03-29-2017 11:14 AM
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?
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)
Solved! Go to Solution.
03-29-2017 11:33 AM
This is from the help file. The responses are exactly as they should be
03-29-2017 02:45 PM
Thanks very much, this really explains the difference in values.
06-21-2017 01:27 PM
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
06-21-2017 02:09 PM
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.
06-22-2017 06:12 AM
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