LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clear digital channels after loop

I'm pulsing 6 LEDs with Labview and the DAQ USB-6351, but I have an issue when the program stops.

I've attached the VI. 

 

The problem appears depending on when the user stops the VI, the LED remains turned on.

I tried to solving this problem by writing false to all the channels, but this gives me a warning every time, and it doesn't solve the problem.

 

Any solutions? 

0 Kudos
Message 1 of 10
(3,865 Views)

What warning/error are you getting?  Why are you trying to read from digital outputs?


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 10
(3,863 Views)

The readings from the digital channels are just to know which state the LEDs are in. 

 

The warning im getting is: warning.PNG

0 Kudos
Message 3 of 10
(3,851 Views)

Stop the task before writing your all FALSE.


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 4 of 10
(3,836 Views)

You mean like this? I still get the same warning. 

 

0 Kudos
Message 5 of 10
(3,784 Views)

Almost.  Why would you restart your outputs right after stopping it?  That's just silly.  All you need is to remove that DAQmx Start that is done right after the DAQmx Stop Task.


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 10
(3,767 Views)

Thanks for bearing with me..

 

When i remove the Start DAQmx, I just get another error:

 

Error.PNG

0 Kudos
Message 7 of 10
(3,743 Views)

Do the final Write (of all False) before you stop the Task (but after you exit the While loop).  The Task needs to be running fin order for I/O to take place.

 

Bob Schor

0 Kudos
Message 8 of 10
(3,727 Views)

Bob, if I remove the stop DAQmx I'm back to where I started. 🙂

 

 

0 Kudos
Message 9 of 10
(3,704 Views)

Any hints? 

0 Kudos
Message 10 of 10
(3,650 Views)