How to Exchange Data and Events between LabVIEW Executable​s

I am having some trouble determining how to design multiple programs that can exchange data or events between each other when compiled into separate executables. I will layout the design scenario:
I have two VIs, one called Status and the other Graph.  The Status VI displays the serial number and status of each DUT being tested (>50 devices).  The Status VI has one timed loop along with a while loop that contains an event structure.  If the user clicks on the DUT Status Cluster the event structure needs to pass the serial number to the Graph VI.  The Graph VI when called fetches the records for the DUT based on the Serial Number and time frame.  This VI is a producer/consumer so the user can change the time frame of the records to display onto the front panel graph.
I have a couple reasons the VIs need to be separated into independent applications. One being the underlying database fetches tends to slow the threads down between the two VIs; the other is that they may be distributed into separate systems (don't consider this in the design criteria).
I have been researching the available methods to pass the serial number to the Graph VI.  My initial idea was to us a command line argument, but this does not allow the Status VI to pass another Serial Number to the Graph once it has started (I do not want to allow the user to execute multiple Graph applications because the database query can load down the server).
Is there a program method that I can implement between the two VIs that will allow me to compile them as two executables, and allow the Status program the repeatedly send an updated serial number event to the Graphs program.
I have reviewed many methods; Pipes (oglib_pipe), Action Engine, and Shared Variable.  I am not sure which method will give me the ability to use a Event driven structure to inform the Graphs program when to update the serial number.  Any suggestions and tutorials or examples would be greatly appreciated.

I have used the Action Engine (aka: functional global) approach for many years and it works well. Something to think about is that if you make the event's datatype a variant the only code that will need to know the actual structure of the event will be the function that needs to respond to it. Hence, a single event can service multiple functions.
Simply create a cluster containing an enum typedef that is a list of the functions that the event will service, and a variant that will be the function event data. From anywhere in the code you can fire the event (via the functional global) by selecting the function from the enum and converting function specific data to a variant. On the receiving end the event handler uses the enum to determine the function that is to get the data and sends the variant to it. The event handler doesn't know or care what the actual event data is so you could in theory add new functions without modifying the event handler.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • How do you date and time stamp iCal entries?  We share an event calendar and need to know when a new event was entered into iCal.

    How do you date and time stamp iCal entries?  We share an event calendar and need to know when a new event was entered into iCal.

    BKBK,
    Thank you for your response. That does adequately cover the
    client-originated sessions, but still leaves the ability I am
    looking for unavailable.
    It did serve to definitively answer my most pressing
    question, however, with this statement:
    Note: ColdFusion cannot create a session if an initiator
    application uses a SendGatewayMessage method to start an
    interaction with a client, such as an SMS user. In this case, the
    sending code must keep track (for example, in a database) of the
    messages it sends and their destinations. When a response event
    arrives, it can look up the origniatorID to determine whether it
    was in response to an outgoing message.
    I will play around with the Application scope to see if there
    might be a workable solution there.
    RLS

  • How to exchange data between two web application (servlet)

    Hello, all,
    I have two servlets: SerlvetA and ServletB, they are deployed as web appA and appB in the same web container(tomcat)
    How ServletA exchange data with ServletB?
    I have tried follow methods:
    1) appA and appB could not share HttpSession, so I could not transfer data through session
    2) I write a new sigleton java class called AppBroker, servletA get AppBroker's instance, and set some data into the it. ServletB could not get the same instance of the AppBroker, because the appA and appB use different class loader.
    tell me how to?

    thanks reply, but
    1. static class can not solve the problem, it is same
    as my sigleton class method, as different web app use
    different class loaderhmm... at least in tomcat this seems not be true since i can use static classes in one webapp that are available in another web app on the same host/servlet runner.
    Maybe if you build your own classloader than the "scope" of the static class is limited to that classloader (for my understanding this shouldn't be the case since i think it depends on the instance of the jvm and not of the classloader..?!).
    2. rmi and object serialization are too expensive!
    I am working on how to use jndi to solve this problem.
    And I think this maybe a Sevlet specification's
    shortcoming: maybe a Local Method as EJB local
    interface need been introduced into servlet spec.
    could you suggestion other methods?none at the moment. i guess the basic methods are listed.
    Maybe there's just one left, a really ugly one. Depending on what kind of data and how often you have to exchange you could think of building a file-based queue, i.e. a dir where you drop files in an read out from the other web app (maybe based on a file/directory listener). But this would only be an appropriate way to go for kind of email and messaging systems i guess...

  • Using GREP to bold Date and Event Name

    Hi
    I am stumped at how to properly apply a bold style to a combination of dates and event names using GREP. I am including three examples below. I do have Paragraph and Characters styles set up. The area I would like to effect the change is in all caps. I am trying to add a bold style only to the dates and the title of the event with out changing the rest of the information.
    I started of with this GREP Style:
    \d{1,2}\/\d{1,2}|\d\-?\s|\u
    It is bolding the dates and the name of the event. But it's not bolding the small dash between events that have a beginning and end dates or the en dash. It is randomly bolding other numbers and capital letters that it should not. Very frustrating. Each time I alter the GREP Style above, it makes it worse. This is as close as I got to the desired effect. Any ideas how to fix this?
    12/6-8 — HEALING WEEKEND AT TRUE NORTH HOLISTIC CENTER.  Friday  11am-5pm. Private Integrated Healing sessions, Friday 6:30pm-Sunday noon. “Blue Christmas” Retreat: Coping with Sadness at the Holidays; Sunday 3-7pm. Public Integrated Reiki™ clinic. Hubbardston, MA  www.truenorthholisticcenter.org. (978) 820-1139.
    12/6-12/8 — READ AND PLAY MUSIC IN A WEEKEND! World famous seminars turns beginners into musicians, revitalizes and inspires even pro musicians. 169 Mass Ave, Boston. (781) 599-1476 or http://signup.understandingofmusic.com or [email protected]
    12/7 — REIKI CERTIFICATION. Wilton, NH. Libby Barnett, MSW. 32 years experience. Reiki Energy Medicine author. Notebook, pin, certificate awarded. Credit cards accepted. CEU’s/contact hours. Call (603) 654-2787 or www.reikienergy.com. Reiki II: 12/8

    Thanks! That works. I am using a paragraph style for the body and have a bold character style for the information that needs to be bolded. I notice there are some listings that uses a colon and the bolding continued into the description where the first period appears (see samples below). I added a colon (to the shorter GREP style you suggested) in addition to the perod and excalamation point to search for.. Now the bolding stops at the colon but does not include up to the word "CARRY" (see first example). The second example, the bolding should stop after "FAIRE" but cotinues to the word Wisdom because of the period.
    I wish there was a option in the GREP drop menu to search for All Caps only and not Any Uppercase Letter. Is it a case were I need to manually edit those instances so it conforms to the norm? Or is there away to modify the GREP expression ^.+?[.!] to also include other instance like the example below?
    I alread try to add an additional rule using the Postive Look Ahead and nothing. And using the Any Uppercase Letter option, either forces the text back to the begining looking unstylized or it forces any capital letters to be bolded.
    12/8-12/13 — WESTERN REIKI MASTERS: BE ATTUNED TO CARRY Japan’s Gendai Reiki lineage: Usui Mikao-Kan’Ichi Taketomi-Kimiko Koyama-Hiroshi Doi-Audrey Pearson. Learn to teach all 4 levels of Japan’s Gendai Reiki Ho. www.yogapathways.com. (508) 740-9870 or Facebook: ‘Gendai Reiki America’
    11/23 — PSYCHIC AND HOLISTIC FAIRE at Women of Wisdom. North Easton, MA. Psychics, angel readings, mediums, crystal healings, Gaiadon Heart, chair massage, Reiki and more! Sign yourself up for a few appointments and bring your friends! www.womenofwisdominc.com (508) 230-3680.

  • How to compare date and time together

    Hi,
    How to compare Date and Time together?
    For example in a database table there are two fields rundate and runtime.  I want to compare these two with perticular date and time in the program.  Like, I want to pull all the records where the records's date and time are less than a perticular date and time in the program.
    Hope the question is clear...
    Thanks.
    Kavita

    Hi Kavita
    There is no as such Date and Time Comparision FM in Standard SAP  But You can define your own like this
    <b>FUNCTION ZAV4_COMPAREDATETIME.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     REFERENCE(DATE1) TYPE  DATS
    *"     REFERENCE(TIME1) TYPE  TIMS
    *"     REFERENCE(DATE2) TYPE  DATS
    *"     REFERENCE(TIME2) TYPE  TIMS
    *"  EXPORTING
    *"     VALUE(TWOISMORETOPICAL) TYPE  C
      twoismoretopical = ''.
      if date2 > date1.
        twoismoretopical = 'X'.
      else.
         if date2 = date1 and time2 > time1.
           twoismoretopical = 'X'.
         endif.
      endif.
    ENDFUNCTION.</b>
    Regards
    Mithlesh

  • How describe model data and  get select in DB throw topLink.

    Hello,
    I have table from code
    create table t_tree
    id int primary key,
    parent_id int,
    value varchar2(255)
    Alter table t_tree
    add constraint constr_id_parent foreign key (parent_id) references t_tree (id)
    I must get query
    select level as lv,lpad('-@-', (level-1)*2)||value as MMM, t.* from t_tree t
    connect by prior id=parent_id
    start with T.PARENT_ID is null
    How describe model data and get select in DB throw topLink.
    Dema.

    So you'll probably have to write a function which uses dynamic SQL to retrieve the desired message text, like this untested one:
    CREATE OR REPLACE FUNCTION get_msg(p_db IN VARCHAR2,
                                       p_id IN NUMBER)
       RETURN VARCHAR2
    IS
       msg_txt  VARCHAR2(4000);
    BEGIN
       -- make sure p_db is a valid database link ...
       EXECUTE IMMEDIATE 'SELECT d_msg FROM msg@' || p_db || ' WHERE t_id = :id' INTO msg_txt USING p_id;
       RETURN msg_txt;
    EXCEPTION
       WHEN NO_DATA_FOUND THEN
          RETURN NULL;
    END get_msg;
    /The you can update likeUPDATE mex
       SET t_msg = get_msg(db_id, t_id);Hth, Urs

  • How to display date and time on jsf page

    Hi,
    how to display date and time on jsf page
    we are using 11.2.0.0 jdeveloper on windows.
    thanks
    Edited by: user12187801 on 26-Jul-2012 01:42

    Your question is certainly lacking some information.
    If you want a constantly updating date/time - then JavaScript is your best bet, and Google would find you examples like [url http://www.webestools.com/scripts_tutorials-code-source-7-display-date-and-time-in-javascript-real-time-clock-javascript-date-time.html]this
    If you meant something else, then it's back to you to explain.

  • How to set date and time on apple tv

    how to set date and time on apple tv

    Assuming this is not the first time you have used your Apple TV
        1.    You might try restarting the Apple TV by removing ALL the cables for 30 seconds.
        2.    Also try restarting the router.
        3.    If the problem persists, try a restore, you may want to try the previous procedures several times before doing this.
    If this is a new Apple TV, it may also be that your network router is not allowing access to the timeserver, check that your router allows access over port 123.

  • How to find date and time on photo taken by iphone?, How to find date and time on photo taken by iphone?

    How to find date and time on iphone's photo taken?

    in iPhoto no matter the source of the photo you see the information about th ephoto by selecting the photo and showing info (the get info button may be in a different location depending on the version of iPhoto you have)
    If you are not aking an iPhoto question but are asking an iPhone question instead then repost in the iPhone forum - iPhoto has no association with the iPhone
    LN

  • How to Extract data and reports from the SAP BW warehouse

    Hi to All Guru's
    I am new to SAP BW. Can any one help me to know, How to Extract data and reports from SAP BW. Do we use any tools.  After Extracting the data from SAP BW how can we move all the data to Cognos.  It would be kind enough to provide me with any documentation or links.  Step by step procedure would be very much helpfull to me.
    Thanks
    Venu

    Hi Voodi
    Thanks for the quick response. I think Open hub is to extract the data from SAP BW, but what about sending this data into Cognos.  Can you please let me know in detail regarding answer. If possible send me any documentation or links regarding this.  Thanks for your concern.
    Venu

  • How Adobe gets DATE and its format?

    Hello,
    I am getting current (todays) date by using below JS in some flds, and by using below FormCalc for some flds into my_form,
    JS:
    var currentTime = new Date()
    Form Calc:
    $.rawValue = num2date(date(), DateFmt(MM/DD/YYYY))
    But, i dont have much idea that how adobe is getting this date? For my company this is the very first form, hence they are asking me how adobe gets date and its format whether,
    1) From local IP/Interner provider address's date, format?
    2) or user PC/laptop's LOCAL settings date, format? if so, for example, if Germany user (Laptop settings) has a DD.MM.YYYY configured, if this user comes to US on a busines trip and if that user opens the form, then how the date looks like for this user? as per user laptop settings DD.MM.YYYY or local internat provider date format MM//DD//YYYY?
    Thank you

    Hi,
    the date() function returns the number of days since 01.01.1900 for the local date of the current system (related to the system clock of the OS).
    If you travel from Germany to the US but don't update your date/time settings, then it returns the same date in the US as in Germany.
    You can check the behavior by changing your local date/time setting or the timezones.

  • How to exchange data between loops?

    why can't I exchange data between loops? it is esiest explained by looking at the attached example......... hope you can help me out!

    Falkpl covered all bases for parallel loops that both run at the same time. This was probably the spirit of the original question even without seeing the diagram.
    Steve.Briggs wrote:
    The easiest way to exchange data between loops is to simply wire the data going in. 
    A wire creates a data dependency between the two loops. Dataflow dictates that a diagram object will (1) start executing once all inputs contain data and (2) will only produce data on the outputs once the entire object has finished.
    This means in practical terms that if there is a wire going from loop A (output tunnel) to loop B (input tunnel), Loop B must wait until loop A has finished. If you have wires going from loop A to B AND back from loop B to A you create a deadlock and broken code. You cannot "exchange" data between two parallel loops using wires.
    LabVIEW Champion . Do more with less code and in less time .

  • How to set the system date and time in LabVIEW 6i?

    Hi,
    How can I set the time of the computer from Labview 6i? Is there any function to do this?
    Thanks.

    Arnau wrote in message news:<[email protected]>...
    > Hi,
    >
    > How can I set the time of the computer from Labview 6i? Is there any
    > function to do this?
    >
    > Thanks.
    Not natively that I know of. You could use a LabVIEW DLL call to link
    to a Win32 API call which sets the date and time. You would need to
    have privileges to do it.
    Doug D.
    [email protected]

  • Can I get MJD (date and time) in LabVIEW 2012 SP1?

    I need to time stamp my data before sending it to the file.  I have been doing this with the standard calendar date and time but MJD is what we prefer to use.  How can I get an MJD timestamp in LabVIEW 2012 SP1?
    Solved!
    Go to Solution.

    Hello Brad_Henry,
    The Format Date/Time String will return the day of the year when the %j argument is used, as per this help document:
    LabVIEW Help: Format Codes for the Time Format String
    http://zone.ni.com/reference/en-XX/help/371361J-01/glang/codes_for_time_format_str/
    If you're looking for the actual MJD, I'm not aware of a built-in function that generates this so you'll probably need to create or find a function to calculate it manually.  This should pretty basic arithmetic, and it looks like people have already made a few public examples, the first two search results here look to be just about what you need:
    ni.com search:
    http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/catnav:ex/q/julian/
    Regards,
    Tom L.

  • How to use postlv user event in labview

    Hi sir 
     I am sending data labwindow cvi dll call to labview,for that we need postlv user event.please any one knows to use postlv user evenet in labview.
    Below will  be the  structureand i need to update in labview .
    typedef struct
    unsigned
    uDSPIO,
    // uDAQMode,
    // bControllerActive,
    bShutDown,
    bPowerOn,
    bPowerHi,
    bPowerFault,
    bSGIdle,
    bSGHold,
    uBitsIn,
    uBitsOut,
    uCycleCount,
    uCycResidue,
    uBlockCount,
    uLogChannels,
    uCurrentMode,
    uAsigndPhysCh[LOG_CHANNELS];
    float
    fSetPoint,
    fDAQRate,
    fRange[LOG_CHANNELS],
    fReadout[LOG_CHANNELS],
    fMax[LOG_CHANNELS],
    fMin[LOG_CHANNELS];
    char
    sChID[LOG_CHANNELS][32],
    sChUnits[LOG_CHANNELS][16];
    CTRL_CHANNEL_STATUS;
    Attachments:
    GDSCallback.vi ‏12 KB

    AThe fixed size arrays in your structure are inlined byt the C compiler. This means they are not an array pointer (and definitely never a LabVIEW array handle) but rather LOG_CHANNELS amount of unsigned ints and floats directly embedded in the structure. In LabVIEW terms this is most easily represented as a cluster with LOG_CHANNELS elements inside the main cluster.
    So basically your uAsigndPhysCh needs to be a cluster with LOG_CHANNELS elements of unsigned ints and  fRange,  fReadout, fMax and fin are clusters with LOG_CHANNELS single precision float values, and then sChID is a cluster with 32 * LOG_CHANNELS chars and sChUnits one with 16 * LOG_CHANNELS chars.
    However I would personally rethink this strategy. This huge cluster monster is passed into PostLVUserEvent() each time and copied into the event data on every event, causing quite a bit of overhead that way. Is it really necessary to post all this data every time?
    Also you have commented out uDAQMode and bControllerActive in your C structure but included it in the LabVIEW cluster which will certainly throw off your data. Last but not least the b prefix would probably indicate that you are only using that element as a boolean value, so why not consider to use bit fields there? In LabVIEW you can easily seperate those bitfields by either translating the resulting uInt32 into a boolean array or even more efficiently use boolean logic to detect the bits.
    And in order to let LabVIEW react on a user event you have to create that user event with the correct datatype (your cluster monster) and then pass the user event refnum to your DLL. This DLL then calls PostLVUserEvent() with the user event refnum as first parameter and a pointer to a data structure that matches the LabVIEW user event datatype EXACTLY whenever it wants to post an event to LabVIEW. The user event is also registered in an event structure in LabVIEW which will then get triggered everytime your DLL posts an event by correctly calling PostLVUserEvent().
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • Does Mountain Lion work with Windows 8

    I have just purchased a Mac Mini and wondering if I can emulate Windows 8 on it.

  • I POD AS HARD DISK DRIVE

    I can transfer non Itunes files to and from the Ipod. After I synchronise to ITunes, the non Itunes data files are deleted. How can I over come this. How can I keep the files in my Ipod without deleting them?

  • How to force BI Publisher to output header without any record in CSV or XML format?

    When the output format is CSV or XML, it seems that Oracle BI publisher does not use the template. When there is no record returned, it only display "ROWSET" in the report. No column names are displayed in the report. If the output format is one of t

  • Jsp import package error after upgrading to jdk1.4.2_08 and tomcat 5.0

    I am trying to upgrade the jdk and tomcat from 1.3/3.3 to 1.4/5.0. My jsp imports worked fine prior to the upgrade, but now I get the following: Jun 6, 2005 10:01:17 AM org.apache.jasper.compiler.Compiler generateClass SEVERE: Error compiling file: /

  • Printer won't work via Airport

    I bought a Canon MF4550d Printer which works fine via USB, but not at all via airport extreme with my MacBook Pro from 2008. All my other printers work fine via airport extreme. Canon support checked everything they could, installations are correct.