ECMC: EtherCAT open source motion control.
Motion control based on the open source EtherCAT master (www.etherlab.org). The motion package is integerated into the ESS EPCIS environment (E3).
|
Motion commands. More...
Go to the source code of this file.
Macros | |
#define | CHECK_AXIS_RETURN_IF_ERROR(axisIndex) |
#define | CHECK_AXIS_RETURN_IF_ERROR_AND_BLOCK_COM(axisIndex) |
#define | CHECK_AXIS_ENCODER_RETURN_IF_ERROR(axisIndex) |
#define | CHECK_AXIS_ENCODER_CFG_RETURN_IF_ERROR(axisIndex) |
#define | CHECK_AXIS_CONTROLLER_RETURN_IF_ERROR(axisIndex) |
#define | CHECK_AXIS_DRIVE_RETURN_IF_ERROR(axisIndex) |
#define | CHECK_AXIS_TRAJ_RETURN_IF_ERROR(axisIndex) |
#define | CHECK_AXIS_SEQ_RETURN_IF_ERROR(axisIndex) |
#define | CHECK_AXIS_MON_RETURN_IF_ERROR(axisIndex) |
Functions | |
int | moveAbsolutePosition (int axisIndex, double positionSet, double velocitySet, double accelerationSet, double decelerationSet) |
Move axis to an absolute position. . | |
int | moveRelativePosition (int axisIndex, double positionSet, double velocitySet, double accelerationSet, double decelerationSet) |
Move axis to a relative position. . | |
int | moveVelocity (int axisIndex, double velocitySet, double accelerationSet, double decelerationSet) |
Move axis in a constant velocity. . | |
int | stopMotion (int axisIndex, int killAmplifier) |
Stop axis. . | |
int | moveHome (int axisIndex, int nCmdData, double homePositionSet, double velocityTowardsCamSet, double velocityOffCamSet, double accelerationSet, double decelerationSet) |
Execute homing sequence. . | |
int | setPosition (int axisIndex, double homePositionSet) |
set position. used by epics autosave to restore axis value after ioc reboot. | |
int | getAxisError (int axisIndex) |
Get axis error state. . | |
int | getAxisErrorID (int axisIndex) |
Get axis error code. . | |
int | getAxisCycleCounter (int axisIndex, int *counter) |
Get axis execution cycle counter. Can be used for checking that logic for an axis object is executing. . | |
int | getAxisDebugInfoData (int axisIndex, char *buffer, int bufferByteSize) |
Get axis debug information string. . | |
int | getAxisStatusStructV2 (int axisIndex, char *buffer, int bufferByteSize) |
Get axis status structure V2. . | |
int | getAxisExecute (int axisIndex, int *value) |
Get axis execute bit. . | |
int | getAxisCommand (int axisIndex, int *value) |
Get axis command word. . | |
int | getAxisCmdData (int axisIndex, int *value) |
Get axis command data word. . | |
int | getAxisReset (int axisIndex, int *value) |
Get axis reset bit. . | |
int | getAxisEnabled (int axisIndex, int *value) |
Get axis amplifier state bit. . | |
int | getAxisEnable (int axisIndex, int *value) |
Get axis amplifier command bit. . | |
int | getAxisBlockCom (int axisIndex, int *block) |
Get axis block external com. If true the axis will not take any active commands via cmd parser (statuses can still be read). . | |
int | getAxisBusy (int axisIndex, int *value) |
Get axis busy bit. . | |
int | getAxisEncVelo (int axisIndex, double *velo) |
Get axis act velo. . | |
int | getAxisTrajVelo (int axisIndex, double *velo) |
Get axis traj velo. . | |
int | getAxisID (int axisIndex, int *value) |
Get axis index. . | |
int | getAxisEnableAlarmAtHardLimits (int axisIndex, int *value) |
Get enable alarms at limits bit. . | |
int | getAxisSoftLimitPosBwd (int axisIndex, double *value) |
Get backward soft-limit position. . | |
int | getAxisSoftLimitPosFwd (int axisIndex, double *value) |
Get forward soft-limit position. . | |
int | getAxisEnableSoftLimitBwd (int axisIndex, int *value) |
Get backward soft-limit enabled state of an axis. . | |
int | getAxisEnableSoftLimitFwd (int axisIndex, int *value) |
Get forward soft-limit enabled state of an axis. . | |
int | getAxisAcceleration (int axisIndex, double *value) |
Get axis acceleration setpoint. . | |
int | getAxisDeceleration (int axisIndex, double *value) |
Get axis deceleration setpoint. . | |
int | getAxisTargetPos (int axisIndex, double *value) |
Get axis target position setpoint. . | |
int | getAxisTargetVel (int axisIndex, double *value) |
Get axis target velocity setpoint. . | |
int | getAxisDone (int axisIndex, int *value) |
Get axis done bit. . | |
int | getAxisAtHardFwd (int axisIndex, int *value) |
Get state of forward hard limit. . | |
int | getAxisLimitSwitchFwd (int axisIndex, int *value) |
Same as getAxisAtHardFwd() but better name. . | |
int | getAxisAtHardBwd (int axisIndex, int *value) |
Get state of backward hard limit. . | |
int | getAxisLimitSwitchBwd (int axisIndex, int *value) |
Same as getAxisAtHardBwd() but better name. . | |
int | getAxisEncHomed (int axisIndex, int *value) |
Get encoder homed bit. . | |
int | getAxisEncPosAct (int axisIndex, double *value) |
Get actual encoder position. . | |
int | getAxisEncVelAct (int axisIndex, double *value) |
Get actual encoder velocity. . | |
int | getAxisAtHome (int axisIndex, int *value) |
Get state of reference/home switch. . | |
int | getAxisCntrlError (int axisIndex, double *value) |
Get actual pid controller error. . | |
int | getAxisHomeVelOffCam (int axisIndex, double *value) |
Get off cam referencing/homing velocity setpoint. . | |
int | getAxisHomeVelTowardsCam (int axisIndex, double *value) |
Get Towards cam referencing/homing velocity setpoint. . | |
int | getAxisEncScaleNum (int axisIndex, double *value) |
Get the numerator part of the encoder scale. . | |
int | getAxisEncScaleDenom (int axisIndex, double *value) |
Get the denominator part of the encoder scale. . | |
int | getAxisEncPosRaw (int axisIndex, int64_t *value) |
Get raw unscaled encoder value. . | |
int | getAxisCntrlOutPpart (int axisIndex, double *value) |
Get PID-controller proportional output part. . | |
int | getAxisCntrlOutIpart (int axisIndex, double *value) |
Get PID-controller integral output part. . | |
int | getAxisCntrlOutDpart (int axisIndex, double *value) |
Get PID-controller differential output part. . | |
int | getAxisCntrlOutFFpart (int axisIndex, double *value) |
Get PID-controller feed forward output part. . | |
int | getAxisCntrlOutput (int axisIndex, double *value) |
Get PID-controllegetAxisAtHomer total output part. . | |
int | getAxisDrvScale (int axisIndex, double *value) |
Get the drive output scale factor. . | |
int | getAxisDrvEnable (int axisIndex, int *value) |
Get enable state of drive. . | |
int | getAxisMonAtTarget (int axisIndex, int *value) |
Get at target. . | |
int | getAxisType (int axisIndex, int *value) |
Get axis type. . | |
const char * | getAxisTrajTransExpr (int axisIndex, int *error) |
Get axis trajectory transformation expression. . | |
const char * | getAxisEncTransExpr (int axisIndex, int *error) |
Get axis encoder transformation expression. . | |
const char * | getAxisPLCExpr (int axisIndex, int *error) |
Get axis sync. PLC expression. . | |
int | getAxisTrajSource (int axisIndex, int *value) |
Get axis trajectory data source. . | |
int | getAxisEncSource (int axisIndex, int *value) |
Get axis encoder data source. . | |
int | getAxisAllowCommandsFromPLC (int axisIndex, int *value) |
Get axis allow command from PLC. . | |
int | getAxisPLCEnable (int axisIndex, int *value) |
Get axis enable for axis sync. PLC. . | |
int | setAxisExecute (int axisIndex, int value) |
Set axis execute bit. . | |
int | setAxisCommand (int axisIndex, int value) |
Set axis command word. . | |
int | setAxisCmdData (int axisIndex, int value) |
Set axis command data word. . | |
int | setAxisEnable (int axisIndex, int value) |
Set axis amplifier enable command bit. . | |
int | setAxisEnableMotionFunctions (int axisIndex, int enablePos, int enableConstVel, int enableHome) |
Set enable of motion functions. . | |
int | setAxisEnableAlarmAtHardLimits (int axisIndex, int value) |
Set enable alarms at limits bit. . | |
int | setAxisBlockCom (int axisIndex, int block) |
Block/unblock communicatiom from via cmd parser. . | |
int | setAxisEnableSoftLimitBwd (int axisIndex, int value) |
Set enable backward soft-limit of an axis. . | |
int | setAxisEnableSoftLimitFwd (int axisIndex, int value) |
Set enable forward soft-limit of an axis. . | |
int | setAxisSoftLimitPosBwd (int axisIndex, double value) |
Set backward soft-limit position. . | |
int | setAxisSoftLimitPosFwd (int axisIndex, double value) |
Set forward soft-limit position. . | |
int | setAxisEnableAlarmAtSoftLimit (int axisIndex, int value) |
Enable alarm when at softlimit. | |
int | setAxisAcceleration (int axisIndex, double value) |
Set axis acceleration setpoint. . | |
int | setAxisDeceleration (int axisIndex, double value) |
Set axis deceleration setpoint. . | |
int | setAxisEmergDeceleration (int axisIndex, double value) |
Set axis emergency deceleration setpoint. . | |
int | setAxisJerk (int axisIndex, double value) |
Set axis maximum jerk setpoint. . | |
int | setAxisTargetPos (int axisIndex, double value) |
Set axis target position setpoint. . | |
int | setAxisTargetVel (int axisIndex, double value) |
Set axis target velocity setpoint. . | |
int | setAxisJogVel (int axisIndex, double value) |
Set axis jog velocity setpoint. . | |
int | setAxisExtSetPos (int axisIndex, double value) |
Set axis external position setpoint. . | |
int | setAxisEncScaleDenom (int axisIndex, double value) |
Set the denominator part of the encoder scale. . | |
int | setAxisEncScaleNum (int axisIndex, double value) |
Set the numerator part of the encoder scale. . | |
int | setAxisEncInvHwReady (int axisIndex, int invert) |
Invert Encoder Ready bit. | |
int | setAxisHomePos (int axisIndex, double value) |
Set axis home reference position setpoint. . | |
int | setAxisErrorId (int axisIndex, int errorId) |
Set axis error code. . | |
int | setAxisEncHomeLatchCountOffset (int axisIndex, int count) |
Set home index pulse count offset. . | |
int | setAxisHomeVelTowardsCam (int axisIndex, double dVel) |
Set Towards cam referencing/homing velocity setpoint. . | |
int | setAxisHomeVelOffCam (int axisIndex, double dVel) |
Set off cam referencing/homing velocity setpoint. . | |
int | axisErrorReset (int axisIndex, int value) |
Set gear ration setting. . | |
int | setAxisPLCTrajVelFilterEnable (int axisIndex, int enable) |
Enables/disables velocity filter of external setpoint. . | |
int | setAxisPLCTrajVelFilterSize (int axisIndex, int size) |
Set size of external trajectory velocity filter. . | |
int | setAxisPLCEncVelFilterEnable (int axisIndex, int enable) |
Enables/disables velocity filter of external actual value. . | |
int | setAxisPLCEncVelFilterSize (int axisIndex, int size) |
Set size of external encoder velocity filter. . | |
int | setAxisEncVelFilterSize (int axisIndex, int size) |
Set size of encoder velocity filter. . | |
int | setAxisEncPosFilterSize (int axisIndex, int size) |
Set size of encoder position filter. . | |
int | setAxisEncPosFilterEnable (int axisIndex, int enable) |
Enables/disables encoder position filter. . | |
int | setAxisTrajSource (int axisIndex, int value) |
Set axis trajectory data source. . | |
int | setAxisEncSource (int axisIndex, int value) |
Set axis encoder data source. . | |
int | setAxisTrajStartPos (int axisIndex, double value) |
Set axis trajectory start position. NOTE: NOT USED!!. . | |
int | setAxisEncOffset (int axisIndex, double value) |
Set encoder offset value. . | |
int | setAxisEncType (int axisIndex, int value) |
Set encoder type. . | |
int | setAxisEncBits (int axisIndex, int bits) |
Set encoder register bit count. . | |
int | setAxisEncAbsBits (int axisIndex, int bits) |
Set encoder register bit count for absolute data. . | |
int | setAxisEncRawMask (int axisIndex, uint64_t rawMask) |
Set encoder raw data mask. . | |
int | addAxisEnc (int axisIndex) |
Add encoder object to axis. . | |
int | selectAxisEncPrimary (int axisIndex, int index) |
Select encoder to be used for control. . | |
int | selectAxisEncConfig (int axisIndex, int index) |
Select encoder to configured. . | |
int | setAxisEncEnableRefAtHome (int axisIndex, int enable) |
Set referance this encoder at homing. | |
int | getAxisEncPrimaryIndex (int axisIndex, int *index) |
Get index of current encoder being used for control (PID). . | |
int | getAxisEncConfigIndex (int axisIndex, int *index) |
Get index of current encoder being configured. . | |
int | setAxisEncRefToOtherEncAtStartup (int axisIndex, int encRef) |
Reference this encoder to other encoder at startup. . | |
int | setAxisEncMaxDiffToPrimEnc (int axisIndex, double value) |
Set maximum position deviation between current encoder and primary encoder. . | |
int | setAxisCntrlKp (int axisIndex, double value) |
Set PID-controller proportional gain. . | |
int | setAxisCntrlKi (int axisIndex, double value) |
Set PID-controller integral gain. . | |
int | setAxisCntrlKd (int axisIndex, double value) |
Set PID-controller differential gain. . | |
int | setAxisCntrlKff (int axisIndex, double value) |
Set PID-controller feed forward gain. . | |
int | setAxisCntrlDeadband (int axisIndex, double value) |
Set PID-controller deadband. . | |
int | setAxisCntrlDeadbandTime (int axisIndex, int value) |
Set PID-controller deadband time filter. . | |
int | setAxisCntrlInnerParams (int axisIndex, double kp, double ki, double kd, double tol) |
Use a differnt set of pid parameters if within a certain distance of target. | |
int | setAxisCntrlOutHL (int axisIndex, double value) |
Set PID-controller maximum output value. . | |
int | setAxisCntrlOutLL (int axisIndex, double value) |
Set PID-controller minimum output value. . | |
int | setAxisCntrlIpartLL (int axisIndex, double value) |
Set PID-controller minimum integral part output value. . | |
int | setAxisCntrlIpartHL (int axisIndex, double value) |
Set PID-controller maximum integral part output value. . | |
int | getAxisDrvScaleNum (int axisIndex, double *value) |
Get drive output scale numerator. . | |
int | setAxisDrvScaleNum (int axisIndex, double value) |
Set drive output scale numerator. . | |
int | setAxisDrvScaleDenom (int axisIndex, double value) |
Set drive output scale denominator. . | |
int | setAxisDrvVelSetOffsetRaw (int axisIndex, double value) |
Set drive raw velocity offset. . | |
int | setAxisDrvBrakeEnable (int axisIndex, int enable) |
Set enable of brake. . | |
int | setAxisDrvBrakeOpenDelayTime (int axisIndex, int delayTime) |
Set brake open delay time . . | |
int | setAxisDrvBrakeCloseAheadTime (int axisIndex, int aheadTime) |
Set brake close ahead time . . | |
int | setAxisDrvStateMachineTimeout (int axisIndex, double seconds) |
Set drive timeout . . | |
int | setAxisDrvReduceTorqueEnable (int axisIndex, int enable) |
Set enable of reduce torque functionality. . | |
int | getAxisMonAtTargetTol (int axisIndex, double *value) |
Set drive type. OBSOLETE COMMAND. USE CREATEAXIS(id,type,drvtype). | |
int | setAxisMonAtTargetTol (int axisIndex, double value) |
Set "at target" monitoring tolerance. . | |
int | setAxisEnableCheckEncsDiff (int axisIndex, int enable) |
Set "at target" monitoring tolerance. . | |
int | getAxisMonAtTargetTime (int axisIndex, int *value) |
Get "at target" monitoring time (cycles). . | |
int | setAxisMonAtTargetTime (int axisIndex, int value) |
Set "at target" monitoring time (cycles). . | |
int | getAxisMonEnableAtTargetMon (int axisIndex, int *value) |
Get enable "at target" monitoring. . | |
int | setAxisMonEnableAtTargetMon (int axisIndex, int value) |
Enable "at target" monitoring. . | |
int | getAxisMonPosLagTol (int axisIndex, double *value) |
Get position lag maximum monitoring tolerance. . | |
int | setAxisMonPosLagTol (int axisIndex, double value) |
Set position lag maximum monitoring tolerance. . | |
int | getAxisMonPosLagTime (int axisIndex, int *value) |
Get position lag monitoring time (cycles). . | |
int | setAxisMonPosLagTime (int axisIndex, int value) |
Set position lag monitoring time (cycles). . | |
int | getAxisMonEnableLagMon (int axisIndex, int *value) |
Get position lag monitoring enable. . | |
int | setAxisMonEnableLagMon (int axisIndex, int value) |
Enable position lag monitoring. . | |
int | getAxisMonMaxVel (int axisIndex, double *value) |
Get maximum allowed velocity. . | |
int | setAxisMonMaxVel (int axisIndex, double value) |
Set maximum allowed velocity. . | |
int | setAxisMonEnableMaxVel (int axisIndex, int value) |
Enable maximum velocity monitoring (over speed). . | |
int | getAxisMonEnableMaxVel (int axisIndex, int *value) |
Get enable maximum velocity monitoring (over speed). . | |
int | setAxisMonMaxVelDriveILDelay (int axisIndex, int value) |
Set velocity monitoring interlock delay for drive. . | |
int | setAxisMonMaxVelTrajILDelay (int axisIndex, int value) |
Set velocity monitoring interlock delay for trajectory. . | |
int | getAxisMonLatchLimit (int axisIndex, int *value) |
Get latch on limit settings. . | |
int | setAxisMonLatchLimit (int axisIndex, int value) |
Set latch limit settings. . | |
int | setAxisSeqTimeout (int axisIndex, int value) |
Set sequence timeout time in seconds. . | |
int | setAxisHomeSeqId (int axisIndex, int value) |
Set homing sequence id for current encoder beeing configured. . | |
int | setAxisHomeAcc (int axisIndex, double acc) |
Set homing acceleration for current encoder beeing configured. . | |
int | setAxisHomeDec (int axisIndex, double acc) |
Set homing deceleration for current encoder beeing configured. . | |
int | setAxisHomePostMoveEnable (int axisIndex, int enable) |
Set homing post movement enable. | |
int | setAxisHomePostMoveTargetPosition (int axisIndex, double targetPosition) |
Set homing post movement target position. | |
int | setAxisMonEnableCntrlOutHLMon (int axisIndex, int value) |
Enable controller output high limit monitoring. . | |
int | setAxisMonCntrlOutHL (int axisIndex, double value) |
Set monitoring controller output high limit. . | |
int | setAxisMonEnableVelocityDiff (int axisIndex, int value) |
Enable monitoring of velocity difference. . | |
int | setAxisMonVelDiffTrajILDelay (int axisIndex, int value) |
Set trajectory interlock filter time in cycles for velocity difference monitoring. . | |
int | setAxisMonVelDiffDriveILDelay (int axisIndex, int value) |
Set drive interlock filter time in cycles for velocity difference monitoring. . | |
int | setAxisMonVelDiffTol (int axisIndex, double value) |
Set maximum allowed difference between setpoint speed and actual speedĀ±n. | |
int | setAxisMonEnableExternalInterlock (int axisIndex, int value) |
Enable motion axis interlock from EtherCAT entry. . | |
int | setAxisMonEnableAnalogInterlock (int axisIndex, int value) |
Enable motion axis interlock from analog EtherCAT entry. A typical usecase is temperature sensors. . | |
int | setAxisMonExtHWInterlockPolarity (int axisIndex, int value) |
Set polarity of motion axis interlock from EtherCAT entry. . | |
int | setAxisMonAnalogInterlockPolarity (int axisIndex, int value) |
Set polarity of motion axis interlock from EtherCAT entry. . | |
int | setAxisMonAnalogInterlockRawLimit (int axisIndex, double value) |
Set analog interlock raw value limit . . | |
int | getAxisMonExtHWInterlockPolarity (int axisIndex, int *pol) |
Get polarity of motion axis interlock from EtherCAT entry. . | |
int | setAxisMonLimitBwdPolarity (int axisIndex, int value) |
Set polarity of hard low limit switch. . | |
int | getAxisMonLimitBwdPolarity (int axisIndex, int *pol) |
Get polarity of hard low limit switch. . | |
int | setAxisMonLimitFwdPolarity (int axisIndex, int value) |
Set polarity of hard high limit switch. . | |
int | getAxisMonLimitFwdPolarity (int axisIndex, int *pol) |
Get polarity of hard high limit switch. . | |
int | setAxisMonHomeSwitchPolarity (int axisIndex, int value) |
Set polarity of home switch. . | |
int | getAxisMonHomeSwitchPolarity (int axisIndex, int *pol) |
Get polarity of home switch. . | |
int | setAxisAllowCommandsFromPLC (int axisIndex, int value) |
Allow commands from PLCs. . | |
int | setAxisPLCEnable (int axisIndex, int value) |
Enable axis sync PLC expression. . | |
int | appendAxisPLCExpr (int axisIndex, char *expr) |
Append axis sync. PLC expression. . | |
int | compileAxisPLCExpr (int axisIndex) |
Compile Axis PLC code . | |
int | createAxis (int axisIndex, int axisType, int drvType, int trajType) |
Creates an axis object at index axisIndex. | |
int | linkEcEntryToAxisEnc (int slaveBusPosition, char *entryIdString, int axisIndex, int encoderEntryIndex, int entryBitIndex) |
Links an EtherCAT entry to the encoder object of the axis at axisIndex. | |
int | linkEcEntryToAxisDrv (int slaveBusPosition, char *entryIdString, int axisIndex, int driveEntryIndex, int entryBitIndex) |
Links an EtherCAT entry to the drive object of the axis at axisIndex. | |
int | linkEcEntryToAxisMon (int slaveBusPosition, char *entryIdString, int axisIndex, int monitorEntryIndex, int entryBitIndex) |
Links an EtherCAT entry to the monitor object of the axis at axisIndex . | |
int | linkEcEntryToAxisStatusOutput (int slaveIndex, char *entryIDString, int axisIndex) |
Links an EtherCAT entry to the an axis object for status output . | |
int | linkEcEntryToAxisSeqAutoModeSet (int slaveIndex, char *entryIDString, int axisIndex) |
Links an EtherCAT entry to the an axis object for setting drive mode . | |
int | linkEcEntryToAxisSeqAutoModeAct (int slaveIndex, char *entryIDString, int axisIndex) |
Links an EtherCAT entry to the an axis object for reading actual drive mode . | |
int | setAxisAutoModeCmdHoming (int axisIndex, int cmd) |
Set axis auto mode command for homing. . | |
int | setAxisAutoModeCmdMotion (int axisIndex, int cmd) |
Set axis auto mode command for motion. . | |
int | setDiagAxisIndex (int axisIndex) |
Set axis index for detailed motion diagnostics. . | |
int | setDiagAxisFreq (int freq) |
Set axis frequency of detailed motion diagnostics printouts. . | |
int | setDiagAxisEnable (int enable) |
Enable detailed motion diagnostics printouts. . | |
int | getAxisModRange (int axisIndex, double *range) |
Get axis modulo range. . | |
int | setAxisModRange (int axisIndex, double range) |
Set axis modulo range. . | |
int | setAxisModType (int axisIndex, int type) |
Set axis modulo motion type. . | |
int | getAxisModType (int axisIndex, int *value) |
Set axis modulo motion type. . | |
int | setAxisDisableAtErrorReset (int axisIndex, int disable) |
Disable axis at error reset . | |
int | setAxisAllowSourceChangeWhenEnabled (int axisIndex, int allow) |
Allow change of encoder and trajectory source when axis is enabled. | |
int | getAxisValid (int axisIndex) |
Returns 1 if axis index is in use. | |
int | setAxisEmergencyStopInterlock (int axisIndex, int stop) |
Init emergency stop ramp for an axis. | |
Motion commands.
#define CHECK_AXIS_CONTROLLER_RETURN_IF_ERROR | ( | axisIndex | ) |
#define CHECK_AXIS_DRIVE_RETURN_IF_ERROR | ( | axisIndex | ) |
#define CHECK_AXIS_ENCODER_CFG_RETURN_IF_ERROR | ( | axisIndex | ) |
#define CHECK_AXIS_ENCODER_RETURN_IF_ERROR | ( | axisIndex | ) |
#define CHECK_AXIS_MON_RETURN_IF_ERROR | ( | axisIndex | ) |
#define CHECK_AXIS_RETURN_IF_ERROR | ( | axisIndex | ) |
#define CHECK_AXIS_RETURN_IF_ERROR_AND_BLOCK_COM | ( | axisIndex | ) |
#define CHECK_AXIS_SEQ_RETURN_IF_ERROR | ( | axisIndex | ) |
#define CHECK_AXIS_TRAJ_RETURN_IF_ERROR | ( | axisIndex | ) |
int addAxisEnc | ( | int | axisIndex | ) |
Add encoder object to axis.
.
Adds another encoder to axis object(max is 8).
After this command have been executed, all following encoder configuration
commands will be applied to the newly created encoder object.
Note: An encoder object will be automatically created when the axis object is created,
this encoder will have index 0. The first "extra" encoder created with addAxisEnc
function will therefore have encoder index 1, the next 2....
[in] | axisIndex | Axis index. |
int appendAxisPLCExpr | ( | int | axisIndex, |
char * | expr ) |
Append axis sync. PLC expression.
.
Add one line to the axis PLC code.
The axis PLC expression is used for enabling and executing of axes based on mathematical expressions. This is useful when synchronizing axes i.e. a slave axis could be enabled and executed at the same time as the master axis.
Example: Enable of axis 2 is related to the enable command of axis 1 and 5. The execute command is related to an expression including the execute command for axis 2 and 7.
"ax2.drv.enable:=ax1.drv.enable or ax5.drv.enable|".
For more syntax help plese view PLC syntax (setPLCExpr()).
[in] | axisIndex | Axis index. |
[in] | expr | PLC expression. |
int axisErrorReset | ( | int | axisIndex, |
int | value ) |
Set gear ration setting.
.
Note: The gear ratio is only valid during synchronized motions.
[in] | axisIndex | Axis index. |
[in] | ratioNum | Gear ratio factor numerator. |
[in] | ratioDenom | Gear ratio factor denominator. |
[in] | axisIndex | Axis index. |
[in] | value | State of axis reset bit. |
int compileAxisPLCExpr | ( | int | axisIndex | ) |
Compile Axis PLC code
.
For more syntax help plese view PLC syntax (setPLCExpr()).
[in] | axisIndex | Axis index. |
int createAxis | ( | int | axisIndex, |
int | axisType, | ||
int | drvType, | ||
int | trajType ) |
Creates an axis object at index axisIndex.
[in] | axisIndex | Index of axis to address. |
[in] | axisType | Type of axis. type = 1 : Normal axis (drive, encoder, monitor,pid-controller,trajectory). type = 2 : Virtual axis (encoder, monitor, trajectory). |
[in] | drvType | Type of axis. type = 0 : Simple drive (stepper). type = 1 : DS402 drive. |
[in] | trajType | Type of trajectory generator. type = 0 : Trapetzoidal. type = 1 : Jerk limited (s-curve, ruckig). |
int getAxisAcceleration | ( | int | axisIndex, |
double * | value ) |
Get axis acceleration setpoint.
.
[in] | axisIndex | Axis index. |
[out] | value | acceleration setpoint. |
int getAxisAllowCommandsFromPLC | ( | int | axisIndex, |
int * | value ) |
Get axis allow command from PLC.
.
An axis can receive commands from PLCs (expressions).
However, the axis must be allow to receive these commands, see command getAxisPLCExpr() for more information.
[in] | axisIndex | Axis index. |
[out] | value | enable. |
int getAxisAtHardBwd | ( | int | axisIndex, |
int * | value ) |
Get state of backward hard limit.
.
Checks state of backward hard limit switch.
[in] | axisIndex | Axis index. |
[out] | value | state of backward limit switch. |
int getAxisAtHardFwd | ( | int | axisIndex, |
int * | value ) |
Get state of forward hard limit.
.
Checks state of forward hard limit switch.
[in] | axisIndex | Axis index. |
[out] | value | state of forward limit switch. |
int getAxisAtHome | ( | int | axisIndex, |
int * | value ) |
Get state of reference/home switch.
.
[in] | axisIndex | Axis index. |
[out] | value | state of reference/home switch. |
int getAxisBlockCom | ( | int | axisIndex, |
int * | block ) |
Get axis block external com.
If true the axis will not take any active commands via cmd
parser (statuses can still be read).
.
[in] | axisIndex | Axis index. |
[out] | block | Axis blocked. |
int getAxisBusy | ( | int | axisIndex, |
int * | value ) |
Get axis busy bit.
.
The axis busy bit is high while an command is executed or while synchronizing to other axes.
[in] | axisIndex | Axis index. |
[out] | value | state of axis busy bit. |
int getAxisCmdData | ( | int | axisIndex, |
int * | value ) |
Get axis command data word.
.
The command data word is an argument linked to the axis command. See fbDriveVirtual manual for more information.
[in] | axisIndex | Axis index. |
[out] | value | axis command data word. Command word = 10 (homing): value 1..6: Different homing sequences. Command word = 4 (absolute positioning): value 1: Go to start position of trajectory generator external transformation expressions. This is useful to avoid jumps during start phase when absolute synchronizing. |
int getAxisCntrlError | ( | int | axisIndex, |
double * | value ) |
Get actual pid controller error.
.
[in] | axisIndex | Axis index. |
[out] | value | actual error of pid controller. |
int getAxisCntrlOutDpart | ( | int | axisIndex, |
double * | value ) |
Get PID-controller differential output part.
.
[in] | axisIndex | Axis index. |
[out] | value | PID-controller differential output. |
int getAxisCntrlOutFFpart | ( | int | axisIndex, |
double * | value ) |
Get PID-controller feed forward output part.
.
[in] | axisIndex | Axis index. |
[out] | value | PID-controller feed forward output. |
int getAxisCntrlOutIpart | ( | int | axisIndex, |
double * | value ) |
Get PID-controller integral output part.
.
[in] | axisIndex | Axis index. |
[out] | value | PID-controller integral output. |
int getAxisCntrlOutPpart | ( | int | axisIndex, |
double * | value ) |
Get PID-controller proportional output part.
.
[in] | axisIndex | Axis index. |
[out] | value | PID-controller proportional output. |
int getAxisCntrlOutput | ( | int | axisIndex, |
double * | value ) |
Get PID-controllegetAxisAtHomer total output part.
.
The current total output from the PID-controller (the sum of the P,I,D and FF part).
[in] | axisIndex | Axis index. |
[out] | value | PID-controller total output. |
int getAxisCommand | ( | int | axisIndex, |
int * | value ) |
Get axis command word.
.
The command word defines different modes of operation for and axis. See fbDriveVirtual manual for more information.
[in] | axisIndex | Axis index. |
[out] | value | axis command word. value = 0: Jog. value = 1: Constant Velocity. value = 2: Relative Positioning. value = 3: Absolute Positioning. value = 10: Homing. See manual for fbDriveVirtual for more information. |
int getAxisCycleCounter | ( | int | axisIndex, |
int * | counter ) |
Get axis execution cycle counter.
Can be used for checking that logic for an axis object is executing.
.
[in] | axisIndex | Axis index. |
[out] | counter | Execution cycle counter. |
int getAxisDebugInfoData | ( | int | axisIndex, |
char * | buffer, | ||
int | bufferByteSize ) |
Get axis debug information string.
.
[in] | axisIndex | Axis index. |
[in,out] | buffer | Pointer to char output data buffer. |
[in] | bufferByteSize | Size of data buffer. |
int getAxisDeceleration | ( | int | axisIndex, |
double * | value ) |
Get axis deceleration setpoint.
.
[in] | axisIndex | Axis index. |
[out] | value | deceleration setpoint. |
int getAxisDone | ( | int | axisIndex, |
int * | value ) |
Get axis done bit.
.
The axis done bit is high when an axis is ready to take a new command (inverse of busy bit).
[in] | axisIndex | Axis index. |
[out] | value | state of axis done bit. |
int getAxisDrvEnable | ( | int | axisIndex, |
int * | value ) |
Get enable state of drive.
.
[in] | axisIndex | Axis index. |
[out] | value | Drive enabled. |
int getAxisDrvScale | ( | int | axisIndex, |
double * | value ) |
Get the drive output scale factor.
.
[in] | axisIndex | Axis index. |
[out] | value | Drive output scale factor. |
int getAxisDrvScaleNum | ( | int | axisIndex, |
double * | value ) |
Get drive output scale numerator.
.
[in] | axisIndex | Axis index. |
[out] | pointer | to return value Scale numerator. |
int getAxisEnable | ( | int | axisIndex, |
int * | value ) |
Get axis amplifier command bit.
.
[in] | axisIndex | Axis index. |
[out] | value | state of axis amplifier command bit. |
int getAxisEnableAlarmAtHardLimits | ( | int | axisIndex, |
int * | value ) |
Get enable alarms at limits bit.
.
[in] | axisIndex | Axis index. |
[out] | value | state of enable alarm at limits bit. |
int getAxisEnabled | ( | int | axisIndex, |
int * | value ) |
Get axis amplifier state bit.
.
[in] | axisIndex | Axis index. |
[out] | value | state of axis amplifier. |
int getAxisEnableSoftLimitBwd | ( | int | axisIndex, |
int * | value ) |
Get backward soft-limit enabled state of an axis.
.
[in] | axisIndex | Axis index. |
[out] | value | soft-limit enabled. |
int getAxisEnableSoftLimitFwd | ( | int | axisIndex, |
int * | value ) |
Get forward soft-limit enabled state of an axis.
.
[in] | axisIndex | Axis index. |
[out] | value | soft-limit enabled. |
int getAxisEncConfigIndex | ( | int | axisIndex, |
int * | index ) |
Get index of current encoder being configured.
.
[in] | axisIndex | Axis index. |
int getAxisEncHomed | ( | int | axisIndex, |
int * | value ) |
Get encoder homed bit.
.
Checks if encoder has been homed.
[in] | axisIndex | Axis index. |
[out] | value | state of encoder homed bit. |
int getAxisEncPosAct | ( | int | axisIndex, |
double * | value ) |
Get actual encoder position.
.
[in] | axisIndex | Axis index. |
[out] | value | encoder actual position. |
int getAxisEncPosRaw | ( | int | axisIndex, |
int64_t * | value ) |
Get raw unscaled encoder value.
.
[in] | axisIndex | Axis index. |
[out] | value | Raw encoder value. |
int getAxisEncPrimaryIndex | ( | int | axisIndex, |
int * | index ) |
Get index of current encoder being used for control (PID).
.
[in] | axisIndex | Axis index. |
int getAxisEncScaleDenom | ( | int | axisIndex, |
double * | value ) |
Get the denominator part of the encoder scale.
.
The encoder scale factor is divided into one numerator and one denominator part. This function reads the denominator part.
[in] | axisIndex | Axis index. |
[out] | value | Encoder scale denominator part. |
int getAxisEncScaleNum | ( | int | axisIndex, |
double * | value ) |
Get the numerator part of the encoder scale.
.
The encoder scale factor is divided into one numerator and one denominator part. This function reads the numerator part.
[in] | axisIndex | Axis index. |
[out] | value | Encoder scale numerator part. |
int getAxisEncSource | ( | int | axisIndex, |
int * | value ) |
Get axis encoder data source.
.
An axis encoder can get actual position from different sources:
source = 0 : Internal (EtherCAT entry).
source = 1 : External from transformation expression (synchronization).
[in] | axisIndex | Axis index. |
[out] | value | Source type. |
const char * getAxisEncTransExpr | ( | int | axisIndex, |
int * | error ) |
Get axis encoder transformation expression.
.
The axis transformation expression is used for synchronization of axes. The expression is a mathematical expression describing relation ship between different axes.
Example: "out:=sin(traj1+enc5)/500;".
traj1 = trajectory setpoint of axis 1.
enc5 = actual encoder position of axis 5.
out = the encoder setpoint for the current axis (axes[axisIndex]).
[in] | axisIndex | Axis index. |
[out] | error | Error code. error = 0: No error. error > 0: Error. |
int getAxisEncVelAct | ( | int | axisIndex, |
double * | value ) |
Get actual encoder velocity.
.
[in] | axisIndex | Axis index. |
[out] | value | encoder actual velocity. |
int getAxisEncVelo | ( | int | axisIndex, |
double * | velo ) |
Get axis act velo.
.
The axis busy bit is high while an command is executed or while synchronizing to other axes.
[in] | axisIndex | Axis index. |
[out] | velo | Axis velocity. |
int getAxisError | ( | int | axisIndex | ) |
Get axis error state.
.
[in] | axisIndex | Axis index. |
int getAxisErrorID | ( | int | axisIndex | ) |
Get axis error code.
.
[in] | axisIndex | Axis index. |
int getAxisExecute | ( | int | axisIndex, |
int * | value ) |
Get axis execute bit.
.
[in] | axisIndex | Axis index. |
[out] | value | state of axis execute bit. |
int getAxisHomeVelOffCam | ( | int | axisIndex, |
double * | value ) |
Get off cam referencing/homing velocity setpoint.
.
This velocity setpoint is only used during homing sequence when the reference switch already have been found. See command "getAxisHomeVelTowardsCam()" for more information.
[in] | axisIndex | Axis index. |
[out] | value | Velocity setpoint. |
int getAxisHomeVelTowardsCam | ( | int | axisIndex, |
double * | value ) |
Get Towards cam referencing/homing velocity setpoint.
.
This velocity setpoint is only used during homing sequence when finding the reference switch. See command "getAxisHomeVelTowardsCam()" for more information.
[in] | axisIndex | Axis index. |
[out] | value | Velocity setpoint. |
int getAxisID | ( | int | axisIndex, |
int * | value ) |
Get axis index.
.
This function is only implemented for compatibility reasons with the ESS MCAG TwinCAT implementation. (An TwinCAT plc axis can be linked to different NC-axis).
If the axis at axisIndex exists, axisIndex will be "returned" in the value parameter.
[in] | axisIndex | Axis index. |
[out] | value | axis index of chosen axis. |
int getAxisLimitSwitchBwd | ( | int | axisIndex, |
int * | value ) |
Same as getAxisAtHardBwd() but better name.
.
getAxisAtHardBwd() is kept for backward compatibility
int getAxisLimitSwitchFwd | ( | int | axisIndex, |
int * | value ) |
Same as getAxisAtHardFwd() but better name.
.
getAxisAtHardFwd() is kept for backward compatibility
int getAxisModRange | ( | int | axisIndex, |
double * | range ) |
Get axis modulo range.
.
[in] | axisIndex | Axis index. |
[out] | value | modulo range. |
int getAxisModType | ( | int | axisIndex, |
int * | value ) |
Set axis modulo motion type.
.
[in] | axisIndex | Axis index. |
[out] | type | Modulo type. type = 0 : ECMC_MOD_MOTION_NORMAL 1: ECMC_MOD_MOTION_FWD (Always forward) 2: ECMC_MOD_MOTION_BWD (always backward) 3: ECMC_MOD_MOTION_CLOSEST (closest path) |
int getAxisMonAtTarget | ( | int | axisIndex, |
int * | value ) |
Get at target.
.
Checks if axis is within a certain tolerance from target position.
[in] | axisIndex | Axis index. |
[out] | value | At target. |
int getAxisMonAtTargetTime | ( | int | axisIndex, |
int * | value ) |
Get "at target" monitoring time (cycles).
.
[in] | axisIndex | Axis index. |
[out] | pointer | to return value At target time (cycles) . |
int getAxisMonAtTargetTol | ( | int | axisIndex, |
double * | value ) |
Set drive type.
OBSOLETE COMMAND. USE CREATEAXIS(id,type,drvtype).
[in] | axisIndex | Axis index. |
[in] | type | Drive type. 0 = Stepper drive. 1 = DS402 drive. |
[in] | axisIndex | Axis index. |
[out] | pointer | to return value At target tolerance. |
int getAxisMonEnableAtTargetMon | ( | int | axisIndex, |
int * | value ) |
Get enable "at target" monitoring.
.
[in] | axisIndex | Axis index. |
[out] | pointer | to return value Enable monitoring . |
int getAxisMonEnableLagMon | ( | int | axisIndex, |
int * | value ) |
Get position lag monitoring enable.
.
The position lag monitoring functionality monitors the difference between the actual position and trajectory generated setpoint position. The motion can be interlocked if the difference exceeds a certain tolerance for a certain number of cycles, see command setAxisMonPosLagTime() and setAxisMonPosLagTol() for more information.
A big position lag error during a motion could be generated by bad tuning or mechanical issues.
[in] | axisIndex | Axis index. |
[in] | value | Enable monitoring. . |
int getAxisMonEnableMaxVel | ( | int | axisIndex, |
int * | value ) |
Get enable maximum velocity monitoring (over speed).
.
[in] | axisIndex | Axis index. |
[out] | value | Enable monitoring. |
int getAxisMonExtHWInterlockPolarity | ( | int | axisIndex, |
int * | pol ) |
Get polarity of motion axis interlock from EtherCAT entry.
.
The motion can be interlocked based on an EtherCAT entry. See command linkEcEntryToAxisMon() for more information.
[in] | axisIndex | Axis index. |
[out] | value | Polarity external interlock. 0 = NC (High is OK) Default. 1 = NO (Low is OK). |
int getAxisMonHomeSwitchPolarity | ( | int | axisIndex, |
int * | pol ) |
Get polarity of home switch.
.
[in] | axisIndex | Axis index. |
[out] | pol | Polarity. 0 = NC (High is 1) Default. 1 = NO (Low is 1). |
int getAxisMonLatchLimit | ( | int | axisIndex, |
int * | value ) |
Get latch on limit settings.
.
[in] | axisIndex | Axis index. |
[out] | value | pointer to latch on limit setting value . |
int getAxisMonLimitBwdPolarity | ( | int | axisIndex, |
int * | pol ) |
Get polarity of hard low limit switch.
.
[in] | axisIndex | Axis index. |
[out] | pol | Polarity. 0 = NC (High is OK) Default. 1 = NO (Low is OK). |
int getAxisMonLimitFwdPolarity | ( | int | axisIndex, |
int * | pol ) |
Get polarity of hard high limit switch.
.
[in] | axisIndex | Axis index. |
[out] | pol | Polarity. 0 = NC (High is OK) Default. 1 = NO (Low is OK). |
int getAxisMonMaxVel | ( | int | axisIndex, |
double * | value ) |
Get maximum allowed velocity.
.
The motion will be interlocked if the actual velocity or the velocity setpoint exceeds this value.
[in] | axisIndex | Axis index. |
[out] | value | Maximum velocity. |
int getAxisMonPosLagTime | ( | int | axisIndex, |
int * | value ) |
Get position lag monitoring time (cycles).
.
[in] | axisIndex | Axis index. |
[out] | pointer | to return value Position lag time (cycles). |
int getAxisMonPosLagTol | ( | int | axisIndex, |
double * | value ) |
Get position lag maximum monitoring tolerance.
.
[in] | axisIndex | Axis index. |
[out] | pointer | to return value Position lag maximum tolerance. |
int getAxisPLCEnable | ( | int | axisIndex, |
int * | value ) |
Get axis enable for axis sync. PLC.
.
The axis sync. PLC expression can be enabled/disabled. see command getAxisPLCExpr() for more information.
[in] | axisIndex | Axis index. |
[out] | value | enable. |
const char * getAxisPLCExpr | ( | int | axisIndex, |
int * | error ) |
Get axis sync. PLC expression.
.
The axis sync PLC expression is used for enabling and executing of
axes based on mathematical expressions. This is useful when synchronizing
axes i.e. a slave axis could recive an custom trajatory, other enabled based\ on other axes or ethercat data in the form of mathematical expressions.
[in] | axisIndex | Axis index. |
[out] | error | Error code. error = 0: No error. error > 0: Error. |
int getAxisReset | ( | int | axisIndex, |
int * | value ) |
Get axis reset bit.
.
[in] | axisIndex | Axis index. |
[out] | value | state of axis reset bit. |
int getAxisSoftLimitPosBwd | ( | int | axisIndex, |
double * | value ) |
Get backward soft-limit position.
.
[in] | axisIndex | Axis index. |
[out] | value | soft-limit position. |
int getAxisSoftLimitPosFwd | ( | int | axisIndex, |
double * | value ) |
Get forward soft-limit position.
.
[in] | axisIndex | Axis index. |
[out] | value | Soft-limit position. |
int getAxisStatusStructV2 | ( | int | axisIndex, |
char * | buffer, | ||
int | bufferByteSize ) |
Get axis status structure V2.
.
[in] | axisIndex | Axis index. |
[in,out] | buffer | Pointer to char output data buffer. |
[in] | bufferByteSize | Size of data buffer. |
int getAxisTargetPos | ( | int | axisIndex, |
double * | value ) |
Get axis target position setpoint.
.
The target position is the desired end setpoint of a motion.
[in] | axisIndex | Axis index. |
[out] | value | target position setpoint. |
int getAxisTargetVel | ( | int | axisIndex, |
double * | value ) |
Get axis target velocity setpoint.
.
The target velocity is the desired velocity of a motion.
Note: The actual velocity can be higher than this setpoint.
[in] | axisIndex | Axis index. |
[out] | value | target velocity setpoint. |
int getAxisTrajSource | ( | int | axisIndex, |
int * | value ) |
Get axis trajectory data source.
.
An axis trajectory generator can get position setpoints from different sources:
source = 0 : Internal (normal trajectory generation).
source = 1 : External from transformation expression (synchronization).
[in] | axisIndex | Axis index. |
[out] | value | Source type. |
const char * getAxisTrajTransExpr | ( | int | axisIndex, |
int * | error ) |
Get axis trajectory transformation expression.
.
The axis transformation expression is used for synchronization of axes. The expression is a mathematical expression describing relation ship between different axes.
Example: "out:=sin(traj1+enc5)/500;".
traj1 = trajectory setpoint of axis 1.
enc5 = actual encoder position of axis 5.
out = the trajectory setpoint for the current axis (axes[axisIndex]).
[in] | axisIndex | Axis index. |
[out] | error | Error code. error = 0: No error. error > 0: Error. |
int getAxisTrajVelo | ( | int | axisIndex, |
double * | velo ) |
Get axis traj velo.
.
The axis busy bit is high while an command is executed or while synchronizing to other axes.
[in] | axisIndex | Axis index. |
[out] | velo | Axis velocity. |
int getAxisType | ( | int | axisIndex, |
int * | value ) |
Get axis type.
.
An axis can be of the following types: type = 1 : Normal axis (drive, encoder, monitor,pid-controller,trajectory).
type = 2 : Virtual axis (encoder, monitor, trajectory).
[in] | axisIndex | Axis index. |
[out] | value | Axis type. |
int getAxisValid | ( | int | axisIndex | ) |
Returns 1 if axis index is in use.
[in] | axisIndex | Axis index. |
int linkEcEntryToAxisDrv | ( | int | slaveBusPosition, |
char * | entryIdString, | ||
int | axisIndex, | ||
int | driveEntryIndex, | ||
int | entryBitIndex ) |
Links an EtherCAT entry to the drive object of the axis at axisIndex.
[in] | slaveBusPosition | Position of the EtherCAT slave on the bus. slaveBusPosition = -1: Used to address the simulation slave. Only two entries are configured, "ZERO" with default value 0 and "ONE" with default value 1. slaveBusPosition = 0..65535: Addressing of normal EtherCAT slaves |
[in] | entryIdString | String for addressing purpose (see command "Cfg.EcAddEntryComplete() for more information"). If left blank driveEntryIndex == 3 or4, the corresponding functionality will be disabled. |
[in] | axisIndex | Index of axis to link to. |
[in] | driveEntryIndex | Index of drive objects entry list. driveEntryIndex = 0: Amplifier enable (output). driveEntryIndex = 1: Velocity setpoint (output). driveEntryIndex = 2: Amplifier enabled (input). driveEntryIndex = 3: Brake (output). Brake func will be enabled. driveEntryIndex = 4: Reduce torque (output). Reduce torque func will be enabled. |
[in] | entryBitIndex | Bit index of EtherCAT entry to use. entryBitIndex = -1: All bits of the entry will be used. entryBitIndex = 0..64: Only the selected bit will be used. |
int linkEcEntryToAxisEnc | ( | int | slaveBusPosition, |
char * | entryIdString, | ||
int | axisIndex, | ||
int | encoderEntryIndex, | ||
int | entryBitIndex ) |
Links an EtherCAT entry to the encoder object of the axis at axisIndex.
[in] | slaveBusPosition | Position of the EtherCAT slave on the bus. slaveBusPosition = -1: Used to address the simulation slave. Only two entries are configured, "ZERO" with default value 0 and "ONE" with default value 1. slaveBusPosition = 0..65535: Addressing of normal EtherCAT slaves |
[in] | entryIdString | String for addressing purpose (see command "Cfg.EcAddEntryComplete() for more information"). |
[in] | axisIndex | Index of axis to link to. |
[in] | encoderEntryIndex | Index of encoder objects entry list. encoderEntryIndex = 0: Actual position (input). |
[in] | entryBitIndex | Bit index of EtherCAT entry to use. entryBitIndex = -1: All bits of the entry will be used. entryBitIndex = 0..64: Only the selected bit will be used. |
int linkEcEntryToAxisMon | ( | int | slaveBusPosition, |
char * | entryIdString, | ||
int | axisIndex, | ||
int | monitorEntryIndex, | ||
int | entryBitIndex ) |
Links an EtherCAT entry to the monitor object of the axis at axisIndex
.
[in] | slaveBusPosition | Position of the EtherCAT slave on the bus. slaveBusPosition = -1: Used to address the simulation slave. Only two entries are configured, "ZERO" with default value 0 and "ONE" with default value 1. slaveBusPosition = 0..65535: Addressing of normal EtherCAT slaves. |
[in] | entryIdString | String for addressing purpose (see command "Cfg.EcAddEntryComplete() for more information"). |
[in] | axisIndex | Index of axis to link to. |
[in] | monitorEntryIndex | Index of monitor objects entry list. monitorEntryIndex = 0: Limit switch backward direction. monitorEntryIndex = 1: Limit switch forward direction. monitorEntryIndex = 2: Reference switch (homing). monitorEntryIndex = 3: External interlock input (optional). monitorEntryIndex = 4: External analog interlock input (optional). |
[in] | entryBitIndex | Bit index of EtherCAT entry to use. entryBitIndex = -1: All bits of the entry will be used. entryBitIndex = 0..64: Only the selected bit will be used. |
int linkEcEntryToAxisSeqAutoModeAct | ( | int | slaveIndex, |
char * | entryIDString, | ||
int | axisIndex ) |
Links an EtherCAT entry to the an axis object for
reading actual drive mode
.
[in] | slaveIndex | Position of the EtherCAT slave on the bus. slaveIndex = -1: Used to address the simulation slave. Only two entries are configured, "ZERO" with default value 0 and "ONE" with default value 1. slaveIndex = 0..65535: Addressing of normal EtherCAT slaves. |
[in] | entryIdString | String for addressing purpose (see command "Cfg.EcAddEntryComplete() for more information"). |
[in] | axisIndex | Index of axis. |
int linkEcEntryToAxisSeqAutoModeSet | ( | int | slaveIndex, |
char * | entryIDString, | ||
int | axisIndex ) |
Links an EtherCAT entry to the an axis object for
setting drive mode
.
[in] | slaveIndex | Position of the EtherCAT slave on the bus. slaveIndex = -1: Used to address the simulation slave. Only two entries are configured, "ZERO" with default value 0 and "ONE" with default value 1. slaveIndex = 0..65535: Addressing of normal EtherCAT slaves. |
[in] | entryIdString | String for addressing purpose (see command "Cfg.EcAddEntryComplete() for more information"). |
[in] | axisIndex | Index of axis. |
int linkEcEntryToAxisStatusOutput | ( | int | slaveIndex, |
char * | entryIDString, | ||
int | axisIndex ) |
Links an EtherCAT entry to the an axis object for status output
.
The output will be high when the axis object is without error code and otherwise zero.
[in] | slaveIndex | Position of the EtherCAT slave on the bus. slaveIndex = -1: Used to address the simulation slave. Only two entries are configured, "ZERO" with default value 0 and "ONE" with default value 1. slaveIndex = 0..65535: Addressing of normal EtherCAT slaves. |
[in] | entryIdString | String for addressing purpose (see command "Cfg.EcAddEntryComplete() for more information"). |
[in] | axisIndex | Index of axis. |
int moveAbsolutePosition | ( | int | axisIndex, |
double | positionSet, | ||
double | velocitySet, | ||
double | accelerationSet, | ||
double | decelerationSet ) |
Move axis to an absolute position.
.
[in] | axisIndex | Axis index. |
[in] | positionSet | Position setpoint. |
[in] | velocitySet | Velocity setpoint. |
[in] | accelerationSet | Acceleration setpoint. |
[in] | decelerationSet | Deceleration setpoint. |
int moveHome | ( | int | axisIndex, |
int | nCmdData, | ||
double | homePositionSet, | ||
double | velocityTowardsCamSet, | ||
double | velocityOffCamSet, | ||
double | accelerationSet, | ||
double | decelerationSet ) |
Execute homing sequence.
.
[in] | axisIndex | Axis index. |
[in] | nCmdData | Homing sequence number. |
[in] | homePositionSet | Position to set at homing. |
[in] | velocityTowardsCamSet | Velocity setpoint Towards cam. |
[in] | velocityOffCamSet | Velocity setpoint off cam. |
[in] | accelerationSet | Acceleration setpoint. |
[in] | decelerationSet | Deceleration setpoint. |
int moveRelativePosition | ( | int | axisIndex, |
double | positionSet, | ||
double | velocitySet, | ||
double | accelerationSet, | ||
double | decelerationSet ) |
Move axis to a relative position.
.
[in] | axisIndex | Axis index. |
[in] | positionSet | Relative position setpoint. |
[in] | velocitySet | Velocity setpoint. |
[in] | accelerationSet | Acceleration setpoint. |
[in] | decelerationSet | Deceleration setpoint. |
int moveVelocity | ( | int | axisIndex, |
double | velocitySet, | ||
double | accelerationSet, | ||
double | decelerationSet ) |
Move axis in a constant velocity.
.
[in] | axisIndex | Axis index. |
[in] | velocitySet | Velocity setpoint. |
[in] | accelerationSet | Acceleration setpoint. |
[in] | decelerationSet | Deceleration setpoint. |
int selectAxisEncConfig | ( | int | axisIndex, |
int | index ) |
Select encoder to configured.
.
Select an encoder to be configured (default encoder index 1 is used).
[in] | axisIndex | Axis index. |
[in] | encindex | Encoder index (first index is 0). |
int selectAxisEncPrimary | ( | int | axisIndex, |
int | index ) |
Select encoder to be used for control.
.
Select an encoder to use for closed loop control (default encoder index 1 is used).
[in] | axisIndex | Axis index. |
[in] | encindex | Encoder index (first index is 0). |
int setAxisAcceleration | ( | int | axisIndex, |
double | value ) |
Set axis acceleration setpoint.
.
[in] | axisIndex | Axis index. |
[in] | value | Acceleration setpoint. |
int setAxisAllowCommandsFromPLC | ( | int | axisIndex, |
int | value ) |
Allow commands from PLCs.
.
An axis can receive commands from PLCs (see PLC syntax). However, the axis must be allow to receive these commands, see command setAxisPLCExpr() for more information.
[in] | axisIndex | Axis index. |
[in] | value | Enable. |
int setAxisAllowSourceChangeWhenEnabled | ( | int | axisIndex, |
int | allow ) |
Allow change of encoder and trajectory source when axis is enabled.
[in] | axisIndex | Axis index. |
[in] | allow | allow source change (default false). |
int setAxisAutoModeCmdHoming | ( | int | axisIndex, |
int | cmd ) |
Set axis auto mode command for homing.
.
Only relveant if an ethercat entry have been linked with "linkEcEntryToAxisSeqAutoModeSet()"
[in] | axisIndex | Axis index. |
[in] | cmd | command mode value for drive homing. |
int setAxisAutoModeCmdMotion | ( | int | axisIndex, |
int | cmd ) |
Set axis auto mode command for motion.
.
Only relveant if an ethercat entry have been linked with "linkEcEntryToAxisSeqAutoModeSet()"
[in] | axisIndex | Axis index. |
[in] | cmd | command mode value for drive homing. |
int setAxisBlockCom | ( | int | axisIndex, |
int | block ) |
Block/unblock communicatiom from via cmd parser.
.
[in] | axisIndex | Axis index. |
[in] | block | block or unblock com. |
int setAxisCmdData | ( | int | axisIndex, |
int | value ) |
Set axis command data word.
.
The command data word is an argument linked to the axis command. See fbDriveVirtual manual for more information.
A new command will be triggered with a positive edge on the bExecute flag.
[in] | axisIndex | Axis index. |
[in] | value | Axis command data word. The command data word have different meaning depending on the command word. Command word = 1 (Move velocity): Command data 0: Move Velocity Command word = 2 (Relative positioning): Command data 0: Move relative Command word = 3 (absolute positioning): Command data 0: Default absolute positioning Command Data 1: Go to start position of trajectory generator external transformation expressions. This is useful to avoid jumps during start phase when absolute synchronizing. Command word = 10 (Referencing to fHomePosition): Command Data 0: Simplest homing sequence. The actual position of the encoder will be set to fHomePosition. Command Data 1: Ref. on low limit switch. Command Data 2: Ref. on high limit switch. Command Data 3: Ref. on home sensor via low limit switch. Command Data 4: Ref. on home sensor via high limit switch. Command Data 5: Ref. on center of home sensor via low limit switch. Command Data 6: Ref. on center of home sensor via high limit switch. |
int setAxisCntrlDeadband | ( | int | axisIndex, |
double | value ) |
Set PID-controller deadband.
.
[in] | axisIndex | Axis index. |
[in] | value | deadband tolerance. |
int setAxisCntrlDeadbandTime | ( | int | axisIndex, |
int | value ) |
Set PID-controller deadband time filter.
.
[in] | axisIndex | Axis index. |
[in] | value | deadband cycles to be withing tolerance. |
int setAxisCntrlInnerParams | ( | int | axisIndex, |
double | kp, | ||
double | ki, | ||
double | kd, | ||
double | tol ) |
Use a differnt set of pid parameters if within a certain distance of target.
[in] | axisIndex | Axis index. |
[in] | kp | Prop gain. |
[in] | ki | Integarl gain. |
[in] | kd | Derivative gain. |
[in] | tol | Tolerance from target. |
int setAxisCntrlIpartHL | ( | int | axisIndex, |
double | value ) |
Set PID-controller maximum integral part output value.
.
[in] | axisIndex | Axis index. |
[in] | value | Max integral value. |
int setAxisCntrlIpartLL | ( | int | axisIndex, |
double | value ) |
Set PID-controller minimum integral part output value.
.
[in] | axisIndex | Axis index. |
[in] | value | Min integral value. |
int setAxisCntrlKd | ( | int | axisIndex, |
double | value ) |
Set PID-controller differential gain.
.
[in] | axisIndex | Axis index. |
[in] | value | Differential gain. |
int setAxisCntrlKff | ( | int | axisIndex, |
double | value ) |
Set PID-controller feed forward gain.
.
[in] | axisIndex | Axis index. |
[in] | value | Feed forward gain. |
int setAxisCntrlKi | ( | int | axisIndex, |
double | value ) |
Set PID-controller integral gain.
.
[in] | axisIndex | Axis index. |
[in] | value | Integral gain. |
int setAxisCntrlKp | ( | int | axisIndex, |
double | value ) |
Set PID-controller proportional gain.
.
[in] | axisIndex | Axis index. |
[in] | value | Proportional gain. |
int setAxisCntrlOutHL | ( | int | axisIndex, |
double | value ) |
Set PID-controller maximum output value.
.
[in] | axisIndex | Axis index. |
[in] | value | Max value. |
int setAxisCntrlOutLL | ( | int | axisIndex, |
double | value ) |
Set PID-controller minimum output value.
.
[in] | axisIndex | Axis index. |
[in] | value | Min value. |
int setAxisCommand | ( | int | axisIndex, |
int | value ) |
Set axis command word.
.
The command word defines different modes of operation for and axis. See fbDriveVirtual manual for more information.
[in] | axisIndex | Axis index. |
[in] | value | axis command word. value = 0: Jog. value = 1: Constant Velocity. value = 2: Relative Positioning. value = 3: Absolute Positioning. value = 10: Homing. |
int setAxisDeceleration | ( | int | axisIndex, |
double | value ) |
Set axis deceleration setpoint.
.
[in] | axisIndex | Axis index. |
[in] | value | Deceleration setpoint. |
int setAxisDisableAtErrorReset | ( | int | axisIndex, |
int | disable ) |
Disable axis at error reset
.
If axis is in error state and a reset command is issued,
then the axis will be disabled.
[in] | axisIndex | Axis index. |
[in] | disable | disable at error reset. |
int setAxisDrvBrakeCloseAheadTime | ( | int | axisIndex, |
int | aheadTime ) |
Set brake close ahead time .
.
Activation of the brake will be made prior to disabling the amplifier.
Note: A valid EtherCAT entry must be linked to the drive objects brake entry in order to work like intended.
[in] | axisIndex | Axis index. |
[in] | aheadTime | Ahead time in cycles. |
int setAxisDrvBrakeEnable | ( | int | axisIndex, |
int | enable ) |
Set enable of brake.
.
The brake output will follow the amplifier enable state of the drive. The brake is high when amplifier enable is high and low when amplifier enable is low.
Note: Delays are can be configured with:
-setAxisDrvBrakeOpenDelayTime()
-setAxisDrvBrakeCloseAheadTime()
Note: A valid EtherCAT entry must be linked to the drive objects brake entry in order to work like intended.
[in] | axisIndex | Axis index. |
[in] | value | Brake enable. |
int setAxisDrvBrakeOpenDelayTime | ( | int | axisIndex, |
int | delayTime ) |
Set brake open delay time .
.
The release of the brake will be delayed for an additional delay time when enabling the amplifier.
Note: A valid EtherCAT entry must be linked to the drive objects brake entry in order to work like intended.
[in] | axisIndex | Axis index. |
[in] | delayTime | Delay time in cycles. |
int setAxisDrvReduceTorqueEnable | ( | int | axisIndex, |
int | enable ) |
Set enable of reduce torque functionality.
.
The reduce torque output will go high when the axis is atTarget. The "atTarget" monitoring functionality needs to be configured in order to reduce torque at the correct time.
Note: A valid EtherCAT entry must be linked to the drive objects reduce torque entry in order to work like intended.
[in] | axisIndex | Axis index. |
[in] | value | Reduce torque enable. |
int setAxisDrvScaleDenom | ( | int | axisIndex, |
double | value ) |
Set drive output scale denominator.
.
[in] | axisIndex | Axis index. |
[in] | value | Scale denominator. |
int setAxisDrvScaleNum | ( | int | axisIndex, |
double | value ) |
Set drive output scale numerator.
.
[in] | axisIndex | Axis index. |
[in] | value | Scale numerator. |
int setAxisDrvStateMachineTimeout | ( | int | axisIndex, |
double | seconds ) |
Set drive timeout .
.
Timeout for transition between disabled->enabled when enable command is sent. For DS402 drives this time is used as timeout between the DS402 states.
[in] | axisIndex | Axis index. |
[in] | timeout | Ahead time in cycles. |
int setAxisDrvVelSetOffsetRaw | ( | int | axisIndex, |
double | value ) |
Set drive raw velocity offset.
.
Can be used to offset the velocity drive range. can be usefull
if "0" doeas not correspont to 0 speed. basically this value is
added to the raw velocity setpoint just before sent to the slave.
The value should be specified in raw units.
[in] | axisIndex | Axis index. |
[in] | value | velocity offset. |
int setAxisEmergDeceleration | ( | int | axisIndex, |
double | value ) |
Set axis emergency deceleration setpoint.
.
The emergency deceleration setpoint is used:
[in] | axisIndex | Axis index. |
[in] | value | Emergency deceleration setpoint. |
int setAxisEmergencyStopInterlock | ( | int | axisIndex, |
int | stop ) |
Init emergency stop ramp for an axis.
[in] | axisIndex | Axis index. |
[in] | stop | stop axis. |
int setAxisEnable | ( | int | axisIndex, |
int | value ) |
Set axis amplifier enable command bit.
.
[in] | axisIndex | Axis index. |
[in] | value | State of axis amplifier command bit. |
int setAxisEnableAlarmAtHardLimits | ( | int | axisIndex, |
int | value ) |
Set enable alarms at limits bit.
.
[in] | axisIndex | Axis index. |
[in] | value | Enable alarm at limits bit. |
int setAxisEnableAlarmAtSoftLimit | ( | int | axisIndex, |
int | value ) |
Enable alarm when at softlimit.
[in] | axisIndex | Axis index. |
[in] | value | alarm enable command. |
int setAxisEnableCheckEncsDiff | ( | int | axisIndex, |
int | enable ) |
Set "at target" monitoring tolerance.
.
Enable check of difference between encoders
(if more than one encoder is configutred for teh axis)
[in] | axisIndex | Axis index. |
[in] | enable | Enable monitoring of encoder diffs (if more than one enc per axis is configured). |
int setAxisEnableMotionFunctions | ( | int | axisIndex, |
int | enablePos, | ||
int | enableConstVel, | ||
int | enableHome ) |
Set enable of motion functions.
.
[in] | axisIndex | Axis index. |
[in] | enablePos | Allow positioning (default = true). |
[in] | enableConstVel | Allow constant velocity (default = true). |
[in] | enableHome | Allow homing (default = true). |
int setAxisEnableSoftLimitBwd | ( | int | axisIndex, |
int | value ) |
Set enable backward soft-limit of an axis.
.
[in] | axisIndex | Axis index. |
[out] | value | Soft-limit enable command. |
int setAxisEnableSoftLimitFwd | ( | int | axisIndex, |
int | value ) |
Set enable forward soft-limit of an axis.
.
[in] | axisIndex | Axis index. |
[in] | value | Soft-limit enable command. |
int setAxisEncAbsBits | ( | int | axisIndex, |
int | bits ) |
Set encoder register bit count for absolute data.
.
This setting is used for homing of partly absolute encoders
like resolvers (single turn absolute). The data is always
considered to be located at the least significant bits
of the encoder data (masked). See setAxisEncBits() and
setAxisEncRawMask() for more information.
[in] | axisIndex | Axis index. |
[in] | bits | Encoder register bit count for absolute data. |
int setAxisEncBits | ( | int | axisIndex, |
int | bits ) |
Set encoder register bit count.
.
The bit count is used to handle over/under flow.
[in] | axisIndex | Axis index. |
[in] | bits | Encoder register bit count. |
int setAxisEncEnableRefAtHome | ( | int | axisIndex, |
int | enable ) |
Set referance this encoder at homing.
Referance this encoder during homing. If true, this encoder will be
set to the resulting value of a hoing sequence (based on any encoder).
[in] | axisIndex | Axis index. |
[in] | enable | Enable referencing. |
int setAxisEncHomeLatchCountOffset | ( | int | axisIndex, |
int | count ) |
Set home index pulse count offset.
.
Sets number of latches before homing is made for the current
encoder beeing configured.
[in] | axisIndex | Axis index. |
[in] | count | Number of latches before homing. |
int setAxisEncInvHwReady | ( | int | axisIndex, |
int | invert ) |
Invert Encoder Ready bit.
Some hardwares, i.e. EL72XX have a inverted encoder ready bit. part. This function reads the numerator part.
Note: Encoder error bit can also be used for this purpose.
[in] | axisIndex | Axis index. |
[in] | invert | Invert encoder ready bit. |
int setAxisEncMaxDiffToPrimEnc | ( | int | axisIndex, |
double | value ) |
Set maximum position deviation between current encoder and primary encoder.
.
[in] | axisIndex | Axis index. |
[in] | value | Maximum allowed position deviation. |
int setAxisEncOffset | ( | int | axisIndex, |
double | value ) |
Set encoder offset value.
.
[in] | axisIndex | Axis index. |
[in] | value | Offset position. |
int setAxisEncPosFilterEnable | ( | int | axisIndex, |
int | enable ) |
Enables/disables encoder position filter.
.
[in] | axisIndex | Axis index. |
[in] | enable | Enable/disable (default disabled). |
int setAxisEncPosFilterSize | ( | int | axisIndex, |
int | size ) |
Set size of encoder position filter.
.
Sets the size of the low pass filter for the encoder value.
Needed when resolution of encoder is low compared to
sample rate and speed.
[in] | axisIndex | Axis index. |
[in] | size | Size of filter (default 10), filter disables if size<=1. |
int setAxisEncRawMask | ( | int | axisIndex, |
uint64_t | rawMask ) |
Set encoder raw data mask.
.
Mask to filter Encoder data from encoder 64bit data
Also calculates bit-count of encoder data. If this function
is used then the setAxisEncBits() should NOT be used since
. setAxisEncBits() also calculates and sets the a raw-mask
(but based on all data located on the least significant bits).
[in] | axisIndex | Axis index. |
[in] | rawMask | Encoder raw mask. |
int setAxisEncRefToOtherEncAtStartup | ( | int | axisIndex, |
int | encRef ) |
Reference this encoder to other encoder at startup.
.
For axes with multiple encoders an encoder can be referenced to other
encoder at startup. This is typically usefull for referencing a
relative encoder to an absolute encoder.
[in] | axisIndex | Axis index. |
[in] | encRef | Encoder reference index (first index is 0). |
int setAxisEncScaleDenom | ( | int | axisIndex, |
double | value ) |
Set the denominator part of the encoder scale.
.
The encoder scale factor is divided into one numerator and one denominator part. This function reads the denominator part.
[in] | axisIndex | Axis index. |
[in] | value | Encoder scale denominator part. |
int setAxisEncScaleNum | ( | int | axisIndex, |
double | value ) |
Set the numerator part of the encoder scale.
.
The encoder scale factor is divided into one numerator and one denominator part. This function reads the numerator part.
[in] | axisIndex | Axis index. |
[in] | value | Encoder scale numerator part. |
int setAxisEncSource | ( | int | axisIndex, |
int | value ) |
Set axis encoder data source.
.
An axis encoder can get actual position from different sources:
source = 0 : Internal (EtherCAT entry).
source = 1 : External from transformation expression (synchronization).
[in] | axisIndex | Axis index. |
[in] | value | Source type. |
int setAxisEncType | ( | int | axisIndex, |
int | value ) |
Set encoder type.
.
[in] | axisIndex | Axis index. |
[in] | value | Encoder type. value = 0: Incremental encoder. value = 1: Absolute encoder. |
int setAxisEncVelFilterSize | ( | int | axisIndex, |
int | size ) |
Set size of encoder velocity filter.
.
Sets the size of the low pass filter for velocity.
Needed when resolution of encoder is low compared to
sample rate and speed.
[in] | axisIndex | Axis index. |
[in] | size | Size of filter (default 100), needs to be >0. |
int setAxisErrorId | ( | int | axisIndex, |
int | errorId ) |
Set axis error code.
.
Set axis error, can be used to provoke an error in an axis.
[in] | axisIndex | Axis index. |
[in] | errorId | Error id. |
int setAxisExecute | ( | int | axisIndex, |
int | value ) |
Set axis execute bit.
.
An positive edge of the execute bit triggers a new command.
Motion is interlocked when the execute bit is low.
[in] | axisIndex | Axis index. |
[in] | value | Execute bit. |
int setAxisExtSetPos | ( | int | axisIndex, |
double | value ) |
Set axis external position setpoint.
.
Set the external sync/plc setpoint for an axis
[in] | axisIndex | Axis index. |
[in] | value | external position setpoint. |
int setAxisHomeAcc | ( | int | axisIndex, |
double | acc ) |
Set homing acceleration for current encoder beeing configured.
.
[in] | axisIndex | Axis index. |
[in] | value | acceleration. |
int setAxisHomeDec | ( | int | axisIndex, |
double | acc ) |
Set homing deceleration for current encoder beeing configured.
.
[in] | axisIndex | Axis index. |
[in] | value | deceleration. |
int setAxisHomePos | ( | int | axisIndex, |
double | value ) |
Set axis home reference position setpoint.
.
The home reference position setpoint is only used during referencing/homing sequence. The final referencing will be done to this position (the reference switch edge will have this positon after referenceing).
[in] | axisIndex | Axis index. |
[in] | value | Home position setpoint. |
int setAxisHomePostMoveEnable | ( | int | axisIndex, |
int | enable ) |
Set homing post movement enable.
After successfull homing sequence an absolute positioning command can be executed.
If enabled the axis will issue an motion command to the target position defined by
setAxisHomePostMoveTargetPosition()
[in] | axisIndex | Axis index. |
[in] | enable | enable functionality. |
int setAxisHomePostMoveTargetPosition | ( | int | axisIndex, |
double | targetPosition ) |
Set homing post movement target position.
After successfull homing sequence an absolute positioning command can be executed.
If enabled the axis will issue an motion command to the target position defined by
by this function
[in] | axisIndex | Axis index. |
[in] | targetPosition | Target position for post home seq movement. |
int setAxisHomeSeqId | ( | int | axisIndex, |
int | value ) |
Set homing sequence id for current encoder beeing configured.
.
[in] | axisIndex | Axis index. |
[in] | value | seq id time. |
int setAxisHomeVelOffCam | ( | int | axisIndex, |
double | dVel ) |
Set off cam referencing/homing velocity setpoint.
.
This velocity setpoint is only used during homing sequence when the reference switch already have been found. See command "getAxisHomeVelTowardsCam()" for more information.
Normally the off cam velocity setpoint is lower than the Towards cam setpoint since the accuracy of homing is depending on how accurate the signal edge of the reference switch can be identified.
[in] | axisIndex | Axis index. |
[in] | value | Velocity setpoint. |
int setAxisHomeVelTowardsCam | ( | int | axisIndex, |
double | dVel ) |
Set Towards cam referencing/homing velocity setpoint.
.
This velocity setpoint is only used during homing sequence when finding the reference switch. See command "getAxisHomeVelTowardsCam()" for more information.
Normally the off cam velocity setpoint is lower than the towards cam setpoint since the accuracy of homing is depending on how accurate the signal edge of the reference switch can be identified.
[in] | axisIndex | Axis index. |
[in] | value | Velocity setpoint. |
int setAxisJerk | ( | int | axisIndex, |
double | value ) |
Set axis maximum jerk setpoint.
.
[in] | axisIndex | Axis index. |
[in] | value | Jerk setpoint. |
int setAxisJogVel | ( | int | axisIndex, |
double | value ) |
Set axis jog velocity setpoint.
.
The jog velocity is the desired velocity of a motion when executing a jog command (command=10).
Note: The actual velocity can be higher than this setpoint.
[in] | axisIndex | Axis index. |
[in] | value | Jog velocity setpoint. |
int setAxisModRange | ( | int | axisIndex, |
double | range ) |
Set axis modulo range.
.
[in] | axisIndex | Axis index. |
[in] | value | modulo range. |
int setAxisModType | ( | int | axisIndex, |
int | type ) |
Set axis modulo motion type.
.
Used for positioning if modulo range is set (setAxisModRange())
to a value greater than 0.
[in] | axisIndex | Axis index. |
[in] | type | Modulo type. type = 0 : ECMC_MOD_MOTION_NORMAL 1: ECMC_MOD_MOTION_FWD (Always forward) 2: ECMC_MOD_MOTION_BWD (always backward) 3: ECMC_MOD_MOTION_CLOSEST (closest path) |
int setAxisMonAnalogInterlockPolarity | ( | int | axisIndex, |
int | value ) |
Set polarity of motion axis interlock from EtherCAT entry.
.
The motion can be interlocked based on an EtherCAT entry. See command linkEcEntryToAxisMon() for more information.
[in] | axisIndex | Axis index. |
[in] | value | Polarity analog interlock (inversed from digital interlock). 0 = High value is bad. 1 = Low value is bad. |
int setAxisMonAnalogInterlockRawLimit | ( | int | axisIndex, |
double | value ) |
Set analog interlock raw value limit .
.
The motion can be interlocked based on an EtherCAT entry. See command linkEcEntryToAxisMon() for more information.
[in] | axisIndex | Axis index. |
[in] | value | raw value limit. |
int setAxisMonAtTargetTime | ( | int | axisIndex, |
int | value ) |
Set "at target" monitoring time (cycles).
.
The motion will be considered to have reached the target position when the difference between the actual position and target position is within a certain tolerance for a this number of cycles, see command setAxisMonAtTargetTol() for more information.
Note: The "at target" functionality needs to be enabled by the command setAxisMonEnableAtTargetMon().
[in] | axisIndex | Axis index. |
[in] | value | At target time (cycles) . |
int setAxisMonAtTargetTol | ( | int | axisIndex, |
double | value ) |
Set "at target" monitoring tolerance.
.
The motion will be considered to have reached the target position when the difference between the actual position and target position is within this tolerance for a certain number of cycles, see command setAxisMonAtTargetTime() for more information.
Note: The "at target" functionality needs to be enabled by the command setAxisMonEnableAtTargetMon().
[in] | axisIndex | Axis index. |
[in] | value | At target tolerance. |
int setAxisMonCntrlOutHL | ( | int | axisIndex, |
double | value ) |
Set monitoring controller output high limit.
.
Set maximum allowed controller output for an axis.
A high controller output during a motion could be generated by bad tuning or mechanical issues, see command setAxisMonEnableCntrlOutHLMon()for more information.
[in] | axisIndex | Axis index. |
[in] | value | Maximum allowed controller output. |
int setAxisMonEnableAnalogInterlock | ( | int | axisIndex, |
int | value ) |
Enable motion axis interlock from analog EtherCAT entry.
A typical usecase is temperature sensors.
.
The motion can be interlocked based on an analog EtherCAT entry. See command linkEcEntryToAxisMon() for more information.
[in] | axisIndex | Axis index. |
[in] | value | Enable external interlock. |
int setAxisMonEnableAtTargetMon | ( | int | axisIndex, |
int | value ) |
Enable "at target" monitoring.
.
The motion will be considered to have reached the target position when the difference between the actual position and target position is within a certain tolerance for a this number of cycles, see command setAxisMonAtTargetTol() and setAxisMonAtTargetTime() for more information.
[in] | axisIndex | Axis index. |
[in] | value | Enable monitoring . |
int setAxisMonEnableCntrlOutHLMon | ( | int | axisIndex, |
int | value ) |
Enable controller output high limit monitoring.
.
The controller output high limit monitoring functionality monitors the controller output. The motion can be interlocked if the controller output exceeds a certain tolerance, see command setAxisMonCntrlOutHL() for more information.
A high controller output during a motion could be generated by bad tuning or mechanical issues.
[in] | axisIndex | Axis index. |
[in] | value | Enable monitoring. |
int setAxisMonEnableExternalInterlock | ( | int | axisIndex, |
int | value ) |
Enable motion axis interlock from EtherCAT entry.
.
The motion can be interlocked based on an EtherCAT entry. See command linkEcEntryToAxisMon() for more information.
[in] | axisIndex | Axis index. |
[in] | value | Enable external interlock. |
int setAxisMonEnableLagMon | ( | int | axisIndex, |
int | value ) |
Enable position lag monitoring.
.
The position lag monitoring functionality monitors the difference between the actual position and trajectory generated setpoint position. The motion can be interlocked if the difference exceeds a certain tolerance for a certain number of cycles, see command setAxisMonPosLagTime() and setAxisMonPosLagTol() for more information.
A big position lag error during a motion could be generated by bad tuning or mechanical issues.
[in] | axisIndex | Axis index. |
[in] | value | monitoring enabled. . |
int setAxisMonEnableMaxVel | ( | int | axisIndex, |
int | value ) |
Enable maximum velocity monitoring (over speed).
.
The motion will be interlocked if the actual velocity or the velocity setpoint exceeds the limit value set by the command setAxisMonMaxVel().
[in] | axisIndex | Axis index. |
[in] | value | Enable monitoring. |
int setAxisMonEnableVelocityDiff | ( | int | axisIndex, |
int | value ) |
Enable monitoring of velocity difference.
.
[in] | axisIndex | Axis index. |
[in] | value | Enable monitoring. |
int setAxisMonExtHWInterlockPolarity | ( | int | axisIndex, |
int | value ) |
Set polarity of motion axis interlock from EtherCAT entry.
.
The motion can be interlocked based on an EtherCAT entry. See command linkEcEntryToAxisMon() for more information.
[in] | axisIndex | Axis index. |
[in] | value | Polarity external interlock. 0 = NC (High is OK) Default. 1 = NO (Low is OK). |
int setAxisMonHomeSwitchPolarity | ( | int | axisIndex, |
int | value ) |
Set polarity of home switch.
.
[in] | axisIndex | Axis index. |
[in] | value | Polarity. 0 = NC (High is 1) Default. 1 = NO (Low is 1). |
int setAxisMonLatchLimit | ( | int | axisIndex, |
int | value ) |
Set latch limit settings.
.
If set: limit switch is latched even if just a "bounce"
Then motion must stop before a new motion can be activated.
Otherwise motion will be allowed as long as limit is OK
[in] | axisIndex | Axis index. |
[in] | value | latch on limit setting value. 0: disable 1: enable (default) |
int setAxisMonLimitBwdPolarity | ( | int | axisIndex, |
int | value ) |
Set polarity of hard low limit switch.
.
[in] | axisIndex | Axis index. |
[in] | value | Polarity. 0 = NC (High is OK) Default. 1 = NO (Low is OK). |
int setAxisMonLimitFwdPolarity | ( | int | axisIndex, |
int | value ) |
Set polarity of hard high limit switch.
.
[in] | axisIndex | Axis index. |
[in] | value | Polarity. 0 = NC (High is OK) Default. 1 = NO (Low is OK). |
int setAxisMonMaxVel | ( | int | axisIndex, |
double | value ) |
Set maximum allowed velocity.
.
The motion will be interlocked if the actual velocity or the velocity setpoint exceeds this value.
Note: The maximum velocity monitoring needs to be enabled with the command setAxisMonEnableMaxVel().
[in] | axisIndex | Axis index. |
[in] | value | Maximum velocity. |
int setAxisMonMaxVelDriveILDelay | ( | int | axisIndex, |
int | value ) |
Set velocity monitoring interlock delay for drive.
.
The over speed interlock for the drive can be delayed in order ensure that encoder noise reulsting in a high velocity will not interlock motion. If the overspeed interlock is still active after this amount of cycles the drive will be interlocked and the amplifier will be turned off.
Note: The maximum velocity monitoring needs to be enabled with the command setAxisMonEnableMaxVel().
[in] | axisIndex | Axis index. |
[in] | value | Delay cycles. |
int setAxisMonMaxVelTrajILDelay | ( | int | axisIndex, |
int | value ) |
Set velocity monitoring interlock delay for trajectory.
.
The over speed interlock for the trajectory generator can be delayed in order ensure that encoder noise reulsting in a high velocity will not interlock motion. If the overspeed interlock is still active after this amount of cycles the trajectory generator will be interlocked and velocity will be ramped down to stand still.
Note: The maximum velocity monitoring needs to be enabled with the command setAxisMonEnableMaxVel().
[in] | axisIndex | Axis index. |
[in] | value | Delay cycles. |
int setAxisMonPosLagTime | ( | int | axisIndex, |
int | value ) |
Set position lag monitoring time (cycles).
.
The position lag monitoring functionality monitors the difference between the actual position and trajectory generated setpoint position. The motion can be interlocked if the difference exceeds a certain tolerance for a this number of cycles, see command setAxisMonPosLagTol() for more information.
A big position lag error during a motion could be generated by bad tuning or mechanical issues.
Note: The position lag functionality needs to be enabled with the command setAxisMonEnableLagMon().
[in] | axisIndex | Axis index. |
[in] | value | Position lag time (cycles). |
int setAxisMonPosLagTol | ( | int | axisIndex, |
double | value ) |
Set position lag maximum monitoring tolerance.
.
The position lag monitoring functionality monitors the difference between the actual position and trajectory generated setpoint position. The motion can be interlocked if the difference exceeds this tolerance for a certain number of cycles, see command setAxisMonPosLagTime() for more information.
A big position lag error during a motion could be generated by bad tuning or mechanical issues.
Note: The position lag functionality needs to be enabled with the command setAxisMonEnableLagMon().
[in] | axisIndex | Axis index. |
[in] | value | Position lag maximum tolerance. |
int setAxisMonVelDiffDriveILDelay | ( | int | axisIndex, |
int | value ) |
Set drive interlock filter time in cycles for velocity difference monitoring.
.
[in] | axisIndex | Axis index. |
[in] | value | Time in cycles. |
int setAxisMonVelDiffTol | ( | int | axisIndex, |
double | value ) |
Set maximum allowed difference between setpoint speed and actual speedĀ±n.
[in] | axisIndex | Axis index. |
[in] | value | velocity difference. |
int setAxisMonVelDiffTrajILDelay | ( | int | axisIndex, |
int | value ) |
Set trajectory interlock filter time in cycles for velocity difference monitoring.
.
[in] | axisIndex | Axis index. |
[in] | value | Time in cycles. |
int setAxisPLCEnable | ( | int | axisIndex, |
int | value ) |
Enable axis sync PLC expression.
.
The axis sync PLC expression for an axis can be enabled/disabled. see command setAxisPLCExpr() for more information.
[in] | axisIndex | Axis index. |
[in] | value | Enable. |
int setAxisPLCEncVelFilterEnable | ( | int | axisIndex, |
int | enable ) |
Enables/disables velocity filter of external actual value.
.
NOTE: This filter is currentlly not used.
[in] | axisIndex | Axis index. |
[in] | enable | enable filter. |
int setAxisPLCEncVelFilterSize | ( | int | axisIndex, |
int | size ) |
Set size of external encoder velocity filter.
.
NOTE: This filter is currentlly not used.
Sets the size of the filter for velocity from "external" PLC code.
[in] | axisIndex | Axis index. |
[in] | size | Size of filter (default 100). |
int setAxisPLCTrajVelFilterEnable | ( | int | axisIndex, |
int | enable ) |
Enables/disables velocity filter of external setpoint.
.
This filter is needed in order to have a smoth feedforward value when
reciving setpoints form an PLC. If filter is disabled the velocity will
be calculated based on the last two postion values recived from PLC. In many
cases this will result in a "unstable signal" depending onresoltions of the
values involved in the calculation. Using a filter will smoth the velocity
feed forward value and will thereby result in a smoother motion.
[in] | axisIndex | Axis index. |
[in] | enable | enable filter. |
int setAxisPLCTrajVelFilterSize | ( | int | axisIndex, |
int | size ) |
Set size of external trajectory velocity filter.
.
Sets the size of the filter for velocity from "external" PLC code.
This filter is needed in order to have a smoth feedforward value when
reciving setpoints form an PLC. If filter is disabled the velocity will
be calculated based on the last two postion values recived from PLC. In many
cases this will result in a "unstable signal" depending onresoltions of the
values involved in the calculation. Using a filter will smoth the velocity
feed forward value and will thereby rresult in a smoother motion.
[in] | axisIndex | Axis index. |
[in] | size | Size of filter (default 100). |
int setAxisSeqTimeout | ( | int | axisIndex, |
int | value ) |
Set sequence timeout time in seconds.
.
The motion sequences (mainly related to homing) can be aborted if not finalized within a certain time. This is to prevent that the motion control hangs in one sequence. This could happen if the reference switch for some reason is not encountered.
[in] | axisIndex | Axis index. |
[in] | value | Timeout time. |
int setAxisSoftLimitPosBwd | ( | int | axisIndex, |
double | value ) |
Set backward soft-limit position.
.
[in] | axisIndex | Axis index. |
[in] | value | Soft-limit position. |
int setAxisSoftLimitPosFwd | ( | int | axisIndex, |
double | value ) |
Set forward soft-limit position.
.
[in] | axisIndex | Axis index. |
[in] | value | Soft-limit position. |
int setAxisTargetPos | ( | int | axisIndex, |
double | value ) |
Set axis target position setpoint.
.
The target position is the desired end setpoint of a motion.
[in] | axisIndex | Axis index. |
[in] | value | Target position setpoint. |
int setAxisTargetVel | ( | int | axisIndex, |
double | value ) |
Set axis target velocity setpoint.
.
The target velocity is the desired velocity of a motion.
Note: The actual velocity can be higher than this setpoint.
[in] | axisIndex | Axis index. |
[in] | value | Target velocity setpoint. |
int setAxisTrajSource | ( | int | axisIndex, |
int | value ) |
Set axis trajectory data source.
.
An axis trajectory generator can get position setpoints from different sources:
source = 0 : Internal (normal trajectory generation).
source = 1 : External from transformation expression (synchronization).
[in] | axisIndex | Axis index. |
[in] | value | Source type. |
int setAxisTrajStartPos | ( | int | axisIndex, |
double | value ) |
Set axis trajectory start position. NOTE: NOT USED!!.
.
[in] | axisIndex | Axis index. |
[in] | value | Start position. |
int setDiagAxisEnable | ( | int | enable | ) |
Enable detailed motion diagnostics printouts.
.
The detailed motion diagnostics prints valuable motion related information for one axis.
See setDiagAxisIndex() and setDiagAxisFreq() for more information.
[in] | enable | Enable printouts. |
int setDiagAxisFreq | ( | int | freq | ) |
Set axis frequency of detailed motion diagnostics printouts.
.
[in] | freq | Printout frequency. |
int setDiagAxisIndex | ( | int | axisIndex | ) |
Set axis index for detailed motion diagnostics.
.
[in] | axisIndex | Index of axis. |
int setPosition | ( | int | axisIndex, |
double | homePositionSet ) |
set position.
used by epics autosave to restore axis value after ioc reboot.
[in] | axisIndex | Axis index. |
[in] | homePositionSet | Position to set at homing. |
int stopMotion | ( | int | axisIndex, |
int | killAmplifier ) |
Stop axis.
.
[in] | axisIndex | Axis index. |
[in] | killAmplifier | Disable amplifier. |