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: 

Modbus (TCP) parallel requests

HI *!

 

I'm using LabVIEW to communicate with IO-modules (both analog and digital) manufactured by B&R. I've multiple loops running in parallel. The loops containing read or write requests to the modbus. Unfortunately it can happen that some request are running at the same time and interfere themselves (error).

My questions is, how can i make a realiable synchronization between the commands on the modbus. Can the MBAP header be useful?

 

Best Regards

TF

 

 

0 Kudos
Message 1 of 3
(3,123 Views)

Hi TF,

 

did you already had a look to this tutorial?

 

Introduction to Modbus - National Instruments

http://www.ni.com/white-paper/7675/en/

 

Best Regards,

Cem

0 Kudos
Message 2 of 3
(2,889 Views)

Hello LabVIEWpros,

 

i have almost the same problem.

 

All in all i have 4 actuators and 7 sensors. In the VI i have only 2 actuators and 1 mode (const) finished, yet.

The 4 actors ( 3 Heaters and 1 Vacuumpump) have several modes (but every actuator will use the constant mode). So iam using cases and eventstructures. The modes are choosed by an Radiobutton,in the cases for the modes iam using whileloop to calculate.

So in referenc to my VI it so, that if i change the modes of one heater, there is no problem. But it sticks to this case structure and i don't come out of this cases.

I can't stop the while loop because the constant mode need it to calculate the puls, and so i can't do anything.

 

In the beginning i thought i program my I/Os parallel but i didn't do it because i think the Modbus TCP doesn't support multiple request.

Am i wrong or works it maybe?

 

What else can i do? Shall i use sequences instead of whileloop to calculate the pulse?

 

I hope my english is good enough to understand what i mean, otherwise please ask me.

 

Thank you for any advice!

0 Kudos
Message 3 of 3
(2,623 Views)