![background image](http://html1.mh-extra.com/html/racal-instruments/1260-100x-x-series/1260-100x-x-series_user-manual_3136933040.webp)
1260-X138 User Manual
Module Operation 3-12
Racal Instruments
©
2005
/* viOut8() */
/* module address shifted 10 places = module address x 1024 */
creg0_addr = (MOD_ADDR_138 << 10) + 1;
creg1_addr = creg 2;
creg2_addr = creg 2;
/* close channel 63 without affecting the state of */
/* channels 76, 62, 1000, 700, 71, 75, and 77 */
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 channel except 63 unchanged */
creg_val &= ~ (0x20);
/* OR in the bit to close channel 63 */
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 channel 47 without affecting channels 57, 600, 60, 51, 59, 500 */
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 channel except 47 unchanged */
/* leave bit 0 clear to open channel 47 */
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 */
}
Содержание 1260-100X X Series
Страница 8: ...1260 X138 User Manual iv This page was left intentionally blank...
Страница 10: ...1260 X138 User Manual Specifications 1 2 Racal Instruments 2005 Figure 1 1 The 1260 X138...
Страница 42: ...1260 X138 User Manual Module Operation 3 14 Racal Instruments 2005 This page was left intentionally blank...