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

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_SetControlMode (int32_t cardIndex, int32_t module, int32_t channel, nai_enc_mode_t mode)
 Sets the Mode configuration for the specified Encoder channel. Channel can be configured as SSI mode, COUNTER mode or disabled. To specify SSI controller or listener mode, refer to nai_ENC_SetSSI_Mode function.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetControlMode (int32_t cardIndex, int32_t module, int32_t channel, nai_enc_mode_t *outMode)
 Retrieves the Mode configuration for the specified Encoder channel. Channel can be configured as SSI mode, COUNTER mode or disabled. To retrieve SSI controller or listener mode, refer to nai_ENC_GetSSI_Mode function.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_SetIOFormat (int32_t cardIndex, int32_t module, int32_t channel, nai_enc_port_t port, nai_enc_ioformat_t format)
 Sets the IOFormat configuration for the specified Encoder channel and port. Port pins can be configured as input or output. Port pins only need to be configured as an output when in SSI controller mode and should be configured as input for all other configurations.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetIOFormat (int32_t cardIndex, int32_t module, int32_t channel, nai_enc_port_t port, nai_enc_ioformat_t *outFormat)
 Retrieves the IOFormat configuration for the specified Encoder channel and port. Port pins can be configured as input or output. Port pins only need to be configured as an output when in SSI controller mode and should be configured as input for all other configurations.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_SetInputMode (int32_t cardIndex, int32_t module, int32_t channel, nai_enc_input_mode_t inputMode)
 Sets the Input mode configuration for the specified Encoder channel. Input mode can be configured as differential or singled ended.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetInputMode (int32_t cardIndex, int32_t module, int32_t channel, nai_enc_input_mode_t *outInputMode)
 Gets the Input mode configuration for the specified Encoder channel. Input mode can be configured as differential or singled ended.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_SetMultiChanRdEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t enable)
 Sets multi channel read to enabled or disabled for specified Encoder channel.

 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetMultiChanRdEnable (int32_t cardIndex, int32_t module, int32_t channel, bool_t *outEnable)
 Retrieves multi chan read enable for specified Encoder channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_TriggerMultiChanRd (int32_t cardIndex, int32_t module)
 Initiate multi channel read for the specified Encoder channel.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetMultiChanRdStatus (int32_t cardIndex, int32_t module, nai_status_bit_t *outstatusBit)
 Retrieves multi channel read status bit.
 

Detailed Description


Function Documentation

◆ naibrd_ENC_GetControlMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetControlMode ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_enc_mode_t * outMode )

Retrieves the Mode configuration for the specified Encoder channel. Channel can be configured as SSI mode, COUNTER mode or disabled. To retrieve SSI controller or listener mode, refer to nai_ENC_GetSSI_Mode function.

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]).
outMode: (Output) Mode Type: refer to nai_enc_mode_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_ENC_GetInputMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetInputMode ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_enc_input_mode_t * outInputMode )

Gets the Input mode configuration for the specified Encoder channel. Input mode can be configured as differential or singled ended.

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]).
outInputMode: (Output) Mode Type: refer to nai_enc_input_mode_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_ENC_GetIOFormat()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetIOFormat ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_enc_port_t port,
nai_enc_ioformat_t * outFormat )

Retrieves the IOFormat configuration for the specified Encoder channel and port. Port pins can be configured as input or output. Port pins only need to be configured as an output when in SSI controller mode and should be configured as input for all other configurations.

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]).
port: (Input) Port Type: refer to nai_enc_port_t definition.
outFormat: (Output) Mode Type: refer to nai_enc_ioformat_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_ENC_GetMultiChanRdEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetMultiChanRdEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t * outEnable )

Retrieves multi chan read enable for specified Encoder 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]).
outEnable: (Output) 0 = disable multi chan read, 1 = enable multi chan read.
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.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_ENC_GetMultiChanRdStatus()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_GetMultiChanRdStatus ( int32_t cardIndex,
int32_t module,
nai_status_bit_t * outstatusBit )

Retrieves multi channel read status bit.

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]).
outstatusBit: (Output) SSI status bit.
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_ENC_SetControlMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_SetControlMode ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_enc_mode_t mode )

Sets the Mode configuration for the specified Encoder channel. Channel can be configured as SSI mode, COUNTER mode or disabled. To specify SSI controller or listener mode, refer to nai_ENC_SetSSI_Mode function.

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]).
mode: (Input) Mode Type: refer to nai_enc_mode_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_ENC_SetInputMode()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_SetInputMode ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_enc_input_mode_t inputMode )

Sets the Input mode configuration for the specified Encoder channel. Input mode can be configured as differential or singled ended.

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]).
inputMode: (Input) Mode Type: refer to nai_enc_input_mode_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_ENC_SetIOFormat()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_SetIOFormat ( int32_t cardIndex,
int32_t module,
int32_t channel,
nai_enc_port_t port,
nai_enc_ioformat_t format )

Sets the IOFormat configuration for the specified Encoder channel and port. Port pins can be configured as input or output. Port pins only need to be configured as an output when in SSI controller mode and should be configured as input for all other configurations.

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]).
port: (Input) Port Type: refer to nai_enc_port_t definition.
format: (Input) Format Type: refer to nai_enc_ioformat_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_ENC_SetMultiChanRdEnable()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_SetMultiChanRdEnable ( int32_t cardIndex,
int32_t module,
int32_t channel,
bool_t enable )

Sets multi channel read to enabled or disabled for specified Encoder 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]).
enable: (Input) 0 = disable multi chan read, 1 = enable multi chan read.
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.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_ENC_TriggerMultiChanRd()

NAIBRDFUNC nai_status_t NAIAPI naibrd_ENC_TriggerMultiChanRd ( int32_t cardIndex,
int32_t module )

Initiate multi channel read for the specified Encoder 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]).
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.