How can I communicat​e betwen parallel asynchrono​us VIs?

Howdy all,
Here's my situation:
- I have some task that needs to be executed in parallel to the currently running VI. In fact, this task needs to executed in parallel to a number of VIs,
so I've decided to build a sub-vi to handle this task.
- This task involves performing some processes every X number of milliseconds (usually in multiples of 1000). This task will be performed until it receives a stop-command (the user generates this signal - so I have no way of knowing when it will be)
- I still need to be able to handle user interaction with this main VI while the task is executing, so my task must execute asynchronously.
- I want to be able to send a termination command to my asynchronously executing task, and have it respond IMMEDIATELY (polling a global variable is unnacceptable).
The only way that I am aware of running a VI asynchronously is to start it with the VI Server (either the Call by Reference Node, or the Invoke Node).
Originally I planned on using notifiers to send commands to the asynchronous VI. Notifiers would have been perfect, because I could break out of the waiting portion of the task as soon as I received the command (this isn't really possible when polling a global). Later I found out that notifiers are not supposed to work with VIs loaded with the VI Server. My notifier approach worked fine during testing, but wouldn't work when I compiled the program as an executable (which is what the end product will be, so I need a new solution).
I'm about to change my implementation to use Queues instead of notifiers, because I think I can achieve the same "Wait on Notification" functionality with a queue, except I don't think there is a restriction on using a Queue across the VI Server.
My Questions are:
Is there another way to get VIs to execute asynchronously OTHER than the VI Server?
Is there a better way to communicate between them? (I considered using a User Event control, and generating the commands using that, however I can't poll the status of the User Event without an Event structure, preventing me from terminating my task once the user generates the "end-task" request.
Does anybody else find the LabVIEW documentation to be frustratingly lacking at times?
Any help, comments, or stories of similar situations would be appreciated.

tmh,
No, I'm pretty sure you understand perfectly, as that's exactly what I wanted to do. I knew that if you had two loops on a block diagram, they would execute in parallel, but I assumed that if you had a loop and a SubVI on a block diagram, that whichever one started executing first would have to terminate first. I was making the problem much more difficult then it needs to be, as that method would allow me to use notifiers to achieve the intended effect.
As far as notifiers 'not working with the VI Server' as I must have put it, I got that straight from the LabVIEW help files. Under the topic "Notifier Operation Functions" I read that "You cannot use notifiers to communicate with VIs on other computers. For example, you cannot use notifiers to communicate across a network or the VI Server."
Originally, I was using a named notifier. So, my "master" vi would create a notifier to send commands with, then it would launch the "slave" vi asynchronously with an invoke node, and send commands when necessary. The Slave obtained the notifier by using the "Obtain Notifier" vi, supplying the same name as the Master did for the name parameter. This worked fine when I was testing - however once I built my program to be an executable, the Slave created a new notifier, rather than obtaining the same one being used by the Master. (I'm not 100% sure that's the exact reason - it may just not have received commands [it was a while ago that I was playing with that approach]. But I do know that that method works fine in an uncompiled program, but once it's compiled, it stops working. Who knows - there may exist actual ways to pass the notifier, like a global variable or something like that).
According to the *fabulous* LabVIEW documentation, Queues don't have this limitation, so I rewrote my VI to use a queue of length one, rather than the notifier.
-----------------sidebar------------------------
(does anyone find that the LabVIEW documentation can be frustratingly lacking at times? Like, why can't I use notifiers across the VI server? And why can I use queues? I'm not asking for them to show me the guts of LabVIEW, I just think that it would give developpers more control and confidence when coding that they know what's going on, and have at least a general idea of how things work)
--------------end of sidebar--------------------
However, somewhere in my switch between Queues and Notifiers, I must have messed up something, as after that worked fine during the testing phase, after a compilation, I received an error (1013 I believe) whenever I tried to load my slave saying "Front Panel Heap Dump" - which is strange because the front panel of my slave should not have been loading, and was supposed to have been removed from the executable.
Not that that last bit is super relevent to the original topic of discussion, but it might be useful to someone later on.
In any event, thank you for your help. I suspect that that will be the perfect solution for my needs, and when I get back to that chunk I was working on and get it working, I'll let you know.
Thanks again.

Similar Messages

  • How can I communicate with other applications from my Java application?

    Hello,
    I need help about how can i communicate with other application(say textpad.exe/wordpad.exe/MS word.exe) from my Java program.
    More precisely, I need to know how i can get the current position of the cursor whether it is in any .txt/.doc files, then I may write some text in my java application and click a button and then my program will append the line(string) in that position of the file which is running under another appliction(Notepade.exe/MSword.exe).
    Please provide me some help.

    I may be wrong (and anyone, please correct me if so), but Java may not be the best tool for something such as this. I envision that you'd have to make some OS calls such as calls to the user32.dll, and while this can be done through the JNI, you'd still have to have a C or C++ program doing the dirty work.

  • How can I communicate PXI-6509 by Static DIO Register-Level Programming?

    - How can I communicate PXI-6509 by Static DIO Register-Level Programming?
      PXI-6509 physically Port0 is connected to Port1.
      For checking all connections are correct for this case so I have used DAQmx Test Panel. Just in case everything is ok.
      In this case I interested in to communicate the PXI6509 by Register-Level Programming.  
      I have tried to use Open VISA Test Panel for sending and reading data (in MAX explorer) and
      use NI-Spy for checking communication data.
      The first step I configured Port0 to Outputs state and Port1 to Inputs state.
      The second step I setup Port0 to 0xAA.
      The third step I read back Port1 and expected data will be 0xAA but just only 0x0. Why???
       1              ViOut8(0x03D83318, 10, 0x00000041, 1)

    Hello!
    We don't do support on register-level programming but the problem you are experiencing might be due to tri-state on the ports?
    Please check this manual that covers register programming of the device you are using:
    http://digital.ni.com/manuals.nsf/websearch/47300C3471742AD0862570AE005E0AD1
    Regards,
    Jimmie Adolph
    Systems Engineer Manager, National Instruments Northern Region
    Bring Me The Horizon - Sempiternal

  • How can I communicate between two simulated software

    Hallo,
    I have confusion regarding this topic "How can I communicate between two simulated software".
    1: PC with CAN simulation
    2:  PC with AFDX Simulation
    Now i have to communicated these two pc with each other.
    How can i communicated? which module from ni is best for it.
    thanks in advance
    BR

    I recommend looking at the Simple Messaging Reference Library that NI has released.  Use the TCP/IP version of it.
    FYI, TCP/IP is a communication protocol that is used to communicate between two computers.  It is what the internet uses.  So you just need a network switch or router between your computers and you can talk to each other with their IP address.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How can form communicate through RS232 (serial) link?

    How can form communicate through RS232 (serial) link?
    What I have to use/install/setup/copy?
    Thanks

    You can also create a dll library and use the procedures in this library with the Forms ORA_FFI package. See the Forms online help.

  • How can I send multiple string commands into a VISA write?

    Hi Fellow LabVIEW users
    I am very new to LabVIEW (2.5 months) so please forgive me if my lingo is not up to par.
    How can I send multiple string commands to a VISA write. For example each string command looks like this
    1) 3A00 0000 0000 FFFF FFFF FFFF 0000 0000 FF00 0000 0000 0000 0000 0033 (Scenario 1)
    2) 3A01 0000 0000 FFFF FFFF FFFF 0000 0000 FF00 0000 0000 0000 0000 0034 (Scenario 2)
    3) 3A01 0000 0000 33FF FFFF FFFF 0000 0000 FF00 0000 0000 0000 0000 0067 (Scenario 3).
    and so on and so forth. And there are a number of scenarios.
    Each String scenario will give a different string output which will be interpreted differently in the front panel.
    Right now I have to manually change the string commands on the front panel to give me the desired output. How can I do this without manually changing the commands i.e. hard coding each scenario into the block diagram?
    Thanks, any feedback will help.
    mhaque

    Please stick to your original post.

  • How can i make an apple ID without any visa card?

    How can i make an apple ID without any visa card?
    I don't wanna add my visa online.
    i just want to make a fast APPLE ID because me and a friend are using same Apple ID, and i wanna make a new one so...
    how?

    Look to the right on this page under 'More like this'.

  • How can i get my money back on my visa card and delet my song?

    i need to now how can i get my money back on my visa card and delet the song?

    All sales are final

  • How can i edit my order to chaing my visa card number ?

    I get an E-mail from apple, they want me to chaing my visa card number, but i can't edit the order info. this message appears to me "
    Attention
    https://store.apple.com/us/order/list#
    We are unable to edit your order details online. Please contact Apple Online Store Customer Service at 1-800-MY-APPLE. To make changes to your default payment method or billing address, go to Your Account 
    So i try to chaing the account visa card number, and i did. but the order steel with the old visa card number
    How can i edit my order to chaing my visa card number ?

    View > Outline view
    Those are the paths, that the cutter will normally use.

  • How can I communicate the instrumnet in labview using RS485 interface?

    I am using NI USB RS485 to connect the instrument, but I donot have instrument driver,I have to use VISA write and read data. the connection and serial setting are correct, I used a software ModScan32 from win-tech, the communication works well. I want to use the labview as my platform, How can I use VISA? please give me any clue or sample code. the instrument has a Modbus commmunication protocol.ThankS!

    Hi,
    VISA allows you to send/receive string data to/from the instrument. Serial communication with RS-485 is just like RS-232, so any of the labVIEW examples on serial will work. For serial you basically need to use VISA Read and write, that's it.
    If you need information on what to send, you can check out the modbus website (www.modbus.org) and the documentation for the device.
    Hope this helps.
    DiegoF
    National Instruments.

  • How Can i communicate between two iviews?

    Hi all,
       I am having two iviews.I want to conect those two in two pages.How can i do this?Can any one help me out from this?
    regards
    Sudeep.

    Hi ,
    Try this
    WDPortalNavigation.navigateAbsolute("ROLES:"+iview,WDPortalNavigationMode.SHOW_INPLACE,(String) null, (String) null, WDPortalNavigationHistoryMode.NO_DUPLICATIONS,(String) null,(String) null,"Param=Paramvalue");
    "ROLES:"+iview=Iview Path
    "Param=Paramvalue"=Parameter and its value
    Youcan receive the value as
    String parmvalue=WDWebContextAdapter.getWebContextAdapter().getRequestParameter("Param");
    Kind Regards
    Mukesh

  • Text messages on the Iphone 5c do not forward to non-Iphone users.  How can I communicate with both Iphone users and non-Iphone people?

    How can I create a setting that allows me to text to Iphone users and non-Iphone users?  Where do I find those settings?

    That is the default behavior when startng a message to a number that is not associated with iMessage. such as that of non iPhones.
    If you choose to user an email address it will always attempt to send an iMessage.
    For ease of identifcation, Messages sent thorugh SMS will be green in the Messages App, while iMessages will be blue.

  • HT5887 How can I find something I airdropped to someone vis email. I cannot find it in my email

    How can I find something I airdropped to another via email. I cannot find it in my email box?

    I thought AirDrop uses Bluetooth.

  • How can I specify relative SubVI file path in VIs?

    I use LabVIEW 2009 Service Pack 1.
    SubVIs are referenced by absolute paths, so when I move them to a new folder I may need to set their paths again.
    How can I make a SubVI reference a relative path so that I don't have to set its path after moving VIs to a new folder or a new drive?
    Solved!
    Go to Solution.

    altenbach wrote:
    [...]Where did you encounter any problems?
    From my experience, most of those problems occur when moving VI files directly on disk (Windows File Explorer) individually.
    @OP:
    Altenbach brought up a good point: When moving/copying the project, take care that all project related sources are within a single project folder. Move/copy the whole project folder, keeping its internal setup. In most cases, that is doing fine.
    When moving individual files (VIs), make sure that you use the LV Project Explorer to do so. Add all files used in the project into a single lvproj and then swap to the "Files" tab. Rightclick the individual VI you want to move and select "Move on Disk" from the context menu. This will auto-update all (known) callers as well.
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • HT204053 I am reluctant to give my visa details as there was large scale misuse recently. how can i use free services without giving my visa details

    I am reluctant to disclose my visa details due to recent largescae misuse of data. How can I use App store to down load viber and whatts app which are free?

    Buy and redeem a small cash amount iTunes Gift Card.

Maybe you are looking for

  • FYI: TrendMicro antivirus prevents Transport Service from starting after installing Echange Server 2013 Service Pack 1

    I installed Exchange Server 2013 SP1 in my test environment. After that mail flow between internal and external mail servers completely stopped. In the end I discovered that Transport Service on both of the mailbox servers refused to start (or, to be

  • Regarding House bank - G/L account

    Dear All, I have created a house bank and assigned a G/L account to it's bank account in tcode FBZP. Because of change in client's requirement, I had to change the (other) G/L account to bank account. Now, when I go to FF67 and process the manual ban

  • How do I disable the Firefox 3.6 updater?

    My updater cannot complete the updating because it claims that my computer is running "another version of Firefox" when it isn't. This message appears and my version of of Firefox will not start unless the update is completed. The updating process wi

  • NokiaE72 Problem

    Im very dissapointed with my Nokia E72 series (I only buy this June 17, 2010 at Gift Village, Sharjah UAE), especially when I check the store that I buy the same problem exist, so the store did not replace my nokia phone.  U know this keypad particul

  • Having Trouble Closing a JFrame With a Button Click in Swing

    I am brand new to Java so this is probably something really stupid. On my main form I have a table displaying records from a database. When you double click a record, it pops up a second form showing the details of that record. You can then edit the