From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I'm using LabWindows 5.01 - so if this is the wrong place to post then I'm sorry - but I couldn't fint a LabWindows newsgroup.
I've got a HP33120A Signal generator to which I'm communication via RS232. That works fine hardcoding SCPI commands, but I also downloaded the IVI/VISA driver. I connot however seem to get this to work - the initialize function doesn't get through.
This line doesn't mention baud rate and so on as the one I got from e.g. the Tektronix TDS220 serial driver.
The documentation for the driver states I need to run Measurement & Automation eXplorer (MAX) and setup the port manually. This seems s tupid - isn't there a way to do this manually with OpenCom and let the VISA driver refer to this port ? Or do I have to rewrite it myself ?
All of the National Instruments developed instrument drivers come with their source code when you download and install them and this source is available for editing/use at your own discretion (the source file for this driver is hp33120a.c, just search for it on your computer to open it). So you can either edit the source to change the port settings programmatically or you can use the method described in the instrument driver help where you set up the settings under MAX.
To programmatically set the port settings the instrument driver will use you can edit the hp33120a_IviInit function so that after it obtains a Visa session for the device with the viOpen functoin call, you can call the viSetAttribute function in CVI's Visa library (found under Library >> Visa. .. >> Resource Template...) to set up several different com port settings.
Jason F. Applications Engineer National Instruments www.ni.com/ask