Racal Instruments 1260-22 User Manual page 35

High power switch
Table of Contents

Advertisement

1260-22 User Manual
creg0_addr = (MOD_ADDR_22 << 10) + 1;
creg1_addr = creg0_addr + 2;
creg2_addr = creg1_addr + 2;
/* close relay K14 without affecting the state of */
/* relays K9, K10, K11, K12, K13, K15 and K16*/
error = viIn8 (hdl1260, VI_A24_SPACE, creg1_addr, &creg_val);
if (error < 0) {
/* error handling code goes here */
}
/* invert the bits to get the present control register value */
creg_val = ~creg_val;
/* AND to leave every relay except K14 unchanged */
creg_val &= ~ (0x20);
/* OR in the bit to close K14 */
creg_val |= 0x20;
/* write the updated control register value */
error = viOut8 (hdl1260, VI_A24_SPACE, creg1_addr, creg_val);
if (error < 0) {
/* error handling code goes here */
}
/* open relay K17 without affecting relays K18, K19, or K20 */
error = viIn8 (hdl1260, VI_A24_SPACE, creg2_addr, &creg_val);
if (error < 0) {
/* error handling code goes here */
}
/* invert the bits to get the present control register value */
creg_val = ~creg_val;
/* AND to leave every relay except K17 unchanged */
/* leave bit 0 clear to open relay K17 */
creg_val &= ~ (0x01);
/* write the updated control register value */
error = viOut8 (hdl1260, VI_A24_SPACE, creg2_addr, creg_val);
if (error < 0) {
/* error handling code goes here */
}
/* close the VISA session */
error = viClose( hdl1260 );
if (error < 0) {
/* error handling code goes here */
}
}
Module Operation 3-8
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Publication No. 980673-055 Rev. A
EADS North America Test and Services

Advertisement

Table of Contents
loading

This manual is also suitable for:

1260-22a407630407630-001

Table of Contents