LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to configure modbus using LabVIEW?

Thank you guys for your help, but I'm searching a Modbus driver on the slave side.
There are commercially available, but they are expensive, compared to the limited use I would do.

Thank you anyway, this forum is a great resource and I learned a lot here since I started developing seriously with LV, one year ago.


Paolo

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 11 of 35
(4,323 Views)

Dear Mr. Srinivas,

         Let us become friends first, instead of you call me sir.

             Here you can do is to just put the parameters which are required, like No of registers, protocol start address, modbus slave address, Modbus function etc. now take all these parameters and generate a CRC for that, to generate the CRC, the VI is given in the MODBUS driver, and MBwaitforserial register is not used anywhere, uptil now, may be it will come in use afterwards, i dont know much more about that, whenever you generate a query, generate a seprate query in each case and whenever u take the reply, take it seperately, in individual case, so it doesnt clash the modbus function and main thing is the case is drived by the modbus functions like 03:Read output Reister,16:Write multiple o/p register etc. and make the sequential case structure, for clearing the port, sending the query and taking the response form the device.

i think which helps you now.

Thanks,
Nishant
0 Kudos
Message 12 of 35
(3,888 Views)

Thanks Mr. Nishant,

can you explain me what is the use of shift registers that are located on a loop?

thanks

Srinivas
Message 13 of 35
(3,894 Views)
HI everyone,
 
There is a Modbus library for LabVIEW 7.1 available from our website:
 
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=F1582737BACF5CA8E0340003BA7CCD71&p_...
 
Unfortunately, I don't have a version that will work on older versions of LabVIEW, but I do have a workaround if you need to install this library in LabVIEW 8.0.  The above installer installs the two files zipped and attached below.  Make sure that LabVIEW is closed before installing.
 
The nimodbus.mnu file can be manually placed in the following folder:
C:\Program Files\National Instruments\LabVIEW 8.0\user.lib\
 
The NI Modbus.llb library file can be manually placed in the following folder:
C:\Program Files\National Instruments\LabVIEW 8.0\vi.lib\
 
I encourage any one interested in further Modbus development to visit http://sine.ni.com/apps/utf8/nicc.call_me and submit product feedback so that we can get a feel for your interest in the Modbus protocol.
 
Message 14 of 35
(4,316 Views)

Thanks Michael,

                    I want to ask that, is this only works on LV8, coz we have the LV7.1 & i haven't tried it, so please help me.

Thanks,

Nishant

0 Kudos
Message 15 of 35
(3,687 Views)

Mr. Srinivas,

                    Use of shift register on the loop is just to increment the count of the functions we have added in to the loop. by attaching it to the variable, the variable will increment after each count increment of loop.

 

Thanks,

Nishant

0 Kudos
Message 16 of 35
(3,844 Views)

so we can have shift registers only in while loop.we dont require these with for loop,m i right?

thanks

Srinivas
Message 17 of 35
(3,840 Views)

No,

                 Absolutely not and another thing, for which purpose u r usig for loop?

               we can complete it through case structure and sequential structures only, no need to use any other loops.

                see this image. that shows you how we have generated the query and this for one case, function 16, and for other cases you can generate the query like this.

Thanks,

Nishant

0 Kudos
Message 18 of 35
(3,836 Views)

Sorry,

I am attaching the image here.

0 Kudos
Message 19 of 35
(4,282 Views)

but the image is nt visible Mr. Nishant.

can you send it again?

thanks

Srinivas
Message 20 of 35
(4,267 Views)