Page 4.4
PXI/PXIe 2-POLE HIGH DENSITY MATRIX (40/42-588)
pickering
SECTION 4 - PROGRAMMING GUIDE
Using The IVI Driver, Direct I/O Driver or VISA Driver
This section provides some code fragments which show how to control the 40/42-588 Matrix using the IVI Driver,
Direct I/O Driver or the VISA Driver.
Once the drivers are installed the manual “Sys40Prg.pdf” and driver help files which fully describes these functions
can be found in the Pickering folder(s) or the Pickering entries on your Start Menu.
The card must be opened before use and closed after using the following function calls:
Direct I/O Driver - Open with
PIL_OpenCards
or
PIL_OpenSpecifiedCard
and close with
PIL_CloseCards
or
PIL_CloseSpecifiedCards
respectively.
VISA Driver - Open with
pipx40_init
, and close with,
pipx40_close
.
Setting a Matrix Crosspoint:
Using the IVI driver:
pi40iv_Connect(vi, “x1”, “y2”); //set crosspoint x1, y2 to on
pi40iv_Disconnect(vi, “x1”, “y2”); //set crosspoint x1, y2 to off
Using the Pickering Direct I/O Driver:
DWORD SubUnit = 1;
PIL_ClearSub(CardNo, SubUnit);
//clear all crosspoints to off state
PIL_OpCrosspoint(CardNo, SubUnit, 2, 1, 1); //set crosspoint x1, y2 to on
PIL_OpCrosspoint(CardNo, SubUnit, 2, 1, 0); //set crosspoint x1, y2 to off
Using the VISA driver:
ViUInt32 SubUnit = 1;
pipx40_clearSub(vi, SubUnit); //clear all crosspoints off state
pipx40_setCrosspointState (vi, SubUnit, 2, 1, VI_ON); //set crosspoint x1, y2 on
pipx40_setCrosspointState (vi, SubUnit, 2, 1, VI_OFF); //set crosspoint x1, y2 off