The following example demonstrates how to program the board using the C programming language under Windows. The example shows how to close or open a relay.
To run, Enter the following command line:
GXPIOEX <PciSlot> <specific_command>
Where:
<board_type> |
Board type: 5731=GX5731, 5732=GX5732, 5733=GX5733 |
|
<slot> |
PCI/PXI Explorer slot number where the board resides. |
|
<port | counter numbers> |
The digital i/o port number (0-6) or the counter number (0-3). |
<operation> |
Operation code: RD=read port direction WD=write port direction RP=read port value WP=write port value RC=read counter WC=write counter |
<direction | value | count> |
Direction for WP operation: 0-15=for the port 4 groups. Each bit controls the direction of a byte of the port. 1 for output, 0 for input. Value for WP operation: 0 - 0xFFFFFFFF for port value Count for WC operation: 0 - 255 for counter value |