Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

USB COM Probe stops if not instr class

USB communications gives intermittent error "The resource is valid but VISA cannot currently access it". The main program accesses the same subroutine to communicate with the USB instrument in two places (ptA and ptB). If the Visa Resource Name line is probed, the program interrupts (breaks) only when the subroutine is accessed from ptB. The reason is that the tab marked 'Condition' has both 'Is session valid?' and 'Is Instr' 'stop if not valid' boxes checked, and it reports both as invalid.  It does not display anything on the 'general' tab for 'Canonical VISA resource name' when it interrupts the program execution.

I placed an 'Instrument Property Node'  and checked the Rsrc Name, Rsrc Class, Intf Type, and Intf Inst Name, and now it is running fine. 

Any ideas on why it runs from ptA but not ptB, and from ptB if instrument property node is checked?

0 Kudos
Message 1 of 5

Additional info:

Added Instrument Property Node reduced the frequency of the error, but the 'resource is valid but VISA cannot currently access it' error still pops up.

0 Kudos
Message 2 of 5

Probably the two resources to the same intrument are in parallel 

loops and the resource is still claimed by the other loop.

greetings from the Netherlands
0 Kudos
Message 3 of 5

It's a good thought, but the calls are in separate parts of a stacked sequence with flow control using shift registers.

0 Kudos
Message 4 of 5

Than that should not happen.

Do you open and close your session each time? That is not recommended.

Keep it open from start program to end program is normal.

And in that case you are also much faster because opening is not very fast.

greetings from the Netherlands
0 Kudos
Message 5 of 5