NI Labs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

NI LabVIEW Modbus API Discussion

Marco, 

It might be worth trying the Plasmionique Modbus Master library: https://lavag.org/files/file/286-plasmionique-modbus-master/

It is similar to the LabVIEW Modbus API but is open source and uses VISA resource locking to avoid interruption of message transactions.

0 Kudos
Message 391 of 529
(3,288 Views)

Hi,

 

Small update on my memory leak situation. I contacted support, and I belive a CAR is opened on the issue (CAR:617407) so hopefully someone will look into it. 

 

Wish I could see a list of active CARs somewhere.

 

Regards

 

Mrmas

0 Kudos
Message 392 of 529
(3,263 Views)

Hi, Is a limit to the baud rate that this API can cope with?

 

I'm running v1.1.5.39 on Labview 2015 64Bit to test some firmware on an in-house Modbus RTU slave. If I set the slave to run at anything upto 38400 it works just fine. But at 57600 it fails. The 57600 is a requirement for our product. I can poll the slave with Modbus Poll and other software just fine at this baud rate, but this API seems to stop working above 38400.

 

Thanks, Steve

0 Kudos
Message 393 of 529
(3,210 Views)

Hi everyone,

 

I tried a slave on a RS 485 RTU Modbus trough a USB/RS232 with RS 485 converter. The slave worked fine with the configuration and test software provided by the manufacturer.

I used the same installation with the Modbus Master example from Labview and also with Plasmionique-Modbus-Tester. Unfortunately, I obtained in both cases the error 56.

Looking on this forum, I noticed that many people had the same problem since 2013 and especially with RS232.

I tried to solve this problem using Plasmionique-Modbus-Tester by modifying all the timeouts and also the inter-frame delay but it didn’t work. I only obtained sometimes same bytes off response.

After one day brainstorming, my conclusion was: there are too much software and hardware layers.  All these layers generate each one delay of some microseconds. This finally generates a desynchronization, source off the timeout.

For me, the simplest way to gain time was to avoid the RS 232 hardware conversion (+12v, -12v) which is finally reconverted into TTL signal for the RS485 IC.  The step +12v,-12v is totally useless and source off time spending. So I bought a low cost (17$) USB/RS485 adapter to try it (such a converter has the same circuitry as a USB/RS232 + RS232/RS485 converter without the +12v,-12v conversion step).

After installation everything works perfectly:

  • Labview Modbus Master example
  • Plasmionique-Modbus-Tester
  • Multiple session on the same USB port

I tried the Modbus with two slaves a long time with fast polling without error.

Generating manually a desynchronization (on my new working installation) by modifying the baud rate on the master (9933 at least) instead off 9600 generate the same error 56 , reading or writing the slave. It seems that error 56 could effectively be the consequence of a desynchronization.

Don’t forget to wire Ground between master and slave.

Thanks to everyone who posted on this forum.

Best regards from France.

Denis

Message 394 of 529
(3,192 Views)

Hello to all.

Firs of all thanks a lot for posting and being able to help.

 

I would like to use this library Modbus (http://forums.ni.com/t5/NI-Labs-Toolkits/LabVIEW-Modbus-API/ta-p/3524019).

Somebody can show me how to read variable Y25 from PLC and use it in Labview with this library?? A very simple example will be really appreciate it. I am using RS232.

Or a link where I can find information?

 

Thanks a lot!

0 Kudos
Message 395 of 529
(3,172 Views)

Another think. What is the most recent release? Which version?

1.1.5.39 of this link http://forums.ni.com/t5/NI-Labs-Toolkits/LabVIEW-Modbus-API/ta-p/3524019

or

1.2.1 of this link http://www.ni.com/example/29756/en/ ?

 

Thanks!

0 Kudos
Message 396 of 529
(3,170 Views)

hi people

Im trying to establish communication between plc and labview using modbus library My attempt was successful when i used new tcp master but im trying to do the same with serial input RS-485

but i could not get the result and im not getting error either please look into the vi i have attached and help me fix the problem

0 Kudos
Message 397 of 529
(3,112 Views)

I'm assuming that what you are trying to do is make LabVIEW, running on your PC (Master), communicate with a PLC (slave). Make sure that you select "New Serial Master" on the "Create Modbus Instance.vi" (just before your loop). Also add the "Shutdown.vi" to properly close the modbus session after the loop. That should do the trick.

Message 398 of 529
(3,096 Views)

hi porter

your solution was really helpful thank you for responding 

0 Kudos
Message 399 of 529
(3,089 Views)

hi porter

i have one more doubt to be clarified what is the difference between modbus master api and slave api most of the icons and functions are similar this question may seem dumb but im new to labview help will be appreciated thanks

0 Kudos
Message 400 of 529
(3,088 Views)