Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

HIL: Power Supply Control in VeriStand

How Power Supply is integrated into VeriStand Environment. The goal is to  control Power Supply (On/Off/Vary Voltage) from Automation.

0 Kudos
Message 1 of 7
(5,323 Views)

Hi Amit,

 

You can use the following methods to control the any device from Veristand

 

1. By making a custom device fro Veristand
http://www.ni.com/tutorial/9348/en/

Through this route you need to use the given template and use the driver API's for this power supply and then you need to create the Custom Device following the instructions in the tutorial above linked.

2. By converting the existing vi you made in LabVIEW to .lvmodel file.
http://zone.ni.com/reference/en-XX/help/374160B-01/vsmithelp/mit_model_from_lv/

There are some restrictions on the different controls and indicators you can use for input and output. You can understand from this document how to convert the LabVIEW vi to .lvmodel and use with Veristand.

Regards,
Yaskadeva
India AE
National Instruments, India

There are only two ways to tell somebody thanks: Kudos and Marked Solutions 😛
Message 2 of 7
(5,273 Views)
Thanks for information. Going through it.
0 Kudos
Message 3 of 7
(5,270 Views)

Hi,

I have generated LabVIEW model (.lvmodel) for to be used in VeriStand from the existing developed VI. When I run LabVIEW Model dirrectly (without importing into VeriStand) I can control/ set voltage on Xantrex power supply.

 

Now, I imported the .lvmodel into VeriStand System Definition File.

There are two inports to the VI: 1. Voltage 2. On/Off

There is also Simulink model imported into VeriStand same System Definition File and one of the output (BatterySwitch) of Simulink model is mapped as input to LabVIEW Power Control Model (By using System Mapping in VeriStand).

When I changed BatterySwitch to 1, I dont see voltage as 13.8 on Power Supply (I have set default value to 13.8 of voltage). It goes from 0 to 1.5 and again back to 0 and this continues. Am I missing something here?

 

FYI, LabVIEW Model controls Xantrex Power Supply over GPIB.

 

0 Kudos
Message 4 of 7
(5,052 Views)

Any solution for this?

0 Kudos
Message 5 of 7
(4,800 Views)

Here is my requirement:

  • I need to create one project in NI VeriStand having:
  1. Plant Model in Simulink
  2. Control Xantrex Power Supply (Through GPIB and I have LabVIEW VI for this) – I have generated LabVIEW model for this and integrated into VeriStand under Simulation Model
  • The intention is to control power supply by giving Boolean (On/Off) from Simulink model which is also integrated into VeriStand as dll.
  1. Output of Simulink model (BatteryVoltageSwitch_Out) will be mapped to input of LabVIEW Model (BatteryVoltageSwitch_In) => 0/1
  2. Output of Simulink model (BatteryVoltage_Out) will be mapped to input of LabVIEW Model (BatteryVoltage_In) => 0/13.8volts

But this is not working after integration in VeriStand. When I make switch (output of Simulink model) to ON, no On Value is sent to Input of LabVIEW model which is controlling Power Supply.

 

0 Kudos
Message 6 of 7
(4,797 Views)

Hi Amit,

 

Can you try just using the LabVIEW Model in Veristand, without using the Simulink model in between.

 

For Example, you can map two controls on the workspace directly to the on/off inport and also using a numeric control to send data to the voltage inport??

Regards,
Yaskadeva
India AE
National Instruments, India

There are only two ways to tell somebody thanks: Kudos and Marked Solutions 😛
0 Kudos
Message 7 of 7
(4,795 Views)