Programming The Module - Pickering 40-617A User Manual

18-bank, 3-channel, 1-pole multiplexer module
Table of Contents

Advertisement

SECTION 4 - PROGRAMMING GUIDE
PROGRAMMING THE MODULE 40-617A
Here are some simple examples of using the drivers with the 40-617A Multiplexer module.
Using PILPXI
To operate a relay the user could use the simple OpBit command or the WriteSub commands
OpBit
DWORD sub_unit = 1;
PIL_OpBit( card_num, sub_unit, 1, 1);
PIL_OpBit( card_num, sub_unit, 1, 0);
PIL_OpBit( card_num, sub_unit, 3, 1);
WriteSub
// Sub-unit 1 is 3 bits wide, so 1 DWORD is needed to hold the pattern
DWORD data[1];
data[0] = 1;
PIL_WriteSub( card_num, sub_unit, data);
data[0] = 0x4;
PIL_WriteSub( card_num, sub_unit, data);
Using PIPX40
setChannelState
ViUInt32 sub_unit = 1;
pipx40_setChannelState(vi, sub_unit, 1, VI_ON);
pipx40_setChannelState(vi, sub_unit, 1, VI_OFF);
pipx40_setChannelState(vi, sub_unit, 3, VI_ON);
setChannelPattern
// Sub-unit 1 is 3 bits wide, so 1 ViUInt32 value is needed to hold the entire pattern
ViUInt32 data[1];
data[0] = 1;
pipx40_setChannelPattern( vi, sub_unit, data);
data[0] = 0x4;
pipx40_setChannelPattern( vi, sub_unit, data);
Using pi40iv
The IVI driver treats the multiplexers as an array of switches labelling the channels using the normal comA/chA (etc)
labelling tags. For simplicity the operation of isolation and inter-bank switches has been automated in the driver.
pi40iv_Connect(vi, comA, chA1);
pi40iv_Disconnect(vi, comA, chA1);
pi40iv_Connect(vi, comA, chA3);
Uncommited Switch channel labelling is in the form comS1,chS1 to comS12,chS12
The IVI Swtch driver specification contains no bulk setting capabilities.
18 BANK, 3 CHANNEL, 1-POLE MULTIPLEXER MODULE 40-617A
Page 4.4
// Sets lowest bit to 1, channel 1 to common
// Sets 3rd bit, channel 3 to common
// All other relays are set to off
// Sets lowest bit to 1, channel 1 to common
// Sets 3rd bit, channel 3 to common
// All other relays are set to off
// Connects channel 1 to common
// Disconnects channel 1 from common
// Connects channel 3 to common
// Connects channel 1 to common
// Disconnects channel 1 from common
// Connects channel 3 to common
// Connects channel 1 to common
// Disconnects channel 1 from common
// Connects channel 3 to common
pickering

Advertisement

Table of Contents
loading

Table of Contents