11-16-2022 05:52 AM
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
Solved! Go to Solution.
11-16-2022 11:02 AM
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.
11-16-2022 11:10 AM
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.
11-17-2022 06:46 AM
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.
11-18-2022 02:49 AM
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.
11-18-2022 04:01 AM
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?
11-18-2022 04:28 AM
How about Unit ID? Have you given the correct Unit ID.
11-18-2022 06:01 AM
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?
11-21-2022 02:01 AM - edited 11-21-2022 02:14 AM
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
11-21-2022 03:19 AM
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