04-04-2011 11:35 AM
Hi,
I've written the attached vi, but due to my inexperience I can't see why the data is being acted on before it is fully entered.
Running COM 2 Share_2.vi, both Stepper Slave Address, and Steps can be entered, and the vi will work correctly when run.
Running COM 2 Share COM in WHILE.vi, the stepper motor will activate as soon as a new slave address has been typed and before the new value for steps can be entered.
Running COM 2 Share COM outside WHILE.vi, there is no response to stepper data.
Can anyone point out my error please ?
Many thanks !
Solved! Go to Solution.
04-04-2011 11:46 AM
In "COM 2 Share COM in WHILE.vi" the code in the loop executes repeatedly. There's nothing in your code to cause it to wait for anything.
In "COM 2 Share COM outside WHILE.vi" the controls "Stepper Slave Address" and "Steps" are only executed one time, the values read at that time are used repeatedly in the loop.
04-05-2011 11:27 AM
Sorted, thank you. I had assumed that the data wouldn't be processed by the vi until the Enter Text had been pressed, but anyway I've used a Case Structure to stop the data being processed until I'm ready.