Attached is a simple test VI to control a motor via serial port. The commands such as "p=1000\r\ss=10\r\sa=10\r\s^\r\r" are specific to the motor and they work.
In this test VI, I used Basic Serial Write and Read.vi to do the serial read/write.
The problem: When the test VI is run for the first time, the first command is executed and the motor moves. The second command is not executed.
When the test VI is run for the second time, the second command is executed and the motor moves again. The first command is ignored.
If we keep running the test VI, this sequence repeats. I really like to have two commands executed within one run of the test VI.
Any help is deeply appreciated. Thanks. JQS