LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus Library in ASCII mode

Hi,

 

I have download the modbus library, and I want to know if I can use it in mode ASCII and how can I do that ?

 

thanks

Peter.

Labview 2010
0 Kudos
Message 1 of 4
(3,144 Views)

Yes.

 

The Modbus subVI's have inputs that define whether you are ASCII or RTU.  It is an Enum for the MB init subVI.  For the Modbus Serial Master Query, it is a part of the serial parameters cluster that is connected at the bottom of the subVI.

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

It's ok, but the process to send a ASCII command is the same way of RTU mode ?

It's what I do in RTU mode :

Capture.PNG

Should I use it like that for ASCII mode ?

Peter.

Labview 2010
0 Kudos
Message 3 of 4
(3,120 Views)

Yes.  You don't change the way you use the Modbus API subVI's.  The difference is in the underlying subVI's and the way the data is transmitted to the device as hex characters rather than bytes.

 

By the way, you can typecast the single to an Array of U16's rather than to a U32 that you have to split apart and build into an array.

0 Kudos
Message 4 of 4
(3,115 Views)