Software
R&S
®
TS-PIO2
38
User Manual 1506.7208.12 ─ 06
RSPIO2_VAL_TRIG_SEQ_START, 0,
RSPIO2_TRIG_MASK_XTO1);
/* configure module earth tied (connect AGND to GND) */
status = rspio2_ConfigureGround (vi, VI_TRUE);
/* connect AGND to front connector */
status = rspio2_Connect (vi, "AGND", "LO");
/* connect all output channel to front connector */
for (idx = 1; idx <= 16; idx++)
{
sprintf(chName, "CH%d", idx);
status = rspio2_ConfigureOutputMux (vi, chName,
RSPIO2_VAL_OUTMUX_MODE_OUT1);
}
/* connect all input channel to front connector */
for (idx = 1; idx <= 16; idx++)
{
sprintf(ch1, "CH%d_IN", idx);
sprintf(ch2, "CH%d_1", idx);
status = rspio2_Connect (vi, ch1, ch2);
}
/* wait until relays have settled; timeout 500 ms */
status = rspio2_WaitForDebounce (vi, 500.0);
/* configure channel 1 to 8 to mode digital dynamic */
for (idx = 1; idx <= 8; idx++)
{
sprintf(chName, "CH%d", idx);
status = rspio2_ConfigureChannelMode (vi, chName,
RSPIO2_VAL_CH_MODE_DIGITAL_DYNAMIC);
}
/* configure channel 9 to 10 to mode square wave */
for (idx = 9; idx <= 10; idx++)
{
sprintf(chName, "CH%d", idx);
status = rspio2_ConfigureChannelMode (vi, chName,
RSPIO2_VAL_CH_MODE_SQUAREWAVE);
}
/* configure channel 11 to 12 to mode digital static */
for (idx = 11; idx <= 12; idx++)
{
sprintf(chName, "CH%d", idx);
status = rspio2_ConfigureChannelMode (vi, chName,
RSPIO2_VAL_CH_MODE_DIGITAL_STATIC);
Sample program R&S TS-PIO2