01-25-2016 03:14 AM
Hi,
I am using a USB to serial converter to communicate to a PLC inside a while structure.
I am configuring the serial port before entering the loop.
The communication is fine...there is no issue with that.
Now whenever I unplug my USB-to-serial device the loop continues to execute unless I use the 'STOP' button to forcibly stop the loop. Only after the loop stops executing , the error dialog box is thrown.
Can anybody guide me in modifying my program to the achieve the following:
Thanks in advance.
01-25-2016 04:48 AM
Hi,
I have used the unbundle function to read the error status & exit the while loop.
Attaching the edited version.
But my second issue is still unsolved.
01-25-2016 04:56 AM
Put another While loop around all of your code. Have it stop when you press the stop button.
01-25-2016 05:20 AM
Hi,
Thanks.
The while loop around the code works fine , but the outer stop button does not stop the execution.
I have to press the outer stop button then the inner stop button & then the outer stop buttoon once again to exit from the program.
01-25-2016 06:26 AM
Hi,
Only one stop button in the inner while loop does the trick....