From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW vi communication with MODBUS

Don't use the Modbus Init.vi.  You really don't need it.  It has the stop bits hardcoded at 1.

 

Just open it up and look at it.  Mostly, it just does the same things that the Serial Port Configure VI does.  Just use that and set all the serial port settings to what you need.

 

It doesn't even set the device ID like you said.  There is a separate connector terminal on the MB WriteRead.VI that defines the slave address.

0 Kudos
Message 11 of 32
(5,166 Views)

Good call, thank you Ravens Fan.  Now, if I could just get it to not time out...

0 Kudos
Message 12 of 32
(5,164 Views)

Hola Himanshu_Goyal:

Estoy haciendo una aplicacion en Labview para comunicar via Modbus una serie deanalizadores de redes electricas.Si es posible necesito el ejemplo ModBUS.vi y la libreria NI Modbus.llb q le mandaste a Ksurdi, pero en la version 8.5.Saludos:

ing_arr

0 Kudos
Message 13 of 32
(4,866 Views)

Hello Himanshu_Goyal: I'm making an application in LabVIEW to communicate via Modbus series of network analyzers electricas.If may need the example ModBUS.vi and Modbus.llb NI library  you sent him Ksurdi q, but in version 8.5.

0 Kudos
Message 14 of 32
(4,851 Views)

Hi ing_arr,

 

The MODBUS Library for LabVIEW should work in 8.5 for you.

0 Kudos
Message 15 of 32
(4,832 Views)

Hi all

I am using MODBUS as well. I have got respond value in 4 bit Hex string, dut how to convert to floading number?

ex: 0D444104 = 8.2532, 00004248 = 50.0000, B9684092 = 4.5851

 

Please help.

Thanks

Hong

0 Kudos
Message 16 of 32
(4,583 Views)

Hi Hong,

 

I think that this forum will answer your question:

 

http://forums.ni.com/t5/LabVIEW/Convertion-Hex-String-to-32bits-Decimal-floating-point/m-p/412772?qu...

 

 

Andrew T.
National Instruments
0 Kudos
Message 17 of 32
(4,562 Views)

Hello all
i m asking how i can download data from a datalogger working as master using the modbus lib 
Thanks

bilel

Keep Calm and it's gonna be alright !
0 Kudos
Message 18 of 32
(3,391 Views)

Hi routcha,

 

When you say "download data from a datalogger" seems like you need a FTP more than a Modbus connection, modbus is simply another communication protocol. Please take a look at the examples that comes with the library in case they can help you, if not, consider opening a new thread.

 

Alejandro C. | National Instruments
0 Kudos
Message 19 of 32
(3,362 Views)

Hi all,

 

I'm having problems with MB Serial Example Master.vi from the NI Modbus.llb.

I have connected my DTE with another DTE via RS-232 and Ethernet cable. Primary communication is through TCP/IP, secondary (ModBUS) via serial cable.

Both, device and my PC are added in project. On one device I ran MB Serial Example Slave, and on other MB Serial Example Master. 

 

The problem is, when I write in registers from slave, slave and master can read it. But, when i write in registers (holding or coils) from master it is not working.

 

I tried the same with TCP examples and it worked.

 

How could it be?

0 Kudos
Message 20 of 32
(3,264 Views)