Hello Unclebump,
I'm working with LabView, I never used LabVIEW Datalogging and Supervisory Control Module (DSC).
Thank you for the tips with the OPC-server, but I did not manage make proper use of it 😞
But I made some success with the NI modbus OPC-Server 🙂
My serial read signal is e.g.:
6303 0004 0001 CD89 (hex)
1. byte [63] means: bus address 99
2. byte [03] means: read holding
3. byte [00] means: input value
4. byte [04] means: parameter nr 3
5. byte [00] is first byte of the word: "nr of words to read"
6. byte [01] is second byte of the word: "nr of words to read"
7. byte [CD] means: first 8 bit off CRC16
8. byte [89] means: second 8 bit off CRC16
For me is the second word (byte 3 + byte 4) of importance.
0004 (hex) is equivalent to 0004 (unsigned integer(uint)).
I know the value of 0004, it is -10 (or FF9C (hex)),
when I send the signal direct to the MLC9000 the answer
is: 6303 02FF 9C00 15
The last two bytes represent the CRC16 (= 00 15 (hex)).
And the value is represented by the 4. and 5. byte:
FF9C (hex) = -100 (uint)
(So to get the proper value I have to divide by 10.)
NI Modbus OPC sever offers me the data member SD300004,
but the result is not as expected,
it is: 52494136.
When I change the value of the polled address form -10
to -20 this value changes to: 52494236 (difference of 100).
So there seems to be a logic in it. But I'm lost.
Perhaps it has something to do with my hardware, it uses
the "Medicon"-Modbus RTU standard (you can find that in
the advanced settings in the NI OPC modbus server).
The answer is a 16-bit signed integer.
The SD3XXXXX data members represent a 32-bit number,
but also S3XXXXX is not working, when I use the data
member S300004 the result is 800 (for the value -10)
and it is not changing, when I change the value to -20.
Has someone an idea for that strange behavior?
Regards, Stefan