LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with MODBUS: Communicating an array of int16 between twi cRIOS

Hi there,

 

I need to communicate between two cRIOs based on MODBUS TCP. I was trying to send arrays from one RIOn to another, but the second one couldn't even recognized the size of the array it is getting. I could do that with a single (scalar) variable. But when I change the  type to arrays, it seems it does not recgnize arrays. Any help?

 

The main objective is to use MODBUS to receive 1000 bytes of data from another device. Is array the proper data type to be used?

 

Plese excuse my ignorance about communication.

 

Thanks in advance.

0 Kudos
Message 1 of 4
(2,197 Views)

Modbus is used to communicate with a master device (such as your PC) with a slave device that has data stored in registers.

 

I don't understand how you are trying to implement modbus to communicate arrays between two cRIOs.  Why don't you use TCP/IP (examples in the example finder) to transfer data between the two cRIOs?

0 Kudos
Message 2 of 4
(2,192 Views)

Thanks for your reply Ravens.

 

I have to use MODBUS because I am going to communicate with a third party device using MODBUS.

 

I have attached a file that contains 2 projects. I am trying to transmit data 

from the variable zArOfInt16_2 in the project SV_HOST_MODBUS 

to the variable zArOfInt16_read in the project SV_CRIO9024_MODBUS

 

I have used array of int16 data type and bound the above two variables to achieve this. But it does not work as I expect. Any thoughts?

 

Thanks in advance.

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

Amir,

 

Can you be more clear about what is going on? Does the communication give you an error at all?

What exactly happens to the recieving RIO when you try to send the array?

 

 

Daniel

Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,168 Views)