LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I avoid serial frame synchronization errors?

I have a sub-VI that uses the serial read VI. Occasionally I will get a serial frame sync. errors as reported by labview internally to this VI. I cannot open it to use the general error handler and ignore it and it does not affect my serial communications after the user clicks ok. What it does do is holds up my long term running tests waiting for the pop up to be acknowledged. Is there any way to ignore an error inside of a NI VI that cannot be opened?
0 Kudos
Message 1 of 9
(4,363 Views)
Sorry I posted some info that was not correct. This error is caused in the VISA Read VI and is a framing error that is happening. It is error code -1073807253. It does not happen all of the time. In fact it is rare. But when it does it holds up my tests from running. All of my settings between MAX and my unit under test serial port match. I simply want to be able to ignore the error and stop the pop up from happening. Any help would be appreciated.
0 Kudos
Message 2 of 9
(4,356 Views)
If you want to simply ignore the error, turn off the automatic error handling dialogs. It's settable from the LabVIEW Options screen.
0 Kudos
Message 3 of 9
(4,353 Views)
Dennis - Thanks for the reply. I have disabled automatic error handling and dialogs in both the Labview options and the VI properties. The pop up still happens in the VISA Read VI about there being framing errors. The only way around it I have found so far is by taking my VISA Read VI out of the error checking loop. In other words I have disconnected the error in and out from the VISA Read VI within my sub-VI.
0 Kudos
Message 4 of 9
(4,338 Views)
Trosier,

One option might be to use a Clear Errors VI wired up to your Read VISA VI which resets the entire error cluster.  You can use this VI when you want to ignore errors.

Hope this helps,

Dillon M.
Applications Engineer
National Instruments
TheDillo
Message 5 of 9
(4,319 Views)

The solution I mentioned before is currently working but I will keep this one in mind next time.

 

Thanks

0 Kudos
Message 6 of 9
(4,295 Views)
A better way would be clearing the error only if it's a framing error. Other conditions (e.g. Timeout) could be important.
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 7 of 9
(4,291 Views)
I totally agree and that is why I am not completely happy with the solution I am using which is to take the VISA Read out of the error loop. Maybe my implementation was wrong. I did have a General Error Handler at the end of the VIs execution which I had setup to exclude the error that matches -1073807253 which is the framing error. Should I have put that at the output of the VISA Read exclusively? Maybe that way it would work the way I intended.
0 Kudos
Message 8 of 9
(4,287 Views)
pincpanter has a good point.  We could use an unbundle after the Read VISA, check if the error code the one you specified - and if it is, clear the error, if it is not, then pass it on.

Dillon M
Applications Engineer
National Instruments
TheDillo
0 Kudos
Message 9 of 9
(4,278 Views)