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.

VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Power supply (Keithley 2230G-30-6) with Veristand

Solved!
Go to solution

Hello, 

 

I would like to control my power supply (Keithley 2230G-30-6) via USB with Veristand. For the moment, I just need to select the voltage setpoint and the current setpoint manuelly. I have a CRiO-9045 and I need to connect directly the USB of the power supply to the CRiO-9045. 

I can control the power supply with NI max and NI-VISA. I have done several research and If I understood correctly I can integrate a custom device in Veristand but I don't understand how to do that.

I have several questions :

Is it possible to control a power supply via USB from veristand ? 

If it's possible, what is the best solution to make that (Custom devices ?, other ?) ?  

 

Regards,

 

 

0 Kudos
Message 1 of 9
(2,406 Views)

NI recommends using Instrument Addon Custom Device to communicate with any third party device. 

You can download the installer from Releases.

Quick Start Documentation is available at %Public%\Documents\National Instruments\NI VeriStand (Year)\Custom Devices\Instrument Addon\Windows\Quick Start Documentation.

Senior Technical Support Engineer | CLD CTA | NI


DISCLAIMER: The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

0 Kudos
Message 2 of 9
(2,399 Views)

Thank for your answer.

 

I have installed the Instrument Addon Custom Device but if it's correct, I can't communicate directly with the USB but only with a GPIB to USB ? 

 

Regards

0 Kudos
Message 3 of 9
(2,352 Views)

Although the default VISA Resource for VISA Protocol is GPIB0::2::INSTR, you can specify any valid VISA resource name that appears in NI MAX, including USB. See LabVIEW VISA Resource Name Doesn't Show USB Device if it does not appear in NI MAX.

Senior Technical Support Engineer | CLD CTA | NI


DISCLAIMER: The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

0 Kudos
Message 4 of 9
(2,346 Views)

Mahmoud63PPC_0-1622549084334.png

 I have this on NI MAX, so the name of the VISA resource is the last line ? 

0 Kudos
Message 5 of 9
(2,336 Views)
Solution
Accepted by topic author Mahmoud63PPC

Oui, the last line is the VISA Resource Name. You can see some example from VISA Resource Name Control.

Just copy the entire string to the control in the Instrument Addon Custom Device and you would be able to deploy it.

Senior Technical Support Engineer | CLD CTA | NI


DISCLAIMER: The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

0 Kudos
Message 6 of 9
(2,327 Views)

I have a new problem, I am trying to get an answer after a command but the system retrun a error : BFFF001D. I don't understand the error because why NI MAX, the power supply responds correctly. Do you have any leads?

0 Kudos
Message 7 of 9
(2,260 Views)

You can use the Explain Error dialog to see the decimal code of the error (from LabVIEW toolbar Help >> Explain Error...)

ZY_Ong_0-1623199435181.png

In fact, this error is not related to the command but the physical layer setting.

Error 1073807331 When Using a VISA Property in LabVIEW

 

Termination Characters in NI-VISA states that "For VISA resource types that correspond to a complete 488.2 protocol (GPIB Instr, VXI/GPIB-VXI Instr, USB Instr, and TCPIP Instr), you generally do not need to use termination characters, because the protocol implementation also has a native mechanism to specify the end of a message." Perhaps you can try disabling the Termination Characters?

ZY_Ong_2-1623200418879.png

 

Senior Technical Support Engineer | CLD CTA | NI


DISCLAIMER: The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

0 Kudos
Message 8 of 9
(2,244 Views)

Ok thank your for this tool.

Yes, I try that but I have the same error without Termination Characters, I can't receive the answer of the Power Supply.

0 Kudos
Message 9 of 9
(2,238 Views)