LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ecm-1240 energy monitor

Solved!
Go to solution

Hi, masters I have an ECM-1240 Brultech it sends binary packet each 2 seconds through serial rs232, its driving me crazy because i cant read it only garbage on VISA LabView (on the contrary when i program device to send ascii). Need to read each byte and traslate to decimal values to work with them.  I depend of your great help! please show me diagrams im not an expert. Thanks

0 Kudos
Message 1 of 9
(3,737 Views)
Convert the string with the String to Byte Array function. Then you can use Index Array. Combine bytes with the Join Number function.

Hint: make your string more readable by right clicking on it and selecting hex display.
0 Kudos
Message 2 of 9
(3,729 Views)

Thanks Sr. but trying to read voltaje in decimal i get wrong data, maybe the program is wrong?

0 Kudos
Message 3 of 9
(3,717 Views)
Solution
Accepted by topic author DiegoBonilla

Array indices are zero-based.  Your chart of bytes starts with 1.

 

Wire a 3 into the index array.  Drag its bottom border down by one spot.  Now you can get rid of the extra index array.  You've got index 3 and 4  (which correpsond to 4 and 5 on your chart.)

 

0 Kudos
Message 4 of 9
(3,703 Views)

still doesnt work see.. i upload the packet format, thanks for help

Download All
0 Kudos
Message 5 of 9
(3,684 Views)
You don't have the three header bytes present. It seems the data is constantly streaming so you are going to have to synchronize it. Read until the first three bytes are correct. Then read the remainder. After that, you should be synched and can read the entire packet which seems to be more than the 43 you are specifying.
0 Kudos
Message 6 of 9
(3,656 Views)

thanks a lot Srs. grateful help. After synchronized serial input i habe been get volts and current both with only 2 bytes. But this doesn work with other data with more than 2 bytes like:

 

Ch1 Watt-Second Abs Counter where Byte 6 = LSB and Byte 10 = MSB. Help me please. See my test3.jpg

0 Kudos
Message 7 of 9
(3,614 Views)
Solution
Accepted by topic author DiegoBonilla
You can't just ignore the other bytes and you can't convert 5 bytes to U16 (two bytes) or U32 (four bytes). You can use multiple joins, you know.
0 Kudos
Message 8 of 9
(3,601 Views)

I'm trying to do what you said but it have not been successful...i was wondering if you can make a little diagram please

0 Kudos
Message 9 of 9
(3,585 Views)