EasyManua.ls Logo

Pickering 40-296 - Page 25

Pickering 40-296
48 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Page 4.3
PROGRAMMABLE POTENTIOMETER MODULE 40-296
pickering
SECTION 4 - PROGRAMMING GUIDE
Here are examples of using the drivers with the 8-bit versions of the 40-296. Other versions operate in the same
way but have a different number of bits in their sub-units.
Using PILPXI
To operate a relay the user could use the simple OpBit command or the WriteSub commands
OpBit
DWORD sub_unit = 1; // Select channel 1
PIL_OpBit( card_num, sub_unit, 1, 1); // Operates bit 1 (A1 resistor relay)
PIL_OpBit( card_num, sub_unit, 2, 1); // Operates bit 2 (A2 resistor relay)
PIL_OpBit( card_num, sub_unit, 9, 1); // Operates bit 9 (B1 resistor relay)
PIL_OpBit( card_num, sub_unit, 10, 1); // Operates bit 10 (B2 resistor relay)
PIL_OpBit( card_num, sub_unit, 11, 1); // Operates bit 11 (B3 resistor relay)
PIL_OpBit( card_num, sub_unit, 12, 1); // Operates bit 12 (B4 resistor relay)
PIL_OpBit( card_num, sub_unit, 13, 1); // Operates bit 13 (B5 resistor relay)
PIL_OpBit( card_num, sub_unit, 14, 1); // Operates bit 14 (B6 resistor relay)
PIL_OpBit( card_num, sub_unit, 1, 0); // Releases bit 1 (A1 resistor relay)
PIL_OpBit( card_num, sub_unit, 2, 0); // Releases bit 2 (A2 resistor relay)
PIL_OpBit( card_num, sub_unit, 9, 0); // Releases bit 9 (B1 resistor relay)
PIL_OpBit( card_num, sub_unit, 10, 0); // Releases bit 10 (B2 resistor relay)
PIL_OpBit( card_num, sub_unit, 11, 0); // Releases bit 11 (B3 resistor relay)
PIL_OpBit( card_num, sub_unit, 12, 0); // Releases bit 12 (B4 resistor relay)
PIL_OpBit( card_num, sub_unit, 13, 0); // Releases bit 13 (B5 resistor relay)
PIL_OpBit( card_num, sub_unit, 14, 0); // Releases bit 14 (B6 resistor relay)
WriteSub
// Sub-unit is 16 bits wide, so 1 DWORD is needed to hold the pattern
DWORD data[1];
data[0] = 0x3F03 // Operates bits 1, 2, 9, 10, 11, 12, 13 and 14
PIL_WriteSub( card_num, sub_unit, data);
data[0] = 0 // Releases all bits of channel
PIL_WriteSub( card_num, sub_unit, data);

Related product manuals