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.
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
Snip
That's great! Many thanks
The original Point and Click Interface was a Smith and Wesson.