Essentially what VISA does is probe all the ports of the computer ( usb , gpib , ethernet, serial , printeport ) and figure out what is there. it does this by sending the *IDN? command to which a machine must reply with its manufacturer name, model number and firmware / hardware revision
As an application programmer you simply tell VISA 'there should be a machine at ::USB0:DEV0:VID3476:PID2341' or ::COM3::DEV0 or ::GPIB0:DEV22:
visa will poke around , and if a machine is found it will give you a 'handle'. This is a 32 bit number.
so you create
int32 my_voltmeter = Visa_Open("::USB0:DEV0::VIs...")
visa_write (my_voltmeter,":DISP:TEXT 'hello world'")
in object oriented languages you can do this :
dim my_voltmeter as new VISA_instrument( "::blabla:

my_voltmeter.send ":disp:text 'hello world'"
VISA has all the protocols and transport mechanisms and can talk GPIB , LXI , PXI , VXI , MXI , whatever you want. it is a true 'pipe'
as an application programmer you throw in an ascii string and VISA cooperates with the hardware, the hardware drivers (like ethernet drivers , gpib board drivers etc ) to get the string sent to the endpoint.
You as a device simply get a string. when you have something to say you just send it back and done.
VISA has an internal API toward the GPIB boards . a GPIB board aker needs to provide a VISA driver. The instrument maker doesn't need to do that.
VISA is available from either national instruments or Agilent. In general if you buy a GPIB board from either one they give you a runtime licence for VISA. You can also purchase VISA without such a board.
I have 'objectified' all my testequipment.
i can very quickly make testprograms. There is a number of base classes like 'multimeter' , 'supply, ' scope, ' generator' ,'spectrumanalyzer' etc. Each has subclasses that are instrument specific and extend/overload the base class.
i can write testprograms in Visual basic like this
dim dvm as new HP34401 (gpib22) ' give a voltmeter
dim vdigital as new HP3432(GPIB7,2) ' gpib adress 7 channel 2 of the supply
dim vanalog as new hp3432(gpib7,1) ' gpib adress 7 channel 1 of the supply
dim device as new chip_under_test ' gvive me a chip to test
dim dac7 as new device.register(&h307) ' bind this to a register located at adress 307 in the chip
dim document as new xl.workbook ("logfile.xls") ' ope a excel logbook
dim sheet as document.sheet ("sheet1") ' grab a sheet
dim chamber as new Tenney310(gpib4)
vanalog.voltage=3.3
vanalog.current=0.1
vanalog.output=true
vdigital.voltage = 1.8
vdigital.current = 0.5
vdigital.output = true.
dvm.measure = voltsdc
dvm.range = volts3
sheet.rowcol("A1") ="Testsweep"
sheet.nextrow
for temperature = -25 to 125 step 25
chamber.temperature = temperature
chamber.soak ' this waits for the chamber to settle
for sweep = 3.0 to 3.6 step 0.3
vanalog.voltage = sweep
for x = 0 to 1023
dac7.value = x
result = dvm.read
sheet.addrow (temperature & "," & sweep & "," & x & "," & result)
next x
next sweep
next temperature
I have a framework where the instrument connections are defined in a file called 'benchsetup.bas'. Since the equipment on a bench is static i only need to focus on writing my code.
a coupe of lines of nested for-nexts bobmbar excel with a table of data.
I have excel spreadsheet templates for all kinds of plots . the graphics are pre-made in excel. all the script does is update the table. you see the excel plot change in realtime as the measurement is running.
Since the script calls the correct spreadsheet i don't even have to worry about that. i haev a library of 'golden' scripts with their accompanying excel files. if i need that kind of sweep i simply open that project and run it . the script asks me for a new filename , copies the golden excel file to that filename and then plumps the data in there. by the time i am back in my cubicle i can remotely open the output file through the network.
Since we run vnc i can actually launch teh test form my cubicle , do something else while is keep an eye on the screen to see if all is well.
i have links to matlab as well. There is even powerpoint files with links to the embedded exel sheets.
If the boss asks me to prepare a new plot of a dac and prepare a few slides for this afternoons presentation i simply open Visual Basic Express ,run the script and set the filename. when done the slides are created uncluding time dat , who did the test , sample number and everything. I don't even get up... unless i need to go to the lab to change a chip ... we don't have an ATE handler ... -yet ---
