NI Labs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

NI LabVIEW Modbus API Discussion

I've noticed that the RTU and 1 constants were not actually connected to the subVI. Not sure why that happened, but that isn't the issue. I've reconnected them and am still getting the error

0 Kudos
Message 451 of 529
(1,639 Views)

Can you post a screenshot of the VI where you read the holding registers? Are you sure that your reading the right register that is assigned to the holding registers as per the Acuvim Manual? Try reading register 0 and read 2 registers - that should correspond to Frequency. 

 

Shivam

0 Kudos
Message 452 of 529
(1,636 Views)

Here is a screenshot of the holding register code. I will try querying at different addresses to see if that is the issue

0 Kudos
Message 453 of 529
(1,633 Views)

The issue has been solved. It turns out I was querying the wrong port. I'm not entirely sure why or how, as it was listed as COM4 on the Acuview software, and yet COM3 returns data in LabVIEW. Thank you for helping!

0 Kudos
Message 454 of 529
(1,629 Views)

False alarm on fixing the problem. As it turns out, I was only reading echo values from the empty onboard serial port on the computer. I tried reading a bunch of different values according to the manual, including 0, and am still getting the error

0 Kudos
Message 455 of 529
(1,627 Views)

@sbusbyepri wrote:

Hi. I'm trying to connect to an Acuvim power meter with the Modbus library serial master, and I have repeatedly been getting "Error 56 occured at RTU Data Unit.lvclass:Read ADU Packet.vi: 5030001". I am using library version 1.2.1.42. Reading through earlier posts in this discussion, it looked like this is a timeout error? I've tried using the propriety monitoring software and it connects and communicates perfectly fine and quickly. I'm using the Modbus Master Example.vi program to attempt to connect. Any advice on how to get past this error?


I am having exactly the same issue with exactly the same instrument and exactly same sample code!

 

This is my first foray into Modbus any help would be appreciated.

 

BTW: I have tried the Accuvim program for communicating with these meters and it works fine so I am convinced this is not a hardware problem. But for the sake of it I am using a B&B model 485USBTB-2W USB to RS485 adaptor.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 456 of 529
(1,611 Views)

I was actually able to get this to work today! Try checking in NI MAX and making sure your port has the correct baud rate and parity (for me it was 19200 and None). Then, if your parity isn't even (the default on an Acuvim II is none), make sure to add that when initializing the master. This should let you communicate with the device. Hope this helps

0 Kudos
Message 457 of 529
(1,607 Views)

Thanks for the suggestion, but that was not it.

 

Error 56 occurred at RTU Data Unit.lvclass:Read ADU Packet.vi:5030001

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 458 of 529
(1,604 Views)

Could you post your VI or a screenshot of it? A screenshot of the port's properties in NI MAX might also help. Have you changed any of the values in the Acuvim itself?


@RTSLVU
0 Kudos
Message 459 of 529
(1,597 Views)

Got it working, I am not sure what was causing the timeout errors previously but it is working now...

 

I hate it when that happens.

 

Anyway I am having a new error now and will start a new thread.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 460 of 529
(1,571 Views)