Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Led always on when I stop my loop

Solved!
Go to solution

1. Change the DDT into a single scaler.  It will make the code a little simpler.

2. Use a Build Array outside of the case structure.  This will allow you to just pass a single boolean value out of the case structure.

3. Why the Number To Boolean Array?  If you follow 1 & 2, you can just use a single boolean value.  Even if you don't follow 1 & 2, just use an array constant with just a single False value in it.

 

If you look at the error output of your LED output DAQ Assistant, you will likely see an error along the lines of too many items in your boolean array (does not match number of configured channels).  This is caused by the Number To Boolean Array function (likely giving you a 32 element array when you need a single element).


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 11 of 15
(2,399 Views)

@crossrulz wrote:
2. Since we are dealing with floating points, that probably will not be an issue.

Raw mearurement values are typically quantized to a dozen bits (...or a few more ... or even less if the gain is not set right ;)) so the probability of "equal" is quite possible here.

But yes, properly coded we would probabily define a finite deadband.

0 Kudos
Message 12 of 15
(2,386 Views)

As I connect as you ve done. It not working as led of when I stop program. Could you show me the .VI that You have done due to I will compare with my VI?

 

Many Thank 

0 Kudos
Message 13 of 15
(2,379 Views)

All of my VI is found here: http://forums.ni.com/t5/Digital-I-O/Led-always-on-when-I-stop-my-loop/m-p/3139491#M20033

 

All that is in the TRUE case is a FALSE constant wired to the output tunnel.

 

If you post your latest VI, we can point out what is wrong.


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 14 of 15
(2,374 Views)

@Chairat wrote:

It not working as led of when I stop program. Could you show me the .VI that You have done due to I will compare with my VI?


You need to show us your code.

 

You (somewhat) know how to write to a digital line and you can easily program it such that if the stop button goes true you write a FALSE to the digital line. It is not clear what is causing you all the confusion. This is a very simple thing! There are only two possible outcomes.

 

(Of course if you instead use the abort button in the toolbar to stop the VI, all bets are off.)

0 Kudos
Message 15 of 15
(2,367 Views)