description of the data and function block library - lenord.com · twincat 3 codesys v3 somachine...
TRANSCRIPT
Right to technical changes and errors reserved. 04-2017
D-0
2R-L
B_6
505_
xxxx
(1.
1)PowerDRIVE-LibLB_6505_xxxxfor STEP 7 / TIA-Portal, RSLogix / Studio 5000,Automation Studio 4, TwinCAT 3,CODESYS V3 / SoMachine V4
... automates motion.
LENORD+BAUER
Description of the data and function block library
StatusActPosInActVelInNomPosInNomVelInHomeValSetHomeLoopDistanceNumDenomDirectionEnableStartPosStopPosJogFwd JogRev
ControlNomPosOutNomVelOutActPosOutActVelOut
HomingDone
ReadyBusy
InPosWarning
Fault
WORD
DWORD
DWORD
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
WORD
DWORD
DWORD
DINT
DINT
DINT
BOOL
DINT
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Axis_Ctrl
D
D
DWORD
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BYTE
BYTE
WORD
Control
P1_EF_EN
P1_EF_OK
P1_Link_OK
P2_EF_EN
P2_EF_OK
P2_Link_OK
P3_EF_EN
P3_EF_OK
P3_Link_OK
P4_EF_EN
P4_EF_OK
P4_Link_OK
P5_EF_EN
P5_EF_OK
P5_Link_OK
Power
Manual
Error
Error_Source
Error_Group
Error_Info
Status
ERR
P1_EN_EFuse
P1_Reset_EF
P2_EN_EFuse
P2_Reset_EF
P3_EN_EFuse
P3_Reset_EF
P4_EN_EFuse
P4_Reset_EF
P5_EN_EFuse
P5_Reset_EF
PB_Reset_ERR
DWORD
DWORD
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Box_Ctrl
CANopen, EtherNet IP, EtherCAT, Powerlink,
PROFIBUS-DP, PROFINET IO, Sercos III
2 LB_6505_xxxx
Device manufacturer and publisher:
Lenord, Bauer & Co. GmbHDohlenstraße 3246145 Oberhausen ● GermanyPhone: +49 208 9963–0 ● Fax: +49 208 676292Internet: www.lenord.com ● E-Mail: [email protected]
Doc. no. D-02R-LB_6505_xxxx (1.1)
Lenord + Bauer Table of contents
LB_6505_xxxx 3
Table of contents
1 About these instructions ................................................................................. 51.1 Scope ....................................................................................................... 51.2 Copyright ................................................................................................. 51.3 Relevant documents ................................................................................ 61.4 Target group ............................................................................................ 61.5 Markings .................................................................................................. 61.6 Terminology and abbreviations ................................................................ 6
2 Description ....................................................................................................... 82.1 Information on using the function blocks ................................................. 82.2 FB for Box control .................................................................................... 8
2.2.1 Inputs and outputs used .............................................................. 92.2.2 Enabling the power circuit supply for a drive ............................ 102.2.3 Reading errors .......................................................................... 11
2.3 FB for drive control ................................................................................ 122.3.1 Inputs and outputs used ............................................................ 122.3.2 Scaling ...................................................................................... 132.3.3 Positioning ................................................................................ 132.3.4 Manually controlled movement (jogging) .................................. 142.3.5 Specification of the reference value (homing) ........................... 142.3.6 Loop movement ........................................................................ 14
3 STEP 7 / TIA-Portal ........................................................................................ 153.1 General .................................................................................................. 153.2 PDS_Box_Ctrl ........................................................................................ 163.3 PDS_Axis_Ctrl ....................................................................................... 183.4 PDS_RW_PAR ...................................................................................... 20
4 RSLogix 5000 / Studio 5000 .......................................................................... 214.1 General .................................................................................................. 214.2 PDS_Box_Ctrl ........................................................................................ 224.3 PDS_Axis_Ctrl ....................................................................................... 24
5 Automation Studio 4 ...................................................................................... 275.1 General .................................................................................................. 275.2 PDS_Box_Ctrl ........................................................................................ 275.3 PDS_Axis_Ctrl ....................................................................................... 295.4 PDS_RW_PAR ...................................................................................... 31
6 TwinCAT 3 ...................................................................................................... 336.1 General .................................................................................................. 336.2 PDS_Box_Ctrl ........................................................................................ 336.3 PDS_Axis_Ctrl ....................................................................................... 356.4 PDS_RW_PAR_xx ................................................................................ 37
6.4.1 PDS_RW_PAR_EtherCAT ....................................................... 376.4.2 PDS_RW_PAR_CANopen ........................................................ 386.4.3 PDS_RW_PAR_PROFIBUS ..................................................... 39
7 CODESYS V3 / SoMachine V4 ....................................................................... 407.1 General .................................................................................................. 40
Table of contents Lenord + Bauer
4 LB_6505_xxxx
7.2 PDS_Box_Ctrl ........................................................................................ 407.3 PDS_Axis_Ctrl ....................................................................................... 427.4 Acyclic data exchange ........................................................................... 44
Lenord + Bauer 1 About these instructionsScope
LB_6505_xxxx 5
1 About these instructions
The program library aids the integration of the PowerDRIVE-System into the machinecontrol system. It contains the necessary data and function blocks required to controlthe system via a PLC. The primary blocks for controlling the PowerDRIVE-Box andthe PowerDRIVE positioning drives are described in this document.
You can request the current program libraries and programming examplesfrom Lenord+Bauer at [email protected] .The files are sent as .zip files.
The procedure for integrating the function blocks is dependent on the control systemand the programming environment.
1.1 Scope
This document applies to the programming environments stated below and the inter-faces implemented
InterfaceSTEP 7
TIA-PortalRSLogix 5000Studio 5000
AutomationStudio 4
TwinCAT 3CODESYS V3SoMachine V4
CANopen – – – ✓ ✓EtherCAT – – – ✓ ✓Ethernet/IP – ✓ – – ✓PROFINET IO ✓ – – – ✓PROFIBUS-DP ✓ – – ✓ ✓Powerlink – – ✓ – –
Sercos III – – – – ✓
Due to the large number of different control systems, the correct function of theblocks is to be checked in the specific case.
The blocks for controlling the drives are designed for PowerDRIVEs of typeGEL 6110, GEL 6109, GEL 6113.
1.2 Copyright
The programming environments and interfaces identified in this document are theregistered trade marks / marks of the related manufacturer.
1 About these instructions Lenord + BauerRelevant documents
6 LB_6505_xxxx
1.3 Relevant documents
The following separate documents supplement this document and are to be read be-fore integration:
● Reference manuals for the interface usedDescribes the commissioning and the configuration of the devices in the relatednetwork and contains the description of the parameters and process data neces-sary for control.
1.4 Target group
This manual is aimed at the developers of applications programs who have experi-ence with the integration of function blocks in programmable logic controllers. Thefunction blocks are only allowed to be integrated by qualified personnel; the person-nel must
● Be trained in setting the parameters and integrating program blocks into program-mable logic controllers.
● Have advanced specialist knowledge of the topology, function and mechanismsof industrial networks.
● Have system knowledge on the drive control.
● Be familiar with and follow all relevant standards, regulations and safety rules.
1.5 Markings
Information for correct operation
Information for understanding
1.6 Terminology and abbreviations
Drive PowerDRIVE positioning drive
Separate drive PowerDRIVE integrated directly into the network
Box PowerDRIVE-Box
DPV1 Drive control using ProfiDrive device profileas per PROFIBUS Nutzerorganisation e. V.
DS402CiA 402
Drive control using CiA 402 device profileas per CAN in Automation e. V.
eFuse Electronic fuse,protects the power circuit for a drive on the Box
DB Data Block
FB Function Block
Lenord + Bauer 1 About these instructionsTerminology and abbreviations
LB_6505_xxxx 7
LB Library, block library for the PowerDRIVE-System
PLC Programmable logic controller, machine control system
2711 Parameter applies to drive 1 on the Box; for drive 2 to 5 add offset(see Reference manual)
0↑1 Positive edge, state change from FALSE to TRUE
2 Description Lenord + BauerInformation on using the function blocks
8 LB_6505_xxxx
2 Description
Two function blocks are required to control the PowerDRIVE-System with Box and amaximum of 5 positioning drives: PDS_Box_Ctrl, PDS_Axis_Ctrl. Only the PDS_Ax-is_Ctrl block is required to control a separate drive. The blocks are used for the cyclicexchange of process data. The behaviour of the FBs is identical for all interfaces andprogramming environments.
Depending on the interface, the state machine for the drives is controlled via the de-vice profile CiA 402 (CAN in Automation) or DPV1 (ProfiDrive).
The functionality of the main blocks does not differ.
For the acyclic data exchange, the block PDS_RW_PAR is used for most program-ming environments; all device parameters can be queried or written using this block.
2.1 Information on using the function blocks
The parameters in the reference manuals on the interface are stated as hexa-decimal values. On adding the parameters to the block, pay attention to thecorrect format.
● Only use the block PDS_RW_PAR for reading and writing parameters acyclically.
● You will find information on the hardware identification code and the lowest inputaddress for PROFIBUS-DP and PROFINET IO in the hardware configuration.
● On adding inputs and outputs to the FB, pay attention to the correct mapping.
● New nominal values for position and velocity are only applied with StartPos.
2.2 FB for Box control
The FB generates the control word depending on the FB inputs. The FB outputs thestate signals and messages.
● Switch on and reset of the eFuse for each drive (port)
● Acknowledgment of last error message
● Process data exchange between PLC and box
● State of eFuse and internal communication between box and each drive
● Last error message
● State of power supply
● State of commissioning mode
Lenord + Bauer 2 DescriptionFB for Box control
LB_6505_xxxx 9
2.2.1 Inputs and outputs used
Inputs
Status PowerDRIVE Box status word (1)
ERR Last Error (1)
P1_EN_EFuse Port 1 Enable eFuse
P1_Reset_EF Port 1 Reset eFuse
⋮
P5_EN_EFuse Port 5 Enable eFuse
P5_Reset_EF Port 5 Reset eFuse
PB_Reset_ERR Reset Box Error
Outputs
Control PowerDRIVE Box Control Word (1)
P1_EF_EN Port 1 eFuse enabled
P1_EF_OK Port 1 eFuse OK
P1_Link_OK Port 1 Communication OK
⋮
P5_EF_EN Port 5 eFuse enabled
P5_EF_OK Port 5 eFuse OK
P5_Link_OK Port 5 Communication OK
Power Power supply
Manual Manual mode active
Error Error state
Error_Source Error source
Error_Group Error group
Error_Info Error information
(1) Part of the process data
2 Description Lenord + BauerFB for Box control
10 LB_6505_xxxx
2.2.2 Enabling the power circuit supply for a drive
Only if the eFuse is switched on and has not tripped can the power for the power cir-cuit be connected through to the related drive by the Box. For each drive (1…5) therelated eFuse can be switched on or the state of the eFuse reset via the FB.
The following conditions must be met to position a drive:
Example for drive 1
Status word FB output Significance
Bit 0 = 1 P1_EF_EN = TRUE eFuse is switched on
Bit 1 = 1 P1_EF_OK = TRUE eFuse is in order (no error)
Bit 2 = 1 P1_Link_OK = TRUEInternal communication between Box and driveis in order
Bit 15 = 1 Power = TRUE Power supply is in order
For drive 2 to 5 the states of bits 0 to 2 and the FB outputs are similar.
The eFuse for the related drive is reset or switched on via the inputs Px_Reset_EF andPx_EN_EFuse.
If an error has occurred, Px_EF_OK changes from TRUE to FALSE. Resetting theeFuse via the input Px_Reset_EF automatically switches off the eFuse (P1_EF_EN =FALSE). The eFuse must be switched on again after the reset.
Lenord + Bauer 2 DescriptionFB for Box control
LB_6505_xxxx 11
2.2.3 Reading errors
The Box errors read are coded as follows:
Error type (hex) Significance
Group Code Q
001 Electronic fuse (eFuse):
0000 x Programmed I2t threshold exceeded for longer than 2 s
0001 x Max. shutdown current reached (13 A per channel)
0002 x Power circuit voltage too low
0003 x Max. total current exceeded
0004 x No device communication
0005 x No connection to the PLC
002 0000 x Fieldbus module
003 0000 x Internal communication
004 0000 x Peripherals (buttons, LEDs, EEPROM)
005 0000 x Bus communication Box to drives
006 Drive, EMCY telegram:
3210 x Overvoltage
3220 x Undervoltage
4110 x Ambient temperature too high
4410 x Power supply unit temperature too high
5530 x EEPROM error
7300 x Sensor error
8611 x Lag error excessive
007 0000 x Timing error in the operating system
Q ⇒ Source of error
with x = 0: Box 2: Drive Ⅱ 4: Drive Ⅳ 1: Drive Ⅰ 3: Drive Ⅲ 5: Drive Ⅴ
Group 002 / 003 / 004 / 007 error ⇒ rectify by resetting the Box.
Group 001 / 005 / 006 error ⇒ check cause and rectify.
2 Description Lenord + BauerFB for drive control
12 LB_6505_xxxx
2.3 FB for drive control
The FB generates the control word required for the state machine depending on theFB inputs. The FB outputs state signals and messages.
● Process data processing (status word, control word, position, velocity)
● Scaling by setting the numerator, denominator and direction
● Positioning, stopping and manually controlled movement (jogging)
● Specification of any reference value (homing)
● Approaching the position from the same direction (loop movement to compensatefor spindle play)
● Release of drive control
● Acknowledgment of errors
2.3.1 Inputs and outputs used
Inputs
Status Drive Status Word (1)
ActPosIn Actual Position In (2)
ActVelIn Actual Velocity In (2)
NomPosIn Nominal Position In
NomVelIn Nominal Velocity In
HomeValue Home Value
SetHome Set Home
LoopDistance Loop Distance
Num Numerator
Denom Denominator
Direction Direction
StartPos Start Positioning
StopPos Stop Positioning
JogFwd Jogging Forward
JogRev Jogging Backward
Outputs
Control Drive Control Word (2)
NomPosOut Nominal Position Out (2)
NomVelOut Nominal Velocity Out (2)
(1) Part of the process data
Lenord + Bauer 2 DescriptionFB for drive control
LB_6505_xxxx 13
ActPosOut Actual Position Out
ActVelOut Actual Velocity Out
HomingDone Homing Done
Ready Ready
Busy Busy
InPos In Position
Warning Warning
Fault Error
2.3.2 Scaling
The resolution of the position and velocity parameters is adjusted using the Numera-tor and Denominator. In this way the pitch on the spindle is taken into account duringpositioning.
ActPosOUT = ActPosIN * Num Denom
ActVelOUT = ActVelIN * Num Denom
NomPosOUT = NomPosIN *DenomNum
NomVelOUT = NomVelIN *DenomNum
NomPosOUT = HomeVal *DenomNum
Homing:
Positioning:
Integers are to be entered. Negative signs are ignored. If zero is set for one variable,both variables are set internally to the value 1. There is no practical change to thevalues.
The Direction input is used to define whether the actual values for the position rise orfall with clockwise rotation. The specification of the direction is applied using StartPos(initialisation phase). Any change will cause the movement in progress to be cancel-led
2.3.3 Positioning
Inputs Output (on drive)
● NomPosIn
● NomVelIn
● LoopDistance
● StartPos
● StopPos
● Control
● NomPosOut
● NomVelOut
The values for position, velocity and loop movement specified on the inputs are pro-cessed and provided to the output variables for position and velocity. Positioning isstarted using the control word and the Busy output is set. This is also the case whilepositioning is in progress.
2 Description Lenord + BauerFB for drive control
14 LB_6505_xxxx
Once the drive has reached the position, it signals this situation in the status wordand the InPos output is set.
2.3.4 Manually controlled movement (jogging)
Manually controlled movement is used for setting up the machine axis and is initiatedusing the JogFwd or JogRev input.
Jogging should be realised using a pressed push-button to prevent uninten-tional or continuous movement of the drive.
Inputs Output (on drive)
● NomVelIn
● JogFwd
● JogRev
● Control
● NomVelOut
The velocity specified on the NomVelIn input is provided on the NomVelOut outputand the manually controlled movement carried out in the related direction. The Busyoutput is set. The movement ends when the input changes back to “0”.
If JogFwd and JogRev are both set to “1”, there is no manually controlled movement.
The inputs have no effect during a positioning process.
2.3.5 Specification of the reference value (homing)
Inputs Output (on drive)
● HomeVal
● SetHome
● Control
● NomPosOut
On the positive edge on the SetHome bit, the reference value specified on the Home-Value input is applied as the position actual value. If the reference position has beenapplied by the drive, the HomingDone output is set.
The input is only effective with the drive at standstill, no other control input exceptEnable is allowed to be switched.
2.3.6 Loop movement
Loop movement ensures that the destination position is always approached from thesame direction. If the destination position lies in the required movement direction,loop movement is not used. On positioning from the opposite direction, the blockgenerates a fictive nominal position via Loop Distance. Once the drive reaches the fic-tive destination, the block reverses the direction and specifies to the drive the nomi-nal position from NomPosIn. In this way the drive moves past to the nominal positionby the distance set in Loop Distance, stops and then moves to the position from Nom-PosIn.
Lenord + Bauer 3 STEP 7 / TIA-PortalGeneral
LB_6505_xxxx 15
3 STEP 7 / TIA-Portal
Program files available:● LB_6505_STEP7.zip STEP 7 library
● LB_6505_TIA.zip TIA-Portal library
● BP_6505_TIA.zip TIA-Portal examples
● LB_6505_SCOUT.zip SCOUT TIA library
3.1 General
The PROFIBUS-DP and PROFINET IO interfaces are implemented for STEP 7 andTIA-Portal. The drives are controlled according to the device profile DPV1.
Main blocksFC65 PDS_Box_Ctrl
Cyclic exchange of process data with a Box
FB32 PDS_Axis_CtrlCyclic exchange of process data with a drive
FB17 PDS_RW_PARAcyclic exchange of parameters for a Box or a drive
To use the libraries, the related file is opened and the FBs copied to the user project(e.g. SIMATIC Manager).
3 STEP 7 / TIA-Portal Lenord + BauerPDS_Box_Ctrl
16 LB_6505_xxxx
3.2 PDS_Box_Ctrl (FC65, Version 2.1)
Function: Control of a Box (→ page 8)
DWORD
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BYTE
BYTE
WORD
Control
P1_EF_EN
P1_EF_OK
P1_Link_OK
P2_EF_EN
P2_EF_OK
P2_Link_OK
P3_EF_EN
P3_EF_OK
P3_Link_OK
P4_EF_EN
P4_EF_OK
P4_Link_OK
P5_EF_EN
P5_EF_OK
P5_Link_OK
Power
Manual
Error
Error_Source
Error_Group
Error_Info
Status
ERR
P1_EN_EFuse
P1_Reset_EF
P2_EN_EFuse
P2_Reset_EF
P3_EN_EFuse
P3_Reset_EF
P4_EN_EFuse
P4_Reset_EF
P5_EN_EFuse
P5_Reset_EF
PB_Reset_ERR
DWORD
DWORD
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Box_Ctrl
Inputs
Designation Value Significance
Status State word for the Box
ERR Last error in the Box
P1_EN_EFuse TRUE Switch on eFuse for drive 1
P1_Reset_EF TRUE Reset eFuse for drive 1
⋮
P5_EN_EFuse TRUE Switch on eFuse for drive 5
P5_Reset_EF TRUE Reset eFuse for drive 5
PB_Reset_ERR 0↑1 Reset last error
Lenord + Bauer 3 STEP 7 / TIA-PortalPDS_Box_Ctrl
LB_6505_xxxx 17
Outputs
Designation Value Significance
Control Control word for the Box
P1_EF_EN TRUE eFuse for drive 1 switched on (LED1 illuminates green)
FALSE eFuse for drive 1 switched off (LED1 illuminates red)
P1_EF_OK TRUE eFuse for drive 1 in order (LED2 illuminates green)
FALSE eFuse for drive 1 has tripped (LED2 illuminates red)
P1_Link_OK TRUE Communication to the drive in order (LED3 illuminatesgreen)
⋮
P5_EF_EN TRUE eFuse for drive 5 switched on (LED1 illuminates green)
FALSE eFuse for drive 5 switched off (LED1 illuminates red)
P5_EF_OK TRUE eFuse for drive 5 in order (LED2 illuminates green)
FALSE eFuse for drive 5 has tripped (LED2 illuminates red)
P5_Link_OK TRUE Communication to the drive in order (LED3 illuminatesgreen)
Power TRUE Power supply for power circuits in order
Manual TRUE At least one drive is in the commissioning mode
Error TRUE Error message present
Error_Source 0 to 5 Source of error (→ page 11)
0 = Box, 1-5 = drive 1 to 5
Error_Group 1 to 7 Error group (→ page 11)(1)
Can be read from parameter 228.
Error_Info 1 Error code (→ page 11)(2)
Can be read from parameter 228.
(1) If Error_Group is 0, no error occured.(2) Error_Info contains the error code of group 1 and 6, otherwise 0 ist output.
3 STEP 7 / TIA-Portal Lenord + BauerPDS_Axis_Ctrl
18 LB_6505_xxxx
3.3 PDS_Axis_Ctrl (FB32)
Function: Controlling a drive via the Box or as a separate drive (→ page 12)
This block replaces the former blocks FB25 and FB30.
WORD
DWORD
DWORD
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
WORD
DWORD
DWORD
DINT
DINT
DINT
BOOL
DINT
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Axis_Ctrl
StatusActPosInActVelInNomPosInNomVelInHomeValSetHomeLoopDistanceNumDenomDirectionEnableStartPosStopPosJogFwd JogRev
ControlNomPosOutNomVelOutActPosOutActVelOut
HomingDone
ReadyBusy
InPosWarning
Fault
Inputs
Designation Value Significance
Status State word received from the drive
ActPosIn Position actual value received from the drive
ActVelIn Speed actual value received from the drive
NomPosIn Destination position (specification of nominal value)
NomVelIn Final velocity (specification of nominal value)(1)
HomeValue Specification of the reference position (→ page 14)
SetHome 0↑1 Apply HomeValue as position actual value
LoopDistance Specification of the distance for a loop movement(→ page 14)
>0 Move to destination in positive direction
<0 Move to destination in negative direction
0 Move directly to destination
Num Numerator (2) (→ page 13)
(1) Value must be greater than zero, otherwise the drive does not move.(2) Integer value for adapting the position values to the application.
Lenord + Bauer 3 STEP 7 / TIA-PortalPDS_Axis_Ctrl
LB_6505_xxxx 19
Designation Value Significance
Denom Denominator (1) (→ page 13)
Direction Specification of the direction of movement; is applied usingEnable, any change will cause a movement to be cancelled(→ page 13)
FALSE Positive nominal and actual values for clockwise rotation
TRUE Negative nominal and actual values for clockwise rotation
Enable TRUE Enable for positioning, jogging or homing; application of thedirection of movement
FALSE Inhibit for all functions, place drive in “Switching On Inhibi-ted” (S1) stateAcknowledge an existing error message
StartPos 0↑1 Start positioning process (→ page 13)
StopPos TRUE Positioning process in progress is cancelled and start inputinhibited.
JogFwd 0↑1 Forward manually controlled movement (→ page 14)
JogRev 0↑1 Reverse manually controlled movement (→ page 14)
Outputs
Designation Value Significance
Control Control word to be transferred to the drive
NomPosOut Nominal position to be transferred to the drive
NomVelOut Nominal velocity to be transferred to the drive
ActPosOut Output of the position actual value of the drive taking intoaccount the direction of positioning
ActVelOut Output of the velocity actual value of the drive taking intoaccount the direction of positioning
HomingDone TRUE Set Home undertaken successfully
Ready TRUE Drive is ready
Busy TRUE Positioning, Homing or Jogging is being undertaken
InPos TRUE Destination position reached
Warning TRUE Warning present (bit 7 of the state word set)The warning code can be read from parameter 172.
Fault TRUE Error present (bit 3 of the state word set).The error code can be read from parameter 171.
(1) Integer value for adapting the position values to the application.
3 STEP 7 / TIA-Portal Lenord + BauerPDS_RW_PAR
20 LB_6505_xxxx
3.4 PDS_RW_PAR
Function: Read and write parameter data in the acyclic data exchange using thesystem blocks
● SFB52 (RDREC)
● SFB53 (WRREC)
This block is only allowed to be used once in the program.
BOOL
DINT
DINT
DINT
DINT
DWORD
Done
DataOUT_0
DataOUT_1
DataOUT_2
DataOUT_3
Status
Enable
Write
Index
Length
DataIN_0
Adr
BOOL
BOOL
INT
INT
DINT
WORD
PDS_RW_PAR
Inputs
Designation Value Significance
Enable TRUE Enable for the communication
Write TRUE Write data
FALSE Read data
Index Number of parameters to be transferred
Length Number of bytes to be sent/received (4/16)
DataIN_0 Parameter value to be changed
Adr For S7-300 lowest module address,otherwise hardware identification code for the module(status word)
Outputs
Designation Value Significance
Done TRUE Completion message from the FB
DataOUT_0 Actual parameter value read
DataOUT_1 Minimum parameter value read
DataOUT_2 Maximum parameter value read
DataOUT_3 Default parameter value read
Status Status code for the system block SFB52 or SFB53
Lenord + Bauer 4 RSLogix 5000 / Studio 5000General
LB_6505_xxxx 21
4 RSLogix 5000 / Studio 5000
Program files available:● LB_6505_RSLogix.zip library
● BP_6505_RSLogix.zip examples
4.1 General
The EtherNet-IP interface is implemented for RSLogix and Studio 5000. The drivesare controlled according to the device profile CiA 402.
Main blocksPDS_Box_Ctrl Cyclic exchange of process data with a Box
PDS_Axis_Ctrl_Box Cyclic exchange of process data with a drive connected to theBox
PDS_Ax-is_Ctrl_Drive
Cyclic exchange of process data with a separate drive
The acyclic data exchange is undertaken via so-called message boxes that are con-figured in dialog boxes.
4 RSLogix 5000 / Studio 5000 Lenord + BauerPDS_Box_Ctrl
22 LB_6505_xxxx
4.2 PDS_Box_Ctrl
Function: Control of a Box (→ page 8)
INT[29]
INT[29]
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
INT
INT
INT
P1_EF_EN
P1_EF_OK
P1_Link_OK
P2_EF_EN
P2_EF_OK
P2_Link_OK
P3_EF_EN
P3_EF_OK
P3_Link_OK
P4_EF_EN
P4_EF_OK
P4_Link_OK
P5_EF_EN
P5_EF_OK
P5_Link_OK
Power
Manual
Error
Error_Source
Error_Group
Error_Info
P1_EN_EFuse
P1_Reset_EF
P2_EN_EFuse
P2_Reset_EF
P3_EN_EFuse
P3_Reset_EF
P4_EN_EFuse
P4_Reset_EF
P5_EN_EFuse
P5_Reset_EF
PB_Reset_ERR
INT[29]
INT[29]
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Box_Ctrl
BoxStatusStruct
BoxControlStruct
The two 29-integer arrays BoxStatusStruct and BoxControlStruct represent the processdata structure of the PowerDRIVE-System that the FB is accessing.
Inputs
Designation Value Significance
P1_EN_EFuse TRUE Switch on eFuse for drive 1
P1_Reset_EF TRUE Reset eFuse for drive 1
⋮
P5_EN_EFuse TRUE Switch on eFuse for drive 5
P5_Reset_EF TRUE Reset eFuse for drive 5
PB_Reset_ERR 0↑1 Reset last error
Lenord + Bauer 4 RSLogix 5000 / Studio 5000PDS_Box_Ctrl
LB_6505_xxxx 23
Outputs
Designation Value Significance
P1_EF_EN TRUE eFuse for drive 1 switched on (LED1 illuminates green)
FALSE eFuse for drive 1 switched off (LED1 illuminates red)
P1_EF_OK TRUE eFuse for drive 1 in order (LED2 illuminates green)
FALSE eFuse for drive 1 has tripped (LED2 illuminates red)
P1_Link_OK TRUE Communication to the drive in order (LED3 illuminatesgreen)
⋮
P5_EF_EN TRUE eFuse for drive 5 switched on (LED1 illuminates green)
FALSE eFuse for drive 5 switched off (LED1 illuminates red)
P5_EF_OK TRUE eFuse for drive 5 in order (LED2 illuminates green)
FALSE eFuse for drive 5 has tripped (LED2 illuminates red)
P5_Link_OK TRUE Communication to the drive in order (LED3 illuminatesgreen)
Power TRUE Power supply for power circuits in order
Manual TRUE At least one drive is in the commissioning mode
Error TRUE Error message present
Error_Source 0 to 5 Source of error (→ page 11)
0 = Box, 1-5 = drive 1 to 5
Error_Group 1 to 7 Error group (→ page 11)(1)
Can be read from instance 17 (DPV1).
Error_Info 1 Error code (→ page 11)(2)
Can be read from instance 17 (DPV1).
(1) If Error_Group is 0, no error occured.(2) Error_Info contains the error code of group 1 and 6, otherwise 0 ist output.
4 RSLogix 5000 / Studio 5000 Lenord + BauerPDS_Axis_Ctrl
24 LB_6505_xxxx
4.3 PDS_Axis_Ctrl
Function: Controlling a drive via the Box (PDS_Axis_Ctrl_Box) or a separate drive(PDS_Axis_Ctrl_Drive) (→ page 12)
INT[29]
INT[29]
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
INT[29]
INT[29]
INT
DINT
DINT
DINT
BOOL
DINT
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Axis_Ctrl_Box
DriveNoNomPosInNomVelInHomeValSetHomeLoopDistanceNumDenomDirectionEnableStartPosStopPosJogFwd JogRev
ActPosOutActVelOut
HomingDone
ReadyBusy
InPosWarning
Fault
BoxStatusStruct
BoxControlStruct
FB for a drive on the Box
INT[5]
INT[5]
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
INT[5]
INT[5]
DINT
DINT
DINT
BOOL
DINT
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Axis_Ctrl_Drive
NomPosInNomVelInHomeValSetHomeLoopDistanceNumDenomDirectionEnableStartPosStopPosJogFwd JogRev
ActPosOutActVelOut
HomingDone
ReadyBusy
InPosWarning
Fault
DriveStatusStruct
DriveControlStruct
FB for a separate drive
The two 29-integer arrays BoxStatusStructand BoxControlStruct represent the processdata structure of the PowerDRIVE-System
that the FB is accessing.
The two 5-integer arrays DriveStatus-Struct and DriveControlStruct representthe process data structure of the drive
that the FB is accessing.
Inputs
Designation Value Significance
DriveNo Number of the drive on the Box (1…5) only for PDS_Ax-is_Crtl_Box
ActPosIn Position actual value received from the drive
ActVelIn Speed actual value received from the drive
NomPosIn Destination position (specification of nominal value)
NomVelIn Final velocity (specification of nominal value)(1)
HomeValue Specification of the reference position (→ page 14)
(1) Value must be greater than zero, otherwise the drive does not move.
Lenord + Bauer 4 RSLogix 5000 / Studio 5000PDS_Axis_Ctrl
LB_6505_xxxx 25
Designation Value Significance
LoopDistance Specification of the distance for a loop movement(→ page 14)
>0 Move to destination in positive direction
<0 Move to destination in negative direction
0 Move directly to destination
Num Numerator (1) (→ page 13)
Denom Denominator (1) (→ page 13)
Direction Specification of the direction of movement; is applied usingEnable, any change will cause a movement to be cancelled(→ page 13)
FALSE Positive nominal and actual values for clockwise rotation
TRUE Negative nominal and actual values for clockwise rotation
Enable TRUE Enable for positioning, jogging or homing; application of thedirection of movement
FALSE Inhibit for all functions, place drive in “Switching On Inhibi-ted” (S1) stateAcknowledge an existing error message
StartPos 0↑1 Start positioning process (→ page 13)
StopPos TRUE Positioning process in progress is cancelled and start inputinhibited.
JogFwd 0↑1 Forward manually controlled movement (→ page 14)
JogRev 0↑1 Reverse manually controlled movement (→ page 14)
SetHome 0↑1 Apply HomeValue as position actual value
Outputs
Designation Value Significance
Control Control word to be transferred to the drive
NomPosOut Nominal position to be transferred to the drive
NomVelOut Nominal velocity to be transferred to the drive
ActPosOut Output of the position actual value of the drive taking intoaccount the direction of positioning
ActVelOut Output of the velocity actual value of the drive taking intoaccount the direction of positioning
HomingDone TRUE Set Home undertaken successfully
(1) Integer value for adapting the position values to the application.
4 RSLogix 5000 / Studio 5000 Lenord + BauerPDS_Axis_Ctrl
26 LB_6505_xxxx
Designation Value Significance
Ready TRUE Drive is ready
Busy TRUE Positioning, Homing or Jogging is being undertaken
InPos TRUE Destination position reached
Warning TRUE Warning present (bit 7 of the state word set)The warning code can be read from instance 172 for a sep-arate drive and from instance 273 for a drive on the Box1 .
Fault TRUE Error present (bit 3 of the state word set)The error code can be read from instance 171 for a sepa-rate drive and from instance 272 for a drive on the Box1 .
Lenord + Bauer 5 Automation Studio 4General
LB_6505_xxxx 27
5 Automation Studio 4
Program files available:● LB_6505_AutomationStudio.zip
5.1 General
The Powerlink interface is implemented for Automation Studio 4 from B&R. Thedrives are controlled according to the device profile CiA 402.
Main blocksPDS_Box_Ctrl Cyclic exchange of process data with a Box
PDS_Axis_Ctrl Cyclic exchange of process data with a drive
PDS_RW_PAR Acyclic exchange of parameters for a Box or a drive
5.2 PDS_Box_Ctrl
Function: Control of a Box (→ page 8)
UDINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
USINT
USINT
UDINT
Control
P1_EF_EN
P1_EF_OK
P1_Link_OK
P2_EF_EN
P2_EF_OK
P2_Link_OK
P3_EF_EN
P3_EF_OK
P3_Link_OK
P4_EF_EN
P4_EF_OK
P4_Link_OK
P5_EF_EN
P5_EF_OK
P5_Link_OK
Power
Manual
Error
Error_Source
Error_Group
Error_Info
Status
ERR
P1_EN_EFuse
P1_Reset_EF
P2_EN_EFuse
P2_Reset_EF
P3_EN_EFuse
P3_Reset_EF
P4_EN_EFuse
P4_Reset_EF
P5_EN_EFuse
P5_Reset_EF
PB_Reset_ERR
UDINT
UDINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Box_Ctrl
5 Automation Studio 4 Lenord + BauerPDS_Box_Ctrl
28 LB_6505_xxxx
Inputs
Designation Value Significance
Status State word for the Box
ERR Last error in the Box on using the PowerDRIVE-Box Sys-tem Control module ??
P1_EN_EFuse TRUE Switch on eFuse for drive 1
P1_Reset_EF TRUE Reset eFuse for drive 1
⋮
P5_EN_EFuse TRUE Switch on eFuse for drive 5
P5_Reset_EF TRUE Reset eFuse for drive 5
PB_Reset_ERR 0↑1 Reset last error
Outputs
Designation Value Significance
Control Control word for the Box
P1_EF_EN TRUE eFuse for drive 1 switched on (LED1 illuminates green)
FALSE eFuse for drive 1 switched off (LED1 illuminates red)
P1_EF_OK TRUE eFuse for drive 1 in order (LED2 illuminates green)
FALSE eFuse for drive 1 has tripped (LED2 illuminates red)
P1_Link_OK TRUE Communication to the drive in order (LED3 illuminatesgreen)
⋮
P5_EF_EN TRUE eFuse for drive 5 switched on (LED1 illuminates green)
FALSE eFuse for drive 5 switched off (LED1 illuminates red)
P5_EF_OK TRUE eFuse for drive 5 in order (LED2 illuminates green)
FALSE eFuse for drive 5 has tripped (LED2 illuminates red)
P5_Link_OK TRUE Communication to the drive in order (LED3 illuminatesgreen)
Power TRUE Power supply for power circuits in order
Manual TRUE At least one drive is in the commissioning mode
Error TRUE Error message present
Error_Source 0 to 5 Source of error (→ page 11)
0 = Box, 1-5 = drive 1 to 5
Lenord + Bauer 5 Automation Studio 4PDS_Axis_Ctrl
LB_6505_xxxx 29
Designation Value Significance
Error_Group 1 to 7 Error group (→ page 11)(1)
Can be read from parameter 228.
Error_Info 1 Error code (→ page 11)(2)
Can be read from parameter 228.
5.3 PDS_Axis_Ctrl
Function: Controlling a drive via the Box or as a separate drive (→ page 12)
INT
DINT
DINT
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
INT
DINT
DINT
DINT
DINT
DINT
BOOL
DINT
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Axis_Ctrl
StatusActPosInActVelInNomPosInNomVelInHomeValSetHomeLoopDistanceNumDenomDirectionEnableStartPosStopPosJogFwd JogRev
ControlNomPosOutNomVelOutActPosOutActVelOut
HomingDone
ReadyBusy
InPosWarning
Fault
Inputs
Designation Value Significance
Status State word received from the drive
ActPosIn Position actual value received from the drive
ActVelIn Speed actual value received from the drive
NomPosIn Destination position (specification of nominal value)
NomVelIn Final velocity (specification of nominal value)(3)
HomeValue Specification of the reference position (→ page 14)
SetHome 0↑1 Apply HomeValue as position actual value
(1) If Error_Group is 0, no error occured.(2) Error_Info contains the error code of group 1 and 6, otherwise 0 ist output.(3) Value must be greater than zero, otherwise the drive does not move.
5 Automation Studio 4 Lenord + BauerPDS_Axis_Ctrl
30 LB_6505_xxxx
Designation Value Significance
LoopDistance Specification of the distance for a loop movement(→ page 14)
>0 Move to destination in positive direction
<0 Move to destination in negative direction
0 Move directly to destination
Num Numerator (1) (→ page 13)
Denom Denominator (1) (→ page 13)
Direction Specification of the direction of movement; is applied usingEnable, any change will cause a movement to be cancelled(→ page 13)
FALSE Positive nominal and actual values for clockwise rotation
TRUE Negative nominal and actual values for clockwise rotation
Enable TRUE Enable for positioning, jogging or homing; application of thedirection of movement
FALSE Inhibit for all functions, place drive in “Switching On Inhibi-ted” (S1) stateAcknowledge an existing error message
StartPos 0↑1 Start positioning process (→ page 13)
StopPos TRUE Positioning process in progress is cancelled and start inputinhibited.
JogFwd 0↑1 Forward manually controlled movement (→ page 14)
JogRev 0↑1 Reverse manually controlled movement (→ page 14)
Outputs
Designation Value Significance
Control Control word to be transferred to the drive
NomPosOut Nominal position to be transferred to the drive
NomVelOut Nominal velocity to be transferred to the drive
ActPosOut Output of the position actual value of the drive taking intoaccount the direction of positioning
ActVelOut Output of the velocity actual value of the drive taking intoaccount the direction of positioning
HomingDone TRUE Set Home undertaken successfully
Ready TRUE Drive is ready
(1) Integer value for adapting the position values to the application.
Lenord + Bauer 5 Automation Studio 4PDS_RW_PAR
LB_6505_xxxx 31
Designation Value Significance
Busy TRUE Positioning, Homing or Jogging is being undertaken
InPos TRUE Destination position reached
Warning TRUE Warning present (bit 7 of the state word set)The warning code can be read from parameter 172 (DPV1).
Fault TRUE Error present (bit 3 of the state word set)The error code can be read from parameter 171 (DPV1).
5.4 PDS_RW_PAR
Function: Read and write parameter data in the acyclic data exchange using thesystem blocks
● EplSDORead
● EplSDOWrite
BOOL
ARRAY[0...15]
UINT
UDINT
UDINT
Done
DataOUT
Status
ErrorInfo
ReadLen
Enable
Write
pDevice
Node
Index
Subindex
DataIn
DataLen
BOOL
BOOL
UDINT ADR[ANY in]
USINT
UINT
USINT
DINT
UINT
PDS_RW_PAR
Inputs
Designation Value Significance
Enable TRUE Enable for the communication
Write TRUE Write data
FALSE Read data
pDevice Powerlink hardware identification code
Node Node address
Index Number of parameters to be transferred
Subindex Subindex for the parameter
DataIn Parameter value to be changed
DataLen Number of bytes to be sent/received (4/16)
5 Automation Studio 4 Lenord + BauerPDS_RW_PAR
32 LB_6505_xxxx
Outputs
Designation Value Significance
Done TRUE Completion message from the FB
DataOut Data read from the parameter
Status Status code for the system blocks EplSDORead and EplS-DOWrite
ErrorInfo Error code for the system blocks EplSDORead and EplS-DOWrite
0 No error
ReadLen Number of bytes read
Lenord + Bauer 6 TwinCAT 3General
LB_6505_xxxx 33
6 TwinCAT 3
Program files available:● LB_6505_TwinCAT3.zip TwinCAT 3 library
● BP_6505_TwinCAT3.zip TwinCAT 3 examples
6.1 General
The PROFIBUS-DP, EtherCAT and CANopen interfaces are implemented for Twin-CAT 3. The drives are controlled using device profile DPV1 or CiA 402 depending onthe interface.
Main blocksPDS_Box_Ctrl Cyclic exchange of process data with a Box
PDS_Axis_Ctrl Cyclic exchange of process data with a drive
PDS_RW_PAR Acyclic exchange of parameters for a Box or a drive depending inthe interface.
6.2 PDS_Box_Ctrl
Function: Control of a Box (→ page 8)
DWORD
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BYTE
BYTE
WORD
Control
P1_EF_EN
P1_EF_OK
P1_Link_OK
P2_EF_EN
P2_EF_OK
P2_Link_OK
P3_EF_EN
P3_EF_OK
P3_Link_OK
P4_EF_EN
P4_EF_OK
P4_Link_OK
P5_EF_EN
P5_EF_OK
P5_Link_OK
Power
Manual
Error
Error_Source
Error_Group
Error_Info
Status
ERR
P1_EN_EFuse
P1_Reset_EF
P2_EN_EFuse
P2_Reset_EF
P3_EN_EFuse
P3_Reset_EF
P4_EN_EFuse
P4_Reset_EF
P5_EN_EFuse
P5_Reset_EF
PB_Reset_ERR
DWORD
DWORD
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Box_Ctrl
6 TwinCAT 3 Lenord + BauerPDS_Box_Ctrl
34 LB_6505_xxxx
Inputs
Designation Value Significance
Status State word for the Box
ERR Last error in the Box
P1_EN_EFuse TRUE Switch on eFuse for drive 1
P1_Reset_EF TRUE Reset eFuse for drive 1
⋮
P5_EN_EFuse TRUE Switch on eFuse for drive 5
P5_Reset_EF TRUE Reset eFuse for drive 5
PB_Reset_ERR 0↑1 Reset last error
Outputs
Designation Value Significance
Control Control word for the Box
P1_EF_EN TRUE eFuse for drive 1 switched on (LED1 illuminates green)
FALSE eFuse for drive 1 switched off (LED1 illuminates red)
P1_EF_OK TRUE eFuse for drive 1 in order (LED2 illuminates green)
FALSE eFuse for drive 1 has tripped (LED2 illuminates red)
P1_Link_OK TRUE Communication to the drive in order (LED3 illuminatesgreen)
⋮
P5_EF_EN TRUE eFuse for drive 5 switched on (LED1 illuminates green)
FALSE eFuse for drive 5 switched off (LED1 illuminates red)
P5_EF_OK TRUE eFuse for drive 5 in order (LED2 illuminates green)
FALSE eFuse for drive 5 has tripped (LED2 illuminates red)
P5_Link_OK TRUE Communication to the drive in order (LED3 illuminatesgreen)
Power TRUE Power supply for power circuits in order
Manual TRUE At least one drive is in the commissioning mode
Error TRUE Error message present
Error_Source 0 to 5 Source of error (→ page 11)
0 = Box, 1-5 = drive 1 to 5
Lenord + Bauer 6 TwinCAT 3PDS_Axis_Ctrl
LB_6505_xxxx 35
Designation Value Significance
Error_Group 1 to 7 Error group (→ page 11)(1)
Error can be read, parameters dependent on the interface.
Error_Info 1 Error code (→ page 11)(2)
Error can be read, parameters dependent on the interface.
6.3 PDS_Axis_Ctrl
Function: Controlling a drive via the Box or as a separate drive (→ page 12)
WORD
DWORD
DWORD
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
WORD
DWORD
DWORD
DINT
DINT
DINT
BOOL
DINT
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Axis_Ctrl
StatusActPosInActVelInNomPosInNomVelInHomeValSetHomeLoopDistanceNumDenomDirectionEnableStartPosStopPosJogFwd JogRev
ControlNomPosOutNomVelOutActPosOutActVelOut
HomingDone
ReadyBusy
InPosWarning
Fault
Inputs
Designation Value Significance
Status State word received from the drive
ActPosIn Position actual value received from the drive
ActVelIn Speed actual value received from the drive
NomPosIn Destination position (specification of nominal value)
NomVelIn Final velocity (specification of nominal value)(3)
HomeValue Specification of the reference position (→ page 14)
SetHome 0↑1 Apply HomeValue as position actual value
(1) If Error_Group is 0, no error occured.(2) Error_Info contains the error code of group 1 and 6, otherwise 0 ist output.(3) Value must be greater than zero, otherwise the drive does not move.
6 TwinCAT 3 Lenord + BauerPDS_Axis_Ctrl
36 LB_6505_xxxx
Designation Value Significance
LoopDistance Specification of the distance for a loop movement(→ page 14)
>0 Move to destination in positive direction
<0 Move to destination in negative direction
0 Move directly to destination
Num Numerator (1) (→ page 13)
Denom Denominator (1) (→ page 13)
Direction Specification of the direction of movement; is applied usingEnable, any change will cause a movement to be cancelled(→ page 13)
FALSE Positive nominal and actual values for clockwise rotation
TRUE Negative nominal and actual values for clockwise rotation
Enable TRUE Enable for positioning, jogging or homing; application of thedirection of movement
FALSE Inhibit for all functions, place drive in “Switching On Inhibi-ted” (S1) stateAcknowledge an existing error message
StartPos 0↑1 Start positioning process (→ page 13)
StopPos TRUE Positioning process in progress is cancelled and start inputinhibited.
JogFwd 0↑1 Forward manually controlled movement (→ page 14)
JogRev 0↑1 Reverse manually controlled movement (→ page 14)
Outputs
Designation Value Significance
Control Control word to be transferred to the drive
NomPosOut Nominal position to be transferred to the drive
NomVelOut Nominal velocity to be transferred to the drive
ActPosOut Output of the position actual value of the drive taking intoaccount the direction of positioning
ActVelOut Output of the velocity actual value of the drive taking intoaccount the direction of positioning
HomingDone TRUE Set Home undertaken successfully
Ready TRUE Drive is ready
(1) Integer value for adapting the position values to the application.
Lenord + Bauer 6 TwinCAT 3PDS_RW_PAR_xx
LB_6505_xxxx 37
Designation Value Significance
Busy TRUE Positioning, Homing or Jogging is being undertaken
InPos TRUE Destination position reached
Warning TRUE Warning present (bit 7 of the state word set)Warning can be read, parameters dependent on the inter-face.
Fault TRUE Error present (bit 3 of the state word set).Error can be read, parameters dependent on the interface.
6.4 PDS_RW_PAR_xx
Function: Read and write parameter data in the acyclic data exchange using thesystem blocks
● ADSREAD
● ADSWRITE
The FB is dependent on the interface used.
6.4.1 PDS_RW_PAR_EtherCAT
BOOL
DWORD
BOOL
UDINT
Done
DataOUT
Error
ErrorID
NetID
DeviceID
Enable
Write
Index
Subindex
DataIn
T_AmsNetId
UINT
BOOL
BOOL
UINT
USINT
DWORD
PDS_RW_PAR_EtherCAT
Inputs
Designation Value Significance
NetID AMS network identification code for the destination device
DeviceID EtherCAT address for the device (drive or Box)
Enable TRUE Enable for the communication
Write TRUE Write data
FALSE Read data
Index CANopen object index for the parameter to be transferred
Subindex Subindex for the parameter value to be transferred
DataIn New parameter value
6 TwinCAT 3 Lenord + BauerPDS_RW_PAR_xx
38 LB_6505_xxxx
Outputs
Designation Value Significance
Done TRUE Completion message from the FB
DataOUT Parameter value read
Error TRUE An error has occurred
ErrorID Error code (corresponds to the ADS error code)
6.4.2 PDS_RW_PAR_CANopen
BOOL
DWORD
BOOL
UDINT
Done
DataOUT
Error
ErrorID
NetID
NodeID
Enable
Write
Index
Subindex
DataIn
T_AmsNetId
UINT
BOOL
BOOL
UINT
USINT
DWORD
PDS_RW_PAR_CANopen
Inputs
Designation Value Significance
NetID AMS network identification code for the destination device
NodeID Node address for the CANopen slave (drive or Box)
Enable TRUE Enable for the communication
Write TRUE Write data
FALSE Read data
Index CANopen object index for the parameter to be transferred
Subindex Subindex for the parameter value to be transferred
DataIn New parameter value
Outputs
Designation Value Significance
Done TRUE Completion message from the FB
DataOUT Parameter value read
Error TRUE An error has occurred
ErrorID Error code (corresponds to the ADS error code)
Lenord + Bauer 6 TwinCAT 3PDS_RW_PAR_xx
LB_6505_xxxx 39
6.4.3 PDS_RW_PAR_PROFIBUS
BOOL
ARRAY[0...3] OF DINT
BOOL
UDINT
Done
DataOUT
Error
ErrorID
NetID
Station
Slot
Enable
Write
Index
DataIn
T_AmsNetId
UINT
USINT
BOOL
BOOL
UINT
DINT
PDS_RW_PAR_PROFIBUS
Inputs
Designation Value Significance
NetID AMS network identification code for the destination device
Station Station address for the device (drive or Box)
Slot Slot number for the module
Enable TRUE Enable for the communication
Write TRUE Write data
FALSE Read data
Index Number of parameters to be transferred
DataIn New parameter value
Outputs
Designation Value Significance
Done TRUE Completion message from the FB
DataOUT Parameter values read
Error TRUE An error has occurred
ErrorID Error code (corresponds to the ADS error code)
7 CODESYS V3 / SoMachine V4 Lenord + BauerGeneral
40 LB_6505_xxxx
7 CODESYS V3 / SoMachine V4
Program files available:● LB_6505_CODESYS3x.zip CODESYS V3 library
● BP_6505_SoMachine.zip SoMachine V4 library
7.1 General
The CANopen, PROFIBUS-DP, PROFINET, EtherCAT, Ethernet/IP and Sercos III in-terfaces are implemented for CODESYS V3 / SoMachine V4. The drives are control-led using device profile DPV1 or CiA 402 depending on the interface.
Main blocksPDS_Box_Ctrl Cyclic exchange of process data with a Box
PDS_Axis_Ctrl Cyclic exchange of process data with a drive
7.2 PDS_Box_Ctrl
Function: Control of a Box (→ page 8)
DWORD
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BYTE
BYTE
WORD
Control
P1_EF_EN
P1_EF_OK
P1_Link_OK
P2_EF_EN
P2_EF_OK
P2_Link_OK
P3_EF_EN
P3_EF_OK
P3_Link_OK
P4_EF_EN
P4_EF_OK
P4_Link_OK
P5_EF_EN
P5_EF_OK
P5_Link_OK
Power
Manual
Error
Error_Source
Error_Group
Error_Info
Status
ERR
P1_EN_EFuse
P1_Reset_EF
P2_EN_EFuse
P2_Reset_EF
P3_EN_EFuse
P3_Reset_EF
P4_EN_EFuse
P4_Reset_EF
P5_EN_EFuse
P5_Reset_EF
PB_Reset_ERR
DWORD
DWORD
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Box_Ctrl
Lenord + Bauer 7 CODESYS V3 / SoMachine V4PDS_Box_Ctrl
LB_6505_xxxx 41
Inputs
Designation Value Significance
Status State word for the Box
ERR Last error in the Box
P1_EN_EFuse TRUE Switch on eFuse for drive 1
P1_Reset_EF TRUE Reset eFuse for drive 1
⋮
P5_EN_EFuse TRUE Switch on eFuse for drive 5
P5_Reset_EF TRUE Reset eFuse for drive 5
PB_Reset_ERR 0↑1 Reset last error
Outputs
Designation Value Significance
Control Control word for the Box
P1_EF_EN TRUE eFuse for drive 1 switched on (LED1 illuminates green)
FALSE eFuse for drive 1 switched off (LED1 illuminates red)
P1_EF_OK TRUE eFuse for drive 1 in order (LED2 illuminates green)
FALSE eFuse for drive 1 has tripped (LED2 illuminates red)
P1_Link_OK TRUE Communication to the drive in order (LED3 illuminatesgreen)
⋮
P5_EF_EN TRUE eFuse for drive 5 switched on (LED1 illuminates green)
FALSE eFuse for drive 5 switched off (LED1 illuminates red)
P5_EF_OK TRUE eFuse for drive 5 in order (LED2 illuminates green)
FALSE eFuse for drive 5 has tripped (LED2 illuminates red)
P5_Link_OK TRUE Communication to the drive in order (LED3 illuminatesgreen)
Power TRUE Power supply for power circuits in order
Manual TRUE At least one drive is in the commissioning mode
Error TRUE Error message present
Error_Source 0 to 5 Source of error (→ page 11)
0 = Box, 1-5 = drive 1 to 5
7 CODESYS V3 / SoMachine V4 Lenord + BauerPDS_Axis_Ctrl
42 LB_6505_xxxx
Designation Value Significance
Error_Group 1 to 7 Error group (→ page 11)(1)
Error can be read, parameters dependent on the interface.
Error_Info 1 Error code (→ page 11)(2)
Error can be read, parameters dependent on the interface.
7.3 PDS_Axis_Ctrl
Function: Controlling a drive via the Box or as a separate drive (→ page 12)
WORD
DWORD
DWORD
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
WORD
DWORD
DWORD
DINT
DINT
DINT
BOOL
DINT
DINT
DINT
BOOL
BOOL
BOOL
BOOL
BOOL
BOOL
PDS_Axis_Ctrl
StatusActPosInActVelInNomPosInNomVelInHomeValSetHomeLoopDistanceNumDenomDirectionEnableStartPosStopPosJogFwd JogRev
ControlNomPosOutNomVelOutActPosOutActVelOut
HomingDone
ReadyBusy
InPosWarning
Fault
Inputs
Designation Value Significance
Status State word received from the drive
ActPosIn Position actual value received from the drive
ActVelIn Speed actual value received from the drive
NomPosIn Destination position (specification of nominal value)
NomVelIn Final velocity (specification of nominal value)(3)
HomeValue Specification of the reference position (→ page 14)
SetHome 0↑1 Apply HomeValue as position actual value
(1) If Error_Group is 0, no error occured.(2) Error_Info contains the error code of group 1 and 6, otherwise 0 ist output.(3) Value must be greater than zero, otherwise the drive does not move.
Lenord + Bauer 7 CODESYS V3 / SoMachine V4PDS_Axis_Ctrl
LB_6505_xxxx 43
Designation Value Significance
LoopDistance Specification of the distance for a loop movement(→ page 14)
>0 Move to destination in positive direction
<0 Move to destination in negative direction
0 Move directly to destination
Num Numerator (1) (→ page 13)
Denom Denominator (1) (→ page 13)
Direction Specification of the direction of movement; is applied usingEnable, any change will cause a movement to be cancelled(→ page 13)
FALSE Positive nominal and actual values for clockwise rotation
TRUE Negative nominal and actual values for clockwise rotation
Enable TRUE Enable for positioning, jogging or homing; application of thedirection of movement
FALSE Inhibit for all functions, place drive in “Switching On Inhibi-ted” (S1) stateAcknowledge an existing error message
StartPos 0↑1 Start positioning process (→ page 13)
StopPos TRUE Positioning process in progress is cancelled and start inputinhibited.
JogFwd 0↑1 Forward manually controlled movement (→ page 14)
JogRev 0↑1 Reverse manually controlled movement (→ page 14)
Outputs
Designation Value Significance
Control Control word to be transferred to the drive
NomPosOut Nominal position to be transferred to the drive
NomVelOut Nominal velocity to be transferred to the drive
ActPosOut Output of the position actual value of the drive taking intoaccount the direction of positioning
ActVelOut Output of the velocity actual value of the drive taking intoaccount the direction of positioning
HomingDone TRUE Set Home undertaken successfully
Ready TRUE Drive is ready
(1) Integer value for adapting the position values to the application.
7 CODESYS V3 / SoMachine V4 Lenord + BauerAcyclic data exchange
44 LB_6505_xxxx
Designation Value Significance
Busy TRUE Positioning, Homing or Jogging is being undertaken
InPos TRUE Destination position reached
Warning TRUE Warning present (corresponding bit of the state word set)Warning can be read, parameters dependent on the inter-face.
Fault TRUE Error present (corresponding bit of the state word set).Error can be read, parameters dependent on the interface.
7.4 Acyclic data exchange
The acyclic data exchange depends on the interface!
Function: Read and write parameter data in the acyclic data exchange
For reading or writing the following function blocks can be used:
Interface LibraryFunction block
Read Write
CANopen CAA CIA405 SDO_READ4 SDO_WRITE4
PROFIBUS CommFB RDREC WRREC
PROFINET CommFB RDREC WRREC
Ethernet/IPEtherNetIPServices
Get_Attribute_Single Set_Attribute_Single
EtherCAT IODrvEtherCAT ETC_CO_SdoReadDWord ETC_CO_SdoWriteDWord
Sercos III IoDrvSercos3 Sercos3_IDNRead4 Sercos3_IDNWrite4