To exit the Labview program

I am working with drivers of a instrument in LABview and want to completely exit/stop the whole Labview program is something goes wrong. Like, indefinate execution of some while loop..etc.. How can I do that?

This is exactly the discussion I was hoping to stimulate. (I
hope interesting, educational and possibly controversial). I think that the
most valuable part of the discussion to date is your experience and issues with
the application of the Exit vi.
I suspect I may be about to commit heresy to many. But in suggesting what
follows, I hope you will keep in mind a British comedy that I like called
'Black Adder' with Rowen Atkinson. I am applying this to many levels in this
response. I admit to brevity again here....
He is struck with a dilemma of forbidden love and cares what the world will
think and goes to the 'Wise Woman' for advise on his problem: -
She gives him three possible solutions: -
  Kill yourself - 'No' says he.
  Kill the object of desire - 'Not really' says he.
  Kill everyone else - 'Not really practicable' says he.
He elects not to take the advice of the 'Wise Woman' - It transpires that there
was a solution, as there was an error - he just didn't have all the
facts..........
To add one small part to the story, I would like to add that everything dies
eventually!
So here it comes.... Everyone SHOULD be putting in at least one EXIT vi in a
production application!
Still sat in your seat?
I propose - For exactly the reason that has been pointed out with regard to the
hardware and safe shut down. That is to allow the software (LabVIEW) to do the same. To
explicitly and formally state when and where the application terminates - Even
if in principle it is not actually intended that it should - the exit point and
software shut down sequence should be clearly indicated. I would suggest there
should be normally one exit point for a classical application.
To this end the example posted would be modified to include the EXIT vi - when
the designer has, resolved all issues or just can't cope any more.
What one tends to see, both in this forum and in released applications; is
development code or applications that were never reviewed to completion. Effectivley Beta applications.
NI don't put the EXIT vi's in Examples; as it, of course, EXIT's LabVIEW
cleanly and completely!!!! (bit of a pain for a novice). But as a result neither do many others.
So are you a convert to the cause?
Now my questions to the forum are: -
  Do you allow for and provide, a single point of software shutdown;
clearly stated and explicitly defined for production applications (would you
admit you don't / haven't)?
  If you don't; what do you do?
  How do you go about trying to assure clean up of any problems (I have
yet to meet the perfect systems designer, I live in hope).

Similar Messages

  • Error when running the LabVIEW program

    hello...........
    I'm newbie in LabVIEW....I have a problem when i'm running the LabVIEW program...i want to analyse data using the LabVIEW through the real experiment....
    My problem is, there is an Error when i try to start the program...This Error forced me to restart the program several times until it can run.......By the way, i'm using Picoscopes 3206 to connect the LabVIEW program in PC with the real experiment.....
    Here, I'm attached the picture that I snap when the Error occur....
    Attachments:
    error.JPG ‏222 KB

    You have to try to isolate the problem...
    Use 'Diagram disable' or 'Case' structure to run special part of code or try write a specific code to access and manage your equipment.
    Several questions could help: 
    - Are you up to date with your hardware driver?
    - Do you call external ressources (ex: dll)? perhaps with instability
    - Do you properly close connection with your equipment after using? 
    - With your offline mode, do you load all the code, including hardware driver or do you use a special method without no loading the specific code?
    - When you are able to run after many tries, is the program stable? Can you re-start it without exiting LabVIEW?

  • I have some software problems of running matlab script node in the LabVIEW program.

    Hi there,
    I wrote a simple matlab code, like x= 1, y = x*2. Then I tried to put them into matlab script node in LabVIEW.
    However, when I ran the program, I couldn't run and Labiew show some error. 
    Then I tried the method talked before on this forum. Please see the following link.
    http://forums.ni.com/ni/board/message?board.id=Mat​hScript&thread.id=571
    I followed the instruction and open the "command prompt," type some commands then I could run the program, and simultaneously, the LabVIEW program open "Matlab command line window" and run my labview code. However, if I didn't use the command prompt, the  "matlab command window" will not be opened by running the labview program. It would just show some error. And even if I turn on the matlab program in advance, I still couldn't run the labview program.
    Is there any effecient way to deal with this problem without using "command prompt?" Because I try another PC with both matlab and labview installed on it, I "can" run my simple matlab script node on it, and it will open the matlab command line window automatically by running my code. Therefore, I thought there might be some software linking problems in the previous PC I used . Do you have any ideas?
    Thanks in advacne.  

    This board is for Mathscript, but you seem to have a matlab problem. You should probably post in the LabVIEW forum instead.
    What is your LabVIEW version? What is you matlab version?
    LabVIEW Champion . Do more with less code and in less time .

  • Once running the labview program which contain DAQ Assistant ,the message of "ERROR-50405....." appear.

    Once running the labview program which contain DAQ Assistant and can be run without any error before, the message box of "ERROR-50405....." appear which capture down in the attachment. We use PCI6221 and LabVIEW 8.0 in Windows XP. I also found that the Device Manager of Window have recognized the PCI6221.
    Any help on this situation would be great.
    Attachments:
    labview error.JPG ‏145 KB

    Hi~
    This error is due to signal interference between the device and the computer. This could be environmental or due to the PCI Controller. You can on a different computer to see whether this problem persists.

  • HP4275A can not pass self test after running the labview program

    I am using Labview to control HP4275A LCR meter. The Labview program is just the instrument driver for the HP4275A, and it works great. Before running the program, the instrument can pass both Open and Short test perfectly. But after running the program, it can not pass self test, neither Open nor Short. I don't know why?? Is it relative to my Labview program??
    Thanks

    Thank you so much for your help. Yes, the instrument is in Local after running the instrument driver. In normal Open self test, just choose Capactiance as the Display A, and leave the four output terminals open then press the Self Test button. The Open self test will start and "OP" will be shown in the DIsplay A window, after 2 seconds, the open test will be finished. If something abnormal, the number of the abnormal step is displayed in Display A. Similar with the Short test.
    The problem I had was: before running the instrument driver, the self tests pass; but after running the instrument driver, the Open and Short test show abnormal, Open test is abnormal at step 17, and Short test is abnormal at step 24.
    And the instrument driver is only write commands into the instrument and then read back measuring values from it. Nothing else. So I am not sure if the problem is my instrument driver.
    The weird thing is the problems happened several times and then if I do the Open and Short self test again after running the instrument driver, both pass. I am not sure whether the problem will come back or not.
    Ia there any help??
    Big thanks

  • How to deallocate memory used by the labview program?

    Hi,
    I have bulit a large application in labview 2012 that uses a couple of subvis, local and global variables, some uninitialized shift registers (functional global variables) and some c++ and .net dlls as well. When I open my application the memory usage shown at Windows task manager is around 1.4GB. After running the application and enabling all processes used in the application, the memory usage goes up to 1.55GB but when i stop the application, memory is never released/deallocated until i close the application plus exit labview. Can you suggest how to deallocate this memory? and how can i use the request deallocation function for this application? labview help says i have to place it inside a subVI for which i want to deallocate memory. But i have a lot of subVIs used in my application. I tried placing it in the top level VI and called it after stopping all processes but it didn't work... I am also closing references to all of the .net dlls at the end. Any workarounds??
    Thanks

    sandee wrote:
    When I open my application the memory usage shown at Windows task manager is around 1.4GB. After running the application and enabling all processes used in the application, the memory usage goes up to 1.55GB but when i stop the application, memory is never released/deallocated until i close the application plus exit labview.
    You already got some good advice. One thing that was not clear was how you are measuring memory. Since the task manager is capable of showing the memory used by LabVIEW alone (you simply need to look elsewhere), and you said that the memory gets released when you exit LabVIEW, you gave the impression that the 1.4GB was the LabVIEW portion.
    OK, so a couple of hundred MB used by LabVIEW is really nothing to worry about. Are you running into memory or other performance problems? What are the symptoms?
    sandee wrote:
    I have bulit a large application in labview 2012 that uses a couple of subvis, local and global variables, some uninitialized shift registers (functional global variables) and some c++ and .net dlls as well.
    We really need to see some code. It is very well posssible that you have a lots of unecessary data copies in memory due to sloppy programming. How big are the data structures? Do you use local variables for big data structures? What does the program actually do?
    LabVIEW Champion . Do more with less code and in less time .

  • I am trying to translate the labview program to a real time labview programming....i wan to know what te the main isse that i need to focus on

    currently i am doing a lift monitoring system which made use of labview. Due to time constraint, i have decided to use the real time labview program. However i have no prior experience on the real time programmng, can i be enlighten on the main issue and what are the thing i ned to look out for. is thre any documentation that i can use?

    Derek,
    Programming for LabVIEW Real-Time is very similar to programming for LabVIEW for Windows. Many VIs do not need to be changed in order to run in LabVIEW Real-Time RT Engines. However, here are some issues to consider:
    1) Drivers
    2) File I/O
    3) Dialog Boxes
    4) Shared resources
    1) Drivers. If you application was written in LabVIEW for Windows, and then ported to run on an RT Engine on RT Series Hardware, you need to be sure that the drivers you are using are supported on your platform. See KB 28G97MZ8: http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/aad11f924e5b5fd086256a310053a094?OpenDocument
    2) File I/O: If you are running your programs on an RT Series DAQ Device, it has no storage device, so file I/O operations will crash. See KB 26FBO0KN:
    http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/3c35f5e85476579d862569f50067462e?OpenDocument
    File I/O on RT PXI Controllers is supported in 8.3 filename format (no spaces in the filename allowed).
    3) When your application is deployed, (Operate>Download Application, Operate>Run, then File>Exit without closing RT Engine VIs), you VIs continue to run. However, the RT Engine runs headless with no keyboard, monitor (limited information displayed), or mouse, so any user interaction previously required by your VIs, such as Dialog boxes, will hang or crash your program. For user interaction with a deployed application, communicate to the Host PC using shared memory, VI Server, TCP/IP, DataSocket, or UDP. See ~\labview\examples\rt\rt communication.llb for examples.
    4) Even though your programs now run in a real-time operating system, you need to follow good real-time programming techniques. These include: using multithreading with critical tasks set to time critical priority. One time critical VI with no parallel loops. Avoid accessing or using shared resources in time crital VI (shared resources cause jitter). Shared resources include the memory manager (preallocate arrays used in time critical loops), global variables for interthread communcation (use RT Queues). For more information, visit the LabVIEW Real-Time Resource Library in the Developer Zone: http://zone.ni.com/devzone/devzone.nsf/webproducts/c25f8c664230613a862567df006abb06?opendocument

  • Should the LabVIEW program be reduced to the speed of data collection?

    I'm using a LabVIEW program created by Ocean Optics for a
    Spectrophotometer probe with is run through the USB port. The problem
    occurs when we attempt to collect data over a time frame of one
    second. For some reason the whole LabVIEW program will begin to
    operate at the speed of data collection when we try to run the VI with
    an integration time of +500 ms. If anyone would be able to offer any
    kind of explanation or theory it would be greatly appreciated. Thanks
    for any and all help.
    Daniel

    Dear Daniel,
    since LV has no support for USB this must be done through a DLL or Active-X control. A call to a DLL or Active-X method is a synchronous node in LV, that means LV will go on executing when the call completes.
    My theory of your problem is that the program makes such a call and it would take that time to collect the data in the DLL or Active-X control. If you have only one loop in the program and do not use dynamic loaded VIs through the VI server than the program seems to hang on each of this calls.
    I hope this helps
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • VISA -- What is it and is it part of the LabView Program Package

    I am relatively new to Labview. I have taken the Basic I & II courses offered
    by the National Instruments and want to take other courses. I have looked
    through the manuals and all and ran a few of the programs but am not sure what
    VISA is... Is it an integral part of the LabView package and what is it used
    for????

    [email protected] (Ken) wrote:
    (paraphrased)
    1) What is VISA?
    2) Is it an integral part of the LabView package?
    3) What is it used for?
    Answers:
    1) The Virtual Instrument Software Architecture (VISA) is a comprehensive
    package for configuring, programming and troubleshooting instrumentation
    systems comprised of VXI, VME, PXI, GPIB, and/or serial interfaces.
    For more info, check out http://www.ni.com/visa/
    2) No, VISA is a seperate.
    3) VISA is used for communication. VIs written with VISA do not have to
    be re-written if the communication style changes (ie going from GPIB to VXI).
    For more info, check out http://www.ni.com/visa/why.htm
    I hope that this helps,
    Bob Young
    Bob Young - Test Engineer - Lapsed Certified LabVIEW Developer
    DISTek Integration, Inc. - NI Alliance Member
    mailto:[email protected]

  • I am trying to uninstall firefox and when i click uninstall it says the program is still running so i stop it and it exits the remove program

    im trying to uninstal firefox so i went to my control pannel clicked on add or remove progams then clicked on mozzola firefox and clicked remove it said it was still running so i clicked ctrl alt dlt and clicked task manager and ended firefox from running and when i did that the box to uninstall firefox exited so i clicked it again and the program started running again i dont know what to do i need firefox uninstalled

    I assume you are using windows. There are two options:
    1. Try restarting your computer and then try uninstalling.
    2. Firefox might be a program that starts immediately upon booting. In that case, go to the task manager, end all tasks that firefox is running. Then try uninstalling firefox

  • Error Code "1097.....this might corrupted LABVIEW's memory.........." appears after exit the labview and re-start labview

            I have a probelm when I use the "tool/import shared library(.dll)" wizard to generate the API from C.
            The API  works correctly when I complete the wizard, but after I exit labview and re-start labview to run the API again. The error 1097 code "......this might corrupted LABVIEW's memory.............."appears.
            The only solution now is to re-generate or update the wizard to generate the API.
            I try to find the answer in
            http://digital.ni.com/public.nsf/allkb/58596F5D41CE8EFB862562AF0074E04C?OpenDocument 
            The paragraph in above article shows
             "LabVIEW does not crash until it is closed
    The most likely problem is that the DLL function being called has corrupted the memory. If you pass arrays or strings to the DLL, the DLL function cannot dynamically resize the array. Writing beyond the last element of the array or string could corrupt the memory and this may not be obvious until LabVIEW is closed."
    But it doesn't match my case. Does someone have idea about this? I Attach my .h file for reference
    Attachments:
    test_api.h ‏1 KB
    link_test_api.h ‏1 KB

    wewe1215 wrote:
            I have a probelm when I use the "tool/import shared library(.dll)" wizard to generate the API from C.
            The API  works correctly when I complete the wizard, but after I exit labview and re-start labview to run the API again. The error 1097 code "......this might corrupted LABVIEW's memory.............."appears.
            The only solution now is to re-generate or update the wizard to generate the API.
            I try to find the answer in
            http://digital.ni.com/public.nsf/allkb/58596F5D41CE8EFB862562AF0074E04C?OpenDocument 
            The paragraph in above article shows
             "LabVIEW does not crash until it is closed
    The most likely problem is that the DLL function being called has corrupted the memory. If you pass arrays or strings to the DLL, the DLL function cannot dynamically resize the array. Writing beyond the last element of the array or string could corrupt the memory and this may not be obvious until LabVIEW is closed."
    But it doesn't match my case. Does someone have idea about this? I Attach my .h file for reference
    Which of the 2 functions do you call? How?
    The documentation of InitSocketEx() seems to indicate reversed parameter order than what the function prototype looks like!
    I indeed do not see much possibilities to pass in to small a buffer that the DLL function might be overwriting past the end. This really only leaves one more possibility:
    Your DLL is doing something largely illegal somehow. Maybe something as silly as storing the reference to the ipAdress instead of the address itself. The memory passed as parameters into a C function is generally only valid for the duration of the call. This is especially true if you use LabVIEW since LabVIEW will re- and deallocate memory buffers frequently as soon as they are not used anymore and the parameter to a Call Library node is considered to not be required anymore after the function returns.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to compile and link the LabView program(G) with some function written in C?

    Before, some employee in our company developed some program which was written in LabView (G). Now we want to add some new function with has already been done in C++. Can we combine them together? how to do it?

    Hi;
    To use external code in LabVIEW, you can create a dynamic link library (.dll) that you can call from LabVIEW or a Code Interface Node (CIN). The instructions on how to make any of those are in National Instruments manual Using External Code in LabVIEW, which is included with LabVIEW, or you can download it from NI website.
    Also, in the knowledge base there is a "External Code for LabVIEW - CIN / DLL - Starting Point" page.
    If, on the contrary, you want to use LabVIEW code on your C application, you can build dll's in LabVIEW. Depending on your version of LabVIEW, you may need Application Builder to do so.
    Of course, you can also use other techniques like, for example, making that your LabVIEW application save the data in a file and then your C++ application read the file and continues from there, or vice versa. You can also use the "System Exec.vi" in LabVIEw to do that, assuming your C code is an executable.
    Regards;
    Enrique
    www.vartortech.com

  • Only exit the current program, not both!

    hi, i have a problem with a timer program.
    When it "time's out", it starts a new program called reminder2. When you exit reminder2 ( system.exit(1); ) it's quit the program that started it (takati) .
    Takati:
    class RemindTask  extends TimerTask {
                      public void run() {
                                  new reminder2();
                                  timer.cancel();
                  }Remind2:
              block2++;
              if(block2==2)
              System.exit(11);
              }Thanks in advance!

    Sorry for this stupid question, how do i stop it?
    i tried with return; but it don't work. It's a gui program , here is the code:
    import javax.sound.sampled.*;
    import java.applet.*;
    import java.util.*;
    import java.util.Timer;
    import java.util.TimerTask;
    import sun.audio.*;   
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * Summary description for reminder
    public class reminder2 extends JFrame
         // Variables declaration
         Timer timer;
         private JLabel jLabel1;
         private JLabel jLabel2;
         private JLabel jLabel4;
         private JPanel contentPane;
         int block;
         int block2;
         int x;
         int y;
         // End of variables declaration
         public reminder2()
              super();
              initializeComponent();
              // TODO: Add any constructor code after initializeComponent call
              this.setVisible(true);
          * This method is called from within the constructor to initialize the form.
          * WARNING: Do NOT modify this code. The content of this method is always regenerated
          * by the Windows Form Designer. Otherwise, retrieving design might not work properly.
          * Tip: If you must revise this method, please backup this GUI file for JFrameBuilder
          * to retrieve your design properly in future, before revising this method.
         private void initializeComponent()
           x = Toolkit.getDefaultToolkit().getScreenSize().width;
              y = Toolkit.getDefaultToolkit().getScreenSize().height;
              jLabel1 = new JLabel();
              jLabel2 = new JLabel();
              jLabel4 = new JLabel();
              contentPane = (JPanel)this.getContentPane();
        block = 0;
              block2 = 0;
                                   try {
                     // From file
            AudioInputStream stream = AudioSystem.getAudioInputStream(new File("ljud\\danger.au"));
            AudioFormat format = stream.getFormat();
            if (format.getEncoding() != AudioFormat.Encoding.PCM_SIGNED) {
                format = new AudioFormat(
                        AudioFormat.Encoding.PCM_SIGNED,
                        format.getSampleRate(),
                        format.getSampleSizeInBits()*2,
                        format.getChannels(),
                        format.getFrameSize()*2,
                        format.getFrameRate(),
                        true);        // big endian
                stream = AudioSystem.getAudioInputStream(format, stream);
            // Create the clip
            DataLine.Info info = new DataLine.Info(
                Clip.class, stream.getFormat(), ((int)stream.getFrameLength()*format.getFrameSize()));
            Clip clip = (Clip) AudioSystem.getLine(info);
            // This method does not return until the audio file is completely loaded
            clip.open(stream);
            // Start playing
            clip.loop(Clip.LOOP_CONTINUOUSLY);
        } catch (IOException e) {
        } catch (LineUnavailableException e) {
        } catch (UnsupportedAudioFileException e) {
              // Stream to read file
              FileInputStream fin;          
                   try
                       // Open an input stream
                       fin = new FileInputStream ("lib\\msg.txt");
                       // Read a line of text
                       String finS = new DataInputStream(fin).readLine();
                 jLabel2.setText(finS);
                             this.setTitle(finS);
                       // Close our input stream
                       fin.close();          
                   // Catches any error conditions
                   catch (IOException e)
                        System.err.println ("Unable to read from file");
                        System.exit(-1);
              // jLabel1
              jLabel1.setIcon(new ImageIcon("bilder\\maskot.gif"));
              // jLabel2
              jLabel2.setBackground(new Color(255, 0, 0));
              jLabel2.setForeground(new Color(255, 255, 254));
              // jLabel4
              jLabel4.setIcon(new ImageIcon("bilder\\frame.PNG"));
              jLabel4.addMouseListener(new MouseAdapter() {
                   public void mouseClicked(MouseEvent e)
                        jLabel4_mouseClicked(e);
                   public void mousePressed(MouseEvent e)
                        jLabel4_mousePressed(e);
              // contentPane
              contentPane.setLayout(null);
              contentPane.setBackground(new Color(254, 254, 255));
              addComponent(contentPane, jLabel1, 155,9,50,39);
              addComponent(contentPane, jLabel2, 15,19,147,19);
              addComponent(contentPane, jLabel4, 0,-3,221,66);
              // reminder
        this.setUndecorated(true);
              this.setLocation(new Point(x - 240 , y - 100));
              this.setSize(new Dimension(219, 60));
              this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              this.setResizable(false);
              this.addMouseListener(new MouseAdapter() {
                   public void mouseClicked(MouseEvent e)
                        this_mouseClicked(e);
                   public void mousePressed(MouseEvent e)
                        this_mousePressed(e);
         /** Add Component Without a Layout Manager (Absolute Positioning) */
         private void addComponent(Container container,Component c,int x,int y,int width,int height)
              c.setBounds(x,y,width,height);
              container.add(c);
         // TODO: Add any appropriate code in the following Event Handling Methods
         private void jLabel4_mouseClicked(MouseEvent e)
              System.out.println("\njLabel4_mouseClicked(MouseEvent e) called.");
              // TODO: Add any handling code here
              block++;
              if(block==2)
              return;
         private void jLabel4_mousePressed(MouseEvent e)
              System.out.println("\njLabel4_mousePressed(MouseEvent e) called.");
              // TODO: Add any handling code here
              block2++;
              if(block2==2)
              return;
         private void this_mouseClicked(MouseEvent e)
              System.out.println("\nthis_mouseClicked(MouseEvent e) called.");
              // TODO: Add any handling code here
         private void this_mousePressed(MouseEvent e)
              System.out.println("\nthis_mousePressed(MouseEvent e) called.");
              // TODO: Add any handling code here
         // TODO: Add any method code to meet your needs in the following area
         public static void main(String[] args)
              JFrame.setDefaultLookAndFeelDecorated(true);
              JDialog.setDefaultLookAndFeelDecorated(true);
              try
                   UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
              catch (Exception ex)
                   System.out.println("Failed loading L&F: ");
                   System.out.println(ex);
              new reminder2();
    //= End of Testing =
    }Thanks, you're so nice!

  • How can I lock the Labview program in runing mode?

    Hello
    I want lock my program in running mode. can you help me to know how it is possible?
    when we design a program for a user, maybe a child or ane person change the program or stop it, or change the value like an array. is it possible to lock the progran in running mode?
    thank you
    Best Regards

    behzad1 wrote:
    Hello
    I want lock my program in running mode. can you help me to know how it is possible?
    when we design a program for a user, maybe a child or ane person change the program or stop it, or change the value like an array. is it possible to lock the progran in running mode?
    thank you
    Best Regards
    I have attached a primitive example, it should give you some idea, maybe it helps. Of course i put it together quick, so the style is not nice
    The password is a string, visible on the block diagram, so password protect the block diagram via the "VI properties". Also, change the "Window appearance" to custom, where the closing "cross" is disabled ("Allow user to close window"), and you also hide the abort/pause buttons...
    Of course if you build an exe, the story is different...
    These steps should give a minimal protection against children and evil colleagues 
    Attachments:
    lock_unlock_FP.vi ‏42 KB

  • How to get a signal from the serial port to start a labview program?

    I need to synchronize the data obtained from a program (which is not in Labview)with the data collected with Labview on a different computer. I can send some data strings to the serial port of the computer running the Labview program when the other program starts. However, I need to be able to read the trigger in my Labview program. Do you know what I should do? Thanks.

    If you don't have any other programs listening on the COM port, you need to let a LV program run BEFORE the signal comes, otherwise you won't be able to read it. You can have the program wait in a slow timed loop so that it doesn't use up too much CPU time, and when the required "trigger" comes, to move into the main part of the program.
    You basically need a while loop waiting for a certain string in the serial buffer. Once the string is found the while loop is exited, and the data acqquisition or whatever else you require from the progam can be performed.
    In the example attached the program wait for ANY text to be sent to the COM port. Please note that you need to configure the VISA resource before using it. Once there is something at the COM port, the loop will exit and the rest of the program will be executed.
    Hope this helps
    Shane
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
    Attachments:
    Wait for serisl message.vi ‏17 KB

Maybe you are looking for