LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trapping VISA USB to serial session error

Hello,

 

What would be the best way to trap a VISA error where someone disconnects a USB to serial Converter.

At the moment I am looking at the error code and if it is -1073807194 The I break out and let the user reset the system.

Is -1073807194 the only code that will indicate the USB bus was disconnected? Or are there a other codes that apply.

 

Thanks

 

Martin

0 Kudos
Message 1 of 5
(2,704 Views)

You need to perform some VISA job inside while loop in some duration to check the error.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 5
(2,682 Views)

@Martin__E wrote:

Hello,

 

What would be the best way to trap a VISA error where someone disconnects a USB to serial Converter.

At the moment I am looking at the error code and if it is -1073807194 The I break out and let the user reset the system.

Is -1073807194 the only code that will indicate the USB bus was disconnected? Or are there a other codes that apply.

 

Thanks

 

Martin


Don't worry about trapping the error where someone disconnects a USB to serial Converter

 

Trap the "Someone"!

 

Place a "TEST in Progress - Do not disturb" Sign on the station, Post an armed guard! (with orders to shoot!)

 

PROTECT your experiment's equipment set-up!  The alternative is to state, without ambiguity, the the contitions of your test could not be verified and the data, and any conclusions dranw from the data, have NO merit.  (Should be discarded without consideration)

 

Yes, that is very blunt.   If you want to draw conclusions about something you "Test" the "Test enviornment" must be tracable and stable.  You CANNOT recover from an undocumented procedural violation easilly.  You can abort or fail a "Test" where procedures were not followed..... it is much harder to "Prove" that such a violation did not effect data integrity! 


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

@JÞB wrote:

Don't worry about trapping the error where someone disconnects a USB to serial Converter

 

Trap the "Someone"!

 



Layer 8 failure 😉

 

The missing USB connector locking (fail by design) is the problem. Glue, cable tie ... or change the connectors like the Neutik or other industrial solutions..

Picture from http://www.neutrik.com/de/multimedia/usb/nkusb

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 5
(2,663 Views)

Good one !!! Smiley Very Happy

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 5 of 5
(2,658 Views)