cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

Labview and Modbus RTU

I am trying to interface an NI cRIO with an Alycat Mass Flow Control, using Modbus RTU, with the cRIO as the master and the Alicat as the slave. I am able to read registers easy enough (16-bit and 32-bit) however, I am not able to write to any registers. For example: the Alicat Register for writing a value to a gas is #400046. I am able to write to that address from my RedLion HMI, so I am certain it is correct. The Alicat Modbus Manual says it uses "16-bit inter value 40046". Then, I create a Text Ring in the LV and then edit the values so that 0=Air, 1=Argon................etc.. . I am not super experienced with LabVIEW so I am not sure what my next step is. I tried using different data types and word sizes but nothing is working. So, I am using a UINT16. My Modbus settings are over serial (2-wire), mode is RTU, and I have the "Use function code 16 for single write" enabled but it doesn't appear to be working. Would anyone have an idea as to why this is happening? Thank you much for your time.

Sorry about the duplicate, I placed this in the wrong topic at first.

0 kudos
Mensaje 1 de 6
5.805 Vistas

Hi ceilingwalker,

 

Are you using the Modbus VIs that came with the LabVIEW Real-Time module? If you haven't already, it could be helpful if you explore the "Modbus Library.lvproj" shipping example to see how it codes for a master on an RT target. 

 

Could you post your code or a screenshot to help us see where you're at?

 

Lauren D

Applications Engineer

National Instruments

Mensaje 2 de 6
5.737 Vistas

Greetings and thank you for your reply. I am attaching my project however, I am not sure if I saved it properly or not. I don't have internet access on my laptop with the LV running on it.

0 kudos
Mensaje 3 de 6
5.712 Vistas

Greetings and thank you for your reply. I am attaching my project however, I am not sure if I saved it properly or not. I don't have internet access on my laptop with the LV running on it.

Descargar todos
0 kudos
Mensaje 4 de 6
5.712 Vistas

When I extracted the files, I was only able to open the project. It looks like the .lvlib files and the VI were not attached, could you attach those? Creating a zip of all of the files would probably be easiest.

 

-Lauren

0 kudos
Mensaje 5 de 6
5.680 Vistas

ceilingwalker,

 

Typically function code 06 is used for a single register write, not function code 16.  Perhaps your Mass Flow Controller doesn't support function code 16.

 

-DR2

0 kudos
Mensaje 6 de 6
5.673 Vistas