Page 4.5
6-CHANNEL BATTERY SIMULATOR MODULE 41-752
pickering
SECTION 4 - PROGRAMMING GUIDE
RAW SUB-UNIT ACCESS
Output Sub-UnitS 1 to 6 - Voltage Sources
WARNING:
You should only use this function during calibration
Each of these sub-units appears as a 14 bit register which can be set to any binary value between 0 and 16383
(0x3FFF hexadecimal). The range of values controls the output voltage between its minimum and maximum values,
nominally 0-7 Volts.
For example, this code will set the voltage to maximum.
Driver
Command
pilpxi (kernel)
DWORD dac[1];
dac[0] = 0x3fff;
PIL_WriteSub(cardNum, 3, dac);
pipx40 (VISA)
ViUInt32 pattern[1];
pattern[0] = 0x3fff;
pipx40_setChannelPattern (vi, 3, pattern);
PIPLX (LXI)
DWORD dac[1];
dac[0] = 0x3fff;
PIPLX_WriteSub(session, cardNum, 3, dac 1);
SOAP (LXI)
my $data = (0x3fff);
$device -> WriteSub(3, $data);
//Start a loop
//prompts for a test value to be placed in l_Val 0=low voltage 0x3fff is highest voltage
//exit the loop if 0 Volts achieved
l_RetCode = PIL_WriteSub(l_CardNum, l_SubUnit, &l_Val); //write the value in l_Val to the DAC
//Use a DMM to check voltage on channel 3 output pins is 0 volts
//loop for another test
CalInd=
1; //set
0
volt
calibration
value
l_RetCode = PIL_WriteCal(l_CardNum, l_SubUnit, l_CalInd, l_Val);//set calibration value in l_Val
//Start a loop
//prompts for a test value to be placed in l_Val 0=low voltage 0x3fff is highest voltage
//exit the loop if 0 Volts achieved
l_RetCode = PIL_WriteSub(l_CardNum, l_SubUnit, &l_Val); //write the value in l_Val to the DAC
//Use a DMM to check voltage on channel 3 output pins is 7 volts
//loop for another test
CalInd=
2; //set
7
volt
calibration
value
l_RetCode = PIL_WriteCal(l_CardNum, l_SubUnit, l_CalInd, l_Val);//set calibration value in l_Val