Technical data
1260-118/-118A User Manual Publication No. 980824-118 Rev. A
Module Operation 3-8 Astronics Test Systems
creg_val &= ~ (0x20);
/* OR in the bit to close relay 14 */
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 17 without affecting channels 18 through 24 */
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 17 unchanged */
/* leave bit 0 clear to open relay 17 */
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 */
}
}