Writing to FPGA VI Controls (FPGA Interface)
Complete the following steps to write to a control in an FPGA VI from a host VI. The FPGA VI must have front panel controls.
- Open a reference to the FPGA VI or bitfile.
Note The FPGA target, FPGA VI, and host VI must be in the same LabVIEW project if you want to open a reference to an FPGA VI. The host VI does not need to be in a project if you open a reference to a bitfile.
- Place the Read/Write Control function on the block diagram. Notice that the Read/Write Control function contains one Unselected input.
- Wire the FPGA VI Reference Out output of the Open FPGA VI Reference function to the FPGA VI Reference In input of the Read/Write Control function.
- Click the Unselected input. The shortcut menu lists all front panel controls and indicators in the FPGA VI.
- Select a control available in the FPGA VI from the shortcut menu. Notice that the Unselected input changes to reflect the name of the control in the FPGA VI.
To write to more controls in the FPGA VI, right-click the Read/Write Control function and select Add Element from the shortcut menu and then customize the input as described in the previous step. You also can click the bottom line of the Read/Write Control function with the Positioning tool and drag the line down to add more controls and indicators. The read and write operations execute sequentially from top to bottom. Also, if the FPGA VI has subVIs and you want to access controls and indicators on the subVI, you must wire the subVI controls and indicators to the controls and indicators of the FPGA VI that is used in the Open FPGA VI Reference function.
|Note You also can write to FPGA VI indicators. To write to an indicator, right-click the indicator output and select Change to Write from the shortcut menu.|