SoftMotion: DriveInterface: LenzeCAN
SoftMotion: DriveInterface: LenzeCAN
Last update: 27.06.2007
Hardware interface |
CAN; must support 3S_CANdrv.lib |
|
|
Supported drives |
LenzeECSxM, Lenze 9400 Stateline |
|
|
Runtimes |
any |
|
|
Author |
Edwin Schwellinger/Hilmar Panzer |
|
|
Components |
LenzeCANDrive.lib; 3S_CanDrv.lib; SM_CAN.lib; |
|
SysLibCallback.lib; SysLibFile.lib |
|
|
Version |
1.9.3.1 |
|
|
CONTENT |
|
|
|
1 PARAMETERS IN PLC CONFIG |
3 |
||
1.1 |
BusInterface ........................................................................................................................ |
3 |
|
1.2 |
AxisGroup ........................................................................................................................... |
3 |
|
1.3 |
supported Drive.wControlType.......................................................................................... |
3 |
|
1.3.1 |
ECS ............................................................................................................................... |
3 |
|
1.3.2 |
9400 Stateline................................................................................................................ |
3 |
|
1.4 |
Additional structure LenzeECS_AXIS_REF....................................................................... |
3 |
|
1.5 |
Global Variables.................................................................................................................. |
4 |
|
2 |
FEATURES |
5 |
|
|
2.1 |
hardware limits (ECSxM) .................................................................................................... |
5 |
3 |
CONFIGURED PARAMETERS DURING STARTUP |
6 |
|
|
3.1 |
ECSxM ................................................................................................................................. |
6 |
|
3.2 |
9400 ..................................................................................................................................... |
6 |
4 |
CAN-TRAFFIC |
7 |
|
© 3S - Smart Software Solutions GmbH
LenzeCANdrive.doc |
Page 1 of 7 |
SoftMotion: DriveInterface: LenzeCAN
© 3S - Smart Software Solutions GmbH
LenzeCANdrive.doc |
Page 2 of 7 |
SoftMotion: DriveInterface: LenzeCAN
1 Parameters in PLC config
1.1BusInterface
wParam1 |
Not used |
|
|
wParam2 |
Not used |
|
|
dwParam1 |
Not used |
|
|
dwParam2 |
Not used |
|
|
1.2AxisGroup
wParam1 |
CAN channel No (typically 0) |
|
|
wParam2 |
Baudrate in kBit (125, 250, 500, 1000) |
|
|
wParam3 |
SYNC generator: |
|
0: PLC generates SYNC (only possible if PLC is highly precise); |
|
1: first drive of AxisGroup generates SYNC |
|
2: SYNC device generates SYNC (additional hardware needed) |
|
|
wParam4 |
Not used |
|
|
dwParam1 |
Reserved |
|
|
dwParam2 |
Reserved |
|
|
dwParam3 |
Not used |
|
|
dwParam4 |
Reserved |
|
|
1.3supported Drive.wControlType
1.3.1ECS
The cyclic send data must consist of: fSetPosition.
The cyclic receive data can consist of: fActPosition.
1.3.29400 Stateline
The cyclic send data must consist of: fSetPosition, fSetVelocity, fSetTorque
The cyclic receive data can consist of: fActPosition, fActVelocity, fActTorque, fActCurrent.
1.4Additional structure LenzeECS_AXIS_REF
name |
Type |
|
|
|
|
byDriveState |
BYTE |
internal use: state of drive |
wStatusWord |
WORD |
Status word C150 (ECSxM) / 16#6041 |
|
|
(9400) |
wStatusWord2 |
WORD |
Status word2 C155 (only ECSxM) |
|
|
|
© 3S - Smart Software Solutions GmbH
LenzeCANdrive.doc |
Page 3 of 7 |
SoftMotion: DriveInterface: LenzeCAN
wControlWord |
WORD |
Control word C135 (ECSxM) / 16#6040 |
|
|
(9400) |
wStatusWordOld |
WORD |
internal use |
dwSetPosition |
DWORD |
set position sent to drive (RO) |
byStatusInfo |
BYTE |
Bit8-11 of status word (ECSxM) |
byErrAcknCounter |
BYTE |
Internal use |
bHWLimitsActive |
BOOL |
TRUE, if one limit switch is active (ECSxM) |
fLimitSwitchDeceleration |
LREAL |
Deceleration for stopping on limit switch (if 0, |
|
|
no ramp is applied) (ECSxM) |
mcstopLS |
MC_Stop |
Internal use |
strConfigFile |
STRING |
full name and path of config file |
acit |
… |
internal use |
txList, rxList, txPDOs, |
… |
internal use |
rxPDOs |
|
|
byActOpMode |
BYTE |
Object 16#6061 (9400) |
bySetOpMode |
BYTE |
Object 16#6060 (RO) (9400) |
bOldReference |
BOOL |
Internal use |
byDigitalInputs, |
BYTE |
Digital inputs (16#60FD) and outputs |
byDigitalOutputs |
|
(16#60FE/1) (only 9400) |
crap |
SMC_CANReadAllParam |
internal use |
|
s |
|
pParameterlist |
POINTER TO |
internal use |
|
CAN_InitTelegram |
|
wp |
LenzeECSWriteParamete |
internal use |
|
r |
|
rp |
LenzeECSReadParamete |
internal use |
|
r |
|
|
|
|
1.5Global Variables
name |
Type |
|
|
|
|
g_udiTimeDistanceSyncSen |
UDINT |
Time distance between sending of SYNC |
d |
|
and 1st PDO |
|
|
|
© 3S - Smart Software Solutions GmbH
LenzeCANdrive.doc |
Page 4 of 7 |
SoftMotion: DriveInterface: LenzeCAN
2 Features
o RegulatorOn, DriveStart
o Detecting and acknowledging errors
oreading/writing SoftMotion and drive parameters (to access index 0xaabb subindex 0xcc with length 0xdd in byte (only necessary for writing) either use MC_Read/Write(Bool)Parameter with parameter number -16#ddaabbcc) or better use specific FBs LenzeECSReadParameter and LenzeECSWriteParameter to access the Lenze Code positions directly or SMC_ReadCANParameter and SMC_WriteCANParameter to address a standard CAN object via index, subindex.
o reading drive string parameters with LenzeECSReadString
o any gearing factors (dwRatioTechUnitsDenom/iRatioTechUnitsNum)
o linear/rotary axes
ocontrolling modes: position, velocity (9400), torque (9400). Use SMC_SetControllerMode for switching.
odrive internal homing (first configure C3010, C0935, C0936 for ECSxM or 16#6098, 16#6099, 16#609A for 9400)
Note (only ECSxM): during homing, the actual position is not reported from the drive!
o latching: 1 channel (TriggerNumber = 1) (only ECSxM)
oECSxM: depending on C3175 hardware limit switches are handled by the controller (=3) or by the drive (else)
o configuration from file
o configuration from dialogs in PLC config
osupported SYNC generators (to be set in PLC Configuration, AxisGroup) : PLC, 1st drive, SYNC-Device
2.1hardware limits (ECSxM)
The reaction on hardware limits is configured with C3175 inside the drive. If C3175 <> 3 the drive reacts on hardware limits. Then, the software might be unable to move an axis out of its limits, as the drive blocks this operation. Only if C3175 = 3, the drive is not handling the hardware limits, and only the controller handles them:
If bControllerHandlesHWLimits is set (default) and the axis runs on a hardware limit, the controller stops the axis and transfers it to errorstop. After a MC_Reset is done on the drive, it can be moved in the direction heading out of the limit switch; the other direction is blocked and produces an error as soon as the drive tries to move in this direction.
Depending on the deceleration value, the stop is done with a ramp (fLimitSwitchDeceleration>0) or immediately (else; default).
To set the values involved in this, a special FB is provided in LenzeECSdrive.lib:
With a rising edge on bExecute the new values are set.
© 3S - Smart Software Solutions GmbH
LenzeCANdrive.doc |
Page 5 of 7 |