How to detect the correct sequence of Boolean switches pushed

Hello

My program is all what I want too. However, I need to have the Boolean switches (digital inputs when wired to the equipment) be detected in the right sequence. There are 16 switches on a Board of material. The test subject is displayed 3 colors before hand and the sequence of buttons to push when prompted on the screen with one of the colors, each color pertains to a specific sequence of 4 switches pushed on 16 as quickly as possible. The sequence of buttons remains always the same according to the three colors red, yellow, blue.

In the program, which is 99% working properly I tried to use a sequence of plate. It will give me a real if I hit the switches correctly - but will also give a real if I hit them back etc... I thought that a flat sequence is read from left to right?

Then I messed around by using a structured event - the array of switches, pushed index and compare it to a table of values control. I understand how it works, but the correct code is elusive.

I have attached a picture of program I did but it lacks the proper sequence. (Flat sequence)

I have included the code for the structured event that I messed with. Don't laugh - I was just making experiences - I've never used a structured sequence before configuration.

Hope someone can help me.

Ned

Hi Ned,.

Your producer-consumer model is actually very close to work.  In the original version of screenshot, it seems you are trying to use the structure of sequence to capture the order, but in reality you will capture only the AND logical of all the 4 buttons with no information about the order in which they were pressed.  The structure of sequence does not by itself is waiting for an event to happen inside the frame, it which means that all 4 frames read as fast as the processor moves to their reading - which will be very fast.

I've made a few changes to your VI and renamed him Rev 1.  See if it makes a little more sense with the notes I made on the front panel.  I also did a different version with a loop simple and some added functionality (-Ko), just in case Your ' e interested in another way to look at it.

Kurt

Tags: NI Software

Similar Questions

  • How to detect the sign of a number?

    I output which gives the number of negative or positive. My problem is how to detect the sign of the Boolean number and output? For example if the input number is negative as - 23.11 I want to output the value false and if the number is positive as 17.99 I want to output true.

    T H A N K S!

    Test if the number is greater than or equal zero.

  • How to detect the key ALT pressed in os7

    Hai,

    How to detect the key ALT pressed in Os7...

    Can I use the source for os 7 as below? ,

    protected boolean keyStatus (int keycode final, time final int) {}

    If (Keypad.key (keycode) == Keypad.KEY_ALT) {}

    ...

    Returns true;

    } else

    Return super.keyStatus (keycode, time);

    }

    and also I want to know which is the return of this method? In detail
    How to detect the other touches also?
    What are the updations or changes in the code, on os6 os7?

    KeyCode is a bit model, if you use "is" to compare you won't get accurate results, you should use the operator '& '.

    See
    http://supportforums.BlackBerry.com/T5/Java-development/detect-ALT-and-shift-key-clicks/Ta-p/444976

  • How to detect the window closing event and to do some tasks before leaving

    Hello

    Someone knows how to detect the window closing event and to do some tasks before leaving?

    Sridhar

    Structure of the event allows to detect the window closing event. In the structure of the event,.

    Select this VI-> close round table for this task. See attached picture.

  • How to detect the number of created quickobjects

    How to detect the number of quickobjects created? quickobject are quickbox2d.

    Basically, I have a timer that will countdown to 4 seconds and it will create a falling ball, it will get removed when she falls down. However, I want only there so that if more than 5 bullets are in step, it will cease to create until it is less than 5 to start creating some balls again. Is there a way I can do?

    It's the timer to create the ball

    If (! _ballCreation_timer) {}

    _ballCreation_timer = new timer (4000);

    _ballCreation_timer.addEventListener (TimerEvent.TIMER, _onBallCreationTimer);

    }

    _ballCreation_timer. Start();

    Function which create the ball based on clock

    function _onBallCreationTimer (e:TimerEvent): void {}

    _doCreateNewBall();

    }

    function _doCreateNewBall() {}

    _ball_quickobject = sim.addCircle ({x: PHYSICS_SCALE * (960), y: PHYSICS_SCALE * (10), RADIUS: 0.5, draggable: false});

    MAKE A LIST OF BALLS

    _balls_array.push (_ball_quickobject);

    }

    This is the part where if the table (QuickObject) ball falls down and are destroyed

    addEventListener (Event.ENTER_FRAME, _onEnterFrame);

    DRAW EACH BALL FALLING OUT OF THE SCREEN

    function _onEnterFrame (aEvent: Event): void {}

    for each (var quickObject: QuickObject in _balls_array) {}

    BALL FALLING OUT OF THE SCREEN?

    If (quickObject.y / PHYSICS_SCALE > 1080) {}

    _doHandleBallOffScreen (quickObject);

    }

    }

    }

    DESTROY THE BALL FALL OFF THE SCREEN IF

    function _doHandleBallOffScreen (aQuickObject: QuickObject): void {}

    DESTROY THE OBJECT

    aQuickObject.destroy ();

    REMOVE FROM THE CUSTOM TABLE

    _balls_array.splice (_balls_array.indexOf (aQuickObject), 1);

    }

    check the length of _balls_array.  If it is greater than 5, do not create another bullet:

    If (! _ballCreation_timer) {}

    _ballCreation_timer = new timer (4000);

    _ballCreation_timer.addEventListener (IMER TimerEvent.T, _onBallCreationTimer);

    }

    _ballCreation_timer. Start();

    Function which create the ball based on clock

    function _onBallCreationTimer (e:TimerEvent): void {}

    _doCreateNewBall();

    }

    function _doCreateNewBall() {}

    If (_balls_array.length<>

    _ball_quickobject = sim.addCircle ({x: PHYSICS_SCALE * (960), y: PHYSICS_SCALE * (10), RADIUS: 0.5, draggable: false});

    MAKE A LIST OF BALLS

    _balls_array.push (_ball_quickobject);

    }

    }

    This is the part where if the table (QuickObject) ball falls down and are destroyed

    addEventListener (Event.ENTER_FRAME, _onEnterFrame);

    DRAW EACH BALL FALLING OUT OF THE SCREEN

    function _onEnterFrame (aEvent: Event): void {}

    for each (var quickObject: QuickObject in _balls_array) {}

    BALL FALLING OUT OF THE SCREEN?

    If (quickObject.y / PHYSICS_SCALE > 1080) {}

    _doHandleBallOffScreen (quickObject);

    }

    }

    }

    DESTROY THE BALL FALL OFF THE SCREEN IF

    function _doHandleBallOffScreen (aQuickObject: QuickObject): void {}

    DESTROY THE OBJECT

    aQuickObject.destroy ();

    REMOVE FROM THE CUSTOM TABLE

    _balls_array.splice (_balls_array.indexOf (aQuickObject), 1);

    }

  • How to detect the color pages in a PDF file?

    I use a plug-in of Acrobat C++ read/modify a PDF file.

    I need to get the total number of pages in the PDF file and the page numbers of the pages in color.

    So far, I was able to get the total number of pages using PDDocGetNumPages() with no problems.

    However, I can't find an API that lets me know if a particular page is color or not. Is there a way to do this?

    Thanks in advance!

    But what happens if there are RGB data which means black or grey (R == G == B), that means black or RGB?

    There is a code sample in the SDK to browse content in the PDF file, and then you can get the color space and color of each object.

    But you really need to do background research on the colors & spaces to achieve this properly.

    From: Sachintha81 [email protected]<>[email protected]>

    Reply-To: "[email protected]<>[email protected]> ' [email protected]<>[email protected]>" "

    Date: Wednesday, February 8, 2012 16:57:10-0800

    To: Leonard Rosenthol [email protected]<>[email protected]>

    Topic: How to detect the color pages in a PDF file?

    Re: How to detect the color pages in a PDF file?

    created by Sachintha81http://forums.adobe.com/people/Sachintha81> in Acrobat SDK - see the discussion complete onhttp://forums.adobe.com/message/4194889#4194889

  • How to detect the operating system to PDF using javascript

    Hello

    How to detect the operating system to PDF using javascript. (Javascript console)

    Thanks in advance.

    App.Platform will return "WIN", "MAC" or "UNIX".

  • After deployment got "404 Not Found".  How to find the correct URL?

    For the experienced:

    Preparing to deploy my application, I use JDeveloper 10.1.3.4 to deploy the application on the server standalone oc4j included in JDeveloper. After deployment, I get the error "404 Not Found" when trying to invoke the application in a browser. The deployment seems OK, because the log in JDeveloper window showed no error executing deployment from inside JDeveloper. So I guess the question is how to find the correct URL to invoke the application. Here are the steps I took to make the deployment.

    First, I installed the standalone oc4j by running the .bat < jdev_home > \jdev\bin\start_oc4j file. Installation is OK because I have deployed the application SRTutorial and invoked successfully in a browser.

    The WAR file has been created by right-clicking on the ViewController project and select this option to create a WAR file. At the root of the application its own name, I typed "ZB" in the area of the root of context.

    Then in ViewController-> resources, right_click the deployment file (ZBOV.deploy) and chose ' deploy to "the local_standalone_oc4j. Messages in the Journal of JDeveloper window for deployment are all nice and clean without errors.

    I then used this url to invoke the application deployed in a browser:

    http://localhost:8888/ZB/faces/staff/login.JSPX

    But I got an error "404 Not Found". Immediately, I tried citing the application of SRTutorial, and it works fine.

    Login.JSPX is one of the pages of the application. In the browser of the application, it is with other files in the content of ViewController/Web/personal folder, so I used /staff/login.jspx after ZB/faces.

    What could be wrong? If the deployment is really successful, how to find the correct url to invoke the application?

    Thanks a lot for your help!


    Newman

    Hello

    According to me, there are 2 possibilities (could be more that I'm not aware of if :)).

    1. your deployment profile has been changed to use a different context root.
    2. your request has not been installed correctly.

    To 1, try to create a new deployment profile and leave the values by default as it is the case, run the jspx page, get the root context, deploy the application to a different OC4J instance (using the new deployment profile), and then run the application with the context root, that you received from the embedded OC4J.

    For 2, check the log file and see if you had any error / exception.

    HTH.

    Arun-

  • How to detect the cFP-1804

    Hello

    I have a cFP1804 connected to a cFP2120 via EThernet.  The cFP1804 has a thermocouple installed package that is read once per second the 2120 by using the 'FP Read.vi"(see file attachment). When systems are interconnected, the correct values of returns «FP read» When disconnecting from the cFP1804, "PS read" still will continue to serve the received values but triggers error 33800 until the connection has been restored. So far so good.

    The problem I have happens when you reset the cFP2120 while the cFP1804 is offline. At that time a single "FP read.vi' will cause the program running on the cFP2120 to stall completely.

    No idea how to get around this problem?

    I'm using Labview 8.2.1 with RT version 5.0.1

    Thank you

    V

    Hi Volker,

    You can detect the RT and network objectives using the replication VI system. An explanation can be found in NI Developer Zone tutorial: replication of system of target in real time at http://zone.ni.com/devzone/cda/tut/p/id/3937. The download link is at the bottom of the page. Be sure to read the included Readme for installation instructions. If you run the VI find all targets, you will be able to test if the cFP-1804 is on the network.

  • How to detect the stop scrolling

    Hi all

    I am currently working with the Bold and Storm, JDE 4.6.0 and JDE 4.7.0 respectively. I have the following question: How can I detect when the user stop scrolling? I have set up a ScrollChangeListener.scrollChanged () that detects when the user begins to scroll through the screen. At the moment, I put a Boolean variable in the true, but now I need to put the same variable to false when the user stops scrolling and I don't know how to do it. Any idea?

    Is there another listener or event that it would be useful for detecting the start and stop scrolling or the movement on my screen?

    Thanks in advance for your reply,

    Gabriela.

    Try to implement a TimerTask with Timer class to check the status of scroll each time.

  • How to set the correct active calorie goal

    How can I calculate correct Active calories?

    Hello

    To change the daily goal of moving (active calories) (this can be done at any time):

    • Open the application of activity on your watch:
      • Tap on the complication of business cycles.
      • Or go the home screen (via a simple press on the digital Crown) and tap the app of the activity (coloured rings).
    • Of any where in the application of the activity, firmly press the screen > type on goal to move the change > choose a new goal by adjusting the target it.

    Every Monday, Apple Watch provides a weekly summary of your achievements in moving. Basically, this may include a change suggested in your objective of moving. Scroll to the bottom of the notification to accept or change any proposal to amend or change the goal for the week next to any other preferred level. If the summary is not immediately seen at the reception, you can open it later the Notification Center (which is accessible by sliding down on the screen during the time display).

    To check that you have decided to receive the weekly summary:

    • On your iPhone, in the application of the watch, go to: My Watch (tab) > activity > scroll to weekly summary - make sure it is turned on.

    More information:

    Use the activity on your Apple Watch - Apple Support

  • C# teststep: how to pass the correct Visa instrument reference?

    Hello

    in c#, I have created a DLL for an instrument with functions as initialize, SetVoltage, close.

    In the Initialize function, I create the object of this session with:

    RM = new ResourceManager();
    Instrument = new FormattedIO488();

    Now, I put the Initialize function in TestStand as a 2014SP1. NET-Module-NumericLimitTest.

    When you open the properties of my new step in the Type Editor there is a button "default Module" where I can choose the function of c#-DLL.

    "All parameters are displayed (such as VISA / addresses) and also an additional parameter 'Return value' reference object ' OUT that was added by TestStand.

    -> I store this value in a StationGlobal.

    The question now is:

    If I have more than one device of the same type (means two or more calls Initialize) how can I pass references saved to the next function (SetVoltage) that is performed on the correct instrument?

    Thanks for help

    Resolved:

    Select "Use object existing" UN - Net Invocation and past the reference saved in there.

  • How to detect the resource (find) information?

    Hi all

    I'm trying to detect programmatically information resource name for devices HSDIO PXI and PXI-4130.   How can I do?    System DAQmx property does not include these devices, and I can't find a way to convert a resource VISA name in name of resource HSDIO or NI DC PS formats.  I enclose a code snippet that detects resource VISA for a device 6552 name, but I can't seem to figure out how to get the name of MAX the device resource.   Both the niHsdio and the properties of 'name of the resource' OR DcPS requires that you spend a session valid in them need valid resource name andI to make...

    And no, asking the operator to launch of MAX and find the name of the resource is not an option

    Thank you

    Hello

    Modular instruments and devices devices use their own set of screws to find devices in the system. The lybrary called NOR-ModInst and i's includedin the palette of the utility with the MID drivers.

    Here is a small example that demonstrates the use of their base.

    Let me know there are questions of the amy

    Kind regards

    JC

  • How to detect the number of channels on an oscilloscope?

    I have various models sitting around the laboratory, some two-channel, a few four-channel oscilloscope.  I would like for my program to be able to detect the number of channels is available.

    I can just tell my program how much string is available based on the model number, but is there a VISA command to request scope directly what channels he has?  I would also be able to ask what, if any, ability to function math there.

    "all drivers of the oscilloscope must return the instrumentID after initialization, and that should be enough to know the number of channels.

    What Albert was referring to is that all compatible drivers IVI in their base class interface have an attribute/property that indicates how many channels has the scope.

    If you don't want to use the driver of the IVI for the scope then maybe download some of the drivers and check the source code to see how they calculate this dynamic repeated capablity.

  • How to detect the movement of components in PaneView event?

    Hi, there! ~

    At first please let me explain what is my development environment, I am develping apps based on BlackBerry JRE 6.0.0 by Eclipse and I'm debugging my apps on Simulator (BlackBerry 9800, 6.0.0.706) and peripheral (BlackBerry 9900, 7.1.0.912)

    I'm starting a new application which is a multifunction, during the wake I want to use a new layout UI for me, I've already imported from the code named "PaneManagerDemo" example and I built a framework in my application, I initialized TitleView as HorizontalScrollableTitleView and add titles and content.

    I also used a UI component custom named "ListStyleButtonField" come from the official web site of blackberry, once all the ListStyleButtonField of accumulated height exceeds the height of the content field, which cause the ListStyleButtonField lost her concentration and I do not know the focus was left to the last content topic whose screen slipped to finally make the time.

    My question is is it possible to detect the components slide event, I'll focus on the ListStyleButtonField what is the top of the content if I can control this event, please help me to solve this problem, thank you! ~

    I already find the method to detect the movement of the pane in PaneViewManager event, by according to this thread How to handle events of TouchGesture

Maybe you are looking for

  • Replacing the battery of Qosmio G30-204

    Hi people, the current battery I have takes about 10 minutes after full load.So, I think to replace. The battery I have right now is a PA3475U-1BRS. I can get my hands on a replacement but the model is:PA3476U-1BRS It is the same shape and everything

  • Re: Satellite A200 - 1 M 4: starting very long procedure

    Well, when I turn on my laptop it took a few minutes (4-5) before even Vista begins to work. I have this screen where Toshiba check my system and it stay that the audit of about 5 minutes. I thought that's the problem with Windows, but it's not. Some

  • Deploy on top of running Veristand system definition

    I managed to deploy a definition of a RT PXI system.  I then closed the workspace but not a not cancel the deployment.  The definition of system continued to run on the PXI system.  I have changed since my definition of the system and would like to d

  • Why those my xbox tells me there is a problem with my account and pay a method

    I'm trying to pay for an account or on my xbox but it keeps telling me that there is a problem with my account. He told me to visit https://account.live.com but I'm still confused

  • Can reserved system defragment?

    Running Windows 7.  I have a question about defragmentation. First of all, no problem of claning and Defrag the C drive.  Second, I noticed that 5% is fragmented "System Reserved".  My system won't let me analyze or defrag from this area.  Why does i