Scope
scope::FPGAIO5771 Class Reference

#include <FPGAIO5771.h>

Inherited by scope::FPGAAnalogDemultiplexer, scope::FPGAAnalogDemultiplexerResonance, scope::FPGAAnalogIntegrator, and scope::FPGAResonanceScannerNI5771.

Public Member Functions

 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)
 
void SetClockSource (NiFpga_Session _session, const uint8_t &_clock_source=0)
 
bool CheckIOModule (NiFpga_Session _session)
 

Protected Member Functions

void WaitForIdle (NiFpga_Session _session)
 

Protected Attributes

const uint32_t user_command_idle_indicator
 
const uint32_t pll_locked_indicator
 
const uint32_t configured_indicator
 
const uint32_t user_error_indicator
 
const uint32_t user_command_status_indicator
 
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_control
 
FPGAStatusSafe iostatus
 

Detailed Description

Handels the NI FlexRIO adapter module IO-5771.

Definition at line 11 of file FPGAIO5771.h.

Constructor & Destructor Documentation

scope::FPGAIO5771::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.

Definition at line 6 of file FPGAIO5771.cpp.

Member Function Documentation

void scope::FPGAIO5771::WaitForIdle ( NiFpga_Session  _session)
protected

Wait for user command idle.

Definition at line 27 of file FPGAIO5771.cpp.

void scope::FPGAIO5771::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 example for code)

  • 0: Internal clock, PLL off
  • 1: Internal clock, PLL on (REF IN)
  • 2: External clock, CLK IN
  • 3: Internal clock, PLL on (IoModSyncClk) Times out after 2 seconds and throws. Note: Wait at least 500ms after WriteOnBoardClockFrequency before calling SetClockSource!!!!!!!
    Parameters
    [in]_sessioncurrent handle of the connection to the FPGA
    [in]_clock_sourcethe new clock source to use
    Warning
    Attention, this function takes at least 6 seconds if using PLL on (NI seems to recommend to wait that long for the PLL to settle)

Definition at line 41 of file FPGAIO5771.cpp.

bool scope::FPGAIO5771::CheckIOModule ( NiFpga_Session  _session)

Necessary calls at the moment not supported by NI FPGA API 12.0, see CheckIOModule.vi for what to do.

Definition at line 92 of file FPGAIO5771.cpp.

Member Data Documentation

const uint32_t scope::FPGAIO5771::user_command_idle_indicator
protected

the User Command Idle indicator on the FPGA

Definition at line 15 of file FPGAIO5771.h.

const uint32_t scope::FPGAIO5771::pll_locked_indicator
protected

the PLL locked indicator on the FPGA

Definition at line 18 of file FPGAIO5771.h.

const uint32_t scope::FPGAIO5771::configured_indicator
protected

the Configure? indicator on the FPGA

Definition at line 21 of file FPGAIO5771.h.

const uint32_t scope::FPGAIO5771::user_error_indicator
protected

the User Error indicator on the FPGA

Definition at line 24 of file FPGAIO5771.h.

const uint32_t scope::FPGAIO5771::user_command_status_indicator
protected

the User Command Status indicator on the FPGA

Definition at line 27 of file FPGAIO5771.h.

const uint32_t scope::FPGAIO5771::user_command_control
protected

the User Command control on the FPGA

Definition at line 30 of file FPGAIO5771.h.

const uint32_t scope::FPGAIO5771::user_data_0_control
protected

the User Data 0 control on the FPGA

Definition at line 33 of file FPGAIO5771.h.

const uint32_t scope::FPGAIO5771::user_data_1_control
protected

the User Data 1 control on the FPGA

Definition at line 36 of file FPGAIO5771.h.

const uint32_t scope::FPGAIO5771::user_command_commit_control
protected

the User Command Commit control on the FPGA

Definition at line 39 of file FPGAIO5771.h.

FPGAStatusSafe scope::FPGAIO5771::iostatus
protected

Current status of the module.

We need the Safe (non-throwing) version here, because exceptions can crash (total computer freeze) the NI FPGA library during debug runs (probably a problem with the stack unwinding?).

Definition at line 43 of file FPGAIO5771.h.


The documentation for this class was generated from the following files: