The call of a Subvi without stopping the execution of the main thread

Hello everyone, I have a rather simple demonstration VI, which opens a menu where the user can call a few screws, signal generation, reading and analysis, each contained in a Subvi and with their own front panel and chart controls. The idea is user just click a button and the required Subvi is in charge, I use a structure of the event to ease.

Problem is, after I opened an option, said Subvi hogs the thread of execution and does not allow for new bodies until it is closed (this is inside a while loop it is so logical, I guess), the queue of events and the next before Panel charges only after that I have stop the Subvi. I would like to be able to simply open the front panels and let them run in parallel, without them in the meantime another at the end, is it possible?

natasftw is right.

A high school is a "hole" in your main panel.  You "insert" a separate VI in this 'hole' and then you see the Panel of VI inserted through the hole and mouse clicks through the hole of the Subvi below.

You will need to run the Subvi separately, even if - by inserting just can't run.

Aynchronous call will begin a Subvi running and then return to the calling thread with the Subvi running in parallel.

You can then insert the Subvi in a secondary, or let it have its own window, as you choose.

There are examples of both techniques.

Tags: NI Software

Similar Questions

  • PhoneListener cannot access a public static vars initialized in the main thread

    Using the emulator (SDK 4.7, phone model 9500)

    I have a class PhoneListener defined and recorded, he gets the phone events without any problems. It's all public static public var that is initialized in the main thread is always null when it is examined in the context of the PhoneListener callback thread, when examined in the main thread or a son they are defined.

    I guess since the PhoneListener callbacks are called from a system thread, it cannot access the battery of my request - it seems correct? is this in any way about this?

    I tried Application.getApplication () .invokeLater (...), but validated all executable from the PhoneListener recalled suffers from the same problem.

    Thanks - Lindsay

    Exactly, that's what I was wondering - I found the answer according to the PhoneListener in the MIDlet . Now I store my UiApplication object in the running store and access them from the PhoneLister to publish objects on my main application via invokeLater.

    Thank you

    Lindsay

  • messages between the main thread and the FX application thread

    I run a thread of the Application of FX for a main thread using Application.launch [described here: {: identifier of the thread = 2530636}]

    I try to have the application thread return information on the main thread, but Application.launch returns void. Is there an easy way to communicate between the main thread and the thread of the Application?

    So far, I googled and found:
    -MOM (Message Oriented Middleware)
    -Sockets

    Thoughts/ideas/examples are appreciated--especially examples ;)--now I try to use Sockets to show/hide the application and data transmission.

    What is the preferred method? Are there others that I did not find (gasp) via Google?

    Dave.

    Published by: cr0ck3t on April 30, 2013 21:04

    Published by: cr0ck3t on April 30, 2013 21:05

    Is there an easy way to get a reference to these objects to both the main thread and the thread of Application FX - called via Application.launch () since the main thread? Or what I need to use Sockets or MOM?

    Not much to do with the concurrent programming is what I would call easy. It looks easy - but it's not.
    You can do kind of what you're describing using Java concurrency constructs without using sockets or a package of Message Oriented Middleware (MOM).
    With the Java concurrency stuff you really implement your own form or MOM light.
    If you have quite an application is complex with many messages of comes and goes, then a sort of package for MOM such as the camel and ActiveMQ (http://camel.apache.org) is useful.
    ---------
    You can find a sample of the various interactions of thread with JavaFX here:
    https://gist.github.com/jewelsea/5500981 "Simulation of dwarf dragons using multiple threads to eat."
    Related code is just demo-ware to try different competitive access facilities and not necessarily a recommended strategy.
    If your curiosity, you can take a look and try to work out what it is, what it does and how it does.
    The main reason followed is that of a blocking queue:
    http://docs.Oracle.com/javase/6/docs/API/Java/util/concurrent/BlockingQueue.html
    ---------
    Note that once you call launch of the main thread, no subsequent statement in the main method will be different until the JavaFX application terminates. If you can't start from the main thread and communicate with the main thread JavaFX application. Instead, you need to spawn another thread (or a set of threads) for communication with the JavaFX application.
    ---------
    But really, in most cases, the best solution with the simultaneity is not care at all (or at least as little as possible). Write everything in JavaFX, use the animation of JavaFX framework to time related things and the simultaneity of JavaFX utilities for when you really need multiple interaction of wire.
    http://docs.Oracle.com/JavaFX/2/threads/jfxpub-threads.htm
    ----------
    For additional assistance, you may be better off describing exactly (i.e. really specific) what you're trying to make in a new question, perhaps with a solution of the sample in a http://sscce.org NBS

  • Running the thread of the child until the end even after that the main thread is terminated

    I run a background task by using the task and the Service Api. When the main application creates little son, the main thread can be terminated without completing the child thread. Is this possible. Thank you.

    Find out about the son of the devil.

    Multithreading - what is Daemon thread in java - Stack Overflow

    Read also the

    Application section of the lifecycle in the javadoc.

  • How to avoid the LrStringUtils.encodeBase64 and LrFileUtils.readFile to block the main thread?

    Hello

    During the publication of the photos, I use LrFileUtils.readFile to read the exported file and LrStringUtils.encodeBase64 on the result of it. These two functions are the only ones in my process which seems to block the main thread of LR.

    I tried to put these two functions in an asynchronous task using LrTasks.startAsyncTask () and LrTasks.yield () to wait for the task at hand, but LR UI is still freezing for 1 or 2 seconds when I execute these functions.

    Is this normal? I'm doing it wrong? Is there a way I can avoid this?

    Thank you very much!

    Perhaps you need to read the file and encode it into smaller pieces (for example 100K bytes at a time), the use of Lua file: read() rather than LrFileUtils.readFile ().

  • How to operate the main thread class when PopupScreen is pushed?

    Hi all

    I created shortcut menu custom in my Application. When you click the button, it shows correctly.

    But in my main screen I used webservice. The screen content is watch depends on webservice respons.

    My problem is that when I click on the popup button comes but threat to webservice conversation stops its execution because because of the pop-up screen my screen becomes not developed for execution. and when I remove my mainclass popup screen takes over its performance and result either appears correctly.

    Please, someone tell me how could it be that in the presence of pop-up screen that my thread to call Webservice will be run?

    The approach that I said is the exact stated, so my suspicion is that you have not implemented correctly.

    Here's a way to test.  Add this code in any code that you are is not executed on the event Thread:

    if ( Application.isEventDispatchThread() (
    
    Dialog.alert("Oppsss, this code should not be running on the Event Thread");
    
    }
    

    Of course if you see the dialog box, so that the code runs on the event Thread.

    If you do not, then validate your code, maybe we can find out what you did wrong.

  • How can I do to block the main thread when to display a dialog box

    I have a problem to block the user interface main thread when to display a dialog box (the dialog was created by the main Application), and when the dialog box is closed, the main Application can go to the next step.
    Here is my code:

    SerializableAttribute public class TitledPaneExample extends Application {}
    instance of TitledPaneExample private;
    StackPane mainModalDimmer;

    /*
    * (non-Javadoc)
    *
    * @see javafx.application.Application #start (javafx.stage.Stage)
    */
    @Override
    public void start (point primaryStage) bird Exception {}
    instance = this;
    primaryStage.setTitle (this.getClass () m:System.NET.SocketAddress.ToString ());

    final StackPane layerPane = new StackPane();
    layerPane.setDepthTest (DepthTest.DISABLE);
    layerPane.setStyle ("background - fx - color: BLACK ;"); ")

    Vb VBox = new VBox();
    vb.setStyle ("background - fx - color: BLUE ;"); ")
    vb.getChildren () .add new (Label ("1"));
    vb.getChildren () .add (Label ("2")) new;
    vb.getChildren () .add new (Label ("3"));
    vb.getChildren () .add (Label ("4")) new;

    Bt1 button = new Button ("bt1");
    BT1.setOnAction (new EventHandler < ActionEvent > () {}
    {} public void handle (ActionEvent event)
    System.out.println ("bt1 trying to the new dialog box > > >");
    Dialogue di = new dialog box (instance, "some trick here!");
    System.out.println ("bt1 dialogue again successfully, try to show");
    di. Show();
    System.out.println ("bt1 dialog hide? < < < < ");"
    }
    });
    vb.getChildren () .add (bt1).

    layerPane.getChildren () .add (vb);

    mainModalDimmer = new StackPane();
    mainModalDimmer.setId ("MainModalDimmer");
    mainModalDimmer.setMaxSize (Double.MAX_VALUE, Double.MAX_VALUE);
    mainModalDimmer.setVisible (false);
    mainModalDimmer.setStyle ("background - fx - color: RED ;"); ")
    layerPane.getChildren () .add (mainModalDimmer);

    Scene sc = new scene (layerPane, 800, 600);
    primaryStage.setResizable (true);
    primaryStage.setScene (sc);
    primaryStage.show ();

    }

    /**
    * Display the node given as a floating dialog on the entire application, with
    * the rest of the application grayed out and blocked from mouse events.
    *
    @param message
    */
    {} public void showModalMessage (message from node)
    mainModalDimmer.getChildren () .add (message);
    mainModalDimmer.setOpacity (0);
    mainModalDimmer.setVisible (true);
    mainModalDimmer.setCache (true);
    TimelineBuilder
    . Create()
    () .keyFrames
    new KeyFrame (Duration.seconds (1),)
    new EventHandler < ActionEvent > () {}
    {} public void handle (ActionEvent t)
    mainModalDimmer.setCache (false);
    }
    }, new KeyValue (mainModalDimmer
    . opacityProperty(), 1.
    Interpolator.EASE_BOTH))) infrastructure)
    . Play();
    }

    /**
    Hide the any modal message that appears
    */
    public void hideModalMessage() {}
    mainModalDimmer.setCache (true);
    TimelineBuilder
    . Create()
    () .keyFrames
    new KeyFrame (Duration.seconds (1),)
    new EventHandler < ActionEvent > () {}
    {} public void handle (ActionEvent t)
    mainModalDimmer.setCache (false);
    mainModalDimmer.setVisible (false);
    mainModalDimmer.getChildren () .clear ();
    }
    }, new KeyValue (mainModalDimmer
    . opacityProperty(), 0,.
    Interpolator.EASE_BOTH))) infrastructure)
    . Play();
    }

    /**
    @param args
    */
    Public Shared Sub main (String [] args) {}
    Launch();
    }

    Dialogue/public class extends TitledPane {}
    private owner of TitledPaneExample = null;
    instance of TitledPane private;

    Dialogue (owner of TitledPaneExample, String message) {}
    This.Owner = owner;
    this.parentThreand = Thread.currentThread ();
    This.instance = this;
    this.setExpanded (true);
    this.setText ("Dialog");
    this.setMaxWidth (400);
    this.setPrefWidth (300);
    this.setMinWidth (200);

    Label the tx = new Label ("message");
    tx.setTooltip (new Tooltip (message));
    tx.setWrapText (true);
    tx.setContentDisplay (ContentDisplay.LEFT);

    Bt button = new Button ("OK");
    bt.setOnAction (new EventHandler < ActionEvent > () {}
    {} public void handle (ActionEvent event)
    masquer();
    }
    });

    Sp ScrollPane = new ScrollPane();
    sp.setHbarPolicy (ScrollBarPolicy.AS_NEEDED);
    sp.setVbarPolicy (ScrollBarPolicy.AS_NEEDED);
    sp.setContent (tx);

    Hb HBox = new HBox (30);
    hb.setPrefHeight (40);
    hb.setAlignment (Pos.CENTER_RIGHT);
    hb.getChildren () .add (bt);

    BP BorderPane = new BorderPane();
    bp.setCenter (sp);
    bp.setBottom (hb);

    this.setContent (bp);
    }

    {} public void show()
    System.out.println ("dialogue show() 1 > > >");

    owner.showModalMessage (instance);

    System.out.println ("dialogue show() 2 > > >");

    }

    public void masquer() {}
    System.out.println ("dialogue masquer() 1 > > >");
    this.owner.hideModalMessage ();

    System.out.println ("dialogue masquer() 2 > > >");
    }
    }

    }

    I'm also interested in how to do this without the use of a step.

    But, if you are ready to use a step for this, you can create a useful first step (without borders) with its owner being your current stage. Then, you can call the function showAndWait on stage that allows to block the thread of your application. For example, I implemented a DialogStage like this:

    package hs.mediasystem.util;
    
    import javafx.animation.KeyFrame;
    import javafx.animation.KeyValue;
    import javafx.animation.Timeline;
    import javafx.event.EventHandler;
    import javafx.scene.effect.ColorAdjust;
    import javafx.stage.Modality;
    import javafx.stage.Stage;
    import javafx.stage.StageStyle;
    import javafx.stage.Window;
    import javafx.stage.WindowEvent;
    import javafx.util.Duration;
    
    public class DialogStage extends Stage implements Dialog {
    
      public DialogStage() {
        super(StageStyle.TRANSPARENT);
    
        this.setTitle("MediaSystem-dialog");
    
        initModality(Modality.APPLICATION_MODAL);
      }
    
      protected void setParentEffect(Stage parent) {
        ColorAdjust colorAdjust = new ColorAdjust();
    
        Timeline fadeOut = new Timeline(
          new KeyFrame(Duration.ZERO,
            new KeyValue(colorAdjust.brightnessProperty(), 0)
          ),
          new KeyFrame(Duration.seconds(1),
            new KeyValue(colorAdjust.brightnessProperty(), -0.5)
          )
        );
    
        parent.getScene().getRoot().setEffect(colorAdjust);
    
        fadeOut.play();
      }
    
      protected void removeParentEffect(Stage parent) {
        parent.getScene().getRoot().setEffect(null);
      }
    
      protected void recenter() {
        Window parent = getOwner();
    
        sizeToScene();
    
        setX(parent.getX() + parent.getWidth() / 2 - DialogStage.this.getWidth() / 2);
        setY(parent.getY() + parent.getHeight() / 2 - DialogStage.this.getHeight() / 2);
      }
    
      @Override
      public final void showDialog(final Stage parent, boolean synchronous) {
        initOwner(parent);
    
        setParentEffect(parent);
    
        setOnShown(new EventHandler() {
          @Override
          public void handle(WindowEvent event) {
            recenter();
            onShow();
          }
        });
    
        if(synchronous) {
          showAndWait();
        }
        else {
          show();
        }
      }
    
      protected void onShow() {
      }
    
      @Override
      public void close() {
        removeParentEffect((Stage)getOwner());
        super.close();
      }
    }
    
  • The call for a Subvi without providing a reference to the objects inside the Subvi?

    Hi all

    Suppose I have a Subvi, which trace Y1 vs X 1 and Y2 X 2 vs on the same XYGraph. See attachment.

    XYGraph the property node is linked to the XYGraph. It sets the style width and point line for each curve on the XYGraph.

    If I call this Subvi 4 times in other code (make 4 diferent XYGraphs (XYGraph1, XYGraph2, XYGraph3, XYGraph4, each of which contains two lines Y1 X 1 and Y2 X 2 vs vs)).

    Why would I need to create 4 different references for 4 different XYGraphs?

    The question is really this: If the property node is explicitly linked to the XYGraph in the Subvi, why the property node must be updated via a reference if the Subvi is called

    several times to several XYGraphs? Wouldn't the Subvi take entries, draw the curves of the XYGraph, update the nodes property and then produce a final with XYGraph

    update properties?

    If there is to be a Subvi why you a graph on its façade and manipulate its properties? You will have to manipulate the properties of the chart on the front of the top-level VI. You see a graph is not a type of data - it is a display object. What is passed through calling screw terminals are given, and in this case, the data type is an array of clusters containing a table of x values and an array of values there.

    If you want to do a Subvi that performs this operation you must pass it a reference to the curve that you want to handle that one of them has entered the data values.

    Mike...

  • Error in the new thread should terminate execution

    Hello

    I have a labview VI (continuous while loop), getting initialized in the subsequence of Initialize section of the main sequence and running in the new thread. An error in the execution of this loop will stop execution of VI, pass the error to Teststand and out the thread. I need to put an end to the execution of the main sequence, when the error event in the new thread (passing initialization). Is it possible to do? I'm getting the popup of error Standard Teststand, when the error event, but when I choose to cancel/Abort, the execution of the main sequence doesn't stop and continues. What is the right way to handle errors for threads running in parallel?

    Thank you best regards &,.

    Juvin Ronny

    Some approaches.

    1) wait on the new thread periodically with a wait with a timeout step zero and "timeout causes error" box unchecked. If the thread is finished and has an error, the step of waiting spread the main thread of the error.

    (2) call the Execution.Terminate () or Execution.Abort () of cleaning up your sequence newthread.

    Hope this helps,

    -Doug

  • Playing audio from inside of a state machine without stopping execution

    I created a state machine that acquires and analyzes the input signal and the state transitions based on triggers found in the breast of this signal.  In a particular State, I need to read a pre-recorded file (right now I'm just using a file .wav for testing purposes).  I understand that because of data flow model of the state machine hangs up during playback status until playback is complete, but I need to find a way around that.  Of course, whenever the machine hangs may not continue the acquisition and analysis of the signal.  How to start playback from the state machine without stopping its execution?

    Do you use the his release screws? If you do, try this. On the 'Play Sound file VI' set timeout = 0

  • Passing parameters to VI in the new thread

    I have a vi constantly running in the main thread of SeqCont.seq. In this vi is a stop button to stop the execution of the vi. How one passes a reference to this stop button, so I can stop this vi of the main.seq?

    I tried to pass the sequencecontext, but a change in the value of the context is not constantly being rated by this vi.

    Why did you delete it! You need a teststand variable to communicate between Teststand and LabVIEW VI to tell the loop to close and therefore complete the VI.

  • The main program is seen as a separate thread?

    I tried to stop a GUI based program opening too fast because the splash screen has not been seen for a long time enough.

    So I tried to use the classes Thread and can be walked in the GUI Builder.
    Trying different things, I got it to do what I wanted: a delay of 10 seconds before the GUI of the program display.
    But I don't understand why main is not considered a separate thread and continue to get visible regardless of the status of delayThread.
    // Constructor:
    // ---------------
    public Hotel (int numberIn)
        {
             // Create the time delay thread so that users may enjoy the splash !
             delayThread = new Thread(this);
             delayThread.run();
             // Initialise the number of rooms and the GuestList :        
            noOfRooms =  numberIn;
            guests  = new GuestList(noOfRooms); 
            // Graphics settings:      
            setTitle("Hotel");     
            setLayout(new FlowLayout());
           // etc. etc.
           // etc. etc.
           setVisible(true);
       }
    
    
        // A run method to delay the program opening:
         
        public void run()
        {     
             try
             {
                  delayThread.sleep(10000);
             }
             catch(InterruptedException ie)
             {
                  ie.printStackTrace();
             }
           
        }
    Now, maybe a better way to do would be to go the setVisible of the manufacturer, the run method statement.
    Maybe there's something even better to produce a delay in the opening of the program.
    But I'm still curious why the main thread has been delayed by a delay in what is really a completely separate topic.
    Any ideas?

    Published by: KonTiki on February 16, 2013 13:10

    Published by: KonTiki on February 16, 2013 13:19

    Published by: KonTiki on February 16, 2013 13:20

    Published by: KonTiki on February 16, 2013 13:21

    Published by: KonTiki on February 17, 2013 09:16

    Are you sure that show you all the relevant code? I think that, as is the case, the thread in sleep does nothing.

  • [4.0 AI2] Without stopping at the points of stop/does any debugger

    When running the debugger in SQL Developer is the debugger immediately connects then disconnects after executing the code WITHOUT stopping at breakpoints or the debugger crashes and only what I choose is to end or for a break.

    The first question that happens much more frequently. I'm trying to debug a procedure in a package where the there are several breakpoints in the code, including at the beginning. After checking my tables in which the procedure is on before and after running the debugger, I can see that the data has been changed so that the debugger ran through the process and run the code without stopping. I have checked the very simple code where the code of breakpoint was called and had the same result.

    IM using 64 bit Win7-

    JDK - 1.7.0 day 40

    Output:

    CHARGE TIME: 329UsersCache.fillIn (time) = 4 ret == null? : true

    UsersCache.fillIn (time) = 3 ret is nothing? : true

    tableAlias.cardinality () == 0

    UsersCache.fillIn (time) = 4 ret is nothing? : true

    UsersCache.fillIn (time) = 3 ret is nothing? : true

    tableAlias.cardinality () == 0

    UsersCache.fillIn (time) = 4 ret is nothing? : true

    tableAlias.cardinality () == 0

    tableAlias.cardinality () == 0

    tableAlias.cardinality () == 0

    The debugger output:

    Connection to the database layout Pro.

    PL/SQL execution: ALTER SESSION SET PLSQL_DEBUG = TRUE

    Running PL/SQL: CALL the DBMS_DEBUG_JDWP. CONNECT_TCP (' * ',' *')

    Accepted connection of database on the debugger port *.

    Running PL/SQL: CALL the DBMS_DEBUG_JDWP. DISCONNECT()

    Process is complete.

    Disconnecting from the database layout Pro.

    Debugger disconnected from the database.

    Thanks in advance,

    James

    Some basic questions.

    Have you compiled for debug?
    Certainly are breakpoints on lines of code? He has had problems in the past where line numbers are off by one that looks like code is actually a blank line, or a statement.  Try several breakpoints on consecutive lines to be sure.

    You can also set the preference tools |  Preferences | Debugger | Start debugging Option to ' get in '.  That should be limited to the first executable line.

  • PCI-6601 reading pulse without stop the meter

    Hi, the problem seems to be simple, just for the moment that I did not came up with a reasonable solution. I'm programming the meter 6601 for the following using my own routines of driver (in visual studio 2008 C++) for read/write registers. I follow carefully the DDK examples. I started with the example 1 and 4, and it works very well and now I have to somehow come up with the following code:

    1. I use the signal specific to 10 MHZ external H. MAser as input to the meter.

    2. I start the meter with arm software and am constantly read the values of the counter.

    3. I want everything just to read a single pulse (1PPS) and make the absolute time of the counter in time synchronization UTC. He should simply give me the meter reading of the rising edge of the PPS signal but after that it should be possible to read the counter as usual by reading the save save values, so read pps without stopping, nor anything in the registers of meter loading or b, simply give a pulse reading and continue even as 2...

    Any suggestions?

    Hello

    problem solved, but anyway, to all those who might have a similar task, here are the raw extract of what I've done (code names and function are similar to the DDK, but has nothing to do with the DDK)

    Sub yourclass::yourppscountfunction()
    {

    m_stopPPS = false;
     
    first reset internal values
    card1. Write_G01_Joint_Reset_Register_G0Reset(); reset the counter 0
    card1. G0_Reset_Registers_Values (); Reset internal values
    Disarm
    card1. Write_G0_Command_Register_Disarm (true);
    load the initial value of 0
    card1. Write_G0_Load_A_Register (0x00000000); counter should start with 0
    card1. Write_G0_Command_Register_G0_Load (); tells to load the initial counter of a register value
    Set the source to time external base
    card1. Write_G0_Input_SelectRegister_SourceSellect (1);
    Select the axis dedicated to door sellect (default value in this case, PFI_38)
    card1. Write_G0_Input_SelectRegister_GateSellect (1);
    card1. Write_G0_Mode_Register_Gating_Mode (2); rising edge Gate
    card1. WriteIO_Config_Reg_Pin36_Select_out(); Configure the PFI_36 PIN to drive the output
    card1. Write_G0_Mode_Register_Output_Mode (1); We're out the TC, connect to a counter2 to count the animated buttons
    Configure the PFI_36 PIN to drive the output (not made here)
    card1. Write_G0_Mode_Register_Trigger_Mode_For_Edge_Gate (3); Gate not used to start or stop
    card1. Write_G1_Command_Register_Synchronized_Gate (true);
    card1. Write_G0_Command_Register_Up_Down (1); counting direction up
     
    card1. Write_G0_DMA_Config_Register_DMA_Enable (true);
    card1. Write_G0_DMA_Config_Register_DMA_Int_Enable (true);
     
    arm the meter
    card1. Write_G0_Command_Register_Disarm (false);
    card1. Write_G0_Command_Register_Arm (true);
    WRITE THE COUNTER VALUES
      
    card1. G0_Write_Mode_Registers();
    card1. G0_Write_G0_Input_Sellect_Registers();
    card1. G0_Write_G0_DMA_Config_Registers();
    card1. G0_Write_Command_Registers();
    while(!m_stopPPS)
    {
    PeekAndPump();
    now loop to see if measures available PPS, if yes, read them and display
    If (card1. Read_DMA_Status_Register_G0_DRQ_Status()) //if that something saved
    {
    unsigned long int counterValue1.
      
    int HWSaveorSWSave;
    HWSaveorSWSave = card1. Read_DMA_Status_Register_G0_DMA_Readbank();
    if(HWSaveorSWSave==1)
    {
    counterValue1 = card1. Read_Save_Register();
    m_editPPSreading = counterValue1 * 1.E-7;
    }
    on the other
    {
    counterValue1 = card1. Read_HW_Save_Register();
    m_editPPSreading = counterValue1 * 1.E-7;
    }

    This-> UpdateData (FALSE);
    } //if something red

    } //while
    card1. Write_G0_Mode_Register_Gating_Mode (0); gating disabled
    card1. Write_G0_DMA_Config_Register_DMA_Enable (false); Disable dma
    card1. Write_G0_DMA_Config_Register_DMA_Int_Enable (false); Disable interrupts
    card1. G0_Write_G0_DMA_Config_Registers();
    card1. G0_Write_Mode_Registers();

    } //after you might normally read the meter (PPS values are added to playback as UTC offset-> not done here)

    to stop playback PPS and continue as normal counter where the values are simply red of the SW save registers
    Sub yourclass::yourstopppscount()
    {
    m_stopPPS = true;
    }

  • Disabling update the configuration file without stopping the VI

    I would like to perform a function that when the new modules are added in the existing system of the public Service or hot swapping modules autour, the VI can update its configuration file. I don't want the VI to stop we will collect data 24/7.

    I use cFP2220 and two or three modules of different types. I have my work VI and it is fairly straightforward FP read.vi in a time loop. All data are stored in the database using the Labview database tool. My screws are hosted on the local PC, not on the controller. I'm using Labview 8.6.

    I guess I have to get the file configuration (iak), whenever new modules are added, the iak file can be changed (without MAX aperture). In any case, I would have the flexibility to run the VI continuous. I know there is a similar code here: http://zone.ni.com/devzone/cda/epd/p/id/3221and they get the configuration file in the ini file. But I don't know how it's done as I can save only the configuration file as a file iak for FP system.

    Another potential problem associated with that, I guess, is the database format. For now, I use a three column structure, i.e., DateStamp, value and ChannelID. In this case, if I want to add/remove/swap channels, I can just change the ID of the corresponding channel. What happens if I have a horizontal arrangement of the database, namely 10 columns corresponding to 10 sensors, would he be in trouble if I change channels modules?

    Thank you very much.

    There is a way to change the module and programmatically updated the IAK file without stopping the VI.  You will need to change the FP read.vi front right by with the constant e/s FieldPoint.  You will need to use the Open FP, FP create Tag, read FP, and close to the public Service.  The trick to this is that you must pre-create files IAK in MAX first.  The way to do is to set up your cart in a configuration and then find devices to MAX.  Then save the iak.  Then reorganize your bottom of basket to the next setting would have desired, then have MAX find devices and who save in a file different iak.  You will need to do this for each configuration you have.  Then, you need to place the code below when you want to Ministry the configuration file.  I have also included a screenshot of MAX that you can see what the strings are correlated with.

Maybe you are looking for