LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data is acted on before fully entered

Solved!
Go to solution

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 !

0 Kudos
Message 1 of 3
(2,723 Views)
Solution
Accepted by topic author Placebo

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.

Message 2 of 3
(2,707 Views)

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.

0 Kudos
Message 3 of 3
(2,669 Views)