01-12-2017 02:11 PM - edited 01-12-2017 02:13 PM
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!
01-12-2017 02:22 PM
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.
01-12-2017 03:30 PM
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.
01-12-2017 03:54 PM
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.
01-12-2017 06:26 PM - edited 01-12-2017 06:28 PM
@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
01-12-2017 06:49 PM
@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.
01-12-2017 06:55 PM
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).)
01-12-2017 07:41 PM - edited 01-12-2017 07:41 PM
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.
01-12-2017 07:44 PM
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).)
01-12-2017 08:42 PM
@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.