Page 4.14
VERY HIGH DENSITY MULTIPLEXER CARD 50-670A
pickering
SECTION 4 - PROGRAMMING GUIDE
Using pi40iv
The IVI driver has no special labelling for this card and labels the channels using the normal com/ch labelling tags.
pi40iv_Connect(vi, “com”, “ch1”); // Connects channel 1 to com
pi40iv_Disconnect(vi, “com”, “ch1”); // Disconnects channel 1 from com
pi40iv_Connect(vi, “com”, “ch6”); // Connects channel 6 to com
The IVI Switch driver specication contains no bulk setting capabilities.
Using PIPX40
setChannelState
ViUInt32 sub_unit = 1;
pipx40_setChannelState(vi, sub_unit, 1, VI_ON); //
Connects channel 1 to com
pipx40_setChannelState(vi, sub_unit, 1, VI_OFF); //
Disconnects channel 1 from com
pipx40_setChannelState(vi, sub_unit, 6, VI_ON); //
Connects channel 6 to com
setChannelPattern
// Sub-unit is 10 bits wide, so 1 ViUInt32 value is needed to hold the entire pattern
ViUInt32 data[1];
data[0] = 1; // Sets lowest bit to 1, channel 1 to com
pipx40_setChannelPattern( vi, sub_unit, data);
data[0] = 0x20; // Sets 6th bit, channel 6 to com
//Allotherrelaysaresettoo
pipx40_setChannelPattern( vi, sub_unit, data);
PROGRAMMING THE CARD
Here are some simple examples of using the drivers with the 50-670A-021-10/8 (10 Channel 8 Pole) multiplexer
card. Other modules in the range are controlled in a similar way.
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); // Connects channel 1 to com
PIL_OpBit( card_num, sub_unit, 1, 0); // Disconnects channel 1 from com
PIL_OpBit( card_num, sub_unit, 6, 1); // Connects channel 6 to com
WriteSub
// Sub-unit is 10 bits wide, so 1 DWORD is needed to hold the pattern
DWORD data[1];
data[0] = 1; // Sets lowest bit to 1, channel 1 to com
PIL_WriteSub( card_num, sub_unit, data);
data[0] = 0x20; // Sets 6th bit, channel 6 to com
//Allotherrelaysaresettoo
PIL_WriteSub( card_num, sub_unit, data);