Queues and events

Dear friends,

I need a small program for the following scenario example

I have a queue, values must be read in the queue and it must be sent through serial port

(1) the mode of filling the queue is initially a set of string value will be filled (I can implement this part);

(2) the user inserts a string to the queue with a click of a button, if the user click on a button for example 'A' should be in queue in the queue, so another 'B' button like that.

(3) if the queue is empty it should be turned over a set of chain in order for example 'P', 'Q', 'R' and then if the user on the new button (say for example 'P' and 'Q' is in queue, just before R is sent, the button was clicked) it must return to the second step and finish it then return to phase III

As part of the event generation is a bit difficult for me, could you please someone provide a basis for this application example (I use version 8.0)

Thank you

Best regards

Tom

Hello Delph,

The easiest way to add additional, based on the separate button clicks events would be to reproduce event here that handles the click of a single button. You can follow the following steps to do this easily:

Duplicate the occurrence:

Choose the new control created in the duplication and the value change event:

Move the new control on front panel and rename the label and/or Boolean text:

As far as sending a set of commands of initialization (which is what it looks like you do), you can simply add a loop after the queue is obtained, but before you enter the loop of the producer. By indexing the loop by a predefined set of channels, you can enter the commands of initialization before entering the loop of the producer. This gives you your commands to initialize before allowing user input.

Tags: NI Software

Similar Questions

  • use the queue and event to read data from two series mean

    Hi all

    I'm reading the data of two serial port using QUEUE AND EVENT but not sccusess. can someone help me?

    I use LABVIEW 2011.

    att my project.

    regrads.

    You stop the second for loop using cluster of error which means that your upper and lower loop stops when you press exit but not the one in the middle. In theory, you should send a queue for loops below when you press the exit button and also make sure that you shoot hunting all queues before closing everything.

  • Job queue and event ADVANCE.

    Hello

    I'm getting to do advanced queues work which could be removed by the use of event in function. For a single message, it seems to work but if I queue of messages more some of them are 'lost' without having been processed. In below code I create job scheduler queue and event. Then I enqueue messages 3 - two immediately after each other and third with 5 delay. Only the first and the third message are processed (and written to the TST_DATA table). In the queue table, it seems all messaged have been processed. RDBMS version is 12.1.0.2.

    Thanks for any response.

    CREATE TABLE TST_DATA (
      sCommand VARCHAR2(50)
    );
    
    CREATE TYPE TST_PAYLOAD_T AS OBJECT (
    sCommand VARCHAR2(50)
    );
    /
    
    CREATE OR REPLACE PROCEDURE processMessage(
      itMsg TST_PAYLOAD_T
    ) IS
    BEGIN
      INSERT INTO TST_DATA (sCommand) VALUES (itMsg.sCommand);
      COMMIT;
    END;
    /
    
    BEGIN
        dbms_aqadm.create_queue_table(
          queue_table => 'TST_QUEUE_TAB',
          queue_payload_type => 'TST_PAYLOAD_T',
          multiple_consumers => TRUE
        );
    
        dbms_aqadm.create_queue(
          queue_name => 'TST_QUEUE',
          queue_table => 'TST_QUEUE_TAB'
        );
    
        dbms_scheduler.create_program(
          program_name => 'TST_PROG',
          program_type => 'STORED_PROCEDURE',
          program_action => 'processMessage',
          number_of_arguments => 1,
          enabled => FALSE
        );
    
        dbms_scheduler.define_metadata_argument(
          program_name => 'TST_PROG',
          metadata_attribute => 'EVENT_MESSAGE',
          argument_position => 1
        );
        dbms_scheduler.enable('TST_PROG');
    
        dbms_scheduler.create_job(
          job_name => 'TST_JOB',
          program_name => 'TST_PROG',
          queue_spec => 'TST_QUEUE',
          enabled => FALSE
        );
        dbms_scheduler.enable('TST_JOB');
    
        dbms_aqadm.start_queue('TST_QUEUE');
    END;
    /
    
    DECLARE
      ltMsg TST_PAYLOAD_T;
      ltEnqueueOptions dbms_aq.enqueue_options_t;
      ltMsgProperties dbms_aq.message_properties_t;
      lrMsgId RAW(16);
    BEGIN
      ltEnqueueOptions.visibility := dbms_aq.IMMEDIATE;
      ltMsg := TST_PAYLOAD_T('test1');
      dbms_aq.enqueue(
        queue_name => 'TST_QUEUE',
        enqueue_options => ltEnqueueOptions,
        message_properties => ltMsgProperties,
        payload => ltMsg,
        msgid => lrMsgId
      );
      ltMsg := TST_PAYLOAD_T('test2');
      dbms_aq.enqueue(
        queue_name => 'TST_QUEUE',
        enqueue_options => ltEnqueueOptions,
        message_properties => ltMsgProperties,
        payload => ltMsg,
        msgid => lrMsgId
      );
      dbms_lock.sleep(5);
      ltMsg := TST_PAYLOAD_T('test3');
      dbms_aq.enqueue(
        queue_name => 'TST_QUEUE',
        enqueue_options => ltEnqueueOptions,
        message_properties => ltMsgProperties,
        payload => ltMsg,
        msgid => lrMsgId
      );
    END;
    /
    
    SELECT * FROM TST_DATA;
    

    Hello

    you're right: after two immediate queue operations and a separate queue there are only two lines in the table

    (tested on 11.2.0.4):

    SQL> select * from tst_data;
    
    SCOMMAND
    --------------------------------------------------
    test1
    test3
    

    If you wait just 1 sec after each DBMS_ENQUEUE there are 3 rows.

    Even with a visibility using DBMS_AQ.COMMIT and COMMIT after that each line there are only 2 rows.

    This mechanism using DBMS_SCHEDULER and EVENT_MESSAGE functionality seems to be a bit slow.

    You must specify the option parallel instance for your business:

    DBMS_SCHEDULER.set_attribute ('TST_JOB', 'parallel_instances', TRUE);
    

    You will get then 3 rows, even without a delay of sleep:

    SQL> select * from tst_data;
    
    SCOMMAND
    -----------------------------
    test1
    test2
    test3
    

    Kind regards

    WoG

  • Application.invokeLater () and event queue size limit

    Analysis of Application.invokeLater () is insufficient. He mentions a "size limit" of the queue of the event but never defines it or said if it is always applied. Therefore, the contract is ambiguous.

    I would really like to know:

    1. am I guaranteed that an executable that I turn to Application.invokeLater () will eventually race, if the event thread doesn't die?

    2. What is the size limit of the event queue and it's always enfoced or only when the event thread did not intervene?

    3 - How is applied the limit? Runnables get just dropped from the back of the queue and nothing happens?

    I tried.

    The platform throws an exception and judge of the application to be unresponsive not once you have planned a not-very-large number of runnables.

    It is a pity that this is not documented and it is a pity that the queue is so short. Now I have to have a queue in my code to avoid this situation.

  • point check queue and LRU list

    Mr President

    I do IE 9i WDP basic-1. OCA 9i.
    I do not get a clear view of the checkpoint queue and LRU list.t.My question is how LRU list and control point that work together?

    for this topic, I got to know (if I'm wrong please correct me) that the LRU list entry is made when a block is updated first. And when the block is updated and updates more he'll mainly used end of the LRU list. and the first gt update block placed in queue.check - point control queued point basically stores RBA(redo_bite_address).and its going to log.is all this interaction with the LRU and checkpoint queue? If so how RBA is generated?


    concerning

    I don't want to do a nit pick, but what you mentioned is not going to go to different locations.

    Satishbabu Gunukula wrote:
    LogSwitch forces a checkpoint, which updates the database disk files.

    Hereby, you should mention that this point of control switch journal actually emits a Checkoint of wire that can be different in a CCR environment and is surely different from a Global checkpoint.

    >
    Specifically, a control point copies the memory to the database server cache pages to the database hard disk file. The server made the copy in a coherent way; in other words, it copies only the results of committed transactions. The result is that all the data in the database file is data validated to run transactions. If the server goes down between the control points, the player will have a coherent and valid (although not necessarily up-to-date) snapshot of the data.
    >

    Completely wrong!

    Control points does not write everything on its own. To be precise, written to happen because of the recovery are trying to be optimized by oracle in these last two versions. Process Checkpoint fires just the DBWR to "check and write" If there is something to do. It is not copy anything to the memory for the data files and certainly committed or uncommitted data have nothing to do with the control points. If a buffer is dirty and we need to offer a space or control point event is the triggering of the buffer to get out for a list of writing, it is emptied anyway, regardless of who its committed or not. Your last line makes no sense to me where you said, "If the server goes down between the control points, the player will have a coherent and valid (although not necessarily up-to-date) snapshot of the data.'." What would happen in an instance crash would be the recovery instance.

    Between control points, the server writes transactions posted to a transaction log. If the server goes down, all transactions committed since the last control point can be recovered from the transaction log. After a crash of the system, the database will start to recovery of the transactions since the last checkpoint.

    Thank you to read what I said just above, recovery has nothing to do with the State of validation of the buffers.

    HTH
    Aman...

  • After you restore an image of my system drive, my tasks and events disappeared. Help!

    I've restored a backup image on my C: drive. Everything looks good except all my events and tasks have disappeared from the calendar!
    I understand that this data is included in my profile, but how do I get my events and tasks and put back them in the calendar? Are the import and export of functions expected to be used to provide backups of my events and tasks? Shouldn't they already appear in the calendar after the restoration of a system disk?

    After a lot of messing around, I think I solved this problem.

    The problem occurs because of an incompatibility between certain values in prefs.js vs values in the data table cal_events.

    I copied backup prefs.js (containing the 'calendar') related lines in the current prefs.js and now everything looks OK, I can see my tasks and events in the calendar.

    The lines looked like this:
    user_pref ("calendar.list.sortOrder", "75f0f98f-9fdf-4bca-9e48-656ff2e1457d 012fd0d9-bcf1-43b1-a98d-6b0117a3f779 511ca361-a646-4f94-880b-526a0a5cdba1");

    These long numbers must correspond to the values of the column. cal_id apparently if they do not match, they do not appear in the calendar.

    Mine does not, so I corrected the values in the prefs.js file and everything seems to go fine now.

    I still need to find the cause of the incompatibility, I think it was something in the way that I restored the disk then run MozBackup to restore my backup Thunderbird.

    Hope this helps others with this problem.

    Many thanks to Gnospen and Matt for their help!

  • HP Envy 4500: Print jobs disappear from the print queue and not print (Windows 7).

    I just bought a HP Envy 4500 printer,

    When you attempt to print from a PC with windows 7 OS home pro (64-bit), the print job appears in the queue and then disappears, but the printer does not print anything.

    Everything else seems to work very well know

    • The printer prints the internal test page
    • The printer does print when you use iPad2
    • The printer does print when you use ePrint
    • The PC recognizes and communicates with the printer (tried with USB connections and wireless)
    • Analysis feature works very well - when initiated from the PC and printer

    I tried

    • uninstalling and reinstalling the software (several times using software from different sources)
    • restart the printer queue service
    • Disabling the firewall
    • running printing HP and doctor Scan
    • following the instructions described here (the question is the same but the different operating system):

    Print jobs disappear from the print queue and print (Windows 8)

    • combinations of all of the above

    Absolutely no joy in any of them, and in spite of more than 2 hours of research on Google and forums search I can't find a solution.

    HP... can you give me a solution or is that goes back to the shop?

    Well I finally worked on the fix myself by trial and error.  I changed the security settings for 'All' and 'Creator owner' to 'Print' and "Administer Documents".  Why on earth they were not automatically allowed as part of the installation, I couldn't really say.

    Hope this helps someone else with a similar problem.

  • The Shutdown() call causes a StartExecution and event EndExecution

    When my application ends, he calls the following my recall of closing the form code:

    If (this.axApplicationMgr.Shutdown () is false)

    {

    e.Cancel = true;

    }

    on the other

    {

    ...

    }

    But before the ExitApplication event occurs, a StartExecution and event EndExecution occur.  Whence these extrinsic events and how can I get rid of them?

    It's normal.

  • How to remove the alarms and events database of Citadel?

    Hello

    I use LV 2010 with DSC.

    I made a mistake in my program and I wrote too much data event and alarm at the Citadel. Database *.mdf/*.ldf files are quite large > 1 G. Normally, I connect only two alarms per day. I want to delete all events alarm + data before a certain time of stamps for example. 1.1.2011. How can I do? I tried to use MAX and perform the operation so I wrote small program which reach the data from temporary database and then remove it. Yet I can find old events and alarms... I am able to remove the traces of old but not the events/alarms. How do I remove the alarms and events?

    Thanks, Jim

    Hi Jim,.

    Have you seen this:

    http://forums.NI.com/T5/lookout/how-can-I-delete-alarm-and-event-data-from-a-Citadel5-database/m-p/5...

    Not sure if it is valid with the current version, but worth it.

  • Edit event managed by this case in LabVIEW 2013 does not show the specifiers of the event, Event Sources and events on screen resolution 800 x 600

    Edit event managed by this case in LabVIEW 2013 shows not specifiers of the event, Event Sources and events on screen resolution 800 x 600.

    As far as I know, the list of supported resolutions is determined solely by the graphics card. It is possible that one used by the PC supports only 800 x 600 as maximum resolution, even if you plug an external monitor.

    Like Dennis suggested, the recommended option would probably be to develop on another PC and only deploy an executable for the industrial PC. That's what we do with our systems (although not because of this problem, but because it makes sense. There absolutely no need to have the IDE installed in most of our systems).

    Other options:

    1. See if you can get an update of the driver from the manufacturer to solve this problem.
    2. Plug a USB Monitor with its own driver.
    3. Try to hide the taskbar and make the smaller title bar in the hope that the bug manifests.
    4. Try remote access in the PC. I think that some remote access programs allow you to specify custom resolutions that are not affected by the original drivers. Remote Desktop seems to be a likely this option even if it has been awhile since I've used it.
    5. Check the BIOS. I saw at least one industrial PC where there was some settings in the BIOS to control the resolution, but I don't remember the details, and it was quite limited. I think that in this case, you can change the resolution, but then the image does not fill the entire screen.
  • Print job is stuck in the print queue and cannot be removed in HP OfficeJet J4680

    Original title: HP OfficeJet J4680

    Print job is stuck in the queue and cannot be deleted.  Convenience store said it is fixed, but it isn't.

    Hello

    I imagine the inconvenience that you are experiencing. I will certainly help the question of fixing.

    To help you suggest several steps to solve the problem, I would appreciate if you could answer the following questions:

    1. what operating system is installed on your computer?

    2. have you made any recent hardware or exchange of software on your computer before the show?

    3. you receive an error code or message?

    4. what store did you try?

    What version of the operating system Windows am I running? :

    http://Windows.Microsoft.com/en-us/Windows7/help/which-version-of-the-Windows-operating-system-am-i-running

     

    Please follow the steps in the link below and check the issue.

    Unable to print? Print jobs are stuck in the print queue:

    http://h10025.www1.HP.com/ewfrf/wc/document?DocName=c02205477&tmp_task=solveCategory&cc=us&DLC=en&lang=en&LC=en&product=3692888

    For reference:

     

    Solve printer problems:

    http://Windows.Microsoft.com/en-us/Windows/printer-problems-in-Windows-help#fix-printer-problems=Windows-7&V1H=win8tab1&V2H=win7tab1&V3H=winvistatab1&v4h=winxptab1

     

    Diagnose and automatically fix problems printing and printer:

    http://support.Microsoft.com/mats/printing_problems/

     

    I hope that the information above helps you.

  • Printer is printingjob in the queue and new jobs keeps printing how to remove all the tasks in the queue? Have a lot of

    Have a lot of jobs in the queue and would like to erase everything and start a new.

    I don't see why you have posted in the forum Feedback, so I moved your post to the windows 'Hardware and drivers' forum.  Please return to your message, click Edit located just below, change the drop-down list of the Windows Version for your version of Windows, then click on submit.

    Click Start > settings > printers and faxes or start > devices and printers.  Double-click your printer.  Depending on your Windows version, you will also need to double-click now 'See what's printing', click Printer > cancel all Documents

  • Cannot print with hp psc 1300------tried to delete print queue and it showed that the "deletion" for more than 24 hours

    my daughter tried to print out a list and it printed a page, then sprayed upward. We tried of the deletes the remaining queue, and the State showed 'delete '. It is on this status since yesterday, I can't print.

    I rebooted and off voltage & power of taking off. I don't know what else to do. Help :-(

    Thank you

    Hello

    The operating system that you are running on your machine?

    Follow the steps in the article below and check if it solves the problem:

    Print jobs are stuck in the print queue and Will not print using a USB connected product
    http://h20000.www2.HP.com/bizsupport/TechSupport/document.jsp?objectID=c00843712&lang=en&cc=us&TaskID=135&ContentType=SupportFAQ&prodSeriesId=306884&prodTypeId=18972

  • Action, State and events, CTF files

    Hello

    In my project, I received a labview program that has a main VI and about 100 SubVIs.  Some of the subVIs are named: Action, States and events. And a Subvi is written for each user action. Actions, States, and the screws of events are CTL files.

    Is - any technique of special programming used in labview for any specific purpose? I am a novice in labview.

    Thank you

    Josée Vilas V

    Vilas,

    The .ctl files are custom controls.  Without seeing them, I can't be sure, but I suppose they could be witnesses typedef'ed enumerated (enum).  These are often used for engines of the action and state machines.

    The state machine is a widely used program architecture. There are examples in the design templates that ship with LabVIEW.

    If you have had no training in LabVIEW, the online tutorial are a good starting point.  It would be very interesting to spend a few hours before your dive in your project.

    Lynn

  • queue and notifying with state machine

    I'm trying to implement a declarant and a queue to collect data that is running on a state machine in two separate loops.  I'm new to the whole and methods notifier queue and I think I'm really close to make it work as I want.  When I start the computer the first time that State everything works and it is what I expected.  When I try to restart the test and do it again she acts like the queue has been cleared and it will not connect anything to the queue.  I use the queue as a buffer for the data collected between iterations of the loop of State machine.  I empty the queue and add all the data in a table.  The declarer seems to work in all situations as I want.  I have attached a simplified version of what I'm trying to do.  Any ideas? Thank you.

    After the execution of your code (I had to make my own custom control to the States because you include not yours) and some survey values, here's the conclusion that I came to:

    It is not your queue.

    It's your math.

    In your upper loop, put sensors on the values you use to trigger the 'True' case (specifically, put a probe on the values to enter your service "superior or equal to") and then watch their values that you run your code.  The value that is coming through the shift register is your problem.  He isn't getting back to zero when you restart the test.  The first time you run your program, the value is zero.  For subsequent iterations, it's everything the last calculated deflection was.  Run your button 'force' down to zero once your test is over and look at what this value.

    Thus, when you restart your test without having to restart your program, you start with a nonzero value for calculated arrow.  Is to prevent your delta never exceed 0.001 in., and therefore your 'Real' case never executes.  So nothing ever shows in your queue.  You do not put anything in your queue.

    The reason why you go to your "complete" State in the lower loop when you hit 0.3 in flexion is because the current value of the 'deviation' is passed through your Notifier and is not dependent on the previous value of the way your queue is.  So you can always hit deflection 0.3 in., without calculated being greater than 0.001 in. delta.

    Try to reset this registry offset value in your greater than zero loop every time that you restart the test, and your program will probably work.

    And Ravens Fan has a point about the complexity.  It usually does.

Maybe you are looking for