Page 4.7
REED RELAY MODULE 40-110/115/120/125
pickering
SECTION 4 - PROGRAMMING GUIDE
Using pi40iv
The IVI driver has no special labelling for this card and treats the array of switches as a simple array, labelling the
channels using the normal com./ch labelling tags.
pi40iv_Connect(vi, com1, ch1);
// Operates the A1/C1 relay
pi40iv_Disconnect(vi, com1, ch1); // Releases the A1/C1 relay
pi40iv_Connect(vi, com6, ch6);
// Operates the A6/C6 relay
The IVI Swtch driver specification contains no bulk setting capabilities.
Using PIPX40
setChannelState
ViUInt32 sub_unit = 1;
pipx40_setChannelState(vi, sub_unit, 1, VI_ON);
// Operates the A1/C1 relay
pipx40_setChannelState(vi, sub_unit, 1, VI_OFF);
// Releases the A1/C1 relay
pipx40_setChannelState(vi, sub_unit, 6, VI_ON);
// Operates the A6/C6 relay
setChannelPattern
// Sub-unit is 32 bits wide, so 1 ViUInt32 value is needed to hold the entire pattern
ViUInt32 data[1];
data[0] = 1;
// Sets lowest bit to 1, A1/C1 relay
pipx40_setChannelPattern( vi, sub_unit, data);
data[0] = 0x20;
// Sets 6th bit, A6/C6 relay
// All other relays are set to off
pipx40_setChannelPattern( vi, sub_unit, data);
PROGRAMMING THE MODULE
Here are examples of using the drivers with the 40-110-121 (32 x SPDT) module. Other modules in the range
operate in the same way but have a different number of bits in the sub-unit.
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); // Operates the A1/C1 relay
PIL_OpBit( card_num, sub_unit, 1, 0); // Releases the A1/C1 relay
PIL_OpBit( card_num, sub_unit, 6, 1); // Operates the A6/C6 relay
WriteSub
// Sub-unit is 32 bits wide, so 1 DWORD is needed to hold the pattern
DWORD data[1];
data[0] = 1;
// Sets lowest bit to 1, A1/C1 relay
PIL_WriteSub( card_num, sub_unit, data);
data[0] = 0x20;
// Sets 6th bit, A6/C6 relay
// All other relays are set to off
PIL_WriteSub( card_num, sub_unit, data);
Содержание 40-110
Страница 2: ...pickeringtest com Issue 5 5 January 2020 40 110 115 120 125 User Manual PXI Reed Relay Modules...
Страница 7: ...Page VI REED RELAY MODULE 40 110 115 120 125 pickering THIS PAGE INTENTIONALLY BLANK...
Страница 21: ...Page 3 4 REED RELAY MODULE 40 110 115 120 125 pickering SECTION 3 INSTALLATION THIS PAGE INTENTIONALLY BLANK...