6.4.1.3 Connecting to the PLC
Information on how to connect to the PLC can be found in
detail in the Automation Studio™ Help. Open the B&R Help
Explorer and go to [Automation Software → Getting Started
→ Creating programs with Automation Studio → First
project with X20 CPU → Congure online connection].
6.5 Function Block Descriptions
6.5.1
Overview PLCopen
®
PLCopen
®
is a vendor- and product-independent
worldwide association. Its mission is to be the leading
association resolving topics related to control
programming to support the use of international standards
in this eld. Function blocks of the PLC library or package
are compliant with the following standard version:
Technical Specication Function blocks for motion control
(Formerly Part 1 and Part 2), Version 2.0, March 17, 2011.
6.5.1.1 Naming Conventions
Function blocks
The naming of the function blocks consist of a prex, the
function-specic name, and a postx, which is described in
PLCopen
®
as Supplier ID. For function blocks
dened by
PLCopen
®
, the prex MC_ is used. For ISD-specic function
blocks, the prex DD_ is used. For function blocks for a
servo drive, _ISD51x is used as Supplier ID and for SAB,
_SAB is used.
Example:
•
MC_Power_ISD51x = Function block dened by
PLCopen, targeting the servo drive.
•
DD_ReadVersion_SAB = Function block dened
by Danfoss, targeting the SAB.
Enumerations
For enumerations dened by PLCopen
®
, the prex MC_ is
used. For enumerations dened by Danfoss, the prex DD_
is used.
_ISD51x is used as Supplier ID for enumerations.
Internal
The library needs some POUs that are used internally,
however they cannot be used in an application program.
All internal POUs, enumerations, and constants start with a
leading underscore _ and are sorted into the Intern_51x
folder, and/or into the Intern_51x library inside the
package.
6.5.1.2 Structure of Library/Package
All elements, such as function blocks, data types, and
enumerations, are sorted into folders in the library, and/or
into libraries inside the package, depending on the
capabilities of the development environment.
See
chapter 6.3 TwinCAT
®
and chapter 6.4 Automation
Studio
™
for further information.
The constants are structured in lists of constants:
•
AxisErrorCodes/SabErrorCodes: Constants for all
the alarms and warnings of the servo drive (see
chapter 9.2.2 Error Codes) and SAB (see
chapter 9.3.2 Warnings and Alarms).
•
AxisTraceSignals/SabTraceSignals: Constants for
trace signals of the servo drive and SAB (see
chapter 2.7.2 Trace).
•
FB_ErrorConstants: Constants for all the function
block errors. Value provided in the function block
output ErrorInfo.ErrorID.
•
CamParsingErrors: Constants for specifying an
error after the CAM parsing (see
chapter 2.4.5 CAM Mode).
6.5.1.3
PLCopen
®
State Machine
The state diagram in Illustration 6.18 denes the behavior
of the axis at a high level when multiple motion control
function blocks are activated simultaneously. This
combination of motion proles is useful in building a more
complicated prole, or to handle exceptions within a
program.
The basic rule is that motion commands are always taken
sequentially, even if the PLC is capable of real parallel
processing. These commands act on the axis state diagram.
The axis is always in 1 of the dened states. Any motion
command that causes a transition changes the state of the
axis and, as a result of that, modies the way the current
motion is computed.
The state diagram is an abstraction layer of what the real
state of the axis is, compared to the image of the I/O
points within a cyclic (PLC) program.
A change of state is reected immediately when issuing
the corresponding motion command. The response time
depends on the specic functionality.
The diagram is focused on a single axis. The multiple axis
function blocks, for example MC_CamIn_ISD51x or
MC_GearIn_ISD51x, can be looked at, from a state diagram
point of view, as multiple single-axes all in specic states.
For example, the CAM-master can be in the state Continu-
ousMotion. The corresponding slave is in the state
SynchronizedMotion. Connecting a slave axis to a master
axis has no inuence on the master axis.
Arrows within the state diagram show the possible state
transitions between the states. State transitions due to an
issued command are shown as full arrows. Dashed arrows
show state transitions, which occur when a command of
an axis has terminated, and system-related transitions (for
example, error-related). The motion commands that transit
the axis to the corresponding motion state are listed above
Programming
VLT
®
Integrated Servo Drive ISD
®
510 System
172 Danfoss A/S © 01/2017 All rights reserved. MG36D102
6
6