2 #include "FPGAIO5771.h"
7 ,
const uint32_t& _pll_locked
8 ,
const uint32_t& _configured
9 ,
const uint32_t& _user_error
10 ,
const uint32_t& _user_command_status
11 ,
const uint32_t& _user_command_control
12 ,
const uint32_t& _user_data_0_control
13 ,
const uint32_t& _user_data_1_control
14 ,
const uint32_t& _user_command_commit)
15 : user_command_idle_indicator(_user_command_idle)
16 , pll_locked_indicator(_pll_locked)
17 , configured_indicator(_configured)
18 , user_error_indicator(_user_error)
19 , user_command_status_indicator(_user_command_status)
20 , user_command_control(_user_command_control)
21 , user_data_0_control(_user_data_0_control)
22 , user_data_1_control(_user_data_1_control)
23 , user_command_commit_control(_user_command_commit) {
28 NiFpga_Bool idle =
false;
29 uint32_t waitcounter = 0;
34 std::this_thread::sleep_for(std::chrono::milliseconds(20));
36 }
while ( !idle && (waitcounter < 2000) );
37 if ( waitcounter >= 2000 )
42 NiFpga_Bool configured =
false;
43 uint32_t waitcounter = 0;
48 std::this_thread::sleep_for(std::chrono::milliseconds(20));
50 }
while ( !configured && (waitcounter < 2000) );
51 if ( waitcounter >= 5000 )
52 throw FPGAException(-1,
"SetClockSource adapter module not configured");
75 if ( (_clock_source == 1) || (_clock_source == 3) ) {
76 NiFpga_Bool locked =
false;
77 uint32_t waitcounter = 0;
81 std::this_thread::sleep_for(std::chrono::milliseconds(20));
83 }
while ( !locked && (waitcounter < 5000) );
84 if ( waitcounter >= 5000 )
88 std::this_thread::sleep_for(std::chrono::seconds(6));
const uint32_t user_error_indicator
the User Error indicator on the FPGA
const uint32_t user_command_control
the User Command control on the FPGA
An exception for FPGA stuff.
bool CheckIOModule(NiFpga_Session _session)
Necessary calls at the moment not supported by NI FPGA API 12.0, see CheckIOModule.vi for what to do.
const uint32_t user_data_1_control
the User Data 1 control on the FPGA
const uint32_t configured_indicator
the Configure? indicator on the FPGA
const uint32_t pll_locked_indicator
the PLL locked indicator on the FPGA
This is the include file for standard system include files, or project specific include files that ar...
const uint32_t user_command_idle_indicator
the User Command Idle indicator on the FPGA
void SetClockSource(NiFpga_Session _session, const uint8_t &_clock_source=0)
Possible clock sources (see adapter modules help and Configure Clock.vi from NI 5771 Clock Select exa...
const uint32_t user_data_0_control
the User Data 0 control on the FPGA
FPGAStatusSafe iostatus
Current status of the module.
const uint32_t user_command_commit_control
the User Command Commit control on the FPGA
FPGAIO5771(const uint32_t &_user_command_idle, const uint32_t &_pll_locked, const uint32_t &_configured, const uint32_t &_user_error, const uint32_t &_user_command_status, const uint32_t &_user_command_control, const uint32_t &_user_data_0_control, const uint32_t &_user_data_1_control, const uint32_t &_user_command_commit)
Get the FPGA VI control/indicator ids.
void WaitForIdle(NiFpga_Session _session)
Wait for user command idle.