LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error list in VI scripting

Solved!
Go to solution

Is it possible to see the error list of a VI created by VI scripting? Preferably the same error list you get when you press a broken run button.

 

If a VI is created, but not executable, you get an error 1003 ("LabVIEW:  The VI is not executable...") when trying to run it. But this doesn't specify what's wrong with the VI.

 

Now I have to manually open the VI and check whats wrong. Is there another option?

 

 

0 Kudos
Message 1 of 14
(4,013 Views)

Hello Dennis,

 

That's actually a good question.

I don't directly know of a property or method that directly allows you to get this list (with one step).

Can you explain a bit more about the use case in which you would want to use this "error list function"?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 2 of 14
(3,968 Views)

There is a "Get Errors" method for VIs, but it doesn't give all the details.

0 Kudos
Message 3 of 14
(3,955 Views)

Hello pcardinale,

 

The "Get Errors" method you're talking about doesn't directly ring a bell for me (at least not at the level of the standard VI Methods).

 

One thing that might have caused confusion is that clicking a Broken Run Arrow is not the same as calling the Run Method for a VI.

When clicking a Broken Run Arrow another "function" gets called that checks the Block Diagram to see what is "wrong" with the VI (that has the Broken Run Arrow).

The fact that the Run Arrow is broken already indicates that it the code cannot be run, so therefore the LabVIEW Development Environment doesn't execute a "run" anymore.

 

I would have to double-check with someone to see if the code that is used for the creation of the Error List is directly available.

Before doing this there are some questions that are open at my side:

- Would you like to have only the error list reported?

- In other words: What are you planning to do in your scripting code with this error list?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 4 of 14
(3,928 Views)

Hello Thierry,

 

Happy new year!

 

When scripting, the general idea is to generate dynamic code adapted to a specific situation. The person running the script code isn't necessarily the programmer of this code.

 

If the situation combined with the scripting that generates code is faulty, the result is a broken VI. Now the user has to debug the result, with no usefull error code.

 

If it would be possible to have the reason for the failure availlable, the user could adapt and change an input for the scripting to make it work. It could even be automated if the error codes are good enough, so you could guide the user into entering valid input.

 

I know it would be best to prevent errors in the first place, but this is not always possible.

 

Kind Regards,

 

Dennis

0 Kudos
Message 5 of 14
(3,894 Views)
Solution
Accepted by topic author Dennis_Vriezekolk
Message 6 of 14
(3,883 Views)

That's exactly what I want, thanks!

 

But why can't I select it from the drop down list? It's not visible somehow...

0 Kudos
Message 7 of 14
(3,878 Views)

You should be able to get the info, select and use it by going through the 2 string arrays.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 8 of 14
(3,857 Views)

It's working fine. I can now see all errors, although they are slightly different than in the Error list it's perfectly usable.

 

I don't understand why I cant see the "Get Errors" in the drop down of the invoke node. I can see other scripting functions but not the "Get Errors". If I copy it, it works fine Smiley Frustrated

 

There's also no help availlable, I get "No description availlable" in the context help. I was wondering what the optional "Call dangerously" boolean did.

0 Kudos
Message 9 of 14
(3,849 Views)

Try adding this to labview.ini:

SuperPrivateScriptingFeatureVisible=True
SuperSecretPrivateSpecialStuff=True
SuperPrivateSpecialStuff=TRUE

 

Here is an image of the context help:

 

Context Help

Message 10 of 14
(3,829 Views)