Wiring constants into the queue in a queued, event driven state machine

I'm creating a queued state machine. Every time I change the queue control options to create a new event I have to recreate a constant in each queued event. Is there a way around this? I'm up to 27 events and changing them all is cumbersome. And I'm sure there are more to folow.

Are you using enums for your constants? If so, make a control from one, right click on it and under "advanced" select "customize" and when in the control editor change the pulldown from "Control" to "Type def." Save it with a useful name, and then in the vi in which you originally created it, use it to create a new constant. You will be able to select the different constant values were you need them and now when you want to add or subtract a "named" value you just click on the closest copy of the type def, either control or diagram constant, and choose customize (or double click into the tool editor if you made that choice in the options in the Tool pulldown at the top of the screen). Any changes you make will automatically be replicated everywhere you have used the typedef, whether a control, indicator or constant. Using enums also allows having case statements that have cases with the same names at the "named" value.
Hope this helps and is what you were refering too.
Putnam Monroe
Certified LabVIEW Developer
Certified LabVIEW Developer
Senior Test Engineer
Currently using LV 6.1-LabVIEW 2012, RT8.5
LabVIEW Champion

Similar Messages

  • Queues even driven state machine

        i am working on this software and doing it via queues even driven state machine but Im having problem with. I understand how queues and event structure work but here's my problem. when I pass a massage to my state machine from the event structure via Queues. It works fine then stop. My goal is for the second loop where the state machine is to continue working but not wait on the next message. I tried ot use a time out on the queue but that didnt work. Is there anyway i can do that. I attached the VI. it's not finished yet but you will see what Im doing with it
    check.vi ‏38 KB

    Bob, thanks for your input. I attached the full vi for you to have a better understanding of what Im talking about. Keep in mind though it works it isnt closed to finished.
      My goal is to toggle different boolean that will generating different data. Each Boolean will generate a messgae via event structure to my message handling loop. once the message is passed, that loop will queue in the state of the data to generate. Once dequeued my plotting loop will generate the data then queue it in for display. It seems like there are too many queues being used but that is how I plan to write the VI. I want my 3rd loop to always generate the data so that my fourth one can display but that isnt working for me since the 3rd loop is always waiting on a message from teh 2nd loop ( messge handler). If you foolow the data flow you'll see what I am referring to
    check2.vi ‏499 KB

  • Can't drag files into the queue window on some computers

    For some reason, on my new desktop and my laptop. I cannot drag files into the Queue window in Media encoder. I  have tried dragging avi's, wav, and mp4. As the files I am dragging hover over the queue window, my mouse turns into the "circle with a line through it" pointer and I cannot add the files that way. I can click the plus sign and then browse to its location to add. I just want to have my drag n drop feature working again... Any ideas why i can on some computers and not others?
    I did try running media encoder as administrator. All my computers are running windows 8.1.

    do you have source patching turned on for audio?

  • New version of the LabHSM Toolkit for Complex Event-Driven Development is Now Available!

    A new version of the unique toolkit is now available for download. As announced earlier, LabHSM makes it possible to easily create and then maintain complex event-driven applications in LabVIEW as a collection of HSM-driven active object VIs using a higher level of abstraction and agile software development methodologies. These active object VIs are created based on a universal Hierarchical State Machine ( HSM or statechart ) template. Therefore, all your code looks similar regardless of its functionality!
    So, what’s new in version 1.1?
    • "No hands" block diagram modifications! Version 1.1 actually creates, renames, and removes actions on the block diagram as you define, rename, and remove them in the editor! (No, it can't fill in all the details for you, but it can do some, if you think ahead, by replicating similar actions.)
    • Two new screens, Events Usage and Actions Usage, (available in licensed copies only) clearly show where (in which state(s)/transition(s)) and how (is it an entry action, exit action or event handling action?) a particular event or action is used. Moreover, if after selecting an instance on the list, the Go To button is pressed, it makes the main screen jump to respective location in the HSM structure. In the case of Actions Usage screen, the respective action is also displayed on the block diagram. Thus, these screens provide two more different cross-sections of the HSM data set and two additional ways to navigate it – now along the Actions and Events dimensions too instead of just the state tree in the first version.
    • Version 1.1 can duplicate events or actions, which helps when you've got several that are similar. Changes in the events and actions lists are reflected immediately on the main screen and on the block diagram (which solves the previous problem of deleting a renamed event or action when it's still in use).
    • The Events and Actions List Editors are no longer modal and neither are the Events and Actions Usage screens, so you can have all the panels and the block diagram visible and move freely among them as you build your HSM (a good argument for an even larger monitor).
    • When you save an HSM file, version 1.1 automatically adds the .hsm extension if you leave it out and it remembers the last directory you used.
    • The Loaded VIs utility now can open and close block diagrams (if they are not protected with a password) and display only VIs with modal front panels, if desired—useful for quickly finding and closing accidentally opened (e.g., from the hierarchy window) modal VIs. Make a modal version of this utility and keep it on the Desktop for this purpose.
    • A new example of a simple hierarchical state machine and two more excellent tutorials from Paul F. Sullivan (SULLutions.com) are included into the package. The tutorials are also available online. The overview article has also been extended.
    As before, the LabHSM toolkit is available for UNLIMITED PERIOD trial. Please visit http://www.labhsm.com for details and download. The site also contains references which you may want to check to learn more about hierarchical state machines and active object computing.
    Stanislav Rumega
    NI Certified LabVIEW Developer
    H View Labs
    [email protected]
    US Toll-Free Phone/Fax: 877-570-8684

    I am not really sure if Azure support this but its worth to make your configuration file to support .NET 4.0
    $PShome\PowerShell_ISE.CONFIG and $PSHOME\PowerShell.exe.config will be not existing.
    So you can make an entry in configuration to support .NET framework 4.0
    like shown below
    $config_text = @"
    <?xml version="1.0"?>
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0.30319"/>
    <supportedRuntime version="v2.0.50727"/>
    $config_text| Out-File $pshome\powershell.exe.config
    $config_text| Out-File $pshome\powershell_ise.exe.config
    Close PowerShell Console and open as administrator.
    Try loading the modules back and let me know.
    Regards Chen V [MCTS SharePoint 2010]

  • Dumping the data to XML file (Event driven )

    Hi ,
    Can anybody help me on this requirement .
    Whenever there is an updation or change in the HR Master data like insertion of new personnel number or deletion of personnel number then I need to dump the data to XML file . That means I need to make it event driven.
    Will it be possible programmatically ?
    Please give me your inputs.
    Best Regards

    Hi Bhagat,
    isn't it possible to use change pointers for this?
    Then in partner profile use an XML file port and it should be done!
    Probably this blog could help you:
    <a href="/people/stefan.grube/blog/2006/09/18/collecting-idocs-without-using-bpm">Collecting IDocs without using BPM</a>, have a look at the part where it explains how to write Idoc as XML.
    Hope it helps,
    Kind Regards,

  • Downloading the data to XML file (Event driven )

    Hi ,
    Whenever there is any change or updation in HR master data i need to download the data to XML file. I have written a program to download the data to XML file but i need to trigger this program only when there is a change in HR master data.
    Could somebody tell me how to go about this. Reward points are assured.
    Best Regards

    Hi Bhagat,
    isn't it possible to use change pointers for this?
    Then in partner profile use an XML file port and it should be done!
    Probably this blog could help you:
    <a href="/people/stefan.grube/blog/2006/09/18/collecting-idocs-without-using-bpm">Collecting IDocs without using BPM</a>, have a look at the part where it explains how to write Idoc as XML.
    Hope it helps,
    Kind Regards,

  • Urgent : MDB stops listening to the queues after some time  !!!

    I am using OJMS with OC4J 10.1.2 and db I have a web application which send messages into the queue very frequently.
    But the problem is the MDBs stop listening to the queues after some time (1-2 days) and no more messages will be dequeued from that point.
    All these messages will move to the exception queue after their expiry.
    But the dequeing agains resumes after restarting the OC4J !.
    I guess, at some point mdbs are either becoming busy (locked ) or some exception occured while dequeing, hence they stop listening to the queues.
    Please throw some light on this issue as it is very crucial in my project.

    I've noticed this lately as well, with my iPhone 4. I couldn't confidently pin it directly on any particular iOS update, but my iPhone used to automatically connect up via Bluetooth with my Prius's handsfree feature, and now it doesn't. I work with a CE-based device at my job, with Bluetooth capability, and I used to test out that feature by having it discover my iPhone. This no longer works either.
    What I have found (not really a solution, but it does work and may be a clue for Apple) is that if I simply go to the Settings app then the General -> Bluetooth screen and let it sit there, it will pair right up with my car within a few seconds. Bluetooth is always on, and always says "Now Discoverable" at the bottom of the settings screen.

  • Is there a way to turn off the queue feature in iTunes 11?

    That is, if you're in playlist X, and then select a song from playlist Y, then once that one song is done, it jumps back to playlist X. That is, it just inserts the one song into the queue as the next song.
    This is especially annoying for classical music, where pieces are multiple movements, and it only plays one movement before jumping back to stuff to which you were listening before.

    You could turn on Airplane Mode, then turn wifi back on and listen to Pandora via wifi.
    Also, when the phone rings, you can press the ( - ) volume or sleep button to stop the ring.

  • What is the consequence if I delete the BDoc Messages from the Queue?

    What is the consequence if I delete the BDoc Message (SMW01) from the queue with any state (e.g. intermediate)?

    Hi Alex.
    I had a similar issue with Bdoc. We have had a lot of errors comming through as our CRM & ECC syste were out of sync.
    You need to look into the exact error message before you delete a Bdoc. I would suggest that you do not delete any Bdoc message unless you are sure of the error is and it is fixed.
    Hope this helps
    Edited by: Mohammed Faisal on Jun 2, 2010 4:43 PM

  • Shutting down a queued event state machine with multiple parallel loops

    I am trying to find the best way to shutdown a program that consists of a queued event state machine architecture with multiple parallel loops. Can anyone recommend the best way to accomplish this in my attached VI? (From browsing the forum, this seems to be a common question but I haven't found a solution that works for me.)
    I welcome any other feedback on my code as well, if anyone is willing to offer it.
    My Program Requirements:
    If the user presses the "Shutdown" button, the program should prompt the user with "Are you sure you want to stop the program?" and then either return to the Idle state or proceed to stop the program. Additionally if there is an error, the program should prompt the user with "Clear error and continue, or Stop program?" Then either return to the Idle State or proceed to stop the program.
    Details of architecture:
    The program consists of 3 parallel loops: (1) an Event Handling loop that enqueues various States to a State Queue, (2) a State Machine which enters the latest state that is dequeued from the State Queue, and (3) an Error/Shutdown handling loop which processes any errors in the Error queue.
    During normal Shutdown, in the Event Handling loop the "Program.Shutdown" event case executes, and the States "Shutdown" and "Idle" are added to the State Queue. In the State Machine, the "Shutdown" state is invoked. A special error code "5000" is added to the Error Queue. In the Error/Shutdown handling loop, the "5000" error triggers a prompt that asks the user if they want to stop the program. If the user chooses not to stop, a notifier StopNotif is sent to the "Shutdown" state and "Program.Shutdown" event case with the notification "Go". If the user chooses to stop, the notifier sends the notification "Stop". The Event handling loop and State Machine are terminated if they receive the notification "Stop".
    In case of error, the program behaves similarly: if the user chooses to clear the error and continue, the program returns to the "Idle" state.
    HOWEVER - if the user chooses to stop the program, the program stalls. The notifier that is sent to stop the Event Handling Loop and State Machine cannot be read because the Program.Shutdown event case and the Shutdown state (which contain the "Wait for Notifier" function) are not active.
    I have been able to activate the Shutdown state by enqueuing it in the Error/Shutdown handling loop. But I don't know how to activate the "Program.Shutdown" event programmatically, and thereby access the "Wait for Notifier" function inside it.
    I tried to place the "Wait for Notifier" function outside the event structure, but then the Event Handling loop never completes. Placing timeouts on the "Wait for Notifier" and on the Event structure makes the program work, but I want to avoid using timeouts because I don't want to turn my event-driven program into a polling-based program. I'd also like to avoid using variables or property nodes to stop the loops, because that requires creating a control/indicator for something that the user doesnt need to interact with.
    Thank you!
    Go to Solution.
    Queued event state machine parallel loops empty.vi ‏46 KB

    Thanks for clarifying that, Ravens Fan.
    I marked crossrulz as the solution for pointing out User Events to me.
    I also adopted Ravens Fan's suggestion to keep the Shutdown procedure out of the Error Handling Loop. This has simplified the architecture by eliminating the need for Notifiers. Instead, I have used booleans in case structures to stop the Event Loop and State Machine, and Release Queue to stop the Error Handling Loop.
    For reference, I'm attaching my corrected code.
    Thank you to everyone who helped!
    Queued event state machine parallel loops empty in progress.vi ‏44 KB

  • Time Machine on my iMac won't open iPhoto. It goes to desktop screen automatically. When I select User/Picture/Iphoto library it only brings up the preview page with the size of the folder. I can't get into the library to look for lost photos.

    Time Machine on my iMac won't open iPhoto. It goes to desktop screen automatically. When I select User/Picture/Iphoto library it only brings up the preview page with the size of the folder. I can't get into the library to look for lost photos.

    Thank You. This helps me alot to get into the masters and to see events and photos in a utilitarian way, but it is not as easy as viewing the normal iphoto format to find photos.  Can I do something else or did I not do something right to not see normal iphoto in Time Machine ?

  • Using multiple events structure inside state machine to control the Tab

    Hi y'all,
    Anne here.I have a Tab indicator in my front panel and I want to be able to control the flow of my program based on what controls I clicked inside the tab. I am using a state machine architecture and inside every state, I use an event structure to check for user interaction  to determine the next state and what tab page is going to be displayed next. This means that I am actually using multiple event structures in my application and I use them in just one while loop, but just that they are not running in parallel since I am only using "one event structure per state" which means that only one event structure is running at one time. My questions is, programming technique wise, am I doing it correctly? So far, I am not facing any problem (I am still in the early stage of the project) but I want to check with you all first on your opinion regarding this architecture. Will there be any issue on using multiple event structures in a vi? Since I will be using a tab, and the controls available in the tab will be the controls that will control my event structure for that state, by right, there should be no issue. Am I correct to assume this? Is there any limit on the use of event structures? I have attached here a simple sample of the architecture that I am talking about for your reference. I have attached a 2010 version and a 8.6 version. Let me know what you think or any opinions that you may have.
    Hoping to hear from you soon! Thanks so much in advance!
    State Machine-Event Structure Sample_2010.vi ‏19 KB
    State Machine-Event Structure Sample_8.5.vi ‏25 KB

    Hi jak888,
    I decided to use tabs cause I don't want to have subvi pop ups every time i need to perform the process in the state and show an update in the front panel. This is actually going to be more of an ATE where you will have to choose first whether the one using is the operator or the engineer. If the operator is logged in, she will proceed to choose what test to run (this state will have its own event structure). This part, I don't want a pop up, so what happens is that from Login page, if the user logs in as operator, the tab will automatically switch to the Test Selection page. After selecting the test, it will proceed to Start Test state and the tab will show the Result Summary page. If the user logs in as engineer, then a totally different tab will be automatically shown next and so on. By doing this, I will be able to show an update on the front panel objects without having the subvis pop up. I will also just need to use the call reference functions to call my subvis, making my Main VI more generic. The tab Page header will be hidden so the operator will actually not see that there is a tab and that there are a lot of controls and indicators cause they are hidden in the tabs and that page will only be shown based on what they selected from the main tab. 
    I appreciate your thoughts! thanks so much!

  • How the Queue will be created to process the  Multiple IDOC's into  1 Queue

    Hi Sap All.
    when i went into the Transaction code we14 and when the press F4 for search help in the field  Queue Name it displays me the several queues with the Port referring to B0018(refers to PI Box) ,which means that the IDOC's will be sending to PI.
    here my Question is how the Queues get created ,what is the Transaction code for creating the Queues in SAP-R/3 and how we we setup the SAP-R/3 Box in order to send multiple IDOC's into one queue.overall my question is how we wrok on Queues ?
    could any body help me in driving me to the best way.

    If you have the drivers CD or the LV 6 installation CD, then you could try installing just the traditional DAQ drivers.  I will do a search if I can find them...Good news, I found the drivers that you may need.  Here is the link to download.
    After you install it, look in the vi.lib folder for the DAQ folder and see if you have a dozen
    .llb files. That is where you will find your missing vi's. You may also check into the LV2009 folder to check to
    see if the driver got installed there. I think the driver only gets
    installed for a single version and it might default to the latest at that time (I did not check which one it was).
    In any case, look for the missing VIs in the \National Instruments\LabVIEW 2009\vi.lib\Daq\ folder.  The VIs are contained in the .llb files so you
    can't just search for them through Windows.  Look in the AI.llb file using LabVIEW.
    Here are issues that you may encounter.  The link is to the DAQmx driver (I thought it was for traditional DAQ )
    Someone with a similar problem.  It won't help you, but kinda explains what you are going through..
    Although the recommendation in this thread is to use the same LV version and driver as the previous machine, we know it is not your case.  Newer LV version... and maybe the latest Traditional DAQ drivers...  May be worth reading:
    Traditional DAQ 7.4.4

  • Sending BUPA_MAIN into the RFC queue

    I would like to send BDoc <b>BUPA_MAIN</b> into the RFC queue
    (must be default for Business Partner), for selected BP from my report.
    I know how to send bupa_main direct to the site, but it is not the same.
    Can anyone help me with this ?
    Regards, Robert

    Hi Vikash,
    thanks for the answer.
    Unfortunately this tx has sent BP <b>direct to the site</b> not to the queue.
    Flow context (smw01) shows MO4 (mBDoc Direct Send) for Bupa_Main.
    And for test I stopped all queues in tx: SMQ2.
    And maybe there is a problem with the RFC configuration ?
    In transaction after BP is selected new window "SELECT SITE" shows,
    and what I can see is one line where :
    RFC Destination = NONE
    #          = empty
    Log.System     = empty
    Site Type ID      =  CDB
    Site ID           = some guid
    What do you think ?
    Best Regards,

  • How to parse the message received into  WF_WS_JMS_IN queue agent from web service

    I am using Service Invocation Framework to raise business event and call the external web services.  The web service is called and we got the synchronous response back to EBS into a inbound agent WF_WS_JMS_IN.
    Once the message is received here then I want to grab it and process further in my PL/SQL and update into the staging tables. 
    Could you please guide me how I can achieve this?

    Please check below which could be helpful for your issue:
    How To Troubleshoot Service Invocation Framework(SIF) In 12.1.1 Integrated SOA Gateway (Doc ID 736404.1)

Maybe you are looking for

  • Is the following possible in OBIEE

    I have a requirement: that runs like this - There r four dimensions (let's say d1, d2, d3, d4). There are also measures like m1, m2, m3, m4. I have got a requirement that a OBIEE report needs to be produced that has d1 columns at the left, one of (d2

  • SAPScript to PDF for nonenglish characters

    Hi All: My requirement is to download some PDF files which will contain some Korean Characters.My custom program will do that from SAP Script which generate some spool.From that spool no I am using FM 'CONVERT_OTFSPOOLJOB_2_PDF' which will generate t

  • Future of Apple TV

    The addition yesterday of being able to buy and VIEW HD TV shows on your computer (as well as ATV) got me thinking about the future viability of the ATV (which I love). Specifically, it seems the functional gap btw the ATV and say the Mac Mini is ver

  • Java with facebook

    hello My final year uni project consists of creating a java software which will scan a facebook page and extract user information such as availabilty of pictues, address, email address, mobile number, if the profile is on private and then assess if t

  • Speedport time out fail wireless

    I am connected to ethernet port, no problem. AirPort fails to connect. Now Windows with two local machines connect ok. My previous Dell connected. My AirPort works at home, a Bell Modem. SpeedPort W 700 V seems to have some issues for Win. The SpeedP