LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error message to user

Solved!
Go to solution

Hi,

       In the attached VI, i have taken a case structure for displaying the message whenever error enters into the block. But its irritating me even though i have given an user message in that but it not poping up the dailog box whenever the error enters in that block. 

                   Can any one figure it out. Thanks in advance.

0 Kudos
Message 1 of 8
(6,626 Views)

The express VI dialog block is not intended for displaying any messages based on what is in the error cluster coming in.  It is intended for displaying any messages that you feed into the other inputs of the express VI.  It actually will not display any pop up at all if there is an error.  That is because like many subVI's, there is an internal case structure where the real code only executes if there is no error.  If there is an error, the error is just passed through and no other action is taken.

 

Why are you using the Express VI to try to display a dialog box when you already have the error handler dialog right after it?

 

And why do you have an error handler dialog in the No Error case of your case structure.  The code in that won't do anything because of there is no error, it won't display the error dialog.

0 Kudos
Message 2 of 8
(6,613 Views)

Your error message will only display based on an error condition from the VISA Write. You probably want to set it up so that it will be displayed if either the Write or the Read encounter an error.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 8
(6,606 Views)

I know that about express Vi can not intend for displaying coming errors. In my case i know why error is coming and i want to display the error clearly to the user unlike the message generated by error handler(with error code). For that i feed a message into Display message to user VI and if the error came in , likely i want to display that message but as far it not poping up what i have written inner on that VI.

 

            I hope now you will give me any solution for that.

 

0 Kudos
Message 4 of 8
(6,602 Views)

Raven told you exactly why the Express VI is not popping up. Internally it has a case structure and will not display it if there is an error passed in. Disconnect the error wire to the Express VI. Please take the time to read the answers people post.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 5 of 8
(6,599 Views)

Hi,

       In my case, i want to give an user friendly message that can easily understand by user unlike labview generated error with error code(by using simple error handler VI). So, in that case i tried with simple error handler VI and observed that its not displaying user understandable message. In that situation i want to pop up a message(which i have written internally in it ) by using display messge to user VI.

       @Ravens--> in error case--> i am interfacing to an USB which having some data to and from labview. In the mean process, if the RESET(button pressed on microcontroller side, so no more existing comport ) or USB plucked out by unknown person, in that case i want to display a message to user which i have written in display messge to user VI. More, In that case(error case) i want to stop the loop and total program but if couldn't use that simple error handler VI after display messge to user VI then program never ends and continuing with errors.

           @Ravens--> in No error case--> i dont want to stop the loop and continus until it encounter the error. So, simple error handler VI will not read error in and out until there was no error coming due to port lost or etc. Loop continous till error encounters.

 

            Now, tell me how can i display the messge which i have written in display messge to user VI or is there any way to do that.

                                    Hope this time will get answer rather than these long discriptions.

                                           Thank you for your support.

0 Kudos
Message 6 of 8
(6,564 Views)
Solution
Accepted by topic author shjukheter

How many times do you have to be told? DISCONNECT THE ERROR WIRE TO YOUR DIALOG! This was not part of any long description. It was plainly stated

0 Kudos
Message 7 of 8
(6,555 Views)

In your case with your dialog box DO NOT wire the error to your dialog VI. DO NOT use the general error handler. If you want to stop the program on an error you already know you have an error based on which case you are in. The red colored one means you have an error so wire a TRUE constant to your Or test. In the green case (no error) wire a FALSE constant to the Or. There definitely is no reason to run the general error handler in the no error case since you already determined there is no error.

 

Please, take some time learning LabVIEW. There have been several suggestions for good resources.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 8 of 8
(6,552 Views)