Software Library API naibrd 1.62
See all documentation at naii.docs.com
Standard Operation Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_SetRelayState (int32_t cardIndex, int32_t module, int32_t channel, nai_rly_state_t setstate)
 Sets the relay control state for the specified RLY channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetRelayState (int32_t cardIndex, int32_t module, int32_t channel, nai_rly_state_t *outstate)
 Retrieves the control setting state for the specified RLY channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetRelayPosition (int32_t cardIndex, int32_t module, int32_t channel, nai_rly_state_t *outstate)
 Retrieves the physical relay position for the specified RLY channel, via reading of secondary pole contacts.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_rly_status_type_t type, nai_status_bit_t *outstatusBit)
 Retrieves the status for the specified status type and RLY channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_ClearStatus (int32_t cardIndex, int32_t module, int32_t channel, nai_rly_status_type_t type)
 Clears the latched status for the specified RLY channel and status type. (Applicable for latched status types only)
 

Detailed Description


Function Documentation

◆ naibrd_RLY_ClearStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_ClearStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_rly_status_type_t type )

Clears the latched status for the specified RLY channel and status type. (Applicable for latched status types only)

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
type: (Input) Status Type: refer to nai_rly_status_type_t definition.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_INVALID_VALUE when invalid status type parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_RLY_GetRelayPosition()

NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetRelayPosition ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_rly_state_t * outstate )

Retrieves the physical relay position for the specified RLY channel, via reading of secondary pole contacts.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
outstate: (Output) Refer to nai_rly_state_t definitions.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_RLY_GetRelayState()

NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetRelayState ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_rly_state_t * outstate )

Retrieves the control setting state for the specified RLY channel.

NAI_RLY_STATE_OPEN:  Normally Open (N.O.) relay contact open, Normally Closed (N.C) contact connected to COM
NAI_RLY_STATE_CLOSE: N.O. relay contact connected to COM. N.C contact open.
Power on default state for non-latching relay modules KN and RY1 is N.C.
Latching relay modules KL and RY2 will remain in the last prior state from power down.
Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
outstate: (Output) Refer to nai_rly_state_t definitions.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_RLY_GetStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_GetStatus ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_rly_status_type_t type,
nai_status_bit_t * outstatusBit )

Retrieves the status for the specified status type and RLY channel.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
type: (Input) Status Type: refer to nai_rly_status_type_t definition.
outstatusBit: Refer to nai_status_bit_t definition.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_RLY_SetRelayState()

NAIBRDFUNC nai_status_t NAIAPI naibrd_RLY_SetRelayState ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_rly_state_t setstate )

Sets the relay control state for the specified RLY channel.

NAI_RLY_STATE_CLOSE: Normally Open (N.O.) relay contact connected to Common (COM). 
NAI_RLY_STATE_OPEN:  Normally Closed (N.C)
Power on default state for non-latching relay modules KN and RY1 is N.C.
Latching relay modules KL and RY2 will remain in the last prior state from power down.
Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
module: (Input) Module Number of the module to access (1 - [max modules for board]).
channel: (Input) Channel Number of the channel to access (1 - [max channels for module]).
setstate: (Input) Refer to nai_rly_state_t definitions.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_INVALID_CHANNEL when invalid channel parameter is specified.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.