LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using modbus labview driver

Dear all,

I have a problem with communicating to a device from my PC using modbus RTU over RS-232 port.

I have framed the data as a string which needs to be sent over the port. This consists of address, function code, data and CRC also.

Now to pass this string over the port, I sought the help of the modbus drivers provided by NI.

I downloaded the modbus library for labview 8.2 and I am now struck with what VI to use to just send this string.

As the data is ready, can you please suggest me, which example to use so that I can just send in the string that I framed to the device using modbus.

 

Thanks  :smileyhappy:

 

Vijay 

0 Kudos
Message 1 of 4
(3,009 Views)

The modbus driver was intended to do the framing work for you !.. Since you have already framed the data, you don't really need the modbus driver 😮

You could simply send the string over the serial port, using basic call to VISA (Intrument In/Out > Serial). Of course, you'll have to manage yourself the communication errors, but since you already are in the process of rewritting the modbus driver from scratch... 😉

 

Chilly Charly    (aka CC)
0 Kudos
Message 2 of 4
(2,991 Views)

 

Dear CC,

 

Oh.. Thanks for that input.

So is there anyway I could reuse the Modbus driver so that I learn to use it for communication over Modbus RTU.

Since I am new to Labview, I have little knowledge about this and so managing the communication and catching errors would be a great task for me to do.

Is there any specific thing I need to do for this or just use one of the Modbus RTU driver examples with just the data and not the framed data.

Which will make my development faster?

 

Thanks,:smileyhappy:

VJ 

0 Kudos
Message 3 of 4
(2,983 Views)

I suppose you have read the LabVIEW ModBus tutorial. This implementation of the ModBus protocol by NI is probably over sized for your application, but learning how to use it from the examples will help you understand a large number of LabVIEW concepts, so it's worthwhile use it.

This being said, you will also learn a lot by simply using VISA serial calls, as I suggested in my first post. If I were you, I would start from there...

Happy wiring ! 🙂 

Chilly Charly    (aka CC)
0 Kudos
Message 4 of 4
(2,975 Views)