07-08-2011 03:49 PM
How do I convert a string of data from a EX540 wireless multimeter into the measurement value? There are always 14 bytes per com port reading. The serial communication settings for my wireless module is COM4, 2400, 8, N, 1 with XON/XOFF. Maybe someone recognizes this data format because when the display value is zero "0" the serial string is alway a hexadecimal value of 0x1020 3040 5060 7080.
DATA (8 bytes), ATTR (4 bytes), LRC (2 bytes) without CR/LF.
1020 3040 5060 7080 90A2 B0C0 DFEE
Displayed Reading: 0.00000 Hz (This one is in Hz to show zero point.)
1020 3042 5E6E 7080 91A4 B8C0 D7EC
Display Reading: 75.0 F
1020 3441 586D 7080 91A4 B8C0 D9EE
Display Reading: 1678.1 F
1020 354F 5E64 7080 91A4 B8C0 D2E9
Display Reading: OL
Solved! Go to Solution.
07-11-2011 08:41 AM
dman271828,
Looks like the hi nibbles of each byte never change. Some sort of byte identifier. I've attached a vi that strips out the hi nibbles and combines the remaining lo nibbles back into U8s. Notice that two bytes can now be combined to return something that resembles the value you expected. It just needs to be multiplied by a power of 10. Power of 10 is most likely a nibble in the returned data.
07-13-2011 03:35 PM
Your solution is correct!
Here are some more details for the EX540 digital multimeter serial string structure. I wrote a vi that converts the data string by using AND, << bit shifting and then OR'ing them together.
1a2b 3c4d 5e6f 7g8h 9iAj BkCl DmEn
Data 4~7 are just location indicators in the string.
Data 0~3 give the multimeter display value, mode setting, attribute and LRC.
1020 is the string start
3c4d 5e6f c,d,e,f are combined to make a 16 bit unsiged integer of the meter display value
7g8h display sign and mode setting
9iAj mode button and switch setting
j values:
0 Voltage AC
1 Voltage DC
2 Frequancy
3 R/Diode/Beep/CAP
4 Temp
5 10A
6 mA
7 4~20mA
8 uA
9 Voltage 400mV
The final DmEn m, n value is the LRC which is used to check the bit count.