Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

about vxi error message

Hi,

I have two questions.

 

I have already set  "true" to "lockDevice"

but when I use another client to connect the server, it still can be connected.

and then when I want to command the server, a error message (error=15 I/O TimeOut) will appear.

 

Do anyone knows what happen?? the spec says if I set "true" to "lockDevice"  the server should not be able to linked by anotherclient.

 

lockDevice is in the struct listed below.

 

struct Create_LinkParms {
    long clientId; /* implementation specific value.*/
    bool lockDevice; /* attempt to lock the device */
    unsigned long lock_timeout; /* time to wait on a lock */
    string device<>; /* name of device */
};

 

 and one more question,

In server side, if I want to check if any error occurs, is it any priority needed??

for example,

device_write error values

error 0 =  no error

error 4 = invaild link identifier

error 5 = parameter error

error 11 = device locked by another link

error 15 = I/O timeout

error 17 = I/O error

error 23 = abort                     

 

which one do I need to check first??

 

Thanks a lot.

0 Kudos
Message 1 of 4
(3,714 Views)

Hi Clowndoll,

 

I'm having a little bit of trouble understanding what exactly you're asking. What device(s) are you using when you see this error? You are referring to a client/server setup, so how exactly is this set up? What is your client and what is your server?

Justin E
National Instruments R&D
0 Kudos
Message 2 of 4
(3,701 Views)

Hi Justin

The Clients are two PC, and the Server is a instrument. The situation is, when I use the first PC to connect to my instruement, it works well, and then I set LockDevice = 'true'

After that, I think the second PC should not be able to connect to my instrument, cuz the spec says that.

But when I try to use the second PC to connect to my instrument, it still can make a link.

The error will apear when I try to use the second PC to command my instrument.

Error 15 - I/O Timeout.

 

Is this correct??But I think the error should occur when the second PC try to connect to my instrument to make a link. 

 

Thanks for your patient.

0 Kudos
Message 3 of 4
(3,668 Views)

Clowndoll,

 

It seems like when the second client tries to connect, "Error 11 - device locked by another link" should be the error that is returned. 

 

What instrument are you connecting to? Is it one of our VXI instruments?

Justin E
National Instruments R&D
0 Kudos
Message 4 of 4
(3,654 Views)