05-25-2015 05:51 AM
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).
05-25-2015 09:59 AM
@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.
05-25-2015 11:14 AM
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
05-25-2015 11:40 AM
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.
05-25-2015 01:30 PM
@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.)