Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

CR1000 GetVariables timestamp


mwilliam Oct 24, 2011 09:56 PM

I am trying to retrieve the timestamp from a remote datalogger (PBA= 102) using the GetVariables (Error102,ComSDC7,-1,102,0,0,"Status","TimeStamp",TS102,1) command, but keep getting error number -16, table not present. I also tried the same command with "Public" in place of "Status", but with no sucess. Do I need to add the Realtime() command in the datalogger I am trying to pull data from? I am trying to pull temperature data (which is working fine) with a timestamp to use as an alarm in my base program. The remote program cycles every 10 seconds, while the base cycles every minute. I am using a reliable RF401 link in PBAware mode with OS version 22 on both of the CR1000s. Thanks. Michael


GeodeNZ Oct 27, 2011 01:46 AM

Hey Mike, had any luck getting it working? I've not had the chance to try this out, a couple thoughts though.
If the loggers are neighbors, you might try changing the -1 to 0 in the Get variables instruction (from auto discover to yes its a neighbor). What is the variable type of TS102?

My guess is you would need to add the realtime instruction to the logger you want the time from. Then on the receiving logger create a variable array with the same number of elements, and try again pulling the time array from the public table it is stored in.


mwilliam Oct 27, 2011 02:17 PM

No, I was trying to make it happen without having to go out to the remote station and reprogram it with the realtime instruction, as it is somewhat hard to access. It is also 3 repeaters away, not an actual neighbor. I have TS102 as a string, but I've tried float, or IEEE4 as well. I was just wondering if it is even possible to pull data from the status table (which is a default table in the CR1000).


Dana Oct 27, 2011 08:11 PM

The Timestamp is not a Status table field, but a calculated value.

You could use the data table access instruction in your remote datalogger to return the timestamp into a variable, and then grab that variable.

e.g., in logger 102

Public Tstamp as string * 25

and

TStamp=Status.Timestamp(1,1)

Then use GetVariables to grab Public.TStamp.

Unfortunately, this would require a program change to your remote.

Dana

Log in or register to post/reply in the forum.