Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB programing Basics

Hi all
I want to know the starting point to connect a device to the computer using a GPIB PCI and a Rf device , I want the general steps, I know that u must  write to the GPIB , to send an instruction the device connected to the computer knows , and then read from the GPIB , to read the response of the device to the GPIB , and then parse the output into understandbale data . one of my applications is using the HP8569B SA to be connected to the PC using the GPIB , are these conectps as I understand them right , is this the way to interface to the computer using the GPIB plz help me in the main conecpts
thnaks alot
 
0 Kudos
Message 1 of 7
(4,639 Views)
It sounds like you have the general concepts right.  Depending on what development environment you are using, however, much of the work may already be done for you.  National Instruments has drivers written for LabVIEW, CVI, and Measurement Studio for most of the common instruments out there.  You can search for these in our Instrument Driver Network. What environment will you be developing in?

If you have an NI-PCI-GPIB card, you can use Measurement and Automation Explorer, which installs with the driver, to test your connection to your instrument and even send and receive commands.  You can do this using a VISA (Virtual Instrument Software Architecture) test panel.  VISA is an abstraction of many different communication protocols (including GPIB) which takes care of the lower level details of communication for you, making it easier to develop applications suited for your needs.

Hope this helps,
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 2 of 7
(4,618 Views)
Dear Robot , MY enviorment is LabVIEW , can I send you my VI document I have done to capture the Graph form a HP8569b SA , I tried with the MAX , but my SA is old , it follows the IEEE488-1975 , so the commands that the MAX send are not recognized by the SA , I managed to capture the graph but I need to do more and I ask your help to guide me , like I want to rescale the y axis to fit the refrence level I will use , I want to rescale the x axis to fit the range of frequnecies I have chosen on the SA, is it ok if you can help me, thnaks alot
0 Kudos
Message 3 of 7
(4,612 Views)

I find it hard to believe that commands that you send in MAX are not recognized by the instrument. It shouldn't matter what version of GPIB the instrument supports as long as you're sending the correct commands. It probably won't respond to the *IDN? command but since you're able to get the waveform, you're obviously abel to communcate with it in some fashion. Scaling the x and y axis are functions in LabVIEW. For example, you can create a property node for the graph and set Xscale.Offset to the start frequency and Xscale.Multiplier to the df that you've got the sa set to.

And by all means, post your VI here. It always helps to have the actual code.

Message Edited by Dennis Knutson on 11-09-2005 10:51 AM

0 Kudos
Message 4 of 7
(4,608 Views)
HI, this is my actual code,
I want to rescale the frequnecy to acording what input range frequnecy I will give and also rescale my y axis value acording to what refeence level I chose for the y axis , the refrence level start from up of the graph of the SA , so the peak value always equals the refrnce level
thnaks alot for your help
 
0 Kudos
Message 5 of 7
(4,601 Views)
Okay, first of all in your VI, you have the GPIB Write mode set to 3. This adds a CR/LF to each command. You can do this in MAX by appending a \r\n at the end of each command. Second, you have the GPIB Write, Wait, and GPIB Read executing in parallel. Without any dataflow forcing execution order, you're going to have problems where sometime the read might happen before the write, etc. Placing one function to the left or right of another does nothing to enforce execution order. Connect the error out of GPIB Write to the error in of GPIB Wait, the error out of GPIB Wait to the error in of GPIB Read. Third, you have nothing wired to the wait state vector of GPIB Wait so I'm not it's doing anything and I don't knwo what you expect it to do. Lastly, experiment with the x and y scale options by right clicking on the graph and selecting properties. Go to the Scales tab and you'll the offset and multiplier options I mentioned. If you can modify the scales manually, then you can do so programatically with a property node.
Message 6 of 7
(4,594 Views)

Dear Denis

thnaks it helped alot

 

0 Kudos
Message 7 of 7
(4,506 Views)