11-04-2019 09:58 AM
Hey!
I have a serial communication with rs232 and modbus rtu. I made a connection verification check diagram and I would like to start sending other signals. The problem starts here, I need to disable the continuous connection check and turn on the rpm read signal I tried using 2 case structures and one button to turn on one and turn off the other diagram but the connection verification check continued looping although from the front panel I changed the boolean value to false.
Below you can find my VI.
Plus I would love to hear about potential improvements to the existing stuff to make it more neat and readable.
Arda
Thanks in Advance!
Solved! Go to Solution.
11-04-2019 10:07 AM - edited 11-04-2019 10:30 AM
Think dataflow!
Your boolean gets read exactly once at the start of the program and never again! If you want to read the boolean value with every iteration of the loop, the terminal belongs inside the loop. Also, the second case structure cannot execute until the first one has completed.
To select between two different code paths, one typically would use the two cases of a single case structure, not two case structures with one empty case each.
I recommend to start with a few basic tutorials. There are helpful links at the top of the forum.