12-14-2018 01:47 PM
I am currently designing a data acquisition system to run tests at my work using a cDAQ-9174 chassis, and we have a programmable variable power supply that we would like to control and measure data from in LabVIEW. There was not a driver for this specific power supply on the NI website, so I followed the tutorial http://www.ni.com/tutorial/4478/en/#toc2 for configuring and installing a driver. However, I am unable to create a block diagram that runs properly because I run into "Timeout expired before operation completed" or "Invalid buffer mask specified" errors. At first DAQmx was able to validate the port settings, but even after making no changes it seems to randomly get an error "The resource is valid, but VISA cannot currently access it." Has anyone used a similar setup with greater success? I do not know much about USB protocol and the two times I have restarted the process, NI-VISA named it first as a RAW resource, and then as a INSTR resource, which to my understanding use completely different configuration settings in the block diagram. If it helps, I am using LabVIEW 2011.
Solved! Go to Solution.
12-17-2018 11:41 AM
This device does not follow IEEE-488.2 protocols (Does not understand SCPI commands). You will need to understand the packages sent to the supply as well as how to decode the various responses. Here is the manual.
12-17-2018 02:27 PM
I have the set of commands for the device, but the manual does not say where the code needs to be entered. NI MAX is now listing the power supply as a USB RAW VISA resource and an ASRL::INSTR VISA resource simultaneously, so I think there is a problem somewhere in the driver installation.
12-17-2018 02:49 PM
Have a look at this thread where I demonstrated setting up communication with a BK 1688, nearly identical to what you need I think. You just specify either the serial or USB resource name in the VISA resource input. (Did you set up both USB and serial?)
Note the unique response of these instruments! They use a termination character then OK, then another termination character. You'll just need to add the code for setting output and limits. As minions pointed out they are not SCPI compliant, so you will just provide strings to VISA write for the commands required.
Craig
12-18-2018 07:28 AM
Craig,
Unfortunately as I am using LabVIEW 2011, I cannot open the VI from the other thread.
12-18-2018 07:41 AM
@cvan17 wrote:
Unfortunately as I am using LabVIEW 2011, I cannot open the VI from the other thread.
Here you go.
12-18-2018 08:52 AM
Thanks for the code, however I am still getting an error:
LabVIEW: Error connecting to GPIB driver or device.
=========================
NI-488: Error connecting to driver or device.
=========================
VISA: (Hex 0x0) Operation completed successfully.
I opened a VISA test panel in MAX and I am not able to complete any queries, getting the same read operation error "timeout expired before operation completed"
12-18-2018 08:59 AM
UPDATE
I redid the wiring and it's working now. From here I think I can figure out how to programmatically control the voltage. Thanks.
11-17-2020 07:09 PM
I have purchased the same identical power supply and running into the same problem. Is it ok if you could share a working example of the vi for voltage output please as b&k precision stated that they were not planning to release LabVIEW support for the 1695B. Thanking you in advance.
11-18-2020 08:49 AM
I threw this together to better understand how the supply works. It will set the voltage to whatever level is desired.