The following example demonstrates how to program the board using the C programming language under Windows. The example shows how to get or set a group or channel voltage. To work correctly, the correct programming file (image) must be loaded into the FPGA:
Use GX3500_Example.rpd for GX3500
This image generates the interrupt automatically every 250 mSec.
Use GX3700_Example.rpd for the GX3700 and use GX3700e_Example.rpd for the GX3700e
These FPGA image generates the interrupt manual when GXFPGA_MEMORY_BAR1, offset 0x3EC transitions from 0 to 1.
All of these files are located in the Examples\C folder within the GXFPGA Program directory.
To run the example, enter the following command line:
GxFpgaExample <Slot> <operation> <parameter>
Where:
<Slot> |
Board PXI Slot number where the board resides. |
<Operation> |
Operation code:LOAD_VOLATILE=Load volatile FPGA configuration.LOAD_EEPROM=Load EEPROM FPGA configuration.READ_REG=Read FPGA Register.READ_MEM=Read FPGA Memory.WRITE_REG=Write FPGA Register.WRITE_MEM=Write FPGA Memory.IOBANKBYPASS=Route IO Bank to Expansion Board or IO.Connector (0-15) [3500(e) only].INTERRUPT=prints when interrupt is received.DMA_READ=Read from the User FLEX FPGA memory [3700(e) only].DMA_WRITE=Write to the User FLEX FPGA memory [3700(e) only].SUM=Print Board Summary information |
<Parameter> |
Parameter varies by Operation:LOAD_VOLATILE=file name and location (.SVF).LOAD_EEPROM=file name and location (.RPD).READ_REG=Specifies the offset.READ_MEM=Specifies the offset.WRITE_REG=Write FPGA Register.WRITE_MEM=Write FPGA Memory.IOBANKBYPASS=Specifies the IO Connector (0-15).DMA_READ=Specifies the number of bytes to read.DMA_WRITE=Specifies the number of bytes to write. |