Labview DLL and Defining Static Variables

A Labview DLL that I am making currently consists of three parts:
1) Initialization protocols for a data recorder
2) Data retrieval from digital data recorder
3) Uninitialization of the data recorder
The DLL has one large sequence structure broken into three sections, and inside each segment there is a true/false case statement which allows the code to run or not.  Each case statement is run one-at-a-time by sending a "selection" value to the DLL which signifies which of the three case statements should execute.  There are hard coded wires running between each of the three in-line sequence structures enabling data to flow from left to right as the code in the DLL executes.
What happens to the state of the data in the hard coded wires when the DLL runs some code in one of the case statements and hands control back to VB?  In other words, in VB I can define variables which are static or self-destruct upon leaving a subroutine.  How is this controlled in Labview?
Also, in the "false" case statements, what is the effect of selecting "use default if unwired"?  I would like to explicitely define this connection properly but am not sure how to proceed.  I would the data held in this wire to be the same data that passed during the function call when the case was "true".
Thanks.

After our disussion above, I was "thinking outside the box" and decided to try a much simpler approach to creating a Labview DLL, which is called by VB.  Being primarily a text based programmer, I wanted to create a Labview DLL project that kept all the function calls in one VI and not have them spread across several VI's, as is the normal practice in Labview coding.  As in text based programming, where multiple function calls can be placed in one module and are easy to read and understand because of their close proximity in the editing compiler, I wanted the same thing from Labview.  This has been accomplished.
To do this I created the code shown in Simple-DLL.JPG.  All the code is in one VI and all parameters that are meant to stay static during calls to the DLL are maintained by local variables.  I'm sure shift registers could be made to work here, but code in this routine is only called once every five or ten seconds.  There are only three parameters that are passed during each call to the center routine to get data back from a digital data recorder.  Those parameters are 1) lSelector, 2) lArraySize, and 3) dArray[].  As mentioned earlier, the other parameters are held static by use of the local variables.
I like the simplicity of this approach, and maintenance of code is extremely easy.  Much easier that flipping between multiple function call VI's and the VI holding the global variables.  Reading and understanding the code is also easy to do in this approach.
Obviously, if one has a project where multiple functions are called with many variables being passed back and forth, then my example may have limitations.  But I wanted to document the above approach for text based programmers to reap the benefits of something easy to understand and implement, especially when their programming experience with Labview is limited, and their Labview project is relatively small.  Your comments are welcome!!
Attachments:
Simple-DLL.jpg ‏153 KB

Similar Messages

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

  • Can we define 'Static Variables' in BPEL process ?

    Is the idea of 'STATIC VARIABLES' supported in Oracle BPEL?
    What I mean by that is, I need all my in-flight BPEL process INSTANCES to read a common variable and then decide the next course of action.
    Is this possible?
    Thanks in advance,
    Mahendra

    Hi Hans,
    In Cocoa and Objective-C a static variable needs to be declared in the implementation file and not the header as you would normally do. Standard C variables can be set at the same time as the declaration but Cocoa objects need an extra step.
    For example:
    #import "TestObject.h"
    // declare your static variable here
    static NSArray *count;
    @implementation TestObject
    - (id) init {
    self = [super init];
    if (self != nil) {
    // set the variable here
    // the 'if' statement ensures it is only set once
    if (!count) {
    count = [[NSArray arrayWithObjects:@"One",@"Two",@"Three",Nil] retain];
    return self;
    @end
    Hope this helps,
    Martin.
    PowerMac G5 1.6Ghz   Mac OS X (10.4.9)   4 gig RAM & NVidia 6800 Ultra

  • Static and non-static variables and methods

    Hi all,
    There's an excellent thread that outlines very clearly the differences between static and non-static:
    http://forum.java.sun.com/thread.jsp?forum=54&thread=374018
    But I have to admit, that it still hasn't helped me solve my problem. There's obviously something I haven't yet grasped and if anyone could make it clear to me I would be most grateful.
    Bascially, I've got a servlet that instatiates a message system (ie starts it running), or, according to the action passed to it from the form, stops the message system, queries its status (ie finds out if its actually running or not) and, from time to time, writes the message system's progress to the browser.
    My skeleton code then looks like this:
    public class IMS extends HttpServlet
        public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
            doPost(request, response);
       public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
          //get the various parameters...
             if (user.equalsIgnoreCase(username) && pass.equalsIgnoreCase(password))
                if(action.equalsIgnoreCase("start"))
                    try
                        IMSRequest imsRequest = new IMSRequest();
                        imsRequest.startIMS(response);
                    catch(IOException ex)
                    catch(ClassNotFoundException ex)
                else if(action.equalsIgnoreCase("stop"))
                    try
                        StopIMS stopIMS = new StopIMS();
                        stopIMS.stop(response);
                    catch(IOException ex)
                 else if(action.equalsIgnoreCase("status"))
                    try
                        ViewStatus status = new ViewStatus();
                        status.view(response);
                    catch(IOException ex)
             else
                response.sendRedirect ("/IMS/wrongPassword.html");
    public class IMSRequest
    //a whole load of other variables   
      public  PrintWriter    out;
        public  int                 messageNumber;
        public  int                 n;
        public  boolean         status = false;  //surely this is a static variable?
        public  String            messageData = ""; // and perhaps this too?
        public IMSRequest()
        public void startIMS(HttpServletResponse response) throws IOException, ClassNotFoundException
            try
                response.setContentType("text/html");
                out = response.getWriter();
                for(n = 1 ; ; n++ )
                    getMessageInstance();
                    File file = new File("/Users/damian/Desktop/Test/stop_IMS");
                    if (n == 1 && file.exists())
                        file.delete();
                    else if (file.exists())
                        throw new ServletException();
                    try
                        databaseConnect();
                   catch (ClassNotFoundException e)
    //here I start to get compile problems, saying I can't access non-static methods from inside a static method               
                   out.println(FrontPage.displayHeader()); 
                    out.println("</BODY>\n</HTML>");
                    out.close();
                    Thread.sleep(1000);
            catch (Exception e)
        }OK, so, specifially, my problem is this:
    Do I assume that when I instantiate the object imsRequest thus;
    IMSRequest imsRequest = new IMSRequest();
    imsRequest.startIMS(response); I am no longer in a static method? That's what I thought. But the problem is that, in the class, IMSRequest I start to get compile problems saying that I can't access non-static variables from a static method, and so on and so on.
    I know I can cheat by changing these to static variables, but there are some specific variables that just shouldn't be static. It seems that something has escaped me. Can anyone point out what it is?
    Many thanks for your time and I will gladly post more code/explain my problem in more detail, if it helps you to explain it to me.
    Damian

    Can I just ask you one more question though?Okay, but I warn you: it's 1:00 a.m., I've been doing almost nothing but Java for about 18 hours, and I don't do servlets, so don't take any of this as gospel.
    If, however, from another class (FrontPage for
    example), I call ((new.IMSRequest().writeHTML) or
    something like that, then I'm creating a new instance
    of IMSRequest (right?)That's what new does, yes.
    and therefore I am never going
    to see the information I need from my original
    IMSRequest instance. Am I right on this?I don't know. That's up to you. What do you do with the existing IMS request when you create the new FrontPage? Is there another reference to it somewhere? I don't know enough about your design or the goal of your software to really answer.
    On the other hand, IMSRequest is designed to run
    continuously (prehaps for hours), so I don't really
    want to just print out a continuous stream of stuff to
    the browser. How can I though, every so often, call
    the status of this instance of this servlet?One possibility is to pass the existing IMSRequest to the FrontPage and have it use that one, rather than creating its own. Or is that not what you're asking? Again, I don't have enough details (or maybe just not enough functioning brain cells) to see how it all fits together.
    One thing that puzzles me here: It seems to me that FP uses IMSReq, but IMSReq also uses FP. Is that the case? Those two way dependencies can make things ugly in a hurry, and are often a sign of bad design. It may be perfectly valid for what you're doing, but you may want to look at it closely and see if there's a better way.

  • Nexus 5548 and Define static route to forward traffic to Catalyst 4500

    Dear Experts,
    Need your technical assistance for the Static routing in between Nexus 5548 and Catalyst 4500.
    Further I connected both Nexus 5548 with Catalyst 4500 as individual trunk ports because there is HSRP on Catalyst 4500. So I just took 1 port from each nexus 5548, make it trunk with the Core Switch (Also make trunk from each Switch each port). Change the speed on Nexus to 1000 because other side on Catalyst 4500 line card is 1G RJ45.
    *Here is the Config on Nexus 5548 to make port a Trunk:*
    N5548-A/ N5548-B
    Interface Ethernet1/3
    Switchport mode trunk
    Speed 1000
    Added the static route on both nexus for Core HSRP IP: *ip route 0.0.0.0/0 10.10.150.39 (Virtual HSRP IP )*
    But I could not able to ping from N5548 Console to core Switch IP of HSRP? Is there any further configuration to enable routing or ping?
    Pleas suggest

    Hello,
    Please see attached config for both Nexus 5548. I dont have Catalyst 4500 but below is simple config what I applied:
    Both Catalyst 4500
    interface gig 3/48
    switchport mode trunk
    switchport trunk encap dot1q
    On Nexus 5548 Port 1/3 is trunk
    Thanks,
    Jehan

  • Local static variable not unique between dylib, Xcode 4.4.1 bug?

    I am wondering if this is a Xcode bug or it is the way the c++ standart is.
    I would expect to  see 1 in the console but i see 0.
    Anybody know why? Here is the code
    In one dylib I have
    // Header file
    class Foo {
       int i_ = 0;
       Foo(const Foo&) = delete;
       Foo& operator= (Foo) = delete;
       Foo()
    public:
       void inc()
          ++i_;
       int geti()
          return i_;
       static Foo& get()
          static Foo instance_;
          return instance_;
       Foo( Foo&&) = default;
       Foo& operator= (Foo&&) = default;
    int initialize()
       Foo::get().inc();
       return 10;
    class Bar
       static int b_;
    // cpp file
    #include "ClassLocalStatic.h"
    int Bar::b_ = initialize();
    and in my application project i have
    // main.cpp
    #include <iostream>
    #include "ClassLocalstatic.h"
    int main(int argc, const char * argv[])
       std::cout << Foo::get().geti();
       return 0;
    Thanks

    thanks for your answer, You are right there is 2 foo singleton at different memory addresses.
    I didn't think about when the dylib was loaded. I can't even tell when it is loaded. But I know if i but breaks point I break in the initialize function before breaking in main, but that might be because of this actual setup. So when does a dylib will be loaded? At the first call a program sees that need the dylib?
    Here I'explain why it is done this way. My Singleton is a UnitTestRegistry, the Bar class is a UnitTest class and the static variable b_ is a class containing metadata info on the unit test.
    I have a macro to define the unit test it is called Make_UnitTest()
    So in a cpp I do
    Make_UnitTest(MyTest)
         // Test Stuff
    The macro will get expanded to
    class MyTest_UnitTest: public UnitTestBase
         static UniTestMetaData b_;
         virtual void executeTest();
    int MyTest_UnitTest::b_ = initializeAndRegisterUnitTest("MyTest_UnitTest", factoryFunction);
    MyTest_UnitTest::executeTest()
    // Test Stuff
    And in the function initializeAndRegisterUnitTest I call the getInstance of the unit test  registry. This way my unit test are registred at loading time of the program/dll. If you know a better way to automatically register (i know it cuold be manual but i find it too cumbersome), but it wont fix the problem which is that I have two intance of my singleton because the function is inline in a header.
    Well this behavior is surprising to me, I didn't know it would do this. But hey it is good to learn right!
    Just to make it clear there is no real global!! The singleton is like a global but it is not completly one and the b_ is certainly not global it is a class static memeber...

  • Problems in using Labview DLL with TestStand!

    Hi,
    I tried to put the VI's to create a TCP/IP Connection, read/write Data to it and close it inside a LabVIEW DLL and use these functions with TestStand.
    The problem is to get access to the ConnectionID generated as TCP Network Refnum in LabVIEW.
    I don't know how to specify the prototype entry for this Refnum in LabVIEW and how to read it with TestStand.
    Another try to pass an ActiveXReference of SequenceContext and use the SetValIDispatch method to set a local variable (Type: ActiveXReference) to the returned ConnectionID of the TCPOpen.VI wasn't successful too.
    It seems to me that the connectionID isn't a normal ActiveXReference.
    Regards,
    Sunny

    Hi Sunny -
    You should treat this parameter as a pointer to an int when calling the DLL from TestStand (or any language like C or C++). Note that you can't do anything with the value outside of LabVIEW since it only has meaning inside of LabVIEW. You can only pass it around for use in other VIs you call from TestStand.
    Hope this helps....
    Kyle G.
    National Instruments
    Kyle Gupton
    LabVIEW R&D
    National Instruments

  • Deploying labview dll for vb6

    Hello,
    I have created a labview DLL that uses the modulation toolkit. The idea is to use this dll in a VB6 project and this on a PC that doesn't have anything installed from Labview, only visual basic 6.
    To test my DLL, i have created a VB6 test project on my development PC (with labview + modulation toolkit installed) which calls this DLL. On my development PC everything is working fine. The problem starts when I try to run this VB6 project on a PC without Labview. First, he asked for the labview runtime engine, so I installed this and restarted my VB6 project. But if I try to run my project VB6 automatically shuts down.
    How can I create a VB6 project on a blank PC that uses my labview DLL?
    Thanks

    Well, as you've already found out, you have to have the LabVIEW Run Time Engine installed on this other PC. This is an absolute requirement.
    Unfortunately, right now there's too many variables, so the only other answer I can give you is that you should try to narrow this problem down by creating a simplified LabVIEW DLL and try to call it in your VB6 on this other computer. To be honest, I'm not sure whether not having the deployment license for the Modulation Toolkit on this other machine would actually cause VB6 to crash. I did a search on this site and didn't find anything. Still, I would suggest trying it out with the Modulation Toolkit first,  Then work your way up until you find where it breaks.

  • Using PostLVUserEvent function from Labview.dll

    I am trying to use the PostLVuserEvent function from the labview.dll and corresponding extcode.h file.  I have made my own dll using CVI that uses this function.  I then use Labview to call my dll.  My dll compiles fine.  No issues, no errors.  LabView can call my dll function containing the PostLVUserEvent function with no errors.  However, the event number LabView passes my dll is not the same event number I receive so no LabView event is triggered. 
    Has anyone had this issue? 
    We are trying to solve it from the LabView side and the CVI side but cannot seem to get it to work.  The examplesI have found here were compiled using C++ and those seem to work.  I do not know why when I compile my program in C, it creates the dll but does not work.   If I had to guess, i think it's an issue with pointers vs non-pointers.  When the LAbview program selects my function from the dll, it shows the argument PostLVUserEvent as a pointer when in my dll, it is not a pointer PostLVUserEvent....
    Any ideas?
    Thanks in advance. 

    Hello Blue
    Take a look to this one, it was created on C, I think the .c and the .h files will give a good idea, how the function should be implemented. It is important when calling the dll on LabVIEW, to use the std calling convention and run it on the UI thread.
    Regards
    Mart G
    Attachments:
    LabView EventTest.zip ‏1041 KB

  • IS IT POSSIBLE TO CONVERT DATA SERVER EXAMPLE INTO DLL AND CALLING IT FROM VC++

    Hi;
    I have a real time implementation that runs in my PXI machine. Then I have a front panel running on a different computer (host) that reads the outputs of the real-time machine and plots them. The output of the real-time machine is a 2d array. What I am trying to do is take this data and send it to my C++ application. To do that I am considering sending the data to a specific port on my host machine using the data server example (2d version of it). To this end, I am considering converting this server into a Labview dll and read its output in my C++ code.
    I am wondering if this can be done?  
    If yes Could you please provide me a little code as to how to read the outputs of this Labview dll in c++?    
    Is there any tutorial as to how to create a Labview dll for Labview 2009? 
    Thank you so much!
    Serdar 

    Hello,
    You may want to take a look at this tutorial:
    http://zone.ni.com/devzone/cda/tut/p/id/3517
    Let me know if it helps!
    -Zach
    Certified LabVIEW Developer

  • Static variable error

    I know that non-static variables cannot be refrenced from a static context and I see where this error is happening but I can't figure out why. It doesn't appear that I am cross referencing static and non-static variables.
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.*;
    public class CookieStuff extends JFrame implements ActionListener
         private final int XSIZE = 600;
         private final int YSIZE = 300;
         private JButton myButton;
         private JButton myButton2;
         private JLabel myLabel;
         private JLabel myLabel2;
         public JTextField myTextField;
          * Constructor
         public CookieStuff(String title)
              super(title);
              setSize(XSIZE,YSIZE);
              myButton = new JButton("Bake cookies");
              myButton2= new JButton("Eat cookies");
              myLabel = new JLabel("Number of cookies left: ");
              myLabel2= new JLabel("Enter # of cookies and select a button");
              myTextField = new JTextField(5);
              myButton.addActionListener(this);
              myButton2.addActionListener(this);
              add(myButton,BorderLayout.NORTH);
              add(myButton2,BorderLayout.SOUTH);
              add(myLabel,BorderLayout.WEST);
              add(myLabel2,BorderLayout.EAST);
              add(myTextField,BorderLayout.CENTER);
         public static void welcomeStuff()
              JOptionPane.showMessageDialog(null,"Welcome to grandma's cookie jar..");
         public void actionPerformed(ActionEvent ev)
             Object source = ev.getSource();
             if(source == myButton)
                   if(CookieJar.bake() > CookieJar.COOKIES_ALLOWED)
                        JOptionPane.showMessageDialog(this, "Grandma's jar is too small for that many cookies");
                   else
                        JOptionPane.showMessageDialog(this, CookieJar.bake());
                        myLabel.setText("Number of cookies left: " + (CookieJar.bake()));
              else
                   if(CookieJar.eat() < 0)
                        JOptionPane.showMessageDialog(this, "There are not enough cookies in the jar fatso");
                   else
                        JOptionPane.showMessageDialog(this, CookieJar.eat());
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.*;
    public class CookieJar
        public static final int COOKIES_ALLOWED = 40;
        public int numOfCookies;
        public int cookieCount;
        public CookieJar()
              cookieCount = numOfCookies;
              numOfCookies++;
         public int eat()
              int numOfCookies = 0;
              numOfCookies = (numOfCookies - Integer.parseInt(CookieStuff.myTextField.getText()));
              return numOfCookies;
         public int bake()
              int numOfCookies = 0;
              numOfCookies = (numOfCookies + Integer.parseInt(CookieStuff.myTextField.getText()));
              return numOfCookies;
    }The last 2 methods eat( ) and bake( ) are giving the errors. Thanks.

    C:\Documents and Settings\Travis Mandrell\Desktop\DePaul\CSC212\hw8\CookieStuff.java:49: non-static method bake() cannot be referenced from a static context
                   if(CookieJar.bake() > CookieJar.COOKIES_ALLOWED)
    ^
    C:\Documents and Settings\Travis Mandrell\Desktop\DePaul\CSC212\hw8\CookieStuff.java:55: non-static method bake() cannot be referenced from a static context
                        JOptionPane.showMessageDialog(this, CookieJar.bake());
    ^
    C:\Documents and Settings\Travis Mandrell\Desktop\DePaul\CSC212\hw8\CookieStuff.java:56: non-static method bake() cannot be referenced from a static context
                        myLabel.setText("Number of cookies left: " + (CookieJar.bake()));
    ^
    C:\Documents and Settings\Travis Mandrell\Desktop\DePaul\CSC212\hw8\CookieStuff.java:62: non-static method eat() cannot be referenced from a static context
                   if(CookieJar.eat() < 0)
    ^
    C:\Documents and Settings\Travis Mandrell\Desktop\DePaul\CSC212\hw8\CookieStuff.java:68: non-static method eat() cannot be referenced from a static context
    JOptionPane.showMessageDialog(this, CookieJar.eat());
    ^
    .\CookieJar.java:21: non-static variable myTextField cannot be referenced from a static context
              numOfCookies = (numOfCookies - Integer.parseInt(CookieStuff.myTextField.getText()));
    ^
    .\CookieJar.java:28: non-static variable myTextField cannot be referenced from a static context
              numOfCookies = (numOfCookies + Integer.parseInt(CookieStuff.myTextField.getText()));
    ^
    7 errors

  • What is static variable.

    What is static variable. what is difference between  static variable and public variable?

    Static variables belong to the Class. Non-static variables belong to Class instances.
    Public variables can be accessed from outside of the Package. Non-public variables can only be accessed within the Package.
    So they are quite different thing. You can have Static variables, Public Static variables, and Private Static variables...

  • Define a sort of static variable in a FlatFile Resource

    This is the problem, i have a FlatFile Resource that calls a Process Rule (a Workflow). Every user that FlatFile Resource find with the Workflow it retrieves a list, so every time it wastes time because the list is always the same, i have to retrieve this list only the first time the FlatFile start. I wonder if there is a way to define a variable that is setted only the first time FlatFile start and every user can access to it. Who comes from the world of Java like me, i mean to define a sort of a static variable.
    Edited by: thestig on Mar 18, 2009 2:11 AM

    >
    Hi Sandipan, sorry for the late, I tried to manage this task but without success.
    The user exit I'm working on in EXIT_SAPLBBPK_001.
    FUNCTION EXIT_SAPLBBPK_001.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(IM_BBPDECDATA) LIKE  BBPDECDATA STRUCTURE  BBPDECDATA
    *"     VALUE(IV_MANU_PROF) TYPE  MANPRC OPTIONAL
    *"  CHANGING
    *"     VALUE(CH_PROFILE) LIKE  T160EX-EPROFILE
      INCLUDE ZXBBPU04.
    ENDFUNCTION.
    It includes ZXBBPU04, in which I have to understand if I'm working on a Purch. requisition in MODIFY mode or in CREATE mode.

  • Equivalent of visual Basic static variable in LabVIEW

    Hi all!
    I am doing a project where I am counting the values. After i Close/Stop the program I want the value to be intact and continue with the last value.
    I know this in Visual Basic. By using the Static variable we can retain the value even we close the program.
    Kindly help..
    Srikanth Chilivery,
    Solved!
    Go to Solution.

    I have trouble believing that a static variable retains its value after the program is terminated.  Once the program is released from memory, that static variable is gone.  If you want to retain a value between closing and opening an application, you have to save it to disk in some way.
    Are you working exclusively in the LabVIEW IDE or are you running EXEs?  It sounds like you probably just want to use a Functional Global Variable/Action Engine.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to read static variable defined java class from flex?

    This is a beginner question. If I use remoteClass to map a java class and a flex class, how can I access a static variable defined in java class from the flex code?
    Thanks!

    Static propeties are by default ignored in the blazeds for serialization. You can try using another global property in the java bean which maps to the value stored in the static property( Hopefully it should work)
    eg,
    public String instanceValue = ClassName.staticValue;
    Ref: http://livedocs.adobe.com/blazeds/1/blazeds_devguide/help.html?content=serialize_data_3.ht ml

Maybe you are looking for

  • 1.4.2 installation on windows 2000

    I tried 1.4.1 SDK it was not working now I downloaded 1.4.2 beta when i run the exe file it say "error reading setup initialization file"

  • Sound input read multiple soundcards

    Heey everybody, I have a problem. I want to read two different signals at the same time from 2 different soundcards. 1 internal soundcard from my laptop, and 1 usb soundcard.  So i used the Acquire Sound VI. Reading both signals at the same time is n

  • Make Netlet run automatically when login on

    In Portal Server 3 the Netlet started automatically when a user logged in. Is it possible to set up this in Portal Server 6 as well, not having to start the Netlet manually by pressing one of the Netlet links? - Morten

  • VZ Navigator Screen Dim after ICS update

    Since the update to Android 4.0.4, the VZ Navigator application my Droid Razr Maxx is almost unusable during the day.  Entering the application immediately dims the display so low that it is almost unreadable.   Exiting the application immediately re

  • How do i return a osprey wifi device

    hi,  I spoke to ee custumer service yesterday and they said it was fine to return it but i thought they said that i would get an email with the return address seing as i get the device from a call and not from a shop. Is there a return address i send