LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Flat sequence doesn't execute sequentially

Dear all, I have a flat sequence, the first sequence is to use a button to controll start/cancel of daq and processing, the last sequence is to change the button to default status. 

However, when user cancel the daq and processing (including while loop and wait etc), the last sequence of button change happens before the cancellation finished (before the subvi finished).

 

Anyone can give me ideas why? The simple block diagram is attached.

Thank you very much!

 

0 Kudos
Message 1 of 22
(3,825 Views)

How about posting some actual code that exhibits the issue.  Then we can experiment.  But my initial guess is that something is happening inside of your subVI.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 22
(3,807 Views)

The sub vi is hardware-related and you probably can not experiment here. It have a for loop and some waiting, daq, its own sequence etc.  I don't understand why the last sequence finishes before the sub vi finishes. 

 

@crossrulz wrote:

How about posting some actual code that exhibits the issue.  Then we can experiment.  But my initial guess is that something is happening inside of your subVI.


 

0 Kudos
Message 3 of 22
(3,761 Views)

It wouldn't.

 

Even if we can't run your VI because we don't have hardware, at least we can poke around in it and see something that might be unusual.  Right now your picture is so basic it tells us nothing.

0 Kudos
Message 4 of 22
(3,750 Views)

@binpersonl wrote:

The sub vi is hardware-related and you probably can not experiment here. It have a for loop and some waiting, daq, its own sequence etc.  I don't understand why the last sequence finishes before the sub vi finishes. 

 

@crossrulz wrote:

How about posting some actual code that exhibits the issue.  Then we can experiment.  But my initial guess is that something is happening inside of your subVI.


 


Three Knights of NI doubt that your code is behaving the way you say you observe it behaving. *Note1  We all have DAQmx and if you tell us what device it is we can even simulate the device, if we don't have one handy, we can run the code.  if you tell us what the device is connected to we may even be able to simulate approximate inputs (if you also provide sample data).  

 

Just post the code

Spoiler
Note 1:  I bet we could get at least 9 of 11 to agree

"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 22
(3,711 Views)

@binpersonl wrote:

The sub vi is hardware-related and you probably can not experiment here. It have a for loop and some waiting, daq, its own sequence etc.  I don't understand why the last sequence finishes before the sub vi finishes. 

 

@crossrulz wrote:

How about posting some actual code that exhibits the issue.  Then we can experiment.  But my initial guess is that something is happening inside of your subVI.


 


The more I think about this, the more convinced I am that you are resetting the control inside of the subVI.  We need to see code to verify and/or do some proper troubleshooting of the code to help you any more.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 22
(3,703 Views)

Where does the control reference go inside the subVI?

 

(My empirical rule of thumb: if I see mostly sequences and property nodes, I have serious reservations about the quality of the code we don't see (e.g. the one in the sub).)

0 Kudos
Message 7 of 22
(3,699 Views)

But I don't write to the reference in the subvi, it works as read in subVI.

 

@crossrulz wrote:



The more I think about this, the more convinced I am that you are resetting the control inside of the subVI.  We need to see code to verify and/or do some proper troubleshooting of the code to help you any more.


 

0 Kudos
Message 8 of 22
(3,684 Views)

The control reference connected to the stop button of a while loop in the subVI, let user to cancel the daq.

 

@altenbach wrote:

Where does the control reference go inside the subVI?

 

(My empirical rule of thumb: if I see mostly sequences and property nodes, I have serious reservations about the quality of the code we don't see (e.g. the one in the sub).)


 

0 Kudos
Message 9 of 22
(3,682 Views)

@binpersonl wrote:

The control reference connected to the stop button of a while loop in the subVI, let user to cancel the daq.

So let us see that by actually attaching your VI and subVI.

0 Kudos
Message 10 of 22
(3,669 Views)