INOS
cinosbaseaxis.h File Reference
#include <cinosbus.h>
#include <cinosbaseramp.h>
Include dependency graph for cinosbaseaxis.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SINOSBaseAxis
 Descriptor structure used to configure a base axis. It is usually only used in conjunction with SINOSPhysicalAxis. The dt2 table name is "INOS-BASE-AXIS", see also Axis. More...
 
class  CINOSBaseAxis
 Provides axis functionality. More...
 

Macros

#define DF_INOS_BASE_AXIS_DBT   "INOS-BASE-AXIS"
 
#define DF_INOS_MAX_AXIS   256
 
#define DF_INOS_AXIS_STATE_DISABLED   -1
 
#define DF_INOS_AXIS_STATE_UNDEFINED   0
 
#define DF_INOS_AXIS_STATE_OFF   0
 
#define DF_INOS_AXIS_STATE_ACTIVE   1
 
#define DF_INOS_AXIS_STATE_READY   2
 
#define DF_INOS_AXIS_STATE_PEACE   2
 
#define DF_INOS_AXIS_STATE_PULL   3
 
#define DF_INOS_AXIS_STATE_BREAK   4
 
#define DF_INOS_AXIS_STATE_COUPLED   5
 
#define DF_INOS_AXIS_STATE_FORCE   6
 
#define DF_INOS_AXIS_STATE_ACTIVATING   8
 
#define DF_INOS_AXIS_STATE_INACTIVATING   9
 
#define DF_INOS_AXIS_STATE_SYNCING   10
 
#define DF_INOS_AXIS_STATE_MOVING   11
 
#define DF_INOS_AXIS_STATE_ENDLESS   12
 
#define DF_INOS_AXIS_STATE_TOGGLE   13
 
#define DF_INOS_AXIS_STATE_STOPPING   14
 
#define DF_INOS_AXIS_STATE_BREAKING   15
 
#define DF_INOS_AXIS_STATE_EMSTOPPING   16
 
#define DF_INOS_AXIS_STATE_MOVINGEX   17
 
#define DF_INOS_AXIS_STATE_CURSOR   18
 
#define DF_INOS_AXIS_STATE_TRACK   19
 
#define DF_INOS_AXIS_STATE_MOVINGAPP   20
 
#define DF_INOS_AXIS_STATE_MOVINGDEP   21
 
#define DF_INOS_AXIS_STATE_RELAXING   22
 
#define DF_INOS_AXIS_STATE_UMOVE   23
 
#define DF_INOS_AXIS_STATE_SEARCHING   24
 
#define DF_INOS_AXIS_STATE_DEPARTING   25
 
#define DF_INOS_AXIS_STATES   27
 
#define DF_INOS_AXIS_SUBSTATE_TRACK_FOLLOW   0
 
#define DF_INOS_AXIS_SUBSTATE_TRACK_KEEP   1
 
#define DF_INOS_AXIS_CMD_ACTIVATE   0x00000001
 
#define DF_INOS_AXIS_CMD_INACTIVATE   0x00000002
 
#define DF_INOS_AXIS_CMD_SYNC   0x00000004
 
#define DF_INOS_AXIS_CMD_MOVE   0x00000008
 
#define DF_INOS_AXIS_CMD_ENDLESS   0x00000010
 
#define DF_INOS_AXIS_CMD_STOP   0x00000020
 
#define DF_INOS_AXIS_CMD_BREAK   0x00000040
 
#define DF_INOS_AXIS_CMD_CONTINUE   0x00000080
 
#define DF_INOS_AXIS_CMD_EMSTOP   0x00000100
 
#define DF_INOS_AXIS_CMD_UPDATE   0x00000200
 
#define DF_INOS_AXIS_CMD_TOGGLE   0x00000400
 
#define DF_INOS_AXIS_CMD_MOVEEX   0x00002000
 
#define DF_INOS_AXIS_CMD_HANDLE_CACHE   0x00004000
 
#define DF_INOS_AXIS_CMD_CURSOR   0x00008000
 
#define DF_INOS_AXIS_CMD_TRACK   0x00010000
 
#define DF_INOS_AXIS_CMD_MOVESEG   0x00020000
 
#define DF_INOS_AXIS_CMD_COUPLING   0x00040000
 
#define DF_INOS_AXIS_CMD_PULL   0x00080000
 
#define DF_INOS_AXIS_CMD_MOVEAPP   0x00100000
 
#define DF_INOS_AXIS_CMD_MOVEDEP   0x00200000
 
#define DF_INOS_AXIS_CMD_ENABLE   0x00400000
 
#define DF_INOS_AXIS_CMD_DISABLE   0x00800000
 
#define DF_INOS_AXIS_CMD_COMMUTATE   0x01000000
 
#define DF_INOS_AXIS_CMD_MOVETIME   0x02000000
 
#define DF_INOS_AXIS_CMD_RELAX   0x04000000
 
#define ER_INOS_AXIS_REJECTED   0x00000001
 
#define ER_INOS_AXIS_FAILED   0x00000002
 
#define ER_INOS_AXIS_POS_WINDOW   0x00000004
 
#define ER_INOS_AXIS_CPD_ERROR   0x00000008
 
#define ER_INOS_AXIS_CPD_DELTA   0x00000010
 
#define ER_INOS_AXIS_CPD_CORR   0x00000020
 
#define ER_INOS_AXIS_COM_FAILED   0x00000040
 
#define ER_INOS_AXIS_RAMP_LIMIT   0x00000080
 
#define ER_INOS_AXIS_REJECTED_SOS   0x00000100
 
#define ER_INOS_AXIS_PULL_UNDERRUN   0x00000200
 
#define ER_INOS_AXIS_SLS_VIOLATION   0x00000400
 
#define ER_INOS_AXIS_SOS_VIOLATION   0x00000800
 
#define ER_INOS_AXIS_CORE_MISMATCH   0x00001000
 
#define ER_INOS_AXIS_FORCE_CONTROL   0x00002000
 
#define ER_INOS_AXIS_CONTROL   0x00004000
 
#define ER_INOS_AXIS_RAMP   0x00008000
 
#define ER_INOS_AXIS_HOOK   0x00010000
 
#define WR_INOS_AXIS_RAMP   0x00008000
 
#define WR_INOS_AXIS_CONTROL   0x00004000
 
#define WR_INOS_AXIS_IGNORED   0x00000001
 
#define WR_INOS_AXIS_CPD_CORR_IGNORED   0x00000002
 
#define WR_INOS_AXIS_COUPLED   0x00000008
 
#define WR_INOS_AXIS_EME_STOPPED   0x00000010
 
#define DF_INOS_AXIS_FLAG_ZERO   0x00000001
 
#define DF_INOS_AXIS_FLAG_NORM   0x00000002
 
#define DF_INOS_AXIS_FLAG_INCR   0x00000004
 
#define DF_INOS_AXIS_FLAG_SYNC   0x00000008
 
#define DF_INOS_AXIS_FLAG_EDONE   0x00000010
 
#define DF_INOS_AXIS_FLAG_AACC   0x00000020
 
#define DF_INOS_AXIS_FLAG_CURL   0x00000040
 
#define DF_INOS_AXIS_FLAG_LSNCD   0x00000080
 
#define DF_INOS_AXIS_FLAG_DISMP   0x00000100
 
#define DF_INOS_AXIS_FLAG_RNDNR   0x00000200
 
#define DF_INOS_AXIS_FLAG_PWCL   0x00000400
 
#define DF_INOS_AXIS_FLAG_DSAP   0x00000800
 
#define DF_INOS_AXIS_FLAG_SAFETY   0x00001000
 
#define DF_INOS_AXIS_FLAG_ESPULL   0x00002000
 
#define DF_INOS_AXIS_FLAG_IGNORE_CORE   0x00004000
 
#define DF_INOS_AXIS_FLAG_INPUT_SHAPING_ACTIVE   0x20000000
 
#define DF_INOS_AXIS_FLAG_WINDOW   0x40000000
 
#define DF_INOS_AXIS_FLAG_SNCD   0x80000000
 
#define DF_INOS_AXIS_SYNC_NOADJ   0x00
 
#define DF_INOS_AXIS_SYNC_ADJUST   0x01
 
#define DF_INOS_AXIS_SYNC_STOP   0x02
 
#define DF_INOS_AXIS_NORM_AFTER   0x00
 
#define DF_INOS_AXIS_NORM_LIVE   0x01
 
#define DF_INOS_AXIS_NORM_POSITIVE   0x40
 
#define DF_INOS_AXIS_NORM_ROUND   0x80
 
#define DF_INOS_AXIS_NORM_MOVE_DIR_NO   0x00
 
#define DF_INOS_AXIS_NORM_MOVE_DIR_POS   0x01
 
#define DF_INOS_AXIS_NORM_MOVE_DIR_NEG   0x02
 
#define DF_INOS_AXIS_NORM_MOVE_DIR_SHORT   0x03
 
#define DF_INOS_AXIS_NORM_MOVE_DIR_SHORT_EX   0x04
 
#define DF_INOS_AXIS_SAFETY_EMGSTOP   0x00
 
#define DF_INOS_AXIS_SAFETY_AUTO   0x01
 
#define DF_INOS_AXIS_SAFETY_NONE   0x02
 
#define DF_INOS_AXIS_EMGT_STOP   0x00
 
#define DF_INOS_AXIS_EMGT_STOP_INACTIVATE   0x01
 
#define DF_INOS_AXIS_EMGT_INACTIVATE   0x02
 
#define DF_INOS_AXIS_EMGT_NONE   0x03
 
#define DF_INOS_AXIS_EMGT_STOP_POSITION   0x04
 
#define DF_INOS_AXIS_EMGT_STOP_POSITION_INACTIVATE   0x05
 
#define DF_PRECONFIGURED_EME_STOP_TYPE   0xffff
 
#define DF_PRECONFIGURED_EME_STOP_POS_OR_STOP   0xfffe
 
#define DF_PRECONFIGURED_EME_STOP_DELAY   0xffff
 
#define DF_INOS_AXIS_PST_STANDARD   0x00000000
 
#define DF_INOS_AXIS_PST_WINDOW   0x00000001
 
#define DF_INOS_AXIS_PST_WINDOW_OPT   0x00000002
 
#define DF_INOS_BASE_AXIS_OPT_EARLY_DONE   0x00000001
 
#define DF_INOS_BASE_AXIS_OPT_AUTO_ACCEPT   0x00000002
 
#define DF_INOS_BASE_AXIS_OPT_LIMITS_IF_SNCD   0x00000004
 
#define DF_INOS_BASE_AXIS_OPT_MAPPING_DISABLED   0x00000008
 
#define DF_INOS_BASE_AXIS_OPT_NORM_ENABLED   0x00000010
 
#define DF_INOS_BASE_AXIS_OPT_CHECK_LIMITS   0x00000020
 
#define DF_INOS_BASE_AXIS_OPT_LIFETIME   0x00000040
 
#define DF_INOS_BASE_AXIS_OPT_SETPOS_DISABLED   0x00000080
 
#define DF_INOS_BASE_AXIS_OPT_EMGSTOP_PULL   0x00000100
 
#define DF_INOS_BASE_AXIS_OPT_FORCE_CONTROL   0x00000200
 
#define DF_INOS_BASE_AXIS_OPT_IGNORE_CORE   0x00000400
 
#define DF_INOS_BASE_AXIS_LIMIT_S   0x00000001
 
#define DF_INOS_BASE_AXIS_LIMIT_V_OF_S   0x00000002
 
#define DF_INOS_BASE_AXIS_LIMIT_A_OF_S   0x00000004
 
#define DF_INOS_BASE_AXIS_LIMIT_B_OF_S   0x00000008
 
#define DF_INOS_BASE_AXIS_LIMIT_S_V_CONS   0x00000010
 
#define DF_INOS_BASE_AXIS_LIMIT_V   0x00000020
 
#define DF_INOS_BASE_AXIS_LIMIT_A_OF_V   0x00000040
 
#define DF_INOS_BASE_AXIS_LIMIT_B_OF_V   0x00000080
 
#define DF_INOS_BASE_AXIS_LIMIT_A   0x00000100
 
#define DF_INOS_BASE_AXIS_LIMIT_B   0x00000200
 
#define DF_INOS_BASE_AXIS_LIMIT_BRAKE   0x00000400
 
#define DF_INOS_BASE_AXIS_LIMIT_J_OF_S   0x00000800
 
#define DF_INOS_BASE_AXIS_LIMIT_J_OF_V   0x00001000
 
#define DF_INOS_BASE_AXIS_LIMIT_J_OF_A   0x00002000
 
#define DF_INOS_BASE_AXIS_LIMIT_J   0x00004000
 
#define INOS_AXIS_CORE_MISMATCH_IS_ERROR(ret)
 
#define SAFETY_CHECK_SOS()
 
#define SAFETY_CHECK_SOS_SYNC(apSync)
 
#define SAFETY_IGNORE_IF_SOS()
 

Variables

end of doxygen exclude typedef real64(* tpGetter )(void *apVal)
 

Macro Definition Documentation

◆ DF_INOS_AXIS_EMGT_INACTIVATE

#define DF_INOS_AXIS_EMGT_INACTIVATE   0x02

In case of an emergency stop, directly inactivate the axis

◆ DF_INOS_AXIS_EMGT_NONE

#define DF_INOS_AXIS_EMGT_NONE   0x03

Ignore the emergency stop. This type is only useful if the user handles the situation itself

◆ DF_INOS_AXIS_EMGT_STOP

#define DF_INOS_AXIS_EMGT_STOP   0x00

In case of an emergency stop, use the configured 'Emergency' speed set or emergency deceleration and jerk to stop the axis. Let the axis active after stop (also known as SS2)

◆ DF_INOS_AXIS_EMGT_STOP_INACTIVATE

#define DF_INOS_AXIS_EMGT_STOP_INACTIVATE   0x01

In case of an emergency stop, use the configured 'Emergency' speed set or emergency deceleration and jerk to stop the axis, wait the configured time and inactivate the axis (SS1) see also SINOSBaseAxis::m_uEmergencyDelay

◆ DF_INOS_AXIS_EMGT_STOP_POSITION

#define DF_INOS_AXIS_EMGT_STOP_POSITION   0x04

In case of an emergency stop, use the configured 'Emergency' speed set or emergency deceleration and jerk to move the axis to the requested position and let the axis active after stop see also SINOSBaseAxis::m_rEmergencyPosition

◆ DF_INOS_AXIS_EMGT_STOP_POSITION_INACTIVATE

#define DF_INOS_AXIS_EMGT_STOP_POSITION_INACTIVATE   0x05

In case of an emergency stop, use the configured 'Emergency' speed set or emergency deceleration and jerk to move the axis to the requested position, wait the configured time and inactivate the axis see also SINOSBaseAxis::m_uEmergencyDelay and SINOSBaseAxis::m_rEmergencyPosition

◆ DF_INOS_AXIS_NORM_AFTER

#define DF_INOS_AXIS_NORM_AFTER   0x00

Norm position after move. The position will not be normed while a move is running, means that the position may exceed the "norm pos" during a move (e.g. reach 7200.0 degree, although the norm pos is set to 360.0 degree)

◆ DF_INOS_AXIS_NORM_LIVE

#define DF_INOS_AXIS_NORM_LIVE   0x01

Norm position live. The position is normalised even during a move.

◆ DF_INOS_AXIS_NORM_MOVE_DIR_NEG

#define DF_INOS_AXIS_NORM_MOVE_DIR_NEG   0x02

If axis position norming is active, a move always goes into negative direction, e.g. assume an axis is normed to 0..360° and the actual position is 350°, a command Move(360.0) will be done by moving to 0°

◆ DF_INOS_AXIS_NORM_MOVE_DIR_NO

#define DF_INOS_AXIS_NORM_MOVE_DIR_NO   0x00

If axis position norming is active, no special move direction specified

◆ DF_INOS_AXIS_NORM_MOVE_DIR_POS

#define DF_INOS_AXIS_NORM_MOVE_DIR_POS   0x01

If axis position norming is active, a move always goes into positive direction, e.g. assume an axis is normed to 0..360° and the actual position is 10°, a command Move(0.0) will be done by moving to 360°

◆ DF_INOS_AXIS_NORM_MOVE_DIR_SHORT

#define DF_INOS_AXIS_NORM_MOVE_DIR_SHORT   0x03

If axis position norming is active, a move always takes the shortest way, e.g. assume an axis is normed to 0..360° and the actual position is 10°, a command Move(360.0) will be done by moving to 0°

◆ DF_INOS_AXIS_NORM_MOVE_DIR_SHORT_EX

#define DF_INOS_AXIS_NORM_MOVE_DIR_SHORT_EX   0x04

If axis position norming is active, a move always takes the shortest way, except for a full turn. Assume an axis is normed to 0..360° and the actual position is 0.0, a command Move(360.0) will do a full turn although the shortest way would be a no move at all

◆ DF_INOS_AXIS_NORM_POSITIVE

#define DF_INOS_AXIS_NORM_POSITIVE   0x40

Norm to only positive values

◆ DF_INOS_AXIS_NORM_ROUND

#define DF_INOS_AXIS_NORM_ROUND   0x80

Use 'round' instead of 'trunc'. Rounding should most probably be enabled for new applications. Truncation mode is merely still available for backward compatibility

◆ DF_INOS_AXIS_PST_STANDARD

#define DF_INOS_AXIS_PST_STANDARD   0x00000000

Positioning type STANDARD : move ends when ramp is in peace

◆ DF_INOS_AXIS_PST_WINDOW

#define DF_INOS_AXIS_PST_WINDOW   0x00000001

Positioning type WINDOW : move ends when ramp is in peace and the position check error was smaller than SINOSBaseAxis::m_rPosTolerance for at least SINOSBaseAxis::m_uPosTime [ms]. The move is NEVER shorter than SINOSBaseAxis::m_uPosTime

◆ DF_INOS_AXIS_PST_WINDOW_OPT

#define DF_INOS_AXIS_PST_WINDOW_OPT   0x00000002

Positioning type WINDOW optimized : move ends when ramp is in peace and the position check error was smaller than SINOSBaseAxis::m_rPosTolerance for at least SINOSBaseAxis::m_uPosTime [ms] or during the whole move. The move can be shorter than SINOSBaseAxis::m_uPosTime

◆ DF_INOS_AXIS_SAFETY_AUTO

#define DF_INOS_AXIS_SAFETY_AUTO   0x01

Fully automatic handling of all safety levels. In case of a SLS, the axis speed is reduced accordingly. In case of a SOS the axis is paused (the move stays active) If the SOS is left, the axis automatically continues a previously paused move.

◆ DF_INOS_AXIS_SAFETY_EMGSTOP

#define DF_INOS_AXIS_SAFETY_EMGSTOP   0x00

In case of an SOS, emit an emergency stop to the axis, which cancels a running command. In case of a SLS the axis speed is reduced accordingly.

◆ DF_INOS_AXIS_SAFETY_NONE

#define DF_INOS_AXIS_SAFETY_NONE   0x02

Ignores all safety levels. The application is responsible itself to react accordingly

◆ DF_INOS_BASE_AXIS_OPT_AUTO_ACCEPT

#define DF_INOS_BASE_AXIS_OPT_AUTO_ACCEPT   0x00000002

Setting this option tells the system to always accept all axis errors before activating the axis. It is recommended to use this option because it simplifies application code. If one is working with this option and an axis is on error, it is sufficient to just CINOSPhysicalAxis::InActivate and CINOSPhysicalAxis::Activate the axis to recover

◆ DF_INOS_BASE_AXIS_OPT_CHECK_LIMITS

#define DF_INOS_BASE_AXIS_OPT_CHECK_LIMITS   0x00000020

Setting this option tells the system to permanently check all axis limits like speed, acceleration and deceleration. This option is helpful to find trajectory generation errors, e.g. in an own axis pulling code

◆ DF_INOS_BASE_AXIS_OPT_EARLY_DONE

#define DF_INOS_BASE_AXIS_OPT_EARLY_DONE   0x00000001

Setting this option tells the system to mark a move as done one tick before is is really done. This can improve performance but should only be used if one really knows what he/she is doing

◆ DF_INOS_BASE_AXIS_OPT_EMGSTOP_PULL

#define DF_INOS_BASE_AXIS_OPT_EMGSTOP_PULL   0x00000100

Setting this option tells the system to emit an emergency stop ramp in case of an axis error during a pull session. It has the advantage, that the user does not have to take care about that.

◆ DF_INOS_BASE_AXIS_OPT_FORCE_CONTROL

#define DF_INOS_BASE_AXIS_OPT_FORCE_CONTROL   0x00000200

Setting this option enables force control functionality.

◆ DF_INOS_BASE_AXIS_OPT_IGNORE_CORE

#define DF_INOS_BASE_AXIS_OPT_IGNORE_CORE   0x00000400

Ignore core mismatch failure/. This option should only be used in a desperate situation, where it is not easy to adjust the application code accordingly.

◆ DF_INOS_BASE_AXIS_OPT_LIFETIME

#define DF_INOS_BASE_AXIS_OPT_LIFETIME   0x00000040

Use this option if you want the system to accumulate the overall moved distance. This option only works if the axis is part of a McRobot module and the used Indel target has an NvRam option.

◆ DF_INOS_BASE_AXIS_OPT_LIMITS_IF_SNCD

#define DF_INOS_BASE_AXIS_OPT_LIMITS_IF_SNCD   0x00000004

Setting this option tells the system to check for axis limits only if the axis was successfully synched

◆ DF_INOS_BASE_AXIS_OPT_MAPPING_DISABLED

#define DF_INOS_BASE_AXIS_OPT_MAPPING_DISABLED   0x00000008

Setting this option tells the system to permanently disable axis mapping mechanisms. If no mapping mechanisms are used, one can set this option to improve performance due to the fact, that less system hooks are set up for this axis

◆ DF_INOS_BASE_AXIS_OPT_NORM_ENABLED

#define DF_INOS_BASE_AXIS_OPT_NORM_ENABLED   0x00000010

Enable axis norming already at startup. Norm type, move direction and position can be defined with SINOSBaseAxis::m_uNormMode, SINOSBaseAxis::NormMoveDir and SINOSBaseAxis::m_rNormPos

◆ DF_INOS_BASE_AXIS_OPT_SETPOS_DISABLED

#define DF_INOS_BASE_AXIS_OPT_SETPOS_DISABLED   0x00000080

Setting this option tells the system to disable the methods CINOSPhysicalAxis::SetActPosition and CINOSPhysicalAxis::SetRealPosition after the axis was successfully synced. This can help to avoid crashes due to accidentally changed positions.

◆ DF_PRECONFIGURED_EME_STOP_POS_OR_STOP

#define DF_PRECONFIGURED_EME_STOP_POS_OR_STOP   0xfffe

If the configured emergency type is 'stop position' or 'stop position and inactivate' , use 'stop position'. In all other cases use 'stop'