Nic04
2008-08-12 03:40:06 UTC
Hi
I am designing a program to control stepper motors. The program uses a modified version of the serial read and write examples.
What the program does is send a signal "I" to the motors which replies with the motors current position. The position is then changed to the next step and written to the motor. The motor is then supposed to reply with "O" meaning the string has been received.
The problem seems to be that the signal "O" from the motor is never returned although the signal is sent to the motor (the motor) does move. On the next iteration of the loop when "I" is sent it recieves the "O" from before which leads to errors.
If I tell the program to not read the second signal (the "O") I still get the same results.
Does anyone know how to fix this problem?
Thanks
Nicola
test5.jpg:
Loading Image...
test45.vi:
http://forums.ni.com/attachments/ni/140/31518/2/test45.vi
I am designing a program to control stepper motors. The program uses a modified version of the serial read and write examples.
What the program does is send a signal "I" to the motors which replies with the motors current position. The position is then changed to the next step and written to the motor. The motor is then supposed to reply with "O" meaning the string has been received.
The problem seems to be that the signal "O" from the motor is never returned although the signal is sent to the motor (the motor) does move. On the next iteration of the loop when "I" is sent it recieves the "O" from before which leads to errors.
If I tell the program to not read the second signal (the "O") I still get the same results.
Does anyone know how to fix this problem?
Thanks
Nicola
test5.jpg:
Loading Image...
test45.vi:
http://forums.ni.com/attachments/ni/140/31518/2/test45.vi