ApossC SDK  V01.15
SetupIncEncoder.mc
#include <SysDef.mh>
#include "..\..\SDK\SDK_ApossC.mc"
#define AXIS 0 // Axis module number
#define AXIS_ENCPORT 0 // Encoder port number. Usually, module instance 0 is connected to X1 and so on. Please refer to product manual
#define AXIS_ENCRES 1024 // Resolution of the encoder for position feed back in increments (quadcounts)
#define AXIS_ENC_LATCHTYPE 1 // Defines the latch type: Digital input
#define AXIS_ENC_LATCHPARAM 1 // Latch on digital input 1
#define AXIS_ENC_LATCHSLOPE HWLATCH_SLOPE_RISING // Defines the slope of the trigger signal (Default 1)
long main(void)
{
AXIS_ENCPORT,
AXIS_ENCRES,
AXIS_ENC_LATCHTYPE,
AXIS_ENC_LATCHPARAM,
AXIS_ENC_LATCHSLOPE
);
while(1)
{
Delay(2000);
}
return(0);
}
sdkSetupIncEncoder
long sdkSetupIncEncoder(long axis, long encPort, long encRes, long latchType, long latchParam, long latchSlope)
Settings for an incremental encoder.
Definition: SDK_Encoder_Setup.mc:43
sdkInfoPrintAxesPos
long sdkInfoPrintAxesPos()
Prints the position information of all axes.
Definition: SDK_Information_General.mc:78

Data Sheets | Released Software | Software Manuals | Hardware Manuals | Maxon Shop

Maxon Support Center