LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error.txt file

I've read everything I think is available on creating custom error codes ( xxxx-errors.txt)  I can't find anything that tells how to "access" them.

In other words, I have the error text file created with say -8010 is "Turn power supply on".

Now I pass -8010 to the error cluster in a stacked seq but it doesn't popup and tell me "Turn power supply on".

What do I have to do to get the error cluster to tell the user what the error is when I pass it a number thats defined in the error text file?

Thanks..

 

0 Kudos
Message 1 of 9
(3,219 Views)

use an error ring (LabVIEW 2012 and later)

 

Use the general error handeler in previous versions


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 9
(3,217 Views)

Are you using the General Error Handler?  That VI has a lookup routine that will search in those files.  You could just be dropping the error somewhere along your way.  Can you post your code?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 9
(3,216 Views)

Thanks...I wasn't using that those.  Just the error cluster.

0 Kudos
Message 4 of 9
(3,207 Views)

Now I'm trying to use the simple and/or the general error in a sequence structure.  In one seq if I fail the test (TEST1) an error is displayed based on my xxx-error.txt file.  In another, same thing. If the test fails (TEST2)  I display an error based on the text file.  My problem is if the 1st test fails the next failure doesn't popup up and tell the operator.  The error handler vi, by design , just passes it thru  .By accident I found if I don't wire the error clusters from one error handler to the next it displays both errors.  If there are other things going on in the seq between test 1 and test2  should I be concerned that I didn't connect one error cluster to another??  Could I miss an error and not know it?  If it matters there is also a test 3 that checks for a failure which is after test 2 in the same seq.

0 Kudos
Message 5 of 9
(3,164 Views)

Could you post a screenshot of the code you’re referring to? It could help to clarify your question.

0 Kudos
Message 6 of 9
(3,144 Views)

Unfortunately I can't..  I'm just going to leave the error cluster unwired from one simple error handler to another that are in my sequences..If you're still interested I can create a bare bones sequence w the idea in mind of what I'm trying to do..

0 Kudos
Message 7 of 9
(3,127 Views)

_TIM,

I'm using the simple error handler in LV2012.  In state machine 1 I measure the value of a port on a DAQ Card.  If its say HIGH ( and I want low)  I fail using a case statement. I have the error.txt file w all my error codes defined.  So if the test fails it popus up the error and a description.  No problem.  The problem is if I go onto another statemachine 2 and do another measurement and it fails nothing happens.  Its as thought the error in SM1 has prevented the code that does the next test from executing.  If I allow SM1 to pass and SM2 to fail, SM2 popsup w the correct error code.  Now nothing after SM2 "runs".  If I clear the errors it works.  Why does an error prevent the following from executing?

 

Thxs

0 Kudos
Message 8 of 9
(3,086 Views)
Clint_Eastwood1000,
 
This is expected behavior for LabVIEW. If an error is generated, we want to skip subsequent code and propagate the error to the end of the program to be handled correctly. If you want to keep running your code, you can handle the error and clear it. Here is a document with an example on error handling without stopping the program.
Jason H
Automated Test Software R&D
0 Kudos
Message 9 of 9
(3,066 Views)