NI Labs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

NI LabVIEW Modbus API Discussion

You could try the Plasmionique Modbus Master library. It handles the transaction ID differently, allowing for TCP packets to be received out of order without causing an error.

 

Plasmionique Modbus Master Toolkit for LabVIEW - Download - VIPM by JKI

0 Kudos
Message 521 of 527
(1,719 Views)

Hello, 

 

I wanted to give a quick update on some of the Modbus communication that I was doing previously. 

 

With the help from ShivamSaxena, I transitioned into a case structure-based data collection loop. This helped me keep distinct states during the process of data collection separate and allowed me to debug knowing what part of the case I was erroring at. I also made some changes to the way that the program samples with the advice about the wait time as well. You can see the new structure below:

Tomwell17_0-1654883374206.png

 

If you notice the modbus master on the left side, I changed my communication to serial. Previously, I had been wiring the weather station to an RS-485 to ethernet converter and trying to do TCP protocol for the data collection. This was giving me a headache with the error 56 and I cold not figure out if it was failing at the weather station, ethernet converter, or the LabVIEW script. I ended up adding in a local router between the converter and my laptop to see if that helped, tried another ethernet converter from a different manufacturer, and even tried different computers. Nothing resolved this so I bought a serial converter and have had no problems since this transition! I am far from an expert at Modbus communication but the amount of time I put into debugging the TCP master was an issue. Maybe this will help someone in the future so I decided to post some updates.

 

Thanks for the help from the forum!

 

Message 522 of 527
(1,689 Views)

Hi All,

 

Wanted to see if somebody could help me understand how to utilize the Modbus RTU protocol with a DAQ, I haven't ever gotten into it before so it's very new to me 🙂

 

 I am using a DGH D8200 DAQ unit with a pressure transducer in a 4-20 mA loop. I have been able to get a successful setup within DASYLab, but would like to transition to LabVIEW instead.

 

I have gotten to a point where I can establish some sort of connection with the DAQ, the VI is not giving me errors. However, I am only getting a value of 0 out of the channel. I'm trying to configure it in the same manner that I did on DASYlab, but seem to be either missing or not seeing where to establish some points.

 

Here is what my configuration for the DAQ is on DASYLab:

jaskulskib_0-1660670581000.pngjaskulskib_1-1660670591606.png

 

As for my VI, I have kept it simple, only to read inputs registers and show the values. This VI is from an example that DGH provided, but featured outdated modbus functions:

jaskulskib_2-1660670732306.png

0 Kudos
Message 523 of 527
(1,603 Views)

Hi,Mark,
I also encountered error 539193 when using Modbus/TCP. Error 538193 popped up a few minutes after I connected the device to communicate. Could you give me some solutions to this problem?

0 Kudos
Message 524 of 527
(1,066 Views)

Hello all,

I am using the library to connect a PLC Modbus master through TCP, which dims LED drivers over different protocols.

Everything runs fine, but I split all my dedicated functions in separated VI's and I would like to build these separated VI's in DLL by means of the application builder add-on.

Unfortunately, it shows an error when I am trying to selected the considered VI's, as they contains Labview classes terminals (see the attachment).

A main VI executing all these separated functions runs well in the builder.

 

Do you see another solution, please?

 

Thanks and kind regards,

Nicolas

0 Kudos
Message 525 of 527
(967 Views)

This question is more about using the application builder.  You should ask your question in a forum or thread dedicated to that, but it's been a while so maybe you've resolved it already.  My guess is that you have to build the whole class into the DLL rather than just isolated functions.

0 Kudos
Message 526 of 527
(742 Views)

Hi Carlos,

Thanks for your answer. All my apologies, I did not find the dedicated applicaiton builder forum.

I finally solved the issue by exporting the VIs as .NET interop assembly.

0 Kudos
Message 527 of 527
(733 Views)