LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Second part of Flat sequence not getting executed while given inside a for loop

Hi all,

 

I am using LabVIEW to control an XY stage with benchtop stepper motor controller, in a sequential pattern.

 

The movement of Y axis for 10 mm should be followed by movement of X axis for 10 mm, and this has to execute for 3 times. I have used a flat sequence and a for loop for this operation.

 

However, the first frame of flat sequence is getting executed three times as given in a for loop and the VI gets stopped before executing the second frame of flat sequence.

 

Required pattern: (Move Y axis for 10 mm, move X axis for 10 mm)x3

VI returns: (Move Y axis for 10 mm)x3

 

No error window is appearing when the VI is being executed.

 

The VI is attached here (RelativeMotion.vi). Anyone who understands the error in the VI, kindly respond.

0 Kudos
Message 1 of 2
(681 Views)

Hi Varsha,

 


@Varsha_Vijayan wrote:

However, the first frame of flat sequence is getting executed three times as given in a for loop and the VI gets stopped before executing the second frame of flat sequence.


This is impossible due to THINK DATAFLOW!

The 2nd frame will be executed before the loop can start the next iteration!

 


@Varsha_Vijayan wrote:

I have used a flat sequence and a for loop for this operation.


A statemachine would be a better approach…

 


@Varsha_Vijayan wrote:

No error window is appearing when the VI is being executed.


Did you disable automatic error dialogs?

Why is there no error handling at most of those "MG17" property nodes?

Why are there no error indicators to show (possible) errors when executing your VI?

Did you debug your VI? What did you determine while doing so?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(675 Views)