neMESYS SDK  20150729
Digital/Analog IO

Functions for control of digital and analog input and output. More...

Typedefs

typedef enum eDigInChannelId TDigInChannelId
 Digital input channel identifier for function NCS_ReadDigInput(). More...
 
typedef enum eDigOutChannelId TDigOutChannelId
 Digital ourput channel identifier for function NCS_WriteDigOutput() You can use these identifiers to select a certain digital output channel according to the purpose of this channel configured in the pump drive.
 

Enumerations

enum  eDigInChannelId {
  NCS_DIG_IN_NEGATIVE_LIMIT = 0, NCS_DIG_IN_POSITIVE_LIMIT, NCS_DIG_IN_HOME_SWITCH, NCS_DIG_IN_POSITION_MARKER,
  NCS_DIG_IN_DRIVE_ENABLE, NCS_DIG_IN_GENERAL_PURPOSE_H = 8, NCS_DIG_IN_GENERAL_PURPOSE_G, NCS_DIG_IN_GENERAL_PURPOSE_F,
  NCS_DIG_IN_GENERAL_PURPOSE_E, NCS_DIG_IN_GENERAL_PURPOSE_D, NCS_DIG_IN_GENERAL_PURPOSE_C, NCS_DIG_IN_GENERAL_PURPOSE_B,
  NCS_DIG_IN_GENERAL_PURPOSE_A
}
 Digital input channel identifier for function NCS_ReadDigInput(). More...
 
enum  eDigOutChannelId {
  NCS_DIG_OUT_READY = 0, NCS_DIG_OUT_GENERAL_PURPOSE_E = 11, NCS_DIG_OUT_GENERAL_PURPOSE_D, NCS_DIG_OUT_GENERAL_PURPOSE_C,
  NCS_DIG_OUT_GENERAL_PURPOSE_B, NCS_DIG_OUT_GENERAL_PURPOSE_A
}
 Digital ourput channel identifier for function NCS_WriteDigOutput() You can use these identifiers to select a certain digital output channel according to the purpose of this channel configured in the pump drive.
 

Functions

NCS_Func long __stdcall NCS_ReadAnalogInput (ncs_hdl hDevice, unsigned char DosingUnit, unsigned char Channel, short *pVoltageAnalogIn)
 Read analog input state of one channel of a single dosing unit. More...
 
NCS_Func long __stdcall NCS_ReadDigInput (ncs_hdl hDevice, unsigned char DosingUnit, unsigned char Channel, unsigned char *pDigInState)
 Read digital input state of one channel of a single dosing unit. More...
 
NCS_Func long __stdcall NCS_ReadDigInputs (ncs_hdl hDevice, unsigned char DosingUnit, unsigned short *pDigInStates)
 Read all digital input states of a single dosing unit. More...
 
NCS_Func long __stdcall NCS_WriteDigOutput (ncs_hdl hDevice, unsigned char DosingUnit, unsigned char Channel, unsigned char DigOutState)
 Write digital output state of one channel of a single dosing unit. More...
 
NCS_Func long __stdcall NCS_WriteDigOutputs (ncs_hdl hDevice, unsigned char DosingUnit, unsigned short DigOutStates)
 Write all digital output states of a single dosing unit. More...
 

Detailed Description

Functions for control of digital and analog input and output.

This group defines all required functions for reading digital and analog inputs anf for writing digital outputs.

Typedef Documentation

Digital input channel identifier for function NCS_ReadDigInput().

You can use these identifiers to select a certain digital input channel according to the purpose of this channel configured in the pump drive.

Enumeration Type Documentation

Digital input channel identifier for function NCS_ReadDigInput().

You can use these identifiers to select a certain digital input channel according to the purpose of this channel configured in the pump drive.

Function Documentation

NCS_Func long __stdcall NCS_ReadAnalogInput ( ncs_hdl  hDevice,
unsigned char  DosingUnit,
unsigned char  Channel,
short *  pVoltageAnalogIn 
)

Read analog input state of one channel of a single dosing unit.

Parameters
[in]hDeviceValid device handle
[in]DosingUnitIndex of neMESYS pump from 0 to number of pumps - 1
[in]ChannelAnalog input channel (0 or 1)
[out]pVoltageAnalogInReturns the current analog input state in the range of 0 - 5000 mV.
Returns
Error code - ERR_NOERR indicates success
NCS_Func long __stdcall NCS_ReadDigInput ( ncs_hdl  hDevice,
unsigned char  DosingUnit,
unsigned char  Channel,
unsigned char *  pDigInState 
)

Read digital input state of one channel of a single dosing unit.

Parameters
[in]hDeviceValid device handle
[in]DosingUnitIndex of neMESYS pump from 0 to number of pumps - 1
[in]DigInPurposePurpose of the digital input
[out]pDigInStateReturns the current digital input state (0 or 1)
Returns
Error code - ERR_NOERR indicates success
See also
TDigInChannelId enumeration for a list of symbolic digital input channel identifiers.
NCS_Func long __stdcall NCS_ReadDigInputs ( ncs_hdl  hDevice,
unsigned char  DosingUnit,
unsigned short *  pDigInStates 
)

Read all digital input states of a single dosing unit.

Parameters
[in]hDeviceValid device handle
[in]DosingUnitIndex of neMESYS pump from 0 to number of pumps - 1
[out]pDigInStatesReturns the current state of all digital input channels. Each bit represents one channel (bit0 = channel 0, bit1 = channel 1...)
Returns
Error code - ERR_NOERR indicates success
NCS_Func long __stdcall NCS_WriteDigOutput ( ncs_hdl  hDevice,
unsigned char  DosingUnit,
unsigned char  Channel,
unsigned char  DigOutState 
)

Write digital output state of one channel of a single dosing unit.

Parameters
[in]hDeviceValid device handle
[in]DosingUnitIndex of neMESYS pump from 0 to number of pumps - 1
[in]DigOutPurposeChannel of the digital output
[in]DigOutStateDigital output state to set (0 or 1)
Returns
Error code - ERR_NOERR indicates success
See also
TDigOutChannelId enumeration for a list of symbolic digital output channel identifiers.
NCS_Func long __stdcall NCS_WriteDigOutputs ( ncs_hdl  hDevice,
unsigned char  DosingUnit,
unsigned short  DigOutStates 
)

Write all digital output states of a single dosing unit.

Parameters
[in]hDeviceValid device handle
[in]DosingUnitIndex of neMESYS pump from 0 to number of pumps - 1
[in]DigOutStatesWrite state of all digital output channels as bitmask. Each bit represents one channl.
Returns
Error code - ERR_NOERR indicates success