This is very similar to the question asked in this thread. It is indeed confusing to interpret the value, so let me use the same example as in that thread. Let's say that I get a value of -13303809 returned for my archived event. To interpret this value to the actual digital state,
0n13303809 = 0b1100 1011 0000 0000 0000 0001
upper 16 bits = 0b1100 1011 = 0n203 (digital state set 203)
lower 16 bits = 0b1 = 0n1 (first offset within set 203)
So in this case, the value -13303809 means go to the digital state set 203 and return the value at the first offset (offsets are zero-based). To get the state set numbers, you can use piconfig:
@tabl pids @ostr setno,set @ends
Hope that helps!
Thank You - Please let me digest this to see if I get it!
OK I don’t understand! When I convert the example below to either 32 bit binary or 16 bit binary I get different numbers from what you are showing – I clearly am missing something!
For example if I assume a short singed integer I get –13303809 = 0x 0000 = 00000000 00000000
Which is not the same as what you have. What is with the “On”
Normally I just use the "Programmer" mode of the built-in Windows calculator. However, if you're converting online, I use the binaryconvert site. If you follow my link, you'll see the conversion of the number 13303809. Make the value positive first, then convert as a 32-bit integer. Once it's converted to bits, you look at the upper and lower 16 bits separately. I was using "0n" as notation to represent decimal numbers (0b=binary, 0x=hex, 0n=decimal).