Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VI_ERROR_RSRC_LOCKED

Hello,

 

i have a hardware configuration, where several power supplies and a multimeter are connect on one GPIB bus to a USB2GPIB device(Agilent 82357). On the PC I want to control the power supplies and the multimeter from different programs. Both programs open a session with viOpen(.., VI_EXCLUSIVE_LOCK,...), both programs set the timeout value to 50s with viSetAttribute(..., VI_ATTR_TMO_VALUE, 50000).

 

Any program works as long as the other is not started.

 

But if, e.g. the power control program is running (showing the actual currents) and I start the multimeter, some power readings failed with:

 

Error to get current: -1073807345 VI_ERROR_RSRC_LOCKED: Operation failed due to
locked resource

 

This is the error returned from  

 

ErrorStatus=viPrintf(g_ps[psm_id-1].ps_sesn,"MEASure:VOLTage? (@%d)\n",output_id)

 

or

   

ErrorStatus=viScanf(g_ps[psm_id-1].ps_sesn,"%f",&value)

 

. After some seconds, both programs continue without any error anymore.

 

Does anybody has an idea, how I can avoid the collision of both programs. For my understanding these shall be happend by the locking of the resources. But it seems not to work. Any ideas?

 

Thanks,

David

0 Kudos
Message 1 of 2
(6,166 Views)
Search

Go through all the posts and if still your problem was not solved, please post back.

 

Thanks,

Markus

0 Kudos
Message 2 of 2
(6,077 Views)