NCTOPLC_AXLESTRUCT2

TYPE NCTOPLC_AXLESTRUCT
STRUCT
    nStateDWord         : DWORD; (* Status double word *)
    nErrorCode          : DWORD; (* Axis error code *)
    nAxisState          : DWORD; (* Axis moving status *)
    nAxisModeCon        : DWORD; (* Axis mode confirmation (feedback from NC) *)
    nCalibrationState   : DWORD; (* State of axis calibration (homing) *)
    nCoupleState        : DWORD; (* Axis coupling state *)
    nSvbEntries         : DWORD; (* SVB entries/orders (SVB = Set preparation task) *)
    nSafEntries         : DWORD; (* SAF entries/orders (SAF = Set execution task *)
    nAxisId             : DWORD; (* Axis ID *)
    nOpModeDWord        : DWORD; (* Current operation mode *)
    nReserved2_HIDDEN   : DWORD; (* reserved *)
    fPosIst             : LREAL; (* Actual position (absolut value from NC) *)
    fModuloPosIst       : LREAL; (* Actual position as modulo value (e.g. in degrees) *)
    nModuloTurns        : DINT;  (* Actual modulo turns *)
    fVeloIst            : LREAL; (* Actual velocity (optional) *)
    fPosDiff            : LREAL; (* Position difference (lag distance) *)
    fPosSoll            : LREAL; (* Setpoint position *)
    fVeloSoll           : LREAL; (* Setpoint velocity *)
    fAccSoll            : LREAL; (* Setpoint acceleration, OLD: "fReserve1_HIDDEN" *)
    fReserve2_HIDDEN    : LREAL; (* reserved *)
    fReserve3_HIDDEN    : LREAL; (* reserved *)
    fReserve4_HIDDEN    : LREAL; (* reserved *)
END_STRUCT
END_TYPE

 

TYPE NCTOPLC_AXLESTRUCT2
STRUCT
    nStateDWord             : DWORD; (* Status double word *)
    nErrorCode              : DWORD; (* Axis error code *)
    nAxisState              : DWORD; (* Axis moving status *)
    nAxisModeCon            : DWORD; (* Axis mode confirmation (feedback from NC) *)
    nCalibrationState       : DWORD; (* State of axis calibration (homing) *)
    nCoupleState            : DWORD; (* Axis coupling state *)
    nSvbEntries             : DWORD; (* SVB entries/orders (SVB = Set preparation task) *)
    nSafEntries             : DWORD; (* SAF entries/orders (SAF = Set execution task *)
    nAxisId                 : DWORD; (* Axis ID *)
    nOpModeDWord            : DWORD; (* Current operation mode *)
    nActiveControlLoopIndex : WORD;  (* Active control loop index (equivalent to old variable "nCtrlLoopIndex") *)
    nControlLoopIndex       : WORD;  (* Axis control loop index (0, 1, 2, … when multiple control loops are used) *)
    fPosIst                 : LREAL; (* Actual position (absolut value from NC) *)
    fModuloPosIst           : LREAL; (* Actual position as modulo value (e.g. in degrees) *)
    nModuloTurns            : DINT;  (* Actual modulo turns *)
    fVeloIst                : LREAL; (* Actual velocity (optional) *)
    fPosDiff                : LREAL; (* Position difference (lag distance) *)
    fPosSoll                : LREAL; (* Setpoint position *)
    fVeloSoll               : LREAL; (* Setpoint velocity *)
    fAccSoll                : LREAL; (* Setpoint acceleration, OLD: "fReserve1_HIDDEN" *)
    fPosTarget              : LREAL; (* Estimated target position *)
    fModuloPosSoll          : LREAL; (* Setpoint modulo position (e.g. in degrees) *)
    nModuloTurnsSoll        : DINT;  (* Setpoint modulo turns *)
    nCmdNo                  : WORD;  (* Continuous actual command number *)
    nCmdState               : WORD; (* Command state *)
END_STRUCT
END_TYPE

 

No

Data
type

Byte

Bit

Def.
range

Variable
name

Variable name
(since 2.11 resp. TcMc2)

Description

1

UINT32

0-3

-

-

nStateDWord

StateDWord

Status double word
See detailed description as well

 

 

 

0

0/1

Operational

Operational

Axis is ready for operation

 

 

 

1

0/1

Homed

Homed

Axis has been referenced/ homed ("Axis calibrated")

 

 

 

2

0/1

NotMoving

NotMoving

Axis is logically stationary ("Axis not moving")

 

 

 

3

0/1

InPositionArea

InPositionArea

Axis is in position window (physical feedback)

 

 

 

4

0/1

InTargetPosition

InTargetPosition

Axis is at target position (PEH) (physical feedback)

 

 

 

5

0/1

Protected

Protected

Axis is in a protected operating mode (e.g. as a slave axis)

 

 

 

6

0/1

ErrorPropagationDelayed

ErrorPropagationDelayed

Axis signals an error pre warning (from TC 2.11)

 

 

 

7

0/1

HasBeenStopped

HasBeenStopped

Axis has been stopped or is presently executing a stop

 

 

 

8

0/1

HasJob

HasJob

Axis has instructions, is carrying instructions out

 

 

 

9

0/1

PositiveDirection

PositiveDirection

Axis moving to logically larger values

 

 

 

10

0/1

NegativeDirection

NegativeDirection

Axis moving to logically smaller values

 

 

 

11

0/1

HomingBusy

HomingBusy

Axis referenced ("Axis being calibrated")

 

 

 

12

0/1

ConstantVelocity

ConstantVelocity

Axis has reached its constant velocity or rotary speed

 

 

 

13

0/1

Compensating

Compensating

Section compensation passive[0]/active[1] (s. "MC_MoveSuperImposed")

 

 

 

14

0/1

ExtSetPointGenEnabled

ExtSetPointGenEnabled

External setpoint generator enabled

 

 

 

15

0/1

 

 

Operating mode not yet executed (Busy). Not implemented yet!

 

 

 

16

0/1

ExternalLatchValid

ExternalLatchValid

External latch value or sensing switch has become valid

 

 

 

17

0/1

NewTargetPos

NewTargetPos

Axis has a new target position or a new velocity

 

 

 

18

0/1

 

 

Axis is not at target position or cannot reach the target position (e.g. stop).Not implemented yet!

 

 

 

19

0/1

ContinuousMotion

ContinuousMotion

Axis has target position (±) endless

 

 

 

20

0/1

ControlLoopClosed

ControlLoopClosed

Axis is ready for operation and axis control loop is closed (e.g. position control)

 

 

 

21

0/1

CamTableQueued

CamTableQueued

CAM table is queued for  "Online Change" and waiting for activation

 

 

 

22

0/1

CamDataQueued

CamDataQueued

CAM data (only MF) are queued for  "Online Change" and waiting for activation

 

 

 

23

0/1

CamScalingPending

CamScalingPending

CAM scaling are queued for  "Online Change" and waiting for activation

 

 

 

24

0/1

CmdBuffered

CmdBuffered

Following command is queued in then command buffer (s. Buffer Mode)
(from TwinCAT V2.10 Build 1311)

 

 

 

25

0/1

PTPmode

PTPmode

Axis in PTP mode (no slave, no NCI axis, no FIFO axis) (from TC 2.10 Build 1326)

 

 

 

26

0/1

SoftLimitMinExceeded

SoftLimitMinExceeded

Position software limit switch minimum is exceeded (from TC 2.10 Build 1327)

 

 

 

27

0/1

SoftLimitMaxExceeded

SoftLimitMaxExceeded

Position software limit switch maximum is exceeded (from TC 2.10 Build 1327)

 

 

 

28

0/1

DriveDeviceError

DriveDeviceError

Hardware drive device error (no warning), interpretation only possible when drive is data exchanging,
e.g. EtherCAT "OP"-state (from TC 2.10 Build 1326)

 

 

 

29

0/1

MotionCommandsLocked

MotionCommandsLocked

Axis is locked for motion commands (TcMc2)

 

 

 

30

0/1

IoDataInvalid

IoDataInvalid

IO data invalid (e.g. 'WcState' or 'CdlState')

 

 

 

31

0/1

Error

Error

Axis is in a fault state

 

 

 

 

 

 

 

 

2

UINT32

4-7

-

≥0

nErrorCode

ErrorCode

Axis error code

3

UINT32

8-11

-

ENUM

nAxisState

AxisState

Present state of the axis movement

4

UINT32

12-15

-

ENUM

nAxisModeCon

nAxisModeConfirmation

Axis operating mode (feedback from the NC)

5

UINT32

16-19

-

ENUM

nCalibrationState

HomingState

Axis referencing status ("Calibration status")

6

UINT32

20-23

-

ENUM

nCoupleState

CoupleState

Axis coupling status

7

UINT32

24-27

-

≥0

nSvbEntries

SvbEntries

SVB entries/tasks

8

UINT32

28-31

-

≥0

nSafEntries

SafEntries

SAF entries/tasks (NC interpreter, FIFO group)

9

UINT32

32-35

-

>0

nAxisId

AxisId

Axis ID

10

DWORD

36-39

-

0/1

nOpModeDWord,
bOpMode...

OpModeDWord,
OpMode...

Axis run modus Double Word

 

 

 

0

0/1

...PosAreaMonitoring

...PosAreaMonitoring

Position range monitoring

 

 

 

1

0/1

...TargetPosMonitoring

...TargetPosMonitoring

Target position window monitoring

 

 

 

2

0/1

...Loop

...Loop

Loop movement

 

 

 

3

0/1

...MotionMonitoring

...MotionMonitoring

Physical motion monitoring

 

 

 

4

0/1

...PEHTimeMonitoring

...PEHTimeMonitoring

PEH time monitoring

 

 

 

5

0/1

...BacklashComp

...BacklashComp

Backlash compensation

 

 

 

6

0/1

...DelayedErrorReaction

...DelayedErrorReaction

Delayed nc error reaction

 

 

 

7

0/1

...Modulo

...Modulo

Modulo axis (modulo values displayed)

 

 

 

8-15

0/1

 

 

RESERVED

 

 

 

16

0/1

...PosLagMonitoring

...PosLagMonitoring

Following Error monitoring position

 

 

 

17

0/1

...VeloLagMonitoring

...VeloLagMonitoring

Following Error monitoring velocity

 

 

 

18

0/1

...SoftLimitMinMonitoring

...SoftLimitMinMonitoring

End location monitoring min.

 

 

 

19

0/1

...SoftLimitMaxMonitoring

...SoftLimitMaxMonitoring

End location monitoring max.

 

 

 

20

0/1

...PosCorrection

...PosCorrection

Position compensation (position correction)

 

 

 

21

0/1

...AllowSlaveCommands

...AllowSlaveCommands

Allow motion commands to slave

 

 

 

22

0/1

 

 

RESERVED

 

 

 

23

0/1

ApplicationRequest

ApplicationRequest

Application request bit for the PLC (PLC code), e.g. for an "application homing request"
from TwinCAT V2.11 Build 1546

 

 

 

24-31

0/1

 

 

RESERVED

11

UINT16

40-41

-

≥0

nActiveControlLoopIndex

ActiveControlLoopIndex

Active axis control loop index (equivalent to old variable "nCtrlLoopIndex"))

from TwinCAT V2.10 Build 1311

12

UINT16

42-43

-

≥0

nControlLoopIndex

ControlLoopIndex

Axis control index (0, 1, 2, … when multiple control loops are used)

from TwinCAT V2.10 Build 1311

13

REAL64

44-51

-

±∞

fPosIst

ActPos

Actual position (calculated absolute value)

14

REAL64

52-59

-

>∞

fModuloPosIst

ModuloActPos

Modulo actual position (calculate value in, for example, degrees)

15

INT32

60-63

-

±∞

nModuloTurns

ModuloActTurns

Modulo actual rotations

16

REAL64

64-71

-

±∞

fVeloIst

ActVelo

Actual velocity (optional)

17

REAL64

72-79

-

±∞

fPosDiff

PosDiff

Following error (position)

18

REAL64

80-87

-

±∞

fPosSoll

SetPos

Set position (calculated absolute value)

19

REAL64

88-95

-

±∞

fVeloSoll

SetVelo

Set velocity

20

REAL64

96-103

-

±∞

fAccSoll

SetAcc

Set acceleration

21

REAL64

104-111

-

±∞

fPosTarget

TargetPos

Estimated target position

from TwinCAT V2.10 Build 1311

22

REAL64

112-119

-

>∞

fModuloPosSoll

ModuloSetPos

Modulo setpoint position (calculate value in, for example, degrees)

from TwinCAT V2.10 Build 1311

23

INT32

120-123

-

±∞

nModuloTurnsSoll

ModuloSetTurns

Modulo setpoint rotations

from TwinCAT V2.10 Build 1311

24

UINT16

124-125

-

≥0

nCmdNo

CmdNo

Continuous command number from the current command (s. Buffer Mode)

from TwinCAT V2.10 Build 1311

25

UINT16

126-127

-

≥0

nCmdState

CmdState

Command state (s. Buffer Mode)

from TwinCAT V2.10 Build 1311

 

 

NCTOPLC_AXLESTRUCT2 1:

 

Description of the contents of the individual fields:

Define

Axis referencing status (nCalibrationState resp. HomingState)

0

Referencing process completed (READY)

1

Continuous start in the direction of the referencing cam (Note: If the referencing cam is active from the beginning, the referencing status will immediately start with 3)

2

Wait for a rising edge from the referencing cam and initiate the axis stop

3

Wait until the axis settled, check if the referencing cam is still active and then start from the referencing cam into the direction of the synchronising pulse

4

Wait for the falling edge of the referencing cam

5

Activate the latch and stop the axis when the latch has become valid

6

When the axis is stationary, set the calculated actual position (actual position = reference position + break distance)

See also notes in MC_Home

 

Define

Axis coupling status (nCoupleState resp. CoupleState)

0

Single axis that is neither a master nor a slave (SINGLE)

1

Master axis with any number of slaves (MASTER)

2

Slave axis that is the master of another slave (MASTERSLAVE)

3

Just a slave axis (SLAVE)

 

Define

Master: Present state of the axis movement / moving phase of the continuous master axis (servo) (nAxisState resp. AxisState)

0

Set value generator not active (INACTIVE)

1

Set value generator active (RUNNING)

2

Velocity override is zero (OVERRIDE_ZERO)

3

Constant velocity (PHASE_VELOCONST)

4

Acceleration phase (PHASE_ACCPOS)

5

Deceleration phase (PHASE_ACCNEG)

 

Define

Master: Present state of the axis movement / moving phase of the discrete master axis (high/low speed) (nAxisState resp. AxisState)

0

Set value generator not active

1

Moving phase (rapid or creep movement)

2

Switchover delay from rapid to creep motion

3

Creep motion (within the creep region)

4

Braking time (starting from the braking distance in front of the target)

 

Define
 

Slave: Present state of the axis movement / moving phase of the continuous slave axis (servo) (nAxisState resp. AxisState)

Remark: at the time only for salves of type synchronised generator!.

0

Slave generator not active (INACTIVE)

11

Slave is located in a movement prephase (PREPHASE)

12

Slave is synchronising (SYNCHRONIZING)

13

Slave is synchronised and moves synchronously (SYNCHRON)

 

Requirements

Development environement

Target System Type

PLC libraries to include

TwinCAT v2.7.0

PC (i386)

PlcNc.Lib

TwinCAT v2.8.0

PC (i386)

TcNC.Lib