キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

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 件の賞賛
メッセージ1/22
4,901件の閲覧回数

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.



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 件の賞賛
メッセージ2/22
4,883件の閲覧回数

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 件の賞賛
メッセージ3/22
4,837件の閲覧回数

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 件の賞賛
メッセージ4/22
4,826件の閲覧回数

@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

スポイラ
Note 1:  I bet we could get at least 9 of 11 to agree

"Should be" isn't "Is" -Jay
0 件の賞賛
メッセージ5/22
4,787件の閲覧回数

@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.



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 件の賞賛
メッセージ6/22
4,779件の閲覧回数

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 件の賞賛
メッセージ7/22
4,775件の閲覧回数

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 件の賞賛
メッセージ8/22
4,760件の閲覧回数

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 件の賞賛
メッセージ9/22
4,758件の閲覧回数

@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 件の賞賛
メッセージ10/22
4,745件の閲覧回数