NI Labs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

NI LabVIEW Modbus API Discussion

I posted this in the industrial communications area as well....

 

Memory Leak ModbusTCP (New API), and Prosoft Card in ControlLogix Rack...

 

Anyone ever seen this API exhibit a memory leak?

 

0 Kudos
Message 411 of 529
(2,866 Views)

Can anyone PM me the password for the subvis in the Library? The memory leak fix from NI is for the realtime module modbus library that is based on this one. I'd like to verify the memory leak fix with this API as an interim fix before I have to move the officially supported flavor.

 

 

0 Kudos
Message 412 of 529
(2,820 Views)

Hi Supreeth,

 

If you are using Modbus/TCP, you could use a tool like Wireshark for analyzing actually sent packages. If Wireshark would not run on the Modbus Master device, you'd need a hub or switch with mirroring function.

In the case of Modbus/RTU, there must be a similar approach, but I don't have any experience here. Maybe you can get a terminal program to listen to your COM port...

 

Best regards,

Simo

0 Kudos
Message 413 of 529
(2,813 Views)

Hi,

 

I have a system with an host on Computer (LabVIEW Windows) and a target on CompactRIO 9063 (LabVIEW RT). I have a communication MODBUS Ethernet TCP/IP between them (Master on host / Slave on Target). 
On the slave, I use Modbus Slave.lvclass : Write Multiple Input Registers.vi.

On the master, I use Modbus Master.lvclass : Read Input Registers.vi.

 

Are you sure that there is a MUTEX implemented which ensure that reading registers are not writed by the slave in the same time ?

Thanks in advance. 

0 Kudos
Message 414 of 529
(2,727 Views)

Hi,

 

I have been using the Modbus Library API for a few months but, I am struggling to use it within the context of the sample projects provided by NI.

 

Does anyone have a link to any sample projects / templates that use the Modbus API in a queued message handler type architecture? Is there a sample project available similar to the Continuous Measurement and Logging' but built with the Modbus library?

 

Thanks,

 

Message 415 of 529
(2,708 Views)

I am trying to locate the source of error 538172. What is the meaning of this error coce?

0 Kudos
Message 416 of 529
(2,703 Views)

 


tjack escribió:

Hi Daniel,

 

I am trying to communicate with a ModBus device, that is connected via USB (RS-232 to USB adapter) to my computer. I installed the device with VISA and now I would try to access it with your library. Unfortunately that is not possible, since I am only allowed to use serial or TCP connections.

 

Is there a way I can support you in extending this functionality or is there alreay a solution for this?

 

Regards,

Thomas

 

Edit: I found a solution. My RS-232 to USB converter gives me the option to load a virtual COM port device. It is a FTDI232RL chip. Now I get "Error 56 occurred at RTU Data Unit.lvclass:Read ADU Packet.vi:5030001", where I don't know what the problem is.



Hi!

Did you ever find a solution for error 56?

Im having the same issues using the Modbus add-on.

0 Kudos
Message 417 of 529
(2,467 Views)

Isn't Error 56 just a timeout error?

 

In my experience this means the master is not getting a response from the slave within the allotted timeout. This usually means there is a problem with the connection. Could be for a number of reasons; wrong comport, wire loose, wrong slave id etc.

 

I can enforce error 56 by simply switching off my device.

 

Try using some software like ModbusPoll to test that you are actually getting a response from the slave.

0 Kudos
Message 418 of 529
(2,461 Views)

 Hi everyone,

 

I am trying to control a Modbus device for a program that I am working on. I am using the Modbus Master Example VI to verify that I can establish a connection to the device and also to learn how to use the modbus library. I am having trouble talking to the device. I am using a serial connection so I made the necessary changes to the example to allow a serial connection. I made necessary changes to the starting address variables of the "Write Multiple Coils" function also, and when I try to write to one of the coils I get an error. I am only trying to write to one coil (writing to this specific register sets the controller to communicate via serial connection). When I use RTU mode I get error 538182 and when I use ASCII mode I get Error 56. Previous posts say that error 56 just indicates that a connection is not being made. I have had this problem with LabVIEW and MAX, but I am able to connect serially to the controller with hyperterminal without any issue. One thing I am concerned with is that according to the manual for this product, the termination characters are carriage return followed by line feed and VISA/MAX only allows one or the other, not both. I am not sure if the Modbus functions do this automatically or if I have to specify that, but I cannot find where to specify the termination character. Any help is appreciated.

0 Kudos
Message 419 of 529
(2,197 Views)

Hi,

You can find all Modbus protocol on modbus.org end specially the pdf : "MODBUS over serial line specification and implementation guide V1.02". For understanding Modbus, a good way is to use plasmionic modbus tester. You can access to all the code and see where the errors happens .You write : "I made necessary changes to the starting address variables of the "Write Multiple Coils" function also, and when I try to write to one of the coils I get an error" ; normally on plasmionic you have not to fixe the address but only the number of coils to read. Good coil address is default.

Denis

 

Best regard.

 
 

 

0 Kudos
Message 420 of 529
(2,189 Views)