Notifications
Clear all

Whats the Data-Logger format?

3 Posts
2 Users
0 Likes
8,266 Views
(@wooders)
Eminent Member
Joined: 14 years ago
Posts: 30
Topic starter  

Hi, I am trying to automatically read and process a logfile in P-Code.
I have the following hex string from location 1000

95-1B-C2-39-0A-D7-23-3C-07-00-C6-29-83-39-0A-D7-23-3C-07-00-D8-14-93-39-0A-D7-23-3C-07-00

which, when read using the LCS program shows

0.010 0.000370231137 Volt
0.010 0.000250173907 Volt
0.010 0.000280535547 Volt

SInce I need to use the information internally to make a decision (I want to compare to a level and act on the result), can you explain how you translate from the hex to the volt level please?
I have looked at the Little Endian approach and swapping words etc but I am unable to reach the values given. I assume the Volt label is put in by the LCS software as are the column headers that I have not shown.

The original Point and Click Interface was a Smith and Wesson.


   
Quote
(@moderator)
Noble Member Admin
Joined: 14 years ago
Posts: 1044
 

Those datas are floating point numbers (IEEE 32 Bit format).
They are written via the P-Code Programm Nr. 200.
You can also read the datas again via P-Code:

All NF units first write the measurement data (peak power) as IEEE Float, then the frequency, then the sensor type ID (as integer).
You see this quite nicely in the source.
Note: The LCS will automaticaly show the right measurement unit (V; V/m; T) for the logger datas using the sensor ID (e.g. if the E-Fied-Sensor is selected the datas can only be V/m) so the unit is NOT saved in the logger datas.

If you want to write or read IEEE32, you only need to add 10000 to the file ID (not the value!). This makes sure that the interpreter knows that floating point is used.
So its very easy to handle those even via P-Code :D

Snip


   
ReplyQuote
(@wooders)
Eminent Member
Joined: 14 years ago
Posts: 30
Topic starter  

That's great! Many thanks :D

The original Point and Click Interface was a Smith and Wesson.


   
ReplyQuote
Share: