04-09-2019 03:40 PM
Hi people,
I have a .net object invoking a node that counts a certain value when executed (dll is working as it should), and in each VI execution I get the desired value. However when I "Run Continuously" the VI, it seems that LabVIEW is adding up the actual value to the last one of the last execution, and I get a wrong value. I have already tried to create a local variable and zeroed it at the beginning of the script and many others attempts such as cleaning all indicators at the VI properties, but it seems that the reference is just not closed at the end of each execution (but I am closing the reference of the object too)... I have no idea how to solve this, if anyone could help, I would be grateful!
I am not sure if posting the code would help, nor if I can, it is just a Construction Node -> Invoke Node -> Indicator -> Close Reference.
04-09-2019 03:43 PM
I have no idea, either. I might have a better idea if you actually posted the code. (Meaning, the actual VI and not a picture. You wouldn't bring a picture of your car to a mechanic so he can figure out why it's not starting, right?)
04-09-2019 03:45 PM - edited 04-09-2019 03:48 PM
"Run continuously" is a debugging tool and not a valid way to run or test a VI.
(It is impossible to tell from your description what you are actually doing, so seeing some simplified code would definitely help. What is a "script"?)
04-09-2019 03:45 PM - edited 04-09-2019 03:46 PM
Why are you using the "Run Continuously" button anyway? It's a debugging tool and shouldn't be used for anything other than that. Actually, I do have an idea or two about what's going on, but I'm going to wait for the code so I don't have to guess.
04-09-2019 03:49 PM
Billko,
I appreciate your contact, however I am afraid I cant post the code. Do you have any suggestion related to the invoke node, if I can force its reference closure... or if my flat sequence structure (I am using one) is interfering in the "run continuously" execution. Idk...
04-09-2019 03:52 PM
altenbach and Billko,
I use the VI in the TestStand software, and there the execution is having the same behavior as the run continously button.
04-09-2019 04:10 PM
As shown, the invoke node "getListSize" returns a int value, and after each execution, the value is added to its last execution value.
04-09-2019 04:19 PM
@enzofurlan wrote:
As shown, the invoke node "getListSize" returns a int value, and after each execution, the value is added to its last execution value.
Just post the VI.
04-09-2019 04:37 PM - edited 04-09-2019 04:55 PM
Here s the VI, as said, it works perfectly when executed once, but in TestStand, where I execute it multiple times, the "Event Index" indicator is my problem.
I appreciate your help.
EDIT: simplified version
04-10-2019 01:40 AM
Sorry for not getting back to you. Are you able to save it as previous? I only have LV 2016. 😞