Problem using invoke node

I have some tables on the front panel that I use to display my data results.
I use an invoke node to initialize them (so that results boxes are filled
with X's), but sometimes when I rerun the program old data gets back in.
What happens is if I run one test item, then when the program finishes I
click that test item off and click on the next item it is supposed to remove
the previous results so that the display is fresh for the new run. It does
do that at first, but in a subsequent sequence I take the table and new
results and stuff the new results into the table. Somehow the old results
table is passed to the subvi that does the stuffing. It does not do this
all the time, but it should not have a race condition because the
initialization and stuffing are separated by sequence. I am using generic
vi server class (generic/go object/control/control) because I only want to
initialize the display tables, not everything. Is this bugged or am I doing
something wrong? Maybe I should just use another way to initialize, but it
seemed like an elegant way to do it.

Using sequences doesn't remove the possibility of having race conditions. It's more a matter of how you pass the data between the different segments of your code. First thing is to NEVER use globals or locals to pass dynamic data between different parts of your code. Second, use dataflow to establish the proper execution of the program, not artificial structures such as sequences--which you should never have to use anyway. I know this message is kind of old, but if you are still having trouble I'd be glad to check out your code as this type of error is almost always a race condition.
Mike...
[email protected]
"...after all He's not a tame lion..."
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • Intermittent problem using "invoke node - reinitialization to default" command to clear an array

    I use the "reinitalization to default" invoke node to clear an array after sending the data to a file. The next time the vi is called the array should appear with all elements set at the default values. However occasionally the array will not be cleared and data from the previous time the vi was called is still in the arrary, or at least it appears that way since the same data for the previous time called appear in the file  when the new values are appended to the file. New data appears okay, only data points in the array which I dont update appear with the old values. And again it's an intermittent problem. I can fix the problem for a while anyway by shutting down labview and rerunning it.  Any ideas what's going on?
    Thank you.
    Chuck
    Solved!
    Go to Solution.

    A lot of this code should be done different, just for the reason that it is difficult to find such problems. I would suggest you browse examples about state machines to see some 'best practices'.
    But I guess I found the source of your error for now: I checked the control labled '1' which is used to build your appended array. Here I didn't find any initialization code or invoke node. Maybe that's it?
    Felix
    www.aescusoft.de
    My latest community nugget on producer/consumer design
    My current blog: A journey through uml

  • Is it better to use Invoke nodes or property nodes to set/get control values?

    I have a series of VI's that run in parallel, each to manage different functions- pumping, sensing, a fluid flow model, an experiment generator/runner.
    These need to exchange data, which I am currently doing using invoke nodes (that are all in subVIs), using methods "Set control value" and "Get control value". I find that every now and then (perhaps 1% of the time) the data isn't exchanged correctly and therefore the system doesn't work. I can imagine how "set" could go wrong if they happen simultaneously, and can devise ways of preventing this. However, the "Get" method suffers from the same problem. This is a major problem, because I want to leave it running for several hours.
    I could in
    principle achieve the same thing using property nodes and find myself wondering if this might be more reliable. But I don't want to change over only to find it makes no difference!
    Can anyone advise?

    You can use some kind of syncronization such as queues, occurances, or notifiers but I think the easiest way would be to create and action engine. This was only one action can execute at a time avoiding a "race condition". Possibly a write action and a read action might help. You also can add queues or notifiers into this concept. hope this helps.
    BJD1613
    Lead Test Tools Development Engineer
    Philips Respironics
    Certified LV Architect / Instructor

  • Using invoke nodes to change a control on a server vi

    I am trying to pass a parameter to a vi running in parallel with my main vi. I am using invoke nodes to do this without any problems. In server.vi I want to respond to a change in the control using an event structure. I have found that when passing the value to the vi using the invoke node from client.vi the event structure does not respond to the change in value. Is this correct behaviour? In the attachment run client and server, any change in the client panel is reflected in server without a response from the event structure. Running server by itself a change in the cluster causes the event structure to respond as expected. Thanks in advance for any help on this.
    Attachments:
    Test Invoke Node.llb ‏47 KB

    The set control value method is the same as using a local variable or the value property - it doesn't fire the event. To fire the event, you need to use the Value(signaling) property. To do this, you need to get a reference to the control. You can do this by taking the Front Panel property of the server VI and wiring that reference into another property node. Then, you get an array of references to all the controls on the FP. You will need to find your control and wire its reference into the signaling property and then the event will fire. There are, of course, other ways of doing this - this one is fairly complicated, since you have to find the reference.
    Try to take over the world!

  • How can i call a DLL file using invoke node from labview?

    I cant call a DDL function using call library function.so plz tell me how to use invoke node and call DLL using invoke node
    Please Mark the solution as accepted if your problem is solved and donate kudoes

    Please stay in the same thread.
    - Cheers, Ed

  • Multiple VI instance will not RUN using invoke node

    Hi,
    I need to have multiple instances of the same VI running.
    I've created a template of the VI i wan't to call multiple times.
    The VI is called via Open VI reference with a reference to the VI template.
    Parameters to the instance is passed via set control value.
    When opened and parameters has been passed, I use a invoke node to run the VI.
    An error occur.
    "Error 1000 occurred at Invoke Node in Template_Call plot window.vi
    Possible reason(s):
    LabVIEW:  The VI is not in a state compatible with this operation.
    Method Name: Run VI
    VI Path: NULL"
    Note ! The VIs should stay open after the call running independently of each other and the caller should not be waiting until the VI stops.
    Any ideas what I am doing wrong
    Regards Kahr
    Certified LabVIEW Architect
    CIM A/S
    Solved!
    Go to Solution.
    Attachments:
    Call_Plot Window.png ‏31 KB
    Template_Plot window.png ‏23 KB

    As simple as that Kumar !
    Thank You all
    Regards Kahr
    Certified LabVIEW Architect
    CIM A/S

  • Parallel calls to ActiveX using Invoke Node

    Dear colleagues,
    Please help/advice on such a problem.
    The program has a VI template (template.vit) having an ActiveX.
    Two calls to this template create different instances of the ActiveX with different reference numbers.
    Two asynchronous processed invokes the same function of the ActiveX supplying two different refs to Invoke Nodes. Execution of the function takes significant time.
    Apparently functions of two instances are not executed asynchronously. The second waits until accomplishment of the first.
    Please advice how the problem can be approached/solved. We need independency of the calls.
    PS: Most of the tests were done with LabVIEW 8.6.1
    Thank you

    Here's a quick example. Note that for charts you should also clear the history if so desired.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    defaults.vi ‏25 KB

  • Reinitialize to defaults using invoke node?

    I've read about this function in a few other threads, but can't figure out how to use the invoke node for that purpose.  How can I, with the push of a button while running my VI, reinitialize all values to defaults and clear all graphs?  Does anyone have an example they can show?

    Here's a quick example. Note that for charts you should also clear the history if so desired.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    defaults.vi ‏25 KB

  • I seem to have problems using AdjustHSV node for color replace/adjustment

    I have been using shake for some color adjustment on some high res (16bit) tif files. I have a simple network with the input node. I branch to an AdjustHSV node and then feed the original, the AdjustHSV and a roto shape into a KeyMix node. When I view the output of the KeyMix node and make adjustments to the AdjustHSV node sometimes it works, sometimes not. I am using a P2 proxy with update set to always. It is frustrating as I can't seem to make rhyme or reason to why it works interactive sometimes and other times it just seems to ignore my inputs. What I am doing is I view the output. I double click on the replace color on the HSV node to bring up the color picker and I am slowly moving the replace color in the color wheel to fine tune my color replace.

    rimcrazy wrote:
    I double click on the replace color on the HSV node to bring up the color picker
    Don't double-click. You're selecting the swatch and then deselecting it!
    Click once. When the swatch is selected, you'll see a yellow border around it.
    Les

  • I used to working with Labwindow CVI and i would like to know how can i use the commands "loadpanel" and "Displaypanel " in Labview. Using Invoke Nodes?

    I want to make another panel appears and runs, but i don´t want to use a subpanel. So, i would like to use somenthing similar to Loadpanel and Displaypanel, that you can use in Labwindows CVI, but in Labview, is ti possible?I hope your answers, thank you!!!

    Hi Bichillo,
    I posted an example here.
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=50650000000500000014570100&HTHREAD=000087828&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
    It demonstrates how to do what you are asking.
    I do not mind you laughing at the code.
    Have fun!
    Ben

  • Error 1 occurred at Invoke Node in openvi.vi

    Hello,  in openvi.vi, I use Invoke Node to run showchannel2.vi,  I met problem about error 1. please see attachment file.
    This problem have been described below absolutely.  
    Error 1 occurred at Invoke Node in openvi.vi
    Possible reason(s):
    LabVIEW:  An input parameter is invalid.
    NI-488:  Command requires GPIB Controller to be Controller in Charge.
    I don't know why? How can I overcome this question?
    Thank you very much 
    Solved!
    Go to Solution.
    Attachments:
    openvi.vi ‏38 KB
    ShowChannel2.vi ‏79 KB

    The datatypes of your controls don't match. In the subVI you have a U8. In the parent VI the slider is a DBL. Change the slider's datatype to a U8. You should also make sure you have a valid range on your slider. In the subVI you're subtracting 8 from the input value, so it seems you're wanting a control with a minimum value of 8.

  • Invoke Node - Make current values default

    I have an issue similar to many postings regarding the use of an invoke node to set control values and then to make those values default in that I get an error message: "Error 1000 ( The VI is not in a state compatible with this operation)."
    The catch is that it is not all the time.
    I am trying to set up a configuration utility which allows configuration or modification of settings of channels and serial ports. This top level VI pulls values from a configuration file using a mid-level VI which, in addition to loading the configuration file, also calls a further sub VI which initialises and sets as default front panel objects on a number of VI's using Invoke Nodes. Thus there is a heirachy of three VI's
    with the lowest level VI doing the Invoking.
    The only time I get the Error 1000 is when I try to run everything from the top level VI. From any lower level the VI's run with no problems and the defaults are set as desired.
    Any suggestions as to the origin of the problem?
    Ross.

    To complement the other answer that explains why it not always works, I would again and again stress that !! make current values default !! is not the way to go when you want initial values to be changed.
    For changing startup values you should use .ini files !
    greetings from the Netherlands

  • Invoke node (parallely working VIs in a library)

    Hello everyone,
    I am trying to evaluate a temperature sensor.To do that I have to monitor thermocouple readings.Thermocouple is connected to FP-TC-120 temperature module. Besides, I have to acquire data from an optical spectrum analyzer. I am using 3650.VI to monitor the temperature and 86140B Trace_Screen Capture(2).llb o trace the data from the OSA.
    I am trying to use Invoke Node VI to trace data from spectrum analyzer. To do that I specified the necessary file path as an input to the code. The problem is the necessary VI (Write Trace to File.VI) is inside of a llb. file and needs other codes to completely function.
    That's when I run the code, (and when the stability condition is met) the computer asks me to save the spectrum analyzer data to a file called trace.csv. When I press ok, it just saves an empty file with a header (Power(dbm) Wavelength (nm)). Apparently it works parallely with other VI. How can I make use of the VIs inside of a .llb file with invoke node VI or should I use other VI to do combine temperature monitor VI with data tracing VI.
    The second problem is with the stability criterion of temperature.In the attached VI, I check whether the thermocouple reading stays within 0.8 degree stability range for 900 seconds. I want to change this. I
    want to check the stability of the temperature by comparing the final data with the previous ones. Is there any specific VI that should be exploited to check the fluctuations of waveforms?
     Thanks a lot
    Solved!
    Go to Solution.
    Attachments:
    3650.vi ‏107 KB
    86140B Trace_Screen Capture(2).llb ‏143 KB

    deniz wrote:
    I tried to implement the first method you suggested. But i had trouble since I am just a beginner. Could you please be more specific in explaining the solution? I am stating the problem again. Once the stability criterion is met I want the case structure to execute on the increments of 30 second or so. How can I do that by using shift registers? I tried to do  what you suggested as in the code attached but it did not work. (I could not make the case structure dependent on two conditions)
    I understood what you wanted perfectly fine. You just didn't implement it correctly. See attached. Please revisit my comment regarding the Write To Spreadsheet File that already exists inside of the "Trace Xfer" VI.
    The other proplem is again about timing. The while loop execute only if the temperature value changes since it is dependent on FP Open sub VI.
    The while loop has no dependence on the FP Open VI other than waiting for the error cluster and Fieldpoint refnum. There is no dependence on the while loop executing only if the temperature value changes. The while loop continuously acquires data, so I do not understand your statement. 
    Thus, the elapsed time VIs that are inside of the loop does not progress at 1 second increments. Is there any way to set an elapsed time  that is independent of timestamp of thermocouple reading device? 
    They can't and won't. The Elapsed Time VIs simply tell you ... elapsed time. They have no bearing on how fast the loop runs. It seems as if you have contradictory requirements. Do you want to the loop to run once a second and record, or run at the advise rate and only do something once a second, or run at the advise rate and only do something if the temperature changes?
    Attachments:
    3650.vi ‏116 KB

  • Why do I get an error 1000 when using vi server with invoke nodes?

    I use the invoke nodes with set control value and run vi. I want to use the called vi on the same machine and in parallel and I do not want to wait until it is done. If I set wait until done to true it works, if I set it to false I get the error message. Why is that and how can I solve that problem??

    Hi,
    Using LabVIEW 7 I was able to do what you want. I modified an existing example. The main vi will load the a second VI, and then the main VI will do "set control value" on a numberic labeled "Numeric" and you'll be able to see that it is changing the control value.
    I've attached the modified VI.
    Attachments:
    parallel.zip ‏148 KB

  • Method Not Found Invoke Node error 1316 using Solid Works IEdm

    Hi Forum members,
    I have been having a problem with calling a function in a dll file.  I have attached the VI as example.  When I use the GetFile method I get a reference to that.  I then use the Invoke node and recieve a list of methods, the first of which is ChangeState.  I select this method and wire all required inputs and when I run the program I receive the error at that invoke node that the method does not exist.  How is this possible?  I have tried various methods to ensure the inputs are all correct and none have worked.  I do not believe the fault lies in the inputs, but I cannot for the life of me find the problem...  Perhaps someone has experience using Solid Works in Labview?  Any help would be appreciated.!!
    Cheers
    Ben
    Attachments:
    SetFileSatus.vi ‏18 KB

    I have determined that there is a problem with the Invoke node not recognising the function.  This is a Labview problem as the function is listed and selectable, so when the error comes saying the function is not found, this is a problem with Labview and not the dll.  The Function when selected also has the right input parameters that automatically appear.  How is it then that the method is not found when the program is run?

Maybe you are looking for

  • Can I have 2 apple Ids and share apps

    I just got an iPad mini and my husband and I share an apple is which is listed with his phone number I tried to change our Id to my phone number so that I could use iMessage through my iPad and iPhone but I couldn't change it. Apple said to creat a n

  • Error when DBLOGIN into SQL Server

    Hi, I'm using Oracle GoldenGate for SQL Server. I successfully created a DNS ODBC connection to SQL Server and named it as HRSQLSRV. When I tried to use DBLOGIN command in gg, I got the following: E:\ggs>GGSCI Oracle GoldenGate Command Interpreter fo

  • SCC file quirks when viewed in Apple DVD Player

    Greetings all, I have a bunch of DVDs with closed captioning that I am implementing by importing scc files. Everything works fine and looks gereat on set top players and even most software players running Windows. However, on the Mac running Apple DV

  • No luck with SCT

    I tried overstock and J Crew and didn't get any pop ups. I even made sure my pop up blocker was off and that I'm opted in for offers. Is it because I was in using my phone? Wasn't sure if that matters or not.

  • Creating a Cross tab that contains fields with shared variables

    I am trying to create a cross tab in CR2008. I can get the field in the details but cannot choose it when trying to create a cross tab. Please help. Thanks. Shared numbervar MonHrs; Shared numbervar TueHrs; Shared numbervar WedHrs; Shared numbervar T