LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create custom codes such that user on any other computer does not have to manually add any file

Solved!
Go to solution

I am developing an application where all the sub VIs should use the error of the master vi where the master vi generates a custom error. The sub VIs sould base their action depending on which error it received. What is the best way to define custom errors so that the custom errors are automatically added when a user on any other computer is using my VIs? also How should i throw the custom errors based on a condition, say after 5 mins i want to generate a time out error ?

0 Kudos
Message 1 of 6
(2,841 Views)

> You can create your own table (2D) with column 1 will have custom error code and other will have its meaning.

 

How should I throw the custom errors based on a condition, say after 5 mins I want to generate a time out error ?

Design one timer, after timeout send a "Timeout error code" from table.

 

What you can have is a "Functional global" which will store error code. It will be in Write mode in your "Master vi" where you will generate errors depending on whatever conditions

 

In your subVis, same "Functional Global" will be in read mode. So you ll have error code available in all subvis.

 

Then may be you can have case structures in subvis to handle those errors accordingly.

 

I guess I have made my point clear, and I hope this will help you a bit.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 2 of 6
(2,836 Views)

>

thank you...i have currently created a wrapper vi with general error hanldler with custom codes and their description... which is a better approach??

0 Kudos
Message 3 of 6
(2,811 Views)
Solution
Accepted by topic author su_a

Even this is a good idea, you know your application very well, so if it sounds good to you then even we are happy.Smiley Happy

 

Only one thing I want to suggest, you can actually have a file (text, excel) to store these error codes and description.

Advantage of it is, later in future if you want to add/delete any codes, you don't have to change code, or build exe

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Message 4 of 6
(2,800 Views)

LabVIEW comes with an Error Code File Editor. You can distribute these error code files to other installs. You can also include them when you build an application (although it sounds like you are not doing that). Please read the LabVIEW Help on custom error code files.

0 Kudos
Message 5 of 6
(2,794 Views)

Gaurav : good idea.. I'll surely try it..

Smercurio_fc : I am not sure right now if It will be an application or a shared librry.. I looked into the help and it will be really helpful..thanks,,,

0 Kudos
Message 6 of 6
(2,780 Views)