Page 4.4
MEMS FIBER OPTIC SWITCH MODULE 40-855
pickering
SECTION 4 - PROGRAMMING GUIDE
Using pi40iv
pi40iv_Connect(vi, com, no); // Connects the normally open path
pi40iv_Disconnect(vi, com, no); // Disconnects the normally open path
pi40iv_Connect(vi, com, nc); // Connects the normally closed path
Dual or larger versions are labelled by appending a numeric to the channel names, so becoming com1, no1, nc1
com2, no2, nc2 etc.
Please be aware that the IVI driver requires explicit connection of the com-nc path for correct operation of the driver.
Even though the com-nc path is physically connected by issuing a Disconnect(vi, com, no) call, the path will not be
marked as in use unless an explicit call to Connect(vi, com, nc) is issued.
The IVI Switch driver specification contains no bulk setting capabilities.
Using PIPX40
setChannelState
ViUInt12 sub_unit = 1;
pipx40_setChannelState(vi, sub_unit, 1, VI_ON);
// Connects channel 2 to common
pipx40_setChannelState(vi, sub_unit, 1, VI_OFF);
// Disconnects channel 2 from common
(Channel 1 is reconnected)
setChannelPattern
// Sub-unit is 1 bit wide, so 1 ViUInt32 value is needed to hold the entire pattern
ViUInt32 data[1];
data[0] = 1;
// Sets lowest bit to 1, channel 2 to common
pipx40_setChannelPattern( vi, sub_unit, data);
PROGRAMMING THE MODULE 40-855
Here are some simple examples of using the drivers with the 40-855 Single 2 Channel Switch Module.
Channel 1 is always set by default.
The Dual 2 Channel Switch Modules operate in the similar 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); // Connects channel 2 to common
PIL_OpBit( card_num, sub_unit, 1, 0); // Disconnects channel 2 from common
(Channel
1
is
reconnected)
WriteSub
// Sub-unit is 1 bit wide, so 1 DWORD is needed to hold the pattern
DWORD data[1];
data[0] = 1;
// Sets lowest bit to 1, channel 2 to common
PIL_WriteSub( card_num, sub_unit, data);
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com