LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read from a Power Meter with Modbus

Solved!
Go to solution

Hi

I am trying to read power values from a power meter connected to the computer by a USB to rs485 converter. I am using the VI attached but I keep getting the following error: Error 56 occurred at RTU Data Unit.lvclass:Read ADU Packet.vi:5030001 with the possible reason: LabVIEW: The network operation exceeded the user-specified or system time limit. 

I don't know what I'm doing wrong and I'm stuck

 

Thank you

 

0 Kudos
Message 1 of 43
(3,623 Views)

LV 22.3? Why? New is not always good.

What I can say without having seen the code: I use ModBus a lot, also the ModBus VI set from NI. The problem most likely is not in the VIs.

 

0 Kudos
Message 2 of 43
(3,587 Views)

Error 56 is a TCP/IP error, but you say you are using a USB to RS485, which is Serial.  You probably need to correct your setup so you use a serial connection.

0 Kudos
Message 3 of 43
(3,584 Views)

Yes, in the VI I posted I am creating a MODBUS serial master with the LabView VI. If I change the serial type it gives me the same error.

I don´t know if that is what you are referring to because I am new with all these connections.

0 Kudos
Message 4 of 43
(3,536 Views)

Check for the "baud rate" and other serial Communication Parameters "Parity,Flow Control".

 

I have faced the similar issue when the Baud Rate was not Matching.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 43
(3,504 Views)

The baud rate, parity and stop bits match between the VI, the connector and the power meter. The only thing that I don't know is the flow control, I have it in "none" but there are a lot of options, maybe is another one?

0 Kudos
Message 6 of 43
(3,497 Views)

How about Unit ID? Have you given the correct Unit ID.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 43
(3,489 Views)

I choose Unit ID as 1 but because I don't know where I can see what ID the power meter has. In the power meter I can set the address is that the same as unit ID? 

0 Kudos
Message 8 of 43
(3,463 Views)

Hi,

 

The ID and the Address are probably the same.

Normally you don't need flow control when using the ModBus protocol.

Still strange that you get error 56 which a TCP error.

 

Kees

0 Kudos
Message 9 of 43
(3,393 Views)

In the NI MAX I select the connection, wich appears with the name ASRL3::INSTR, I try to test the connection with the VISA test panel an I get the following error: VISA: (Hex 0xBFFF0015) Timeout expired before operation completed. but even if set the timeout option to 20 seconds the error appears after less than 2 seconds.

 

Maybe the error is in the VI, something that I need to set in the MODBUS VIs?

 

Thanks

0 Kudos
Message 10 of 43
(3,375 Views)