Discussion:
what is the difference between GPIB and VISA when we compile a program?
(too old to reply)
Linghui
2006-09-17 07:10:40 UTC
Permalink
I am using GPIB-USB-HS cable (from NI) to get data from SR 245 Computer interface of Boxcar. The cable?s GPIB interface connects with Boxcar?s GPIB interface, and cable?s USB?s interface connects with desktop. The operating system of my computer is Windows XP, and my Labview is 7.1 versions. I have several questions:

 

The Boxcar has two interfaces: one is GPIB and another is RS 232. I switched jumpers inside the SR 245 and chose GPIB interface. The first question is which interface generally for you to choose when you have GPIB and RS 232 interfaces?

 

After I successfully installed the driver for GPIB-USB-HS cable, I got the primary address of GPIB of instrument is 16 through scanning for instrument when I ran M&A Explorer. The second question is that the cable can?t communicate with the instrument. The command string I sent is from SR 245?s manual. No matter what command I entered, including command*IDN?, ?iberr=EABO? is the only answer for my numerous requests. The ACTIVITY green light and the ERROR light didn?t flash, which seemed like nothing happening. Did someone have experience how to correct it? Or did I need to set something in GPIB Configuration?

 

The second question is how to modify boxcar?s driver downloaded from NI Company. There are two drivers for SR 245, and one is GPIB interface and another is Serial interface. I speculated that the driver should be the one with GPIB interface. Is my thought right?

 

I chose the driver supported by GPIB interface. When I opened the driver and corrected the GPIB address in the driver and ran it, the green ACTIVITY light and the red ERROR light on the front panel of SR 245 flashed one times, which shows that the program partly works on the SR 245, but I didn?t get anything from the Front panel of the program, so I modified the program: I changed GPIB WRITE and GPIB READ with VISA WRITE and VISA READ in the driver, and then I ran the modified program, the lights didn?t flash and still got nothing. I didn?t know clearly what the difference between GPIB and VISA is, and when to use VISA rather than GPIB when I compile programs. I remember that VISA supports USB interface, but GPIB doesn?t, right? Is it necessary to replace GPIB icons with relevant VISA icons? I am a little puzzled!!!!!!!!

 

The last question is that did someone have experience to use a Labview program to control Boxcar and get data?

 

Thanks!

 

Linghui
Yaglaser
2006-09-19 03:10:10 UTC
Permalink
Thank you Dennis!!!
Your comment made me a little clear.
So you mean that it should be the same when I use GPIB commands and VISA commands. Is it right?
 
Another question what is the difference between VISA commands and VISA serial commands?
 
Thanks!
 
Linghui
 
Linghui
2006-09-19 05:10:10 UTC
Permalink
Is there any problem with this downloaded driver. I got nothing when I ran this program.
Thanks your suggestion.


SR245(modified).vi:
http://forums.ni.com/attachments/ni/140/19306/1/SR245(modified).vi
Linghui
2006-09-19 15:10:17 UTC
Permalink
I will paste it again.
My labview is also 7.1version. Could you try to open it again?
Thanks.


sr245(modified).vi:
http://forums.ni.com/attachments/ni/140/19320/1/sr245(modified).vi
Linghui
2006-09-19 15:40:17 UTC
Permalink
I downloaded the file that I pasted in the message. There is no problem. Could you give me a email address or some place I could send it to you?
Thanks!
 
 
Linghui
2006-09-19 15:40:16 UTC
Permalink
"There isn't a single error in/error out cluster wired and you should make sure that you have automatic error handling dialogs turned on. Do this and see if you get any error messages. The actual error code (if any) you get will be important. You might want to first try issuing some of the commands from MAX to see if they work from there. "
 
--Dennis
 
What means automatic error handling dialogs turned on? Do I need to build a ERROR IN and Error out in the driver, right?
 
I can't communicate with the instrument through the cable, though MAX can find GPIB address in the instrument. Even I used commands from the company , for example:Bwrt"*IDN?\r"
 
Dennis Knutson
2006-09-19 15:40:17 UTC
Permalink
Automatic error handling dialogs is an option that you can turn on from Tools>Options>New and Changed in 7.x. With this turned on, you don't have to rewire the VI to add the connections for the error in/error out clusters. If you run the VI and get an error, a pop-up will automatically appear. It would still be a good idea to wire them up and add an error out indicator but to get you started quicker, the automatic dialogs are an option.
When MAX finds the instrument, does MAX report that it doesn't respond to the idn query or do you get this information when it does the scan. If MAX can do it, you should certainly be able to repeat that if you choose to 'Communicate with instrument' in MAX.
Linghui
2006-09-19 16:10:13 UTC
Permalink
No matter what commands string I sent, the response showed "EABO". I don't know how to fix it. I have use command from the manual book. So strange.
 
Thanks
Linghui
2006-09-19 18:10:13 UTC
Permalink
Thank you, Dennis;
 
No matter what commands I write, what i read is EABO. When I switched GPIB address of RS 245, I scanned for instrument by MAX, and I saw the new GPIB address, and the problem came out and got the same result" EABO" when I query *IDN?
 

From what I did, I speculated that I could write command for RS 245, but I can't read out data. Do you know how to correct it?
 
Now I worry about GPIB-USB-HS cable. Are there any jumpers inside the cable? Or did you know someone report the same problem like me about this cable. I trusted NI company and I think there shouldn't have any quality problem about its products, right? 
 
Thanks
 
Dennis Knutson
2006-09-19 19:10:14 UTC
Permalink
I'm still waiting for you to tell me what MAX does when it does the scan for instruments and does it return a message that the idn? failed when it ran it. I'm assuming that it did but I would like you to confirm that.
I just received two GPIB-USB-HS and both work flawlessly. There are no jumpers or anything else to set with it. If you had a different GPIB instrument, you could use it with that and see what happens.
I looked at SR's web site and they don't list the manual for this instrument. do you have an electronic copy of it that you could post?
Linghui
2006-09-19 21:40:13 UTC
Permalink
After I powered on instrument, I opened MAX, and hit the Devices and Interface, and saw GPIB0(GPIB-USB-HS), and expanded it and saw Instrument0 there and saw four components listing in the right side of window:
Name                                                 Value                                 Description
Primary Address                                  23
Secondary Address                            None
Identification                                        The device did not respond to a *IDN? query
GPIB Interface Number                       0
 
Did I need to install some drivers? I installed NI488.2 Program.
When I ran Getting Started Wizard, the three verified components passed.
Thanks!
 
Linghui
2006-09-19 22:10:12 UTC
Permalink
Thank you very much, Dennis
From the manual, there is one sentence."Note: with newer GPIB cards you may have to add \r to the end of a command to get a proper <cr>"
Somone suggested one to enter: IBwrt "*IDN?\r" or IBwrt"*IDN?/r" or IBwrt"*IDN?", which didn't work.
I couldn't find *IDN? as a command in the SR245 manual, but I tried other commands from the manual book, and I got the same feedback"EABO",  actually there are not too many commands there, so I can list them as follows:
Input/Output Command:
I<n>   n=0---8
?<n>  n=1---8
?D
C
..
Trigger Commands:
MS
MA
....
Scan Commands:
ES
N
?N
 
Miscellaneous Commands:
MR
W<n>    n=0-225
...
I will try to find out some electronic papers for SR 245
 


Boxcarc.pdf:
http://forums.ni.com/attachments/ni/140/19342/1/Boxcarc.pdf


SR245c.pdf:
http://forums.ni.com/attachments/ni/140/19342/2/SR245c.pdf


SR250c.pdf:
http://forums.ni.com/attachments/ni/140/19342/3/SR250c.pdf
Linghui
2006-09-19 22:40:12 UTC
Permalink
I have to tell you one thing:
When I used the same cable to talk with Lockin Amplifier SR510, I wrote commands from Lock-in manual, I saw GPIB address of Lock-in, and couldn't communicate with the it. The same phenomena happened like what I did for SR 245.
I don't think that SR 245 is old instrument, AND it should be new one.
Thanks!
Dennis Knutson
2006-09-20 13:40:15 UTC
Permalink
I'm at work now with a working GPIB board so I can provide a picture of the NI-488.2 communicator screen. You will notice three different buttons - Query, Write, and Read. Do not click the query button for any commands that do not have a '?' in them. A query will do an ibwrt of that command and then do an ibrd. You do not enter the text 'ibwrt' or 'ibrd'. If the command does not have a '?', then the instrument will not return any data and the query will timeout. Depending on how you set the instrument up, even doing a proper query (i.e. '?1') may also return a timeout. For example, it the instrument does not get triggered, it will not acquire a signal so there wouldn't be any data to return.
Also, can you try to reattach the VI you've modified. Instead of attaching the VI, attach the whole llb because that would include all of the subVIs as well.
<img src="Loading Image..."> Message Edited by Dennis Knutson on 09-20-2006 07:37 AM


488 Communicator.PNG:
http://forums.ni.com/attachments/ni/140/19360/1/488 Communicator.PNG
Linghui
2006-09-20 16:10:21 UTC
Permalink
When I complied a sample program use GPIB command write and read.&nbsp; We can't get&nbsp;any data. The error window poped up:
Error occurred at GPIB Read in Yu_001.vi
Possible reason(s):
Labview Generic file I/O Error
NI-488:I/O operation aborted
&nbsp;
I pasted&nbsp;this program and you may help&nbsp;me look at it.
Thanks&nbsp;


Yu_001.vi:
http://forums.ni.com/attachments/ni/140/19367/1/Yu_001.vi
Linghui
2006-09-20 17:10:13 UTC
Permalink
I tried again.
When&nbsp; I wrote command, and hit the Write botton, &nbsp;I do see Activity Green Light blinking quickly. I also tried other words(for example my name) by hitting Write botton. I also saw the Green Light blinking. Maybe any word may let Activity light blink.
When I send command like ?1, or ?D, What I got for string Received is "iberr=EABO"
Thanks
Linghui
2006-09-20 16:10:20 UTC
Permalink
When I hit the menu of communicating with instrument, I saw the diaglog window like what you pasted
I followed what you said. If a command contains ?, I send query. If the comand doesn't contain ?, I wrote the comand first and then read it. The results are the same, "EABO". Nothing changes.
For example:
I&nbsp;wrote a command I1, and read it. The window showed "EABO". I1&nbsp;means to designate the first 1 anolog port as input, the remainder become outputs.
Second example:
I queried a command ?1, which showed"iberr=EABO". ?1 means to return the value of the designated analog port.
Thank you, Dennis
&nbsp;


SR245-modified.vi:
http://forums.ni.com/attachments/ni/140/19364/1/SR245-modified.vi


sr245250.vi:
http://forums.ni.com/attachments/ni/140/19364/2/sr245250.vi
Linghui
2006-09-20 16:40:15 UTC
Permalink
When I send any commands from Communicator. what I got is "iberr:=EABO". There are two light indicator in the front panel of SR 245. One is Activity Green LED and&nbsp;Error Red LED.&nbsp;I can't see any light&nbsp;blinking when&nbsp;&nbsp;commands&nbsp;were operated. I bet there&nbsp;were no response.
When I turn on the power supply of Boxcar, the Activity LED and Red LED blink one time.
When I ran the program that I pasted, the LEDs blink one time.
Thanks
AnalogKid2DigitalMan
2006-09-20 19:10:15 UTC
Permalink
Just a stab-
Is EOS configured properly&nbsp;for the instrument? My only experience with SRS was over 10 years ago, it was a DS345, I had no problems communicating over GPIB.
Loading...