121
Technical support / Re:PRINT #4 Shutting down
« on: January 16, 2018, 07:45:10 PM »
It appears that your code exited the WHILE loop after receiving the first line and then you execute the PRINT #4 "</>" command, which then close the connection.
So you may need to change the program a bit. Yet you do not want the CPU to be stuck in the WHILE loop inside one custom function all the time. So you should implement a state machine so that the ladder program get to continue to execute and this custom function is then re-enter on the next ladder logic scan.
So you may need to change the program a bit. Yet you do not want the CPU to be stuck in the WHILE loop inside one custom function all the time. So you should implement a state machine so that the ladder program get to continue to execute and this custom function is then re-enter on the next ladder logic scan.