LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB timeout set and read valus are different

Solved!
Go to solution

Hi,

I am trying to set the GPIB timeout, but the value set and the value read are always different.

I am trying to set 500ms but reading in response 1000, trying to set 2000 but receiving 3000.

NI trace also confirms it. Is there any hidden logic behind this?

 

GPIB timeout.jpg

 1.  viSetAttribute (GPIB0::21::INSTR (0x028C9800), TMO_VALUE, 500)
Process ID: 0x00004F48         Thread ID: 0x00002588
Start Time: 16:37:42.109       Call Duration 00:00:00.001
Status: 0 (VI_SUCCESS)

2.  viGetAttribute (GPIB0::21::INSTR (0x028C9800), TMO_VALUE, 1000)
Process ID: 0x00004F48         Thread ID: 0x00002588
Start Time: 16:37:42.110       Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)

0 Kudos
Message 1 of 6
(4,823 Views)
Solution
Accepted by topic author Abdulaev_Rustam

This is from the help file. The responses are exactly as they should be

 

Capture.PNG

Message 2 of 6
(4,806 Views)

Thanks very much, this really explains the difference in values.

0 Kudos
Message 3 of 6
(4,759 Views)

Hi Jamiva

I have 3 questions about timeout, may be you can explain.

1. Is there a difference between GPIB set timeout function and VISA set timeout property node?

The first one has no address, the second needs the instrument address.

When I set timeout with one the functions, then read read with the other function, the value is not the same. Note that both functions follow the rule in the table you mentioned before.

2. Which one would you recommend?

3. How can I know for sure what is the timeout value my VIs are using?

Best regards,

   Joao

0 Kudos
Message 4 of 6
(4,473 Views)

Honestly, I don't know. It's a simple enough experiment to do. Set one at 5 seconds, the other at 10 seconds. Get a stopwatch at see which one it is.

 

Which one would I recommend? IMHO If you are using VISA then use the VISA functions. If you are using the low level GPIB 488.2 functions then use the GPIB timeout.

0 Kudos
Message 5 of 6
(4,468 Views)

Jamiva

I followed your pragmatic advice and timed it with a stopwatch.

Conclusion, each function defines an independent variable. GPIB function defines timeout for GPIB specific functions and VISA property node defines timeout for VISA functions.

 

I really would like to understand deeper into this issue:

1. Is timeout a parameter related to the hardware or the software?

2. Is this parameter defined for the BUS / controller interface or for the device?

3. How is any of this paramenters related with the (diferent) timeout value defined in MAX?

 

Jamiva

I thank you for your contribution and I leave this questions in case someone would like to elaborate more on the subject.

Best regards,

     Joao

 

 

0 Kudos
Message 6 of 6
(4,449 Views)