Page 4.3
6-CHANNEL BATTERY SIMULATOR MODULE 41-752
pickering
SECTION 4 - PROGRAMMING GUIDE
PROGRAMMING THE 41-752
The 41-752 Battery Simulator uses the same driver software as the Pickering range of switches, pilpxi or pipx40,
requiring version 3.05 or later. There is no IVI driver available for this unit at present. For full detail of the range of
driver functions available the user is advised to refer to documentation for the switch drivers pilpxi and/or pipx40.
MODULE ARCHITECTURE
Pickering switch modules separate functionality into logical sections referred to as sub-units. Each sub-unit
represents a set of identical objects used to control or monitor aspects of card operation.
The 41-752 contains 13 output sub-units. The purpose of each of these is described below:
Sub-Unit
Size (Bits)
Purpose
Output 1-6
14
Channels 1 to 6 Voltage DACs
(raw binary access)
Output 7-12
16
Channels 1 to 6 Current Sink
(raw binary access)
Output 13
6
Output Enables for Channels 1 to 6
(raw binary access)
000001B = Channel 1 enable
000010B = Channel 2 enable
000100B = Channel 3 enable
001000B = Channel 4 enable
010000B = Channel 5 enable
100000B = Channel 6 enable
These sub-units are further defined in this section. Examples are given using a number of library interfaces, however
the user is advised to refer to the documentation for the library for full details of its use
SET AND READ BACK AN OUTPUT VOLTAGE
C code example using the Direct Driver (requires Pilpxi.h and Pilpxi.lib found in the Pickering folder structure)
DWORD
l_CardNum;
//assumed you have opened the card using OpenCards() or OpenSpecifiedCard()
DWORD l_SubUnit;
double l_Val;
SubUnit
=
3;
//Select
the
3rd
channel
l_RetCode = PIL_BattSetEnable(l_CardNum, l_SubUnit, 1);
//enable the output for channel 3
l_Val
=
5.43;
//request
5.43
volts
l_RetCode = PIL_BattSetVoltage(l_CardNum, l_SubUnit, l_Val); //select voltage specified in l_Val
l_RetCode = PIL_BattGetVoltage(l_CardNum, l_SubUnit, &l_Val);//get the current voltage into l_Val
//rounded
to
nearest
obtainable
value
SubUnit
=
0;
//Select
all
channels
l_RetCode = PIL_BattSetEnable(l_CardNum, l_SubUnit, 0x3F); //enable output for channels 1 to 6
l_Val
=
5.43;
//request
5.43
volts
l_RetCode = PIL_BattSetVoltage(l_CardNum, l_SubUnit, l_Val); //select voltage specified in l_Val