02-07-2012 05:13 AM
Hi Everyone,
I have an Agilent PCI-GPIB card installed in my computer and have set it up to run with labview. I installed NI VISA, followed by Agilent IO libraries which was installed as a secondary VISA. I then installed the card and drivers, activated the Tulip passport in NI MAX, and even turned on the "enable agilent GPIB cards for 488 programs" in Agilent IO libraries.
The card shows up in NI MAX under "miscellaneous VISA resources" as I expected it would. I want to use the GPIB card to interface with a Signal Recovery Lock-in amplifier (model 7265) which is triggered by a motion controller stage. I know that the program works well, as I have used it on a different system with a USB-GPIB adaptor. However, when I run it on this system, although the lock-in is listed in the VISA I/O dropdown in the labview code, I am unable to read data from the lock-in.
The first VISA write command, which sets the setting on the lock-in works, but the VISA read command doesn't return any data from the lock-in, and finally the following error message is returned: "Error -1073807339 occurred at VISA Read. Possible reason(s): VISA: (Hex 0xBFFF0015) Timeout expired before operation completed".
If I use the Agilent IO VISA assistant, I can query the state of the lock-in (using *IDN?\n) as frequently as I like. However, if I use NI MAX VISA test panel, I can only do this once before the error message is flagged. I recorded the following NI I/O trace as an example:
1. viWrite (GPIB0::12::INSTR (0x020FA5B8), "*IDN?.", 6, 6)
Process ID: 0x000009C0 Thread ID: 0x00000534
Start Time: 10:21:35.545 Call Duration 00:00:00.000
Status: 0 (VI_SUCCESS)
> 2. viWrite (GPIB0::12::INSTR (0x020FA5B8), "*IDN?.", 6, 1)
Process ID: 0x000009C0 Thread ID: 0x00000534
Start Time: 10:21:42.530 Call Duration 00:00:02.171
Status: 0xBFFF0015 (VI_ERROR_TMO)
> 3. viWrite (GPIB0::12::INSTR (0x020FA5B8), "*IDN?.", 6, 0)
Process ID: 0x000009C0 Thread ID: 0x00000534
Start Time: 10:21:50.983 Call Duration 00:00:02.078
Status: 0xBFFF0015 (VI_ERROR_TMO)
> 4. viWrite (GPIB0::12::INSTR (0x020FA5B8), "*IDN?.", 6, 0)
Process ID: 0x000009C0 Thread ID: 0x00000534
Start Time: 10:21:58.733 Call Duration 00:00:02.171
Status: 0xBFFF0015 (VI_ERROR_TMO)
Does anyone have any suggestions as to how I can get this working? Thanks in advance.
02-09-2012 06:23 AM
Hi Wooster,
Thank you for your forum post and welcome to the NI user forums.
Please consider the following when debugging your VISA communications issue:
- Ensure you are not running Agilent VISA and NI VISA simultaneously as Agilent VISA may have control of the VISA resource.
- Although you are communicating via a GPIB interface as it is an Agilent PCI-GPIB card this is treated as a VISA device in MAX and LabVIEW. With this in mind you need to verify that the port communication settings are configured correctly, i.e. verify that the Baud Rate, Data Bits, Parity, Stop Bits, and Flow Control correctly correspond to your hardware requirements.
- Have you tried increasing the timeout?
Please keep me informed with your progress Woodster, the fact that you can communicate via the "Visa Test Panel", albeit only on the first read/write is encouraging.
Many Thanks
02-10-2012 02:55 AM
Hi Wooster,
Having realised this is a GPIB device the settings "Baud Rate", "Data Bits", "Parity", "Stop Bits", and "Flow Control" do not apply.
Could you instead check the "GPIB interface ID" (GPIB0, for example), "Primary Address (PAD)", and "termination settings" (EOI, EOS settings) as these apply to GPIB specifically.
Please keep me informed with your progress Wooster.
Many Thanks
08-30-2012 12:50 PM
Hello,
I also facing this problem. Please see the attached error
I have tried changing the byte around but it still not working. The default value is 1024
Thank you in advance
jaz@
08-30-2012 01:39 PM
Are you using an Agilent GPIB? You're certainly not using the same instrument so you should have probably created a new thread.
In any case, does the instrument assert EOI at the end of a transmission? A VISA Read expects this with a GPIB instrument but older ones are not necessarily compliant with IEEE-488.2. I see the \n in the string so perhaps you need to configure the controller to end on EOI or \n. For NI controllers, you can do this in MAX. Fiddling with the number of bytes to read is not the way to fix the problem you are having.
08-30-2012 04:49 PM
Hello,
I am sorry as i am new in this forum and thank you for your fast reply. I trried to use MAX and the Terminate Read on EOI is uncheck. Is this the problem that causes the Visa read fails and generating error "VISA: (Hex 0xBFFF0015) Timeout expired before operation completed."
I am unable the modified any setting for the GPIB setting. It indicates that it can be changed only by administrator. What does it meant? I am the user for the computer and software
08-30-2012 07:46 PM
Hello,
I have configure the controller to end on EOI as shown below
I have tried to to communicate with the Instrument. It looks pretty fine
But i still can received the error -1073807339. Attached is my code. Kindly please advice
08-30-2012 08:19 PM
08-31-2012 03:24 AM
Hi everyone,
I'm not certain that this will help the new poster, but the solution to my original problem came through disabling the "enable agilent GPIB cards for 488 programs" in Agilent IO libraries, which seemed to be introducing some conflict with the NI VISA communications. I've since installed three equivalent cards on three machines, followed the same steps I did originally but didn't enable the 488 option, and they all work great.
Best wishes,
Woodster
08-31-2012 11:21 AM
Hello,
Thank you for the reply. I think this is the setting you meant as shown below. However, it still don't work. There is still error on read.
Attached is the code written. It able to reset the machine but i still can not read the control I/O command (CMD) sent.
Can please kindly asist me. I have been dealing for it days and can not get it solved. Thank you