Hi,
I'm using Agilent IO connection expert (ver 15) and VISA COM (VISA COM type 3 library) to connect to a couple of old equipment, HP8563E spectrum analyser and HP5350B frequency counter, via either an NI488 compatible GPIB card or Agilent 82357A GPIB to USB adaptor.
I get time out errors when performing the read operation from both programs using the GPIB card, the write operation is OK. I can see from the IO monitor utility from the connection expert that the right values have been returned by the machines but the program keeps running till time out, as if the termination character is not recognised by both programs.
However, both programs are ok at the read operations when using the 82357A.
I have the time out time set to 5000ms. The termination character is enabled and is set to the return carriage or line feed.
My gpib card should be ok as I can use it with VEE pro 6 to both read and write to these equipment.
Your help will be greatly appreciated.
Ken
I'm using Agilent IO connection expert (ver 15) and VISA COM (VISA COM type 3 library) to connect to a couple of old equipment, HP8563E spectrum analyser and HP5350B frequency counter, via either an NI488 compatible GPIB card or Agilent 82357A GPIB to USB adaptor.
I get time out errors when performing the read operation from both programs using the GPIB card, the write operation is OK. I can see from the IO monitor utility from the connection expert that the right values have been returned by the machines but the program keeps running till time out, as if the termination character is not recognised by both programs.
However, both programs are ok at the read operations when using the 82357A.
I have the time out time set to 5000ms. The termination character is enabled and is set to the return carriage or line feed.
My gpib card should be ok as I can use it with VEE pro 6 to both read and write to these equipment.
Your help will be greatly appreciated.
Ken
My PCI-GPIB card is not an NI card and it's not all that compatible with your standard NI488 driver unless it's ver1.7 with ATGPIB/TNT option that can only be downloaded by request to NI.
Yes, I agree that VEE uses a different library that it doesn't experience the same problem as I had with Agilent I/O and VISA COM. VEE probably uses the library that's installed with my GPIB card.
To use the card with the old (non-SCPI) equipment I probably need to rewrite my program with the library that comes with the card or learn more about VEE.
I think I will get the boss to buy the USB/GPIB adaptors to make my life easier, which btw, has came down a lot in price to be almost the same as PCI cards.
have you solved your problem ?? We have the same problem. We youse old measurment equiqment and a Agilent 82357B GPIB adapter. We develop our software in Visual Studio 2005 with VISA Com and the visa32.cs.
We can send all commands to the devices but we cant read from them.
Can somebody help us ?? It is very important for me!!
Thanks
Martin
I have had this issue with the old HP436A. Problem seems to be that it does not support the EOI signal on the GPIB bus, so you have to set up the end-of-line termination to end the data read with LF only. As a result, you can not read data from the 436 using the interactive IO, but you can in VB etc, by setting certain attributes.
Some instruments also do not provide a LF character, which is the GPIB standard. The termination of read data is a huge problem I've had over and over. I think most people just buy new instruments to solve it. Below is a bit of vb from a RI program I wrote.
Cheers,
Steve
Call Instraddr.cnct_instr(pwrmn) ' get idn(pwrmn) from io lib
If idn(pwrmn) Then
viSetAttribute idn(pwrmn), VI_ATTR_TMO_VALUE, 10000 ' long time-out for power meter zeroing
viSetAttribute idn(pwrmn), VI_ATTR_TERMCHAR, 10 ' line-feed is only eol from a 436A
viSetAttribute idn(pwrmn), VI_ATTR_TERMCHAR_EN, True ' IO libraries interactive IO will not set this and can not read a 436A, ie no eoi signal
PwrMtr_doit (3) ' set mode
End If
Debug.Print "Power mtr is di=" & idn(pwrmn)
....... which calls this:
Public Sub cnct_instr(devn As Integer) ' sets idn(devn), uses iolist(devn)
Dim iocancel As Boolean, cn As Integer
If ioList(devn).Text <> "NC" Then
iocancel = False ' connection retry loop
While viOpen(sesn, ioList(devn).Text, 0, 100&, idn(devn)) And iocancel = False
iocancel = MsgBox(instrname(devn) & " is not reponding!", vbRetryCancel) = vbCancel
DoEvents
Wend
Debug.Print ioList(devn).Text, devn
viSetAttribute idn(devn), VI_ATTR_TMO_VALUE, 2000 ' time-out
If Left(ioList(devn).Text, 10) <> "USB0::1351" Then viSetAttribute idn(devn), VI_ATTR_TERMCHAR_EN, 1
viSetAttribute idn(devn), VI_ATTR_WR_BUF_OPER_MODE, VI_FLUSH_ON_ACCESS
If alf(devn) Then
viSetAttribute idn(devn), VI_ATTR_TERMCHAR, 10 ' lf is eol
Else
viSetAttribute idn(devn), VI_ATTR_TERMCHAR, 13 ' cr is eol
End If
If Left(ioList(devn).Text, 4) = "ASRL" Then Call initcom(devn)
End If
End Sub
i am not sure if my problem here is somewhat related with yours...
i would just like to ask....how did you connect the instrument via usb to serial converter using the Vee pro software?
what interfaces did you use when you find the instrument?
I am using the USB to serial converter also but I am having problems of communicating with the instrument. I am actually sending serial commands but it was not successful.
The interface that appears when I find the instrument using vee pro is the ASRL instrument. Is that correct?
Also, do you use the I/O transaction object to send the serial commands?
Also, when using the Agilent IO connection expert, the ASRL is the one that appears when i find the instrument.
Hoping for your responses.
I badly needed it.
Thanks a lot in advanced!