LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -1073807346 in keithley drivers The given session or object reference is invalid

I am using labview 9 for measurement of  shortcircuit current using keithely 2636 ( source measure unit).But when i run this code it showing error  -1073807346 in keithely drivers. I have attached screen shot of error. To solve this error i have reinstalled keithely drivers againe but cant solve it.could you suggest me to solve this problem.

0 Kudos
Message 1 of 2
(2,721 Views)

Hi Royal1,

 

The error -1073807346 is a timeout error on the VISA Read/Write functions, I presume you are experiencing the error after trying to read of write from/to your VISA device.

 

There are two possible causes.

 

The first cause comes from the VISA Write IRP_MJ_FLUSH_BUFFER request causing an INVALID DEVICE REQUEST response from the device.  By default, each VISA Read and Write is followed by a VISA Flush call when communicating via RS-232.  You can change the VISA Buffer setting to keep VISA from executing the flush call to avoid this error.

 

If you call the VISA Set I/O Buffer function at the beginning of your application (after the VISA Open, before any reads or writes) and set the mask to 48 (16 + 32, where 16 is the mask for receive buffer and 32 is the mask for transmit buffer) and the size to some value between 4k and the largest amount of data you ever expect to read or write, that will cause the flush command to not be executed. 

However, if you do not call this function, VISA will segment all writes into 500 millisecond chunks and call flush after every write. By telling VISA that you will never use more than 4k or the value to which you set the size, VISA in turn will not call the flush.

 

The second cause is the default VISA Read and Write.  The default is 2000 milliseconds and can be set for an entire VISA Session, so the timeout will be the same for both VISA Read and Write.  To set the timeout for a VISA session, use the 'VISA Set Timeout' in LabVIEW, which is located in the 'Functions Palette' under 'Instrument I/O > VISA > VISA Advanced' (or 'viSetAttribute(, VI_ATTR_TMO_VALUEK)' function if you're using LabWindows/CVI).

 

By increasing the timeout constant, you should be able to avoid this error.

 

If there is anything else I can assist you with, please feel free to post back.

 

Kind Regards,

Oli
LabVIEW Student Ambassador
National Instruments UK
0 Kudos
Message 2 of 2
(2,709 Views)