Software Library API naibrd 2.24.0
See all documentation at naii.docs.com
rtd_basic_ops.c File Reference

Enumerations

enum  rtd_basicops_commands { RTD_BASICOP_CMD_CONFIG , RTD_BASICOP_CMD_BASICOPS , RTD_BASICOP_CMD_COUNT }
 
enum  rtd_gen5_config_commands {
  RTD_GEN5_CONFIG_CMD_CHAN_STATUS_ENABLE , RTD_GEN5_CONFIG_CMD_RTD_TC_CONFIG , RTD_GEN5_CONFIG_CMD_ZERO_TEMP_RESISTANCE , RTD_GEN5_CONFIG_CMD_COMPRES ,
  RTD_GEN5_CONFIG_CMD_WIRE , RTD_GEN5_CONFIG_CMD_CLEAR_STATUS , RTD_GEN5_CONFIG_CMD_CLEAR_STATUS_ALL_CHANS , RTD_GEN5_CONFIG_CMD_CHECK_POWER_ON_BIT ,
  RTD_GEN5_CONFIG_CMD_SET_THRESH , RTD_GEN5_CONFIG_CMD_SET_THRESH_ALL_CHANS , RTD_GEN5_CONFIG_CMD_SET_OFFSET_TEMP , RTD_GEN5_CONFIG_CMD_SET_BACKGROUND_OP_SUSPEND ,
  RTD_GEN5_CONFIG_CMD_TRIGGER_OPEN_CHECK , RTD_GEN5_CONFIG_CMD_TRIGGER_BIT , RTD_GEN5_CONFIG_CMD_COUNT
}
 

Functions

static bool_t Run_RTD_BasicOps (int32_t cardIndex, int32_t module, uint32_t modid)
 This function asks for the channel number, checks if it is valid, and if it is, calls Configuration() or BasicOperation(), depending on what the user specifies.
 
static nai_status_t Handle_RTD_Configuration (int32_t paramCount, int32_t *p_params)
 This function is called if the user chooses to configure the RTD module or to read the configuration data. There are options to read configuration data, set zero temperature resistance (Gen5) or range (Gen3), set wire mode, set compensation resistance, clear statuses, set thresholds, set offset temperature, suspend background operations, and trigger background operations (BIT and Open-Line tests).
 
static nai_status_t Handle_RTD_BasicOperation (int32_t paramCount, int32_t *p_params)
 This function is called if the user chooses to perform RTD basic operations checks to retrieve the resistance, BIT status, and Open status.
 
static nai_status_t Handle_RTD_ChanStatusEnable (int32_t paramCount, int32_t *p_params)
 This function sets the channel status enabled/disabled state to the value specified by the user and then displays all of the configuration data.
 
static nai_status_t Handle_RTD_ConfigMode (int32_t paramCount, int32_t *p_params)
 This function handles the user request to configure the given channel to RTD or TC mode and calls the relevant setter method in the naibrd library.
 
static nai_status_t Handle_RTD_WireMode (int32_t paramCount, int32_t *p_params)
 This function sets the wire mode to the value specified by the user and then displays all of the configuration data.
 
static nai_status_t Handle_RTD_CompRes (int32_t paramCount, int32_t *p_params)
 This function sets the compensation resistance to the value specified by the user and then displays all of the configuration data.
 
static nai_status_t Handle_RTD_ZeroTempResistance (int32_t paramCount, int32_t *p_params)
 This function sets the compensation resistance to the value specified by the user and then displays all of the configuration data.
 
static nai_status_t Handle_RTD_ClearStatus (int32_t paramCount, int32_t *p_params)
 This function clears the RTD statuses specified by the user of the channel specified by the user.
 
static nai_status_t Handle_RTD_ClearStatusAllChannels (int32_t paramCount, int32_t *p_params)
 This function clears the RTD statuses specified by the user of all of the channels on the RTD module.
 
static nai_status_t Handle_RTD_CheckPowerOnBIT (int32_t paramCount, int32_t *p_params)
 This function checks the RTD power-on BIT completed state and then, if the power-on BIT has completed, checks the Latched BIT Status of each RTD channel.
 
static nai_status_t Handle_RTD_Thresholds (int32_t paramCount, int32_t *p_params)
 This function sets the RTD alert/alarm lo/hi threshold(s) specified by the user of the channel specified by the user to the value specified by the user.
 
static nai_status_t Handle_RTD_Thresholds_All_Channels (int32_t paramCount, int32_t *p_params)
 This function sets the RTD alert/alarm lo/hi threshold(s) specified by the user of all of the channels on the RTD module to the value specified by the user.
 
static nai_status_t Handle_RTD_OffsetTemp (int32_t paramCount, int32_t *p_params)
 This function sets the offset temperature to the value specified by the user and then displays all of the configuration data.
 
static nai_status_t Handle_RTD_BackgroundOpSuspension (int32_t paramCount, int32_t *p_params)
 This function sets the BIT/Open-Line test suspended/enabled state to the value specified by the user and then displays all of the configuration data.
 
static nai_status_t Handle_RTD_TriggerOpenCheck (int32_t paramCount, int32_t *p_params)
 This function triggers an Open-Line check and then displays all of the configuration data.
 
static nai_status_t Handle_RTD_TriggerBIT (int32_t paramCount, int32_t *p_params)
 This function triggers the BIT and then displays all of the configuration data.
 
void RTD_DisplayCfg (int32_t cardIndex, int32_t module, int32_t maxchan)
 This function displays the RTD Configuration settings.
 
void RTD_DisplayOpData (int32_t cardIndex, int32_t module, int32_t maxchan)
 This function displays the RTD Basic Operations data.
 
int32_t RTD_BasicOps (void)
 The purpose of the RTD_BasicOps is to illustrate the methods to call in the naibrd library to perform basic operations with the RTD modules for configuration setup, controlling the drive outputs, and reading the channels.
 

Variables

static const int8_t * CONFIG_FILE = (const int8_t *)"default_RTD_BasicOps.txt"
 
static const int32_t DEF_RTD_CHANNEL = 1
 
static int32_t g_MaxRTDChannels = 0
 
static uint32_t g_RTDModId
 
static char zeroTempOhms [][5] = { "100", "500", "1000" }
 
naiapp_cmdtbl_params_t RTD_BasicOpMenuCmds []
 
naiapp_cmdtbl_params_t RTD_Gen5_ConfigMenuCmds []
 

Enumeration Type Documentation

◆ rtd_basicops_commands

Enumerator
RTD_BASICOP_CMD_CONFIG 
RTD_BASICOP_CMD_BASICOPS 
RTD_BASICOP_CMD_COUNT 

◆ rtd_gen5_config_commands

Enumerator
RTD_GEN5_CONFIG_CMD_CHAN_STATUS_ENABLE 
RTD_GEN5_CONFIG_CMD_RTD_TC_CONFIG 
RTD_GEN5_CONFIG_CMD_ZERO_TEMP_RESISTANCE 
RTD_GEN5_CONFIG_CMD_COMPRES 
RTD_GEN5_CONFIG_CMD_WIRE 
RTD_GEN5_CONFIG_CMD_CLEAR_STATUS 
RTD_GEN5_CONFIG_CMD_CLEAR_STATUS_ALL_CHANS 
RTD_GEN5_CONFIG_CMD_CHECK_POWER_ON_BIT 
RTD_GEN5_CONFIG_CMD_SET_THRESH 
RTD_GEN5_CONFIG_CMD_SET_THRESH_ALL_CHANS 
RTD_GEN5_CONFIG_CMD_SET_OFFSET_TEMP 
RTD_GEN5_CONFIG_CMD_SET_BACKGROUND_OP_SUSPEND 
RTD_GEN5_CONFIG_CMD_TRIGGER_OPEN_CHECK 
RTD_GEN5_CONFIG_CMD_TRIGGER_BIT 
RTD_GEN5_CONFIG_CMD_COUNT 

Function Documentation

◆ Handle_RTD_BackgroundOpSuspension()

static nai_status_t Handle_RTD_BackgroundOpSuspension ( int32_t paramCount,
int32_t * p_params )
static

This function sets the BIT/Open-Line test suspended/enabled state to the value specified by the user and then displays all of the configuration data.

◆ Handle_RTD_BasicOperation()

static nai_status_t Handle_RTD_BasicOperation ( int32_t paramCount,
int32_t * p_params )
static

This function is called if the user chooses to perform RTD basic operations checks to retrieve the resistance, BIT status, and Open status.

◆ Handle_RTD_ChanStatusEnable()

static nai_status_t Handle_RTD_ChanStatusEnable ( int32_t paramCount,
int32_t * p_params )
static

This function sets the channel status enabled/disabled state to the value specified by the user and then displays all of the configuration data.

◆ Handle_RTD_CheckPowerOnBIT()

static nai_status_t Handle_RTD_CheckPowerOnBIT ( int32_t paramCount,
int32_t * p_params )
static

This function checks the RTD power-on BIT completed state and then, if the power-on BIT has completed, checks the Latched BIT Status of each RTD channel.

◆ Handle_RTD_ClearStatus()

static nai_status_t Handle_RTD_ClearStatus ( int32_t paramCount,
int32_t * p_params )
static

This function clears the RTD statuses specified by the user of the channel specified by the user.

◆ Handle_RTD_ClearStatusAllChannels()

static nai_status_t Handle_RTD_ClearStatusAllChannels ( int32_t paramCount,
int32_t * p_params )
static

This function clears the RTD statuses specified by the user of all of the channels on the RTD module.

◆ Handle_RTD_CompRes()

static nai_status_t Handle_RTD_CompRes ( int32_t paramCount,
int32_t * p_params )
static

This function sets the compensation resistance to the value specified by the user and then displays all of the configuration data.

◆ Handle_RTD_ConfigMode()

static nai_status_t Handle_RTD_ConfigMode ( int32_t paramCount,
int32_t * p_params )
static

This function handles the user request to configure the given channel to RTD or TC mode and calls the relevant setter method in the naibrd library.

◆ Handle_RTD_Configuration()

static nai_status_t Handle_RTD_Configuration ( int32_t paramCount,
int32_t * p_params )
static

This function is called if the user chooses to configure the RTD module or to read the configuration data. There are options to read configuration data, set zero temperature resistance (Gen5) or range (Gen3), set wire mode, set compensation resistance, clear statuses, set thresholds, set offset temperature, suspend background operations, and trigger background operations (BIT and Open-Line tests).

◆ Handle_RTD_OffsetTemp()

static nai_status_t Handle_RTD_OffsetTemp ( int32_t paramCount,
int32_t * p_params )
static

This function sets the offset temperature to the value specified by the user and then displays all of the configuration data.

◆ Handle_RTD_Thresholds()

static nai_status_t Handle_RTD_Thresholds ( int32_t paramCount,
int32_t * p_params )
static

This function sets the RTD alert/alarm lo/hi threshold(s) specified by the user of the channel specified by the user to the value specified by the user.

◆ Handle_RTD_Thresholds_All_Channels()

static nai_status_t Handle_RTD_Thresholds_All_Channels ( int32_t paramCount,
int32_t * p_params )
static

This function sets the RTD alert/alarm lo/hi threshold(s) specified by the user of all of the channels on the RTD module to the value specified by the user.

◆ Handle_RTD_TriggerBIT()

static nai_status_t Handle_RTD_TriggerBIT ( int32_t paramCount,
int32_t * p_params )
static

This function triggers the BIT and then displays all of the configuration data.

◆ Handle_RTD_TriggerOpenCheck()

static nai_status_t Handle_RTD_TriggerOpenCheck ( int32_t paramCount,
int32_t * p_params )
static

This function triggers an Open-Line check and then displays all of the configuration data.

◆ Handle_RTD_WireMode()

static nai_status_t Handle_RTD_WireMode ( int32_t paramCount,
int32_t * p_params )
static

This function sets the wire mode to the value specified by the user and then displays all of the configuration data.

◆ Handle_RTD_ZeroTempResistance()

static nai_status_t Handle_RTD_ZeroTempResistance ( int32_t paramCount,
int32_t * p_params )
static

This function sets the compensation resistance to the value specified by the user and then displays all of the configuration data.

◆ RTD_BasicOps()

int32_t RTD_BasicOps ( void )

The purpose of the RTD_BasicOps is to illustrate the methods to call in the naibrd library to perform basic operations with the RTD modules for configuration setup, controlling the drive outputs, and reading the channels.

The following system configuration routines from the nai_sys_cfg.c file are called to assist with the configuration setup for this program prior to calling the naibrd RTD routines.

  • ConfigDevice
  • DisplayDeviceCfg
  • GetBoardSNModCfg
  • CheckModule

◆ RTD_DisplayCfg()

void RTD_DisplayCfg ( int32_t cardIndex,
int32_t module,
int32_t maxchan )

This function displays the RTD Configuration settings.

◆ RTD_DisplayOpData()

void RTD_DisplayOpData ( int32_t cardIndex,
int32_t module,
int32_t maxchan )

This function displays the RTD Basic Operations data.

◆ Run_RTD_BasicOps()

static bool_t Run_RTD_BasicOps ( int32_t cardIndex,
int32_t module,
uint32_t modid )
static

This function asks for the channel number, checks if it is valid, and if it is, calls Configuration() or BasicOperation(), depending on what the user specifies.

Variable Documentation

◆ CONFIG_FILE

const int8_t* CONFIG_FILE = (const int8_t *)"default_RTD_BasicOps.txt"
static

◆ DEF_RTD_CHANNEL

const int32_t DEF_RTD_CHANNEL = 1
static

◆ g_MaxRTDChannels

int32_t g_MaxRTDChannels = 0
static

◆ g_RTDModId

uint32_t g_RTDModId
static

◆ RTD_BasicOpMenuCmds

naiapp_cmdtbl_params_t RTD_BasicOpMenuCmds[]
Initial value:
=
{
{"CFG", "RTD Configuration Functions", RTD_BASICOP_CMD_CONFIG, Handle_RTD_Configuration},
{"OPS", "RTD Basic Operations", RTD_BASICOP_CMD_BASICOPS, Handle_RTD_BasicOperation},
}
static nai_status_t Handle_RTD_Configuration(int32_t paramCount, int32_t *p_params)
This function is called if the user chooses to configure the RTD module or to read the configuration ...
Definition rtd_basic_ops.c:254
@ RTD_BASICOP_CMD_CONFIG
Definition rtd_basic_ops.c:57
@ RTD_BASICOP_CMD_BASICOPS
Definition rtd_basic_ops.c:58
static nai_status_t Handle_RTD_BasicOperation(int32_t paramCount, int32_t *p_params)
This function is called if the user chooses to perform RTD basic operations checks to retrieve the re...
Definition rtd_basic_ops.c:329

◆ RTD_Gen5_ConfigMenuCmds

naiapp_cmdtbl_params_t RTD_Gen5_ConfigMenuCmds[]
Initial value:
=
{
{"ENABLE", "Enable/Disable Channel Status Reporting", RTD_GEN5_CONFIG_CMD_CHAN_STATUS_ENABLE, Handle_RTD_ChanStatusEnable},
{"MODE", "Set RTD/TC Configuration Mode", RTD_GEN5_CONFIG_CMD_RTD_TC_CONFIG, Handle_RTD_ConfigMode},
{"ZEROTEMP", "Set Transducer's 0 degree Celsius Resistance", RTD_GEN5_CONFIG_CMD_ZERO_TEMP_RESISTANCE, Handle_RTD_ZeroTempResistance},
{"RES", "Set Compensation Resistance", RTD_GEN5_CONFIG_CMD_COMPRES, Handle_RTD_CompRes},
{"WIRE", "Set Wire Mode", RTD_GEN5_CONFIG_CMD_WIRE, Handle_RTD_WireMode},
{"STAT", "Clear RTD Statuses", RTD_GEN5_CONFIG_CMD_CLEAR_STATUS, Handle_RTD_ClearStatus},
{"ALL CLEAR", "Clear RTD Statuses All Channels", RTD_GEN5_CONFIG_CMD_CLEAR_STATUS_ALL_CHANS, Handle_RTD_ClearStatusAllChannels},
{"POWER ON BIT", "Check Power-On BIT", RTD_GEN5_CONFIG_CMD_CHECK_POWER_ON_BIT, Handle_RTD_CheckPowerOnBIT},
{"CHAN THRESH", "Set RTD Alert/Alarm Lo/Hi Thresholds", RTD_GEN5_CONFIG_CMD_SET_THRESH, Handle_RTD_Thresholds},
{"THRESH", "Set RTD Alert/Alarm Lo/Hi Thresholds All Channels", RTD_GEN5_CONFIG_CMD_SET_THRESH_ALL_CHANS, Handle_RTD_Thresholds_All_Channels},
{"OFFSET", "Set Offset Temperature", RTD_GEN5_CONFIG_CMD_SET_OFFSET_TEMP, Handle_RTD_OffsetTemp},
{"LINE OPEN", "Trigger Open-Line Check", RTD_GEN5_CONFIG_CMD_TRIGGER_OPEN_CHECK, Handle_RTD_TriggerOpenCheck},
}
static nai_status_t Handle_RTD_WireMode(int32_t paramCount, int32_t *p_params)
This function sets the wire mode to the value specified by the user and then displays all of the conf...
Definition rtd_basic_ops.c:465
@ RTD_GEN5_CONFIG_CMD_SET_OFFSET_TEMP
Definition rtd_basic_ops.c:74
@ RTD_GEN5_CONFIG_CMD_TRIGGER_OPEN_CHECK
Definition rtd_basic_ops.c:76
@ RTD_GEN5_CONFIG_CMD_SET_THRESH
Definition rtd_basic_ops.c:72
@ RTD_GEN5_CONFIG_CMD_SET_BACKGROUND_OP_SUSPEND
Definition rtd_basic_ops.c:75
@ RTD_GEN5_CONFIG_CMD_RTD_TC_CONFIG
Definition rtd_basic_ops.c:65
@ RTD_GEN5_CONFIG_CMD_CHECK_POWER_ON_BIT
Definition rtd_basic_ops.c:71
@ RTD_GEN5_CONFIG_CMD_CHAN_STATUS_ENABLE
Definition rtd_basic_ops.c:64
@ RTD_GEN5_CONFIG_CMD_WIRE
Definition rtd_basic_ops.c:68
@ RTD_GEN5_CONFIG_CMD_CLEAR_STATUS_ALL_CHANS
Definition rtd_basic_ops.c:70
@ RTD_GEN5_CONFIG_CMD_SET_THRESH_ALL_CHANS
Definition rtd_basic_ops.c:73
@ RTD_GEN5_CONFIG_CMD_TRIGGER_BIT
Definition rtd_basic_ops.c:77
@ RTD_GEN5_CONFIG_CMD_ZERO_TEMP_RESISTANCE
Definition rtd_basic_ops.c:66
@ RTD_GEN5_CONFIG_CMD_CLEAR_STATUS
Definition rtd_basic_ops.c:69
@ RTD_GEN5_CONFIG_CMD_COMPRES
Definition rtd_basic_ops.c:67
static nai_status_t Handle_RTD_CompRes(int32_t paramCount, int32_t *p_params)
This function sets the compensation resistance to the value specified by the user and then displays a...
Definition rtd_basic_ops.c:504
static nai_status_t Handle_RTD_TriggerOpenCheck(int32_t paramCount, int32_t *p_params)
This function triggers an Open-Line check and then displays all of the configuration data.
Definition rtd_basic_ops.c:1118
static nai_status_t Handle_RTD_Thresholds(int32_t paramCount, int32_t *p_params)
This function sets the RTD alert/alarm lo/hi threshold(s) specified by the user of the channel specif...
Definition rtd_basic_ops.c:834
static nai_status_t Handle_RTD_OffsetTemp(int32_t paramCount, int32_t *p_params)
This function sets the offset temperature to the value specified by the user and then displays all of...
Definition rtd_basic_ops.c:1014
static nai_status_t Handle_RTD_BackgroundOpSuspension(int32_t paramCount, int32_t *p_params)
This function sets the BIT/Open-Line test suspended/enabled state to the value specified by the user ...
Definition rtd_basic_ops.c:1058
static nai_status_t Handle_RTD_ConfigMode(int32_t paramCount, int32_t *p_params)
This function handles the user request to configure the given channel to RTD or TC mode and calls the...
Definition rtd_basic_ops.c:397
static nai_status_t Handle_RTD_ZeroTempResistance(int32_t paramCount, int32_t *p_params)
This function sets the compensation resistance to the value specified by the user and then displays a...
Definition rtd_basic_ops.c:543
static nai_status_t Handle_RTD_ChanStatusEnable(int32_t paramCount, int32_t *p_params)
This function sets the channel status enabled/disabled state to the value specified by the user and t...
Definition rtd_basic_ops.c:351
static nai_status_t Handle_RTD_TriggerBIT(int32_t paramCount, int32_t *p_params)
This function triggers the BIT and then displays all of the configuration data.
Definition rtd_basic_ops.c:1170
static nai_status_t Handle_RTD_Thresholds_All_Channels(int32_t paramCount, int32_t *p_params)
This function sets the RTD alert/alarm lo/hi threshold(s) specified by the user of all of the channel...
Definition rtd_basic_ops.c:925
static nai_status_t Handle_RTD_ClearStatusAllChannels(int32_t paramCount, int32_t *p_params)
This function clears the RTD statuses specified by the user of all of the channels on the RTD module.
Definition rtd_basic_ops.c:680
static nai_status_t Handle_RTD_ClearStatus(int32_t paramCount, int32_t *p_params)
This function clears the RTD statuses specified by the user of the channel specified by the user.
Definition rtd_basic_ops.c:593
static nai_status_t Handle_RTD_CheckPowerOnBIT(int32_t paramCount, int32_t *p_params)
This function checks the RTD power-on BIT completed state and then, if the power-on BIT has completed...
Definition rtd_basic_ops.c:766

◆ zeroTempOhms

char zeroTempOhms[][5] = { "100", "500", "1000" }
static