[Beginner] Boolean lights do not Flash "separately".

I have attached a picture of a part of my code

2 buttons on the left (conditions 1 and 2 of the Statute)

Other sections control the digital part, when I the value 3, the LED (alarm 1/2) will Flash every 250ms, when set to 2, I want it flashes every 1000ms

I think it is the appropriate way to do it, (if there is a better method, please let me know too)

However the problem...

When 1 digital is set to 3, the led (alarm 1) flashes every 250ms. (I want to)

HOWEVER, when 2 Digital is set to "2", the LED (alarm 2) flashes every 1000ms AND 1 alarm flashes ALSO at 1000 ms.

I don't understand why. I changed many sections to test if no other parts of the vi It is touching, but I don't think so.

Thanks in advance

Jbiem wrote:

I have attached a picture of a part of my code

Attach the real VI instead. We cannot debug photos. We can not see other cases, we see even the most terminals.

In all cases, the code seems to be completely 'inside-out '. Why are there no external loop? Why do you need all these variables? You also make equal comparisons on floating-point values, which is generally not a good idea. Why all the points of constraint? How to make the inner loops never full? Why duplicate all the code? The only thing different between each other is a constant of unique schema, so why duplicate everything code internal?

All you need is a simple loop clocked at 250ms outside while then do some logic to blink the LEDS according to the needs.

Tags: NI Software

Similar Questions

  • Stor.E USB HDD PX1399E - 2 20 - light continues to flash red / blue

    Stor E usb hdd, no access that passes light continues to flash red/blue, which means?
    (constant alternating red/blue 2 x / sec., and not not not flashing as read/write)

    * RESOLVED: * already tried several cables, also with dual usb (Y-cable).
    the solution was a cable with an interferencefilter close to the HARD drive.

    Post edited by: borel

    > RESOLVED: already tried several cables, also with dual usb (Y-cable).
    > solution was a cable with an interferencefilter close to the HARD drive.

    Thanks for your comments!

  • the ink lights does not work

    Product name: Deskjet 2050 All - in - one J510a

    Copy in black ink not working, warning lights did not show (and never did).

    Product name: Deskjet 2050 All - in - one J510a

    Operating system: Windows 8, 64 bits

    Copy and printing in black ink do not work.  No light warning flashing on the printer.

    Via the computer, I get the black ink levels (bowtie symbol?) is ok, but less than 25%.

    The cartridge ink levels color is close to zero, it is said.  How ever, when copying, the color works nice

    but printing in black ink does not at all.

    I tried to clean the inkheads twice.

    Should I replace both cartridges?

    Why don't show the printer ink level lights?

    Why computer don't warn me about low ink levels?

    Hi @malin_t,

    Welcome to the HP Forums!

    I understand that the ink lights do not work and you cannot print in black with your HP Deskjet 2050, and I'm happy to help you!

    If you have tried everything in this guide, solve the problems of quality Print to the HP Deskjet 1050, 1050 A, 2050 and 2050 all-in - One Printer Series. Then I would definitely consider replacing both cartridges.

    About the ink levels, there should be an icon of HP printer on your desktop. Double-click it to open it, click the picture of the level of ink in the HP Solution Center, and then click the advance tab Setiings, here you can choose if you want alerts of ink to showed immediately or only when you print.

    Hope this information helps and have a great day!

  • Boolean value does not get stored in table correctly?

    Hello

    I use the following table to store several variables for similar movieclips:

    public var ballPlaced:Array = new Array(false, false, false);
    
    

    ... However, its not to store the Boolean value correctly in the table?

    I use the following code in the ZoneFill and the ZoneEmpty to assign a value true or false, for example;

    ballPlaced [event.target.name.substring (5)] = true;

    I called a trace to ensure that when an individual ball is placed in an area of the ballPlaced Boolean is true, and that seems to work because it returns a true value... However, I then called a trace to see the status of all and that is to say that all instances of the table are false?

    For example, I put ball0_mc in a box and the trace returns the following...

    Placed ball0_mc (true)
    Ball 0 is set, false: 1 ball is placed, false: ball 2 is set, false

    In this case the second line at the beginning should read "ball 0 is placed, it's true." I know I'm missing something critical here, but can't work out why the Boolean value is not get stored in the array?

    Here is my code... pointers would be greatly appreciated!

    package
    {
        import flash.display.MovieClip;
        import flash.display.DisplayObject;
        import flash.events.MouseEvent;
        import Ball;
           
        public class EgoGame extends MovieClip
        {
            public var _zone0Full:Boolean = false;
            public var _zone1Full:Boolean = false;
            public var _zone2Full:Boolean = false;
           
            public var ballPlaced:Array = new Array(false, false, false);
           
            public function EgoGame()
            {
                ball0_mc.addEventListener(MouseEvent.MOUSE_DOWN, zoneEmpty);
                ball1_mc.addEventListener(MouseEvent.MOUSE_DOWN, zoneEmpty);
                ball2_mc.addEventListener(MouseEvent.MOUSE_DOWN, zoneEmpty);
               
                ball0_mc.addEventListener(MouseEvent.MOUSE_UP, zoneFill);
                ball2_mc.addEventListener(MouseEvent.MOUSE_UP, zoneFill);
                ball1_mc.addEventListener(MouseEvent.MOUSE_UP, zoneFill);
               
                ball0_mc.addEventListener(MouseEvent.MOUSE_UP, playMovie);
                ball1_mc.addEventListener(MouseEvent.MOUSE_UP, playMovie);
                ball2_mc.addEventListener(MouseEvent.MOUSE_UP, playMovie);
               
                   
            private function zoneEmpty(event:MouseEvent):void
            {
                if(event.target.hitTestObject(zone0_mc) && _zone0Full == true)
                {
                   _zone0Full = false;
                    ballPlaced[event.target.name.substring(5)] = false;
                }
                else if(event.target.hitTestObject(zone1_mc) && _zone1Full == true)
                {
                    _zone1Full = false;
                    ballPlaced[event.target.name.substring(5)] = false;
                }
                else if(event.target.hitTestObject(zone2_mc) && _zone2Full == true)
                {
                    _zone2Full = false;
                    ballPlaced[event.target.name.substring(5)] = false;
                }
                else
                {
                    event.target.x = event.target._startX;
                    event.target.y = event.target._startY;
                    ballPlaced[event.target.name.substring(5)] = false;
                }  
                }
           
            private function zoneFill(event:MouseEvent):void
            {
                if(event.target.hitTestObject(zone0_mc) && _zone0Full == false)
                {
                    event.target.x = zone0_mc.x;
                    event.target.y = zone0_mc.y;
                    _zone0Full = true;
                    ballPlaced[event.target.name.substring(5)] = true;
                    trace(event.target.name + " Placed (" + ballPlaced[event.target.name.substring(5)] + " )");
                }
                else if(event.target.hitTestObject(zone1_mc) && _zone1Full == false)
                {
                    event.target.x = zone1_mc.x;
                    event.target.y = zone1_mc.y;
                    _zone1Full = true;
                    ballPlaced[event.target.name.substring(5)] = true;
                    trace(event.target.name + " Placed (" + ballPlaced[event.target.name.substring(5)] + " )");
                }
                else if(event.target.hitTestObject(zone2_mc) && _zone2Full == false)
                {
                    event.target.x = zone2_mc.x;
                    event.target.y = zone2_mc.y;
                    _zone2Full = true;
                    ballPlaced[event.target.name.substring(5)] = true;
                    trace(event.target.name + " Placed (" + ballPlaced[event.target.name.substring(5)] + " )");
                }
                else
                {
                    event.target.x = event.target._startX;
                    event.target.y = event.target._startY;
                    ballPlaced[event.target.name.substring(5)] =false;
                    trace(event.target.name + " Placed (" + ballPlaced[event.target.name.substring(5)] + " )");
                }
                trace("ball 0 is placed, " + ballPlaced[0] + "  :  ball 1 is placed, " + ballPlaced[1] +"  :  ball 2 is placed, " + ballPlaced[2]);
            }
           
            private function playMovie(event:MouseEvent):void
            {
                if (ballPlaced[0] == true)
                {
                    ball0_mc.gotoAndPlay(2);
                }
                else
                {
                    ball0_mc.gotoAndStop(1);
                }
               
                if (ballPlaced[1] == true)
                {
                    ball1_mc.gotoAndPlay(2);
                }
                else
                {
                    ball1_mc.gotoAndStop(1);
                }
               
                if (ballPlaced[2] == true)
                {
                    ball2_mc.gotoAndPlay(2);
                }
                else
                {
                    ball2_mc.gotoAndStop(1);
                }
            }
           
           
        }
    }

    have you checked to see what event.target.name.substring (5) is back?  (TIP: check it out)

  • My Airport Express will randomly start flashing orange and I have to unplug it to make it back to the green.  Wifi continues to operate even when the light is orange flashing.  Anyone know why this is happening?

    My Airport Express will randomly start flashing orange and I have to unplug it to make it back to the green. Wifi continues to operate even when the light is orange flashing. Anyone know why this is happening?

    The next time you see the flashing light amber...

    Open Finder > Applications > utilities > AirPort Utility

    Click on the image of the AirPort Express

    If you see a button update, click on update the firmware on the airport

    Otherwise, find status and click on the little orange dot it. A message will appear to say why the airport complained and suggest a remedy for the issue.

  • 'Lights' do not show in windows pop up and pop unders on Firefox for Mac 38

    Since I installed Firefox for Mac 38, 'lights' do not show in windows pop up and pop unders.
    Today, I installed Firefox 38.0.1 and the problem persists.

    I found the culprit: that's the theme Simple white (version 2.2b16).
    I removed it and now everything seems to work perfectly.

  • Apps do not recognize "separated" as incorrect

    Apple Apps such as TextEdit (1.11) or Pages (5.6.2) do not recognize "separated" as incorrect to separate spelling. When I type "distinct" in TextEdit or Pages it does not get a line of red underline, while "separete" or "sepere" only.  A spell check manually triggered also passes over it. Anyone else notice this problem?

    I checked my local dictionary (~/Library/Spelling/LocalDictionary) file and "distinct" is not here, so I haven't added to all ignore lists that I am aware of.

    Anyone know how to fix this?

    Thank you

    Update to OS X. You use 10.7.5, while the current version is 10.11.6. If you are unable to upgrade because of hardware restrictions, there is no solution available as Lion's is more updated with the exception of security updates.

    You can report your concerns to Feedback - Apple Support or bug - Apple Developer report.

  • Police Segoe UI Light does not

    Segoe UI Light does not work in Firefox 8 when you use it in CSS.

    You may need to use additional selectors to get this specific light family group Segoe UI font.

    See this for an example on Arial.

  • Satellite Pro M70: "Caps lock" light will not stay

    After repairs to toshiba in my brand-new laptop pro M70 (System Board has been replaced) I noticed that the caps light does not work when the caps is on. The bulb works as it lights up when you press the caps, but there are not on.
    Although the installation of ceiling works I don't know when the caps lock button is enabled or disabled. Very confusing.

    Any help is greatly appreciated. I am running MS windows XP pro.
    Brendan was soon

    Hello

    You suggested that this light doesn t work since the replacement of the motherboard.
    Am I wrong? In my opinion this is something mechanically. Can not solve yourself.
    In this case I recommend to contact the ASP again and explain the situation. Generally, the warranty should cover the repair procedure.

  • Satellite C660 - 11 H - HDD light is not blinking and laptop extremely slow

    Hi, I recently started having problems with the laptop above, when you start the screen blocks on the screen 'windows', the HARD drive light does not work, either.
    The computer loads up thereafter, but is very slow.

    Please note that the laptop was recently withdrawn only from a relatively sho height - problems began shortly after.

    I think it might be the hard drive, Pls help.

    Thank you

    > I think it might be the hard drive, Pls help.
    I agree with you. It's probably HDD Hat doesn't work properly.
    Hard drives are cheap and you can exchange it alone then I recommend get you the new HARD drive, Exchange, install the original recovery image and test functionality.

    If you need assistance you are welcome.

  • Satellite M30: Wireless light does not come

    My wireless on my laptop light is not.
    I switch wireless enabled but the light does not come and my router is turned on.

    Also, I can't check the local networks.
    Could someone help me identify this problem?

    Hello

    The wireless network card is properly installed and listed in Device Manager? To check first please all NICs.

  • Photon: Notification light works not properly.

    I just got this phone and my notification light is not working properly it works on messages and emails but don't not during the charge or bluetooth as the manual said it would be. Help, please!


  • Xbox one load and play light kit not or white

    When I plug my charging cable it charges the battery but the orange and white lights do not shine. I did a hard reset and made sure its plugged in properly. What can I do more? Or how to fix it?

    Hello

    Your Question is beyond the scope of this community...

    I suggest that repost you in the Xbox Forums.

    "Xbox a Preview program FAQ.

    http://support.Xbox.com/en-us/Xbox-one/system/Xbox-update-preview-FAQ

    'Home'

    http://forums.Xbox.com/

    "Xbox forums.

    http://forums.Xbox.com/xbox_forums/general_discussion/f/3817.aspx

    _________________________________________________

    "Xbox Forums directory.

    http://www.Xbox.com/en-us/forums

    General

    Material & Discussion Services

    Xbox support
    Agent hours: M - F 09:00-17:00 PT

    Law enforcement forums

    Technical support of Xbox Live rewards
    Xbox Live rewards Squad hours: M - F 09:00-17: 00 PST

    See you soon.

  • Jet Pro 100 MFP M175nw, is the Green standby light supposed to flash all the time

    Jet Pro 100 MFP M175nw, is the Green standby light supposed to flash all the time standby

    When the Green led is flashing, the printer is telling is in stand by mode. It should turn solid when a print job is sent to the printer. Your printer works as expected

  • PPP light does not blink

    The ppp of light does not illuminate & cannot connect 2 sites only 2. Always have access to all other Web sites & email. What can I do to fix this?

    Hello

    These websites is secure? You did changes to the computer?
    What Internet browser do you use?

    Method 1.
    For modem problem, you can contact the modem manufacturer. As far as websites are concerned, I would ask to add these sites to the zone of confidence and check.

    Method 2.
    a. If the problem persists, I recommend allows you to optimize the internet explore.
    See the article below for steps optimize internet explore. Also check if you can access these webistes in mode without modules if you have Internet Explorer 7 or above.
    http://support.Microsoft.com/kb/936213
     
    b. If nothing works to solve the issue try reset Internet Explorer.
    How reset internet Explorer?
    http://support.Microsoft.com/kb/923737
    IE reset warning:
    Please note that reset the settings of Internet Explorer running resets all of the settings defined by the user, including those established by the installed extensions, toolbars and other add-ons for IE by default. This includes all the security, privacy and settings area. Also this will erase browsing history, delete all temporary Internet, cookies, form data files and especially all the passwords.

    I hope this helps.

Maybe you are looking for