PDA

View Full Version : How do I log data with Portal Pro?


msellers
02-25-2008, 12:39 PM
In your Portal script, you would make use of the logData() function of Portal.


For example:

def plotval(who,y):
logData(who,y,1024)


The first parameter is the “label” for the data, in this example “ADC”. The second value, y, is the actual data (one sample of the actual data), and the third is a “max scale” value. In this example, we will be displaying values from 0-1023.

In your end device script, you would invoke this Portal function via an RPC call using the Portal address, 00.00.01.

z = readAdc(0)
rpc("\x00\x00\x01","plotval","ADC",z)

Daid
10-13-2011, 02:44 PM
This helped a lot! Thanks.