AN00270 BandR PLCs Getting Started Guide RevA EN
AN00270 BandR PLCs Getting Started Guide RevA EN
Application note
B&R PLC's Getting Started Guide (SDC and Additional libraries)
AN00270
Rev A (EN)
Introduction
This application note provides and details an example Automation Studio project that includes library
functions to allow a B&R X20 PLC to control and monitor ABB MicroFlex e190 and/or MotiFlex e180 AC servo
drives via Ethernet Powerlink. The following application note covers the basic configuration of a B&R X20
and ABB Motion drives system and some associated features. Before the configuration we must ensure that
we have all the pre-requisites for this.
To control an ABB motion drive as an EPL/SDC slave you will need the following hardware/software …
If any files, Automation Studio versions or further support documentation are needed for the B&R PLC you
can get these from their support website: Downloads | B&R Industrial Automation (br-automation.com)
Note: It’s possible that you will experience issues downloading certain components from the software when
on the corporate network. If there are problems, please try restarting your PC and try different networks.
new.abb.com/drives/low-voltage-ac/motion 1
Application note Generic drive interface AN00270
Getting Started
Select Relicense
https://new.abb.com/drives/low-voltage-ac/motion 2
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
Navigation
To aide easy navigation and descriptions used within this app note the key view tabs are pointed out below.
When you open AS you will see a standard UI layout with several key areas as pointed out below
Toolbar
Project navigation
Hardware Toolbox
Errors Properties
Online status
Within each area there are tabs to change view or get different detail. The tabs in the Hardware area are
pointed out below.
Logical View: Manage all the PLC program, library
new.abb.com/drives/low-voltage-ac/motion 3
Application note Generic drive interface AN00270
After you click “Finish” it will add the CPU to your project.
Note: If your AS version is not up to date you may get an error here saying there is no runtime installed for
this PLC. If so ensure that the license is installed and try to automatically update by going to Toolbar >
Tools > Upgrade and selecting the files that are missing. If this doesn’t work, you can get the files directly
from the website.
Now we have selected the CPU we will use we can proceed with configuration of the PLC
https://new.abb.com/drives/low-voltage-ac/motion 4
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
This will navigate to the ‘Online Settings’ window. Here you can select the Ethernet tab
Selected TCPIP, ensure the cable is connected, click the browse button and refresh.
After a successful scan the PLC will appear in the Target Window.
Note: Your firewall will need to be turned off for this to work. If this is not possible please see the next
section for more detail. Default IP address is 192.168.0.100.
new.abb.com/drives/low-voltage-ac/motion 5
Application note Generic drive interface AN00270
To test the connection to the the PLC right click on the connection you are using and click connect
You will notice in the bottom right hand corner of the screen the status of the connection will change from
OFFLINE
To RUN and will also show the CPU type and further detail
As before right click on the connection and select ‘Connect’ to test the connection.
https://new.abb.com/drives/low-voltage-ac/motion 6
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
Guidance for X20 CPU (CF card), CP1583, CP1584, CP1585, and CP1586
Create a new AS program and set the IP address manually by going to Physical view > ‘ETH’ right clicking
and selecting Configuration.
In the CPU configuration window change the Mode to enter IP address manually
Take out the CF card from PLC and plug it into your PC.
new.abb.com/drives/low-voltage-ac/motion 7
Application note Generic drive interface AN00270
Create the file system and Reinstall Card in PLC then Re-boot it
Then as mentioned earlier in ‘What to do if the PLC cannot be detected’ you can force an IP address into the
destination IP and connect to the PLC with the IP you set.
Guidance for X20 Compact CPU, integrated hard disk, CP1381, CP1382
You can try to use the Serial port to scan the PLC hardware, and then change the IP address using this
connection and download it to PLC.
If this fails, it’s possible some IT issues could be causing the problem so to try a different PC to eliminate
this as a possible issue
https://new.abb.com/drives/low-voltage-ac/motion 8
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
Powerlink Configuration
To configure the Powerlink settings please follow the steps below.
Select the Physical view > PLC and right click > Select Configuration.
In the Configuration Window navigate to the Timing branch then System timer. The interface should be set
to ‘EPL/X2X Interface’
new.abb.com/drives/low-voltage-ac/motion 9
Application note Generic drive interface AN00270
The Interface should be set to the correct port which in this case is the IF3 port.
Ensure ‘Task class idle time’ is set correctly to the cycle time of the CPU. This will also set the Cycle time of
the System Timer. This should match the settings that were used earlier. In the below example 2000us
https://new.abb.com/drives/low-voltage-ac/motion 10
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
There are two versions of xdd file available, one that can be used for legacy ABB motion controllers (top one)
and one for use with Automation Studio (Bottom one)
Upload the special Automation Studio .xdd file from the servo drive
Click ‘Save as.’ and store it in a sensible location for later use.
new.abb.com/drives/low-voltage-ac/motion 11
Application note Generic drive interface AN00270
Note: In previous versions this option was called ‘Import Fieldbus devices’
Next click ‘Import Fieldbus devices’.
Navigate to where the .xdd file created earlier is stored, select it and click ‘Open’
After a while you will get a warning message, details will be shown in the error window.
https://new.abb.com/drives/low-voltage-ac/motion 12
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
Note: Enure that View > Toolbox is ticked to ensure its visable
Then drag the device over to the PLK section of the Physical View device tree and drop it
It will now appear below the PLK section, keep adding drives until the configuration is complete.
Edit the device node number as required in the physical view
You can view the topological view of the connections with the “System Designer”. To access this in the
toolbar select Open > System Designer
new.abb.com/drives/low-voltage-ac/motion 13
Application note Generic drive interface AN00270
Here you can see the view that if gives us showing physical devices and expected connections.
You will then need to delete any unassigned modules that have been updated
>
Note: If you plan to simulate the code you will need to turn Module Supervised = off. If you don’t then you
will get errors when simulating.
The default settings for these parameters are normally enough but can be adjusted as required.
https://new.abb.com/drives/low-voltage-ac/motion 14
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
As with other DS 402 devices the methods of communication are PDO and SDO. The lists of objects for
these can be accessed as indicated below
PDO Objects
SDO Objects
We can look up the object dictionary in Mint Help File for more information on drive objects
new.abb.com/drives/low-voltage-ac/motion 15
Application note Generic drive interface AN00270
PDO Mapping
All standard and drive specific PDO objects which need to be accessed during cyclic transmission are
accessed via the ‘Channels’ section of the tree. As default no PDO’s are mapped (‘cyclic transmission’ =
None), so you must find and map them as needed and also define the data from direction by setting the
property for ‘cyclic transmission’ designation to be READ or WRITE.
Exclamation
point means Input
that its
mapped
Output
Once relevant mappings are complete (Objects 6040, 6041, 6060, 6064 and 607A) Save the changes.
After setting up in the “Channels”, we must then go to PDO mapping list by right clicking on the Drive in
Physical view and selecting in the “I/O mapping” page as below:
As you can see the added IO is there in addition to ‘ModuleOK’ which is mapped by default.
We must then map across the DS 402 objects to the Sdc control structure process variable, to do this click
on the items in the Process Variable column one by one and click the ‘…’ next pick the correct item from the
gSdcAxisCtrl structure as shown below. Each item has a number after it eg [0] this refers to the item in the
sdc, 0 is e190 (1st item), 1 is e180 (2nd item)
https://new.abb.com/drives/low-voltage-ac/motion 16
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
SDO Mapping
All standard and drive specific SDO objects here are transmitted to the device at startup and accessed via
the ‘device specific parameters’ section of the tree. As default the SDO’s are mapped but have no
initialization value. So, you must find and add these values as needed.
All these “device specific parameters (SDO)” are defined by .xdd file and related to drive parameters. The
“Init value” here is transmitted to the drive at startup so that to modify the parameter table of E180/E190.
You can also use a function to read/write these parameters (SDO) in your PLC program as soon as you need.
Note: If any start up SDO’s are needed, then the Parameter for immediate apply should also be set to true
for these to take effect. This object defines if the settings are moved from the objects in the parameters
inside the drive.
new.abb.com/drives/low-voltage-ac/motion 17
Application note Generic drive interface AN00270
Next drag the B&R Libraries across and place it in the Libraries folder.
This is a collection of libraries so the next view we are given an option to select which of the sub libraries we
want to import.
https://new.abb.com/drives/low-voltage-ac/motion 18
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
This program has many sub parts. As default, the ‘SdcCtrl’ > ‘GlobalSdcCrtl.var’ includes 4 axes with
addresses 1,2, 11 and 12.
If your hardware configuration differs from this, you should change these values. The example below shows
2 axes configured with node addresses 3 and 4.
new.abb.com/drives/low-voltage-ac/motion 19
Application note Generic drive interface AN00270
Once these steps are finished you will see a now Smart Device Interface has been added
https://new.abb.com/drives/low-voltage-ac/motion 20
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
Global Variables
For each axis a variable list is needed to interact with the Axis’ IO. We must create these and name them
according to the axis reference.
To do this navigate to Logical view and find the list ‘Global.var’
Double click on it. This will open the Variable decleration view
From here you can click on the Add Variable Icon which will create a new row. From here you should add
information like below:
Name gAxis01 Axis variable name
Type ACP10AXIS_typ Special datatype for the Axis Structure
Replicable Tick
new.abb.com/drives/low-voltage-ac/motion 21
Application note Generic drive interface AN00270
NC mapping
Next, we must add an NC mapping object to connect the Axis Control Program, the SDC Program and the
Actual hardware Axis together. You cannot edit the preexisting NC mapping object “Acp10map.ncm” so you
must add a new one from the toolbox into the same area to create a new editable version “Acp10map1.ncm”.
To do this first select the Configuration view and look for the object called ‘ACP10 Mapping Table’ then drag
it into the Motion folder.
Now we can double click on the new mapping table to open the Editor and start to add NC Objects to it. To
do so right click in the mapping editor and selected ‘Add NC Object’
Add mappings for all the axes in your project using the table below for Guidance…
When your finished you should end up with all the axes added with the correct references
https://new.abb.com/drives/low-voltage-ac/motion 22
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
If you open the ‘InitAxis’ parameter table the structure of the sub folders shows the different groups of
mapping object. Controller has the PID settings in the control loop and message has the diagnostic data
stored in it.
PID Settings
Scale for the encoder is in ‘pulses per rev’ not ‘counts per rev’ so ensure the SCALE_ENCOD_INCR should be
equal to Mint Keyword ‘EncoderResolution(0)’ .e.g. for eSM motors with SmartINC encoders, 131072/4 =
32768
new.abb.com/drives/low-voltage-ac/motion 23
Application note Generic drive interface AN00270
Next select which sub elements to import. Navigate to and find ‘LibACP10MC_SingleAx_ST.zip’ and click
Finish.
https://new.abb.com/drives/low-voltage-ac/motion 24
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
Now your project will have the SDC Program and the Single Axis Control Program within it.
SDC Control
Program
Find task Cyclic #1 right click and select Properties. This will then open the CPUs configuration
>
In the area for ‘Cyclic#1’, set Duration to the ‘EPL cycle time’, and the tolerance time to ‘0’ and then build the
configuration to accept the settings. Then save the configuration
Next, we must add the ‘sdcCtrl’ program to this task, to do so right click in the task ‘Cyclic#1’ > ‘Add Object’
new.abb.com/drives/low-voltage-ac/motion 25
Application note Generic drive interface AN00270
Then navigate to ‘[Project] > StepServo > SdcCtrl > SdcCtrl program’ click okay.
>
The SDC program is now assigned to this task.
Repeat the above step for additional axes.
Next, we must define another Cyclic task for the lower speed control programs. Using the same method as
above, edit the properties of the task (e.g. Cyclic #4) to be suitable for the requirements of the code. In the
below example it was edited to be a 100ms cyclic task.
The control programs must be added to this slow speed task, this is any program sections that don’t
require real time updates. To do this right click on the task and select ‘Add Object’.
Navigate to ‘[Project] > xxxx program’ (Where xxxx is the program name) click okay.
In the example above you can see we just add the Basic program for simple control.
Now the basic programming is complete, this is enough to use basic functionality forcing it through the
program control functions. At the stage the user could either test the basic functionality or add further
programming of their own.
https://new.abb.com/drives/low-voltage-ac/motion 26
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
Next, go to Toolbar > Project > Project Installation > and select either:
- ‘Transfer to Target’ to download current AS program into PLC (PLC must be online)
OR
- ‘Offline installation’ to load the project onto an SD card which can then be loaded onto the PLC
Note: You will need to connect to the PLC first before you can select ‘Transfer to Target’
Next you will get a pop up Window and from here you can select ‘Transfer’. You’ll get a pop up warning you
that the PLC will be formatted if you contuinue. Select ‘Yes’
Once Complete you will get a view like below
new.abb.com/drives/low-voltage-ac/motion 27
Application note Generic drive interface AN00270
Next Switch to the Configuration view and find: [Config] > [CPU] > Motion > Acp10map1.ncm
This will open a view like below giving 4 windows for easy analysis of the axis’ operation.
Commands Parameters
Status Trace
https://new.abb.com/drives/low-voltage-ac/motion 28
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
new.abb.com/drives/low-voltage-ac/motion 29
Application note Generic drive interface AN00270
This will open a Watch Window, here you can insert variables by right clicking in the Watch area and Select
Insert Variable…
Add the variables you want to monitor one by one by selecting them and clicking Add
https://new.abb.com/drives/low-voltage-ac/motion 30
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
Now you can watch and force the variable of the SDC program, to control or monitor the drive.
To do this open the Logical view and find [Project name] > StepServo > SdcCtrl > SdcCtrl.c
Double click to open this ‘Structured text’ program.
The Watch Window will still be open from earlier, as before right click and insert all the wanted parameters.
Note: All the motion related parameters and status of all the SDC controlled axes can be found here.
You can now use this list to watch and force variables as required.
new.abb.com/drives/low-voltage-ac/motion 31
Application note Generic drive interface AN00270
Trace
There two ways of turning on “Trace” function in AS: NC Axis Trace and Program Variables Trace
NC Axis Trace
To use this open the Configuration view and find [Project name] > [CPU type] > Motion > Acp10map1.ncm
and double click on it. This will open the Mapping Editor
From here, right click on the NC Object and select Open > Trace
This will open the trace view, Right click on the trace you want to use to Monitor a variable and select
Configuration.
You can select which NC Object we want to view, select the variable, and Click Apply
Note: NC Axis trace has the following limitations: Maximum points: 4096, Minimum sample rate: 1ms
https://new.abb.com/drives/low-voltage-ac/motion 32
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
This will open the trace for the program you right clicked on.
Next press the icon to Insert Trace then right click on it and select Properties
>
new.abb.com/drives/low-voltage-ac/motion 33
Application note Generic drive interface AN00270
From here you can configure the trace buffer and set a trigger condition if one is needed.
Note: Program Variables Trace: Limitations Maximum points: 32767, Minimum sample rate: The same as
system tick(400us)
Now we have a fully configured chart we can use the controls at the top to stop start and manipulate it.
>
https://new.abb.com/drives/low-voltage-ac/motion 34
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
Then in the configuration window go to System Diagnostics > Activate System Diagnostics manager (SDM)
and ensure its set to ‘on’ then connect to the PLC and put it in Run mode.
Note: SDM service also consumes CPU resource so its best to only turn it on when necessary
new.abb.com/drives/low-voltage-ac/motion 35
Application note Generic drive interface AN00270
Logger
You can use the logger function to check the CPU events and errors.
If the CPU is stuck in “Service Mode” or not running correctly, you can check what is happening here. To
access the Logger, go to Toolbar > Open > Logger
This will then open the Logger window where you can see all errors and Warnings both active and historical.
Note: If no hardware is connected, and you have not turned the supervision off, then the CPU would run into
“Service Mode”
https://new.abb.com/drives/low-voltage-ac/motion 36
Application note B&R PLC's Getting Started Guide (SDC and Additional libraries) AN00270
Profiler
If your program is running but you want to check how its running you can use the profiler. Here you can
check the CPU load and cyclic running.
To access it go to the Toolbar > Open > Profiler.
This will then Open the Profiler view which will give and active view of all the CPU cycle times, CPU
loading and so on.
new.abb.com/drives/low-voltage-ac/motion 37
Application note Generic drive interface AN00270
Included with this application note there are several programs which include the examples are outlined
below.
These programs can be loaded to test and learn more about the programs and structures used to realize
motion with B&R X20 PLC’s
Please see also the below app notes for more information on B&R and SDC.
AN00275 - B&R SDC using the Touchprobe function, for further information on SDC functions
AN00265 - Generic Drive Interface - B&R PLC with Modbus (GDI)
AN00264 - Generic Drive Interface - B&R PLC with EPL (GDI)
Contact us
For more information please contact your
© Copyright 2020 ABB. All rights reserved.
local ABB representative or one of the following:
Specifications subject to change without
new.abb.com/drives/low-voltage-ac/motion
notice.
new.abb.com/drives
new.abb.com/channel-partners
new.abb.com/plc
https://new.abb.com/drives/low-voltage-ac/motion 38