LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1 during vi event scripting

I am working on some VI scripting to automatically build event structures.  I've made a lot of progress but am running into an error that is giving me trouble.  I'm parsing a text file and extracting names of controls.  I create a local variable for the control, then create a Value Change event for said local variable.  All of these events are appended into an array, which I then pass to the SetHandledEvents method.

 

When I run the code, I get the error:

Error 1 occured at Invoke Node

LabVIEW: An input parameter is invalid.  For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.

 

I can click 'Continue' at that point, and if I click it enough times, eventually the loop finishes and the correct code is created (I have verified this).

 

Right now I don't have any ideas as to what the invalid parameter would be...this only started happening when I put this into a loop, so I feel like it must be with how I'm initializing the array, but my initialization seems correct.  See attached screenshots...I couldn't fit the whole screen in one screenshot so I did it in 2 separate ones...

 

Any help?

Download All
0 Kudos
Message 1 of 3
(2,594 Views)

You can't create a Value Change event on a local variable.  You need to create it for the parent front panel terminal.  This would cause the Error 1.

0 Kudos
Message 2 of 3
(2,580 Views)

I'm sorry, I mis-typed.  It is a boolean push-button control that I'm using as the reference, not the local variable.  I've attached a screenshot that shows this.

 

Also, I wanted to clarify that this code worked until I put it into a loop.  In other words the only thing I added really was the initialize array function.  You can see that the first entry to that cluster says 'Null'...I have tried 'Null' and 'Value Change', but both give me the same error I wrote earlier.

 

I have attached a new screenshot.  Please ignore the 'local variable reference' comment...it's a boolean push button reference.

0 Kudos
Message 3 of 3
(2,576 Views)