From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

micro controller

Dennis Knutson,
Some time back ( 1/26/05) you were helping someone with a problem communicating with a micro controller. You said if you tried to read too few bytes the vi times out. I'm using the Serial Read Write that ships with LV 7.1. One of our test is to verify that we do not have communications between one serial port to another. The operator keeps the cable off the UUT on the receive but has it on the send port and runs the vi. He verifies no data is received on the Read side of the port of interest. How can I handle this vi error to turn it into a pass/fail criteria for LV7.1? It looks like a Windows error message that pops up. I just want to display PASS or FAIL to the operator. I don't want to display the error message.

Thanks,
Clint
0 Kudos
Message 1 of 5
(2,679 Views)
Hello Clint:

I am not Dennis Knutson but I think I can answer your question. I hope you don't mind.

VI errors are clusters containing status, code, and source. You can unbundle the error cluster to determine the code. If I'm not mistaken, the error code for Serial Read Time-out is -1073807339. You can connect the error code to a case structure. If the error code is equal to -1073807339, then have an output of "FAIL" then clear the error using "Clear Errors.vi"; then on the default case, have an output of "PASS".

I hope this helps. Please inform me if you have further questions.
0 Kudos
Message 2 of 5
(2,674 Views)
This is the "popup" I get and am trying to avoid see attached. I tried it at my desk w/o any serial card hooked up in case you'd like to try too. Just run the LABVIEW>>Serial vi that is under help>examples>search> type in serial. The vi is the 1st one in the list. If you open it and run it w/o changing anything you get the error I mentioned.
I want the SW to handle the error not the test person. They would have to hit "Continue" to .....continue ! This looks more like a Windows error rather than a LV error. Maybe something with an event vi ???
0 Kudos
Message 3 of 5
(2,671 Views)
Hello Clint:

Actually, the dialog you saw is automatically called by LabVIEW whenever it detects error on one of its vi's.
Please see attachment; it shows how not to display this dialog and have a PASS/FAIL output instead.
0 Kudos
Message 4 of 5
(2,667 Views)
You can have a popup message to show the operator what to do with this VI so they do not have to look at the LabVIEW code.
0 Kudos
Message 5 of 5
(2,644 Views)