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.

Signature instruction


kirving Aug 20, 2009 12:00 AM

I'd like to log the program signature value in CR1000 data table records, as the records in a table may or may not be generated by the program as indicated in the first table header line.

The value returned by the Signature built-in function, however, does not seem to relate to any of the signatures I see in the logger status table. The CRBasic editor Help says that the function needs to be called at least twice, so I'm doing that, but I don't know what the returned value represents. The example code provided in the Help perhaps implies that a different signature would be returned from different parts of a program.

Can someone explain what Signature returns?

I'll investigate getting the "program signature" directly from the status table.


aps Aug 20, 2009 10:43 AM

Another source of the entire program signature is in each data table header which is stored on your PC if you choose a file format for retrieved data that includes the table header (TOB5, TOB1). So you already have that value recorded anyway, along with the logger serial number too.


jra Aug 20, 2009 02:52 PM

To pull the signature out of the Status table that matches the signature shown in the Table header use something like this:
Public DLDsig
DLDsig = status.ProgSignature

You said: ... as the records in a table may or may not be generated by the program as indicated in the first table header line.

In general, that is not the case. The header including program signature goes with the data in that .dat file. If the program signature changes LoggerNet recognizes it and creates a *.dat.backup file for the data generated by the old program.

Let us know if you have other questions.
Regards,
Janet


kirving Aug 20, 2009 04:36 PM

Until recently I thought the program signature in the table header could be relied on to apply to all the data in the file, but I saw evidence to the contrary in one case. Two remote sites were visited to correct telemetry problems, and a small program change was made to both. At the first site, perhaps due to my flailing with the keypad, the logger tables were reset, but this did not happen at the second site. Subsequent downloads of data via telemetry shows the correct program signature for data at the first site, but shows the current program signature also applying to older data at the second site.

Describing this now, it seems plausible that this effect may be due to lack of telemetry at both of the sites. Our Loggernet server had never made contact with either site, so had no way to detect a change in the program signature. On-site downloads using the same laptop as used there before would probably put the newer data in a separate file, but the server files for the second site incorrectly associate the wrong signature with data generated by a previous program.

Storing the program signature as data in each record would remove the ambiguity in such cases, however rare they may be.

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