0% found this document useful (0 votes)
59 views90 pages

BC5250 DeviceNet Controller Guide

Uploaded by

Dinh Thi Truong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views90 pages

BC5250 DeviceNet Controller Guide

Uploaded by

Dinh Thi Truong
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Documentation

BC5250

Bus Terminal Controller for DeviceNet

Version: 2.0.0
Date: 2017-07-18
Table of contents

Table of contents
1 Foreword .................................................................................................................................................... 5
1.1 Notes on the documentation........................................................................................................... 5
1.2 Safety instructions .......................................................................................................................... 6
1.3 Documentation issue status............................................................................................................ 7

2 Product overview....................................................................................................................................... 8
2.1 BCxx50 Overview ........................................................................................................................... 8
2.2 The principle of the Bus Terminal ................................................................................................... 9
2.3 The Beckhoff Bus Terminal system ................................................................................................ 9
2.4 Technical data .............................................................................................................................. 12
2.4.1 Technical Data - BCxx50 ................................................................................................ 12
2.4.2 Technical data - DeviceNet .............................................................................................. 14
2.4.3 Technical Data - PLC ....................................................................................................... 15

3 Mounting and wiring ............................................................................................................................... 16


3.1 Mounting ....................................................................................................................................... 16
3.1.1 Dimensions ...................................................................................................................... 16
3.1.2 Installation ........................................................................................................................ 17
3.2 Wiring............................................................................................................................................ 18
3.2.1 Potential groups, insulation testing and PE ..................................................................... 18
3.2.2 Power supply.................................................................................................................... 20
3.2.3 Programming cable .......................................................................................................... 21
3.2.4 DeviceNet cabling ............................................................................................................ 22

4 Parameterization and Commissioning .................................................................................................. 27


4.1 Start-up behavior of the Bus Terminal Controller ......................................................................... 27
4.2 Configuration ................................................................................................................................ 27
4.2.1 Overview .......................................................................................................................... 27
4.2.2 Creating a TwinCAT configuration ................................................................................... 29
4.2.3 Downloading a TwinCAT configuration ............................................................................ 30
4.2.4 Uploading a TwinCAT configuration ................................................................................ 32
4.2.5 Resources in the Bus Terminal Controller ....................................................................... 33
4.2.6 ADS connection via serial interface ................................................................................. 36
4.2.7 DeviceNet slave interface ................................................................................................ 37
4.2.8 K-bus................................................................................................................................ 45
4.2.9 PLC .................................................................................................................................. 47
4.2.10 Configuration software KS2000 ....................................................................................... 50

5 Programming ........................................................................................................................................... 51
5.1 BCxx50 PLC features ................................................................................................................... 51
5.2 TwinCAT PLC ............................................................................................................................... 51
5.3 TwinCAT PLC - Error codes ......................................................................................................... 52
5.4 Remanent data ............................................................................................................................. 54
5.5 Allocated flags .............................................................................................................................. 55
5.6 Local process image in delivery state........................................................................................... 56
5.7 Mapping the Bus Terminals .......................................................................................................... 57
5.8 Creating a boot project ................................................................................................................. 57
5.9 Local process image in the TwinCAT configuration...................................................................... 58
5.10 Communication between TwinCAT and BX/BCxx50 .................................................................... 59
5.11 Up- and downloading of programs................................................................................................ 60
5.12 Libraries ........................................................................................................................................ 64

BC5250 Version: 2.0.0 3


Table of contents

5.12.1 Libraries overview ............................................................................................................ 64


5.12.2 Data structure strBX5200_Set ......................................................................................... 65
5.12.3 TcBaseBX ........................................................................................................................ 67
5.13 Program transfer via the serial interface....................................................................................... 71

6 DeviceNet communication...................................................................................................................... 73
6.1 DeviceNet Introduction ................................................................................................................. 73
6.2 Network Management................................................................................................................... 74
6.3 Object directory............................................................................................................................. 74
6.4 ADS-Communication .................................................................................................................... 75
6.4.1 ADS services.................................................................................................................... 75

7 Error handling and diagnosis................................................................................................................. 77


7.1 Diagnostics ................................................................................................................................... 77
7.2 Diagnostic LEDs ........................................................................................................................... 79

8 Appendix .................................................................................................................................................. 82
8.1 Firmware Update .......................................................................................................................... 82
8.2 General operating conditions........................................................................................................ 84
8.3 Approvals...................................................................................................................................... 85
8.4 Test standards for device testing.................................................................................................. 86
8.5 Bibliography .................................................................................................................................. 86
8.6 List of Abbreviations ..................................................................................................................... 86
8.7 Support and Service ..................................................................................................................... 88

4 Version: 2.0.0 BC5250


Foreword

1 Foreword

1.1 Notes on the documentation


Intended audience

This description is only intended for the use of trained specialists in control and automation engineering who
are familiar with the applicable national standards.
It is essential that the documentation and the following notes and explanations are followed when installing
and commissioning these components.
It is the duty of the technical personnel to use the documentation published at the respective time of each
installation and commissioning.

The responsible staff must ensure that the application or use of the products described satisfy all the
requirements for safety, including all the relevant laws, regulations, guidelines and standards.

Disclaimer

The documentation has been prepared with care. The products described are, however, constantly under
development.

We reserve the right to revise and change the documentation at any time and without prior announcement.

No claims for the modification of products that have already been supplied may be made on the basis of the
data, diagrams and descriptions in this documentation.

Trademarks

Beckhoff®, TwinCAT®, EtherCAT®, Safety over EtherCAT®, TwinSAFE®, XFC® and XTS® are registered
trademarks of and licensed by Beckhoff Automation GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own
purposes could violate the rights of the owners.

Patent Pending

The EtherCAT Technology is covered, including but not limited to the following patent applications and
patents: EP1590927, EP1789857, DE102004044764, DE102007017835 with corresponding applications or
registrations in various other countries.

The TwinCAT Technology is covered, including but not limited to the following patent applications and
patents: EP0851348, US6167425 with corresponding applications or registrations in various other countries.

EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH,
Germany

Copyright

© Beckhoff Automation GmbH & Co. KG, Germany.


The reproduction, distribution and utilization of this document as well as the communication of its contents to
others without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a
patent, utility model or design.

BC5250 Version: 2.0.0 5


Foreword

1.2 Safety instructions


Safety regulations

Please note the following safety instructions and explanations!


Product-specific safety instructions can be found on following pages or in the areas mounting, wiring,
commissioning etc.

Exclusion of liability

All the components are supplied in particular hardware and software configurations appropriate for the
application. Modifications to hardware or software configurations other than those described in the
documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.

Personnel qualification

This description is only intended for trained specialists in control, automation and drive engineering who are
familiar with the applicable national standards.

Description of symbols

In this documentation the following symbols are used with an accompanying safety instruction or note. The
safety instructions must be read carefully and followed without fail!

Serious risk of injury!


Failure to follow the safety instructions associated with this symbol directly endangers the
life and health of persons.
DANGER

Risk of injury!
Failure to follow the safety instructions associated with this symbol endangers the life and
health of persons.
WARNING

Personal injuries!
Failure to follow the safety instructions associated with this symbol can lead to injuries to
persons.
CAUTION

Damage to the environment or devices


Failure to follow the instructions associated with this symbol can lead to damage to the en-
vironment or equipment.
Attention

Tip or pointer
This symbol indicates information that contributes to better understanding.

Note

6 Version: 2.0.0 BC5250


Foreword

1.3 Documentation issue status


Version Comment
2.0.0 • Migration
1.1.0 • Notes to meet the UL requirements added.
1.0.0 • First public issue

BC5250 firmware

For updating your firmware you need a serial cable, the KS2000 configuration software, or the firmware
update program.

Firmware Comment
0xB1 Firmware version 0xB1

The firmware and hardware versions (delivery state) can be found on the sticker on the underside of the Bus
Terminal Controller.

BC5250 Version: 2.0.0 7


Product overview

2 Product overview

2.1 BCxx50 Overview


Bus Terminal Controllers are Bus Couplers with integrated PLC functionality. The BCxx50 Bus Terminal
Controllers have a fieldbus interface, are intelligent slaves and can be used as decentralized intelligence
within the system. They are located in a cost-optimized and compact housing. In contrast to the BCxx00
range, the BCxx50 range supports up to 255 Bus Terminals via the K-Bus extension.

The Bus Terminal Controller is programmed using the TwinCAT programming system according to IEC
61131-3. The BCxx50 configuration/programming interface is used for loading the PLC program. If the
TwinCAT software PLC is in use, the PLC program can also be loaded via the fieldbus.

The inputs and outputs of the connected Bus Terminals are assigned in the default setting of the mini-PLC.
Each individual Bus Terminal can be configured in such a way that it exchanges data directly through the
fieldbus with the higher-level automation device. Similarly, pre-processed data can be exchanged between
the Bus Terminal Controller and the higher-level controller via the fieldbus.

Fieldbus interface

The variants of the BCxx50 series Bus Terminal Controllers differ in terms of their fieldbus interfaces.
Various versions cover the most important fieldbus systems:
• BC3150: PROFIBUS DP
• BC5150: CANopen
• BC5250: DeviceNet
• BC8050: RS485, various protocols
• BC8150: RS232, various protocols

Programming

The BCxx50 devices are programmed according to the powerful IEC 61131-3 standard. Like for all other
BECKHOFF controllers, the TwinCAT automation software is the basis for parameterization and
programming. Users therefore have the familiar TwinCAT tools available, e.g. PLC programming interface,
System Manager and TwinCAT Scope. Data is exchanged optionally via the serial interface (COM1) or via
the fieldbus through Beckhoff PC FCxxxx fieldbus cards.

Configuration

The configuration is also carried out using TwinCAT. The fieldbus interface can be configured and
parameterized via the System Manager. The System Manager can read all connected devices and Bus
Terminals. After the parameterization, the configuration is saved on the BCxx50 via the serial interface. The
configuration thus created can be accessed again later.

8 Version: 2.0.0 BC5250


Product overview

2.2 The principle of the Bus Terminal

Fig. 1: The principle of the Bus Terminal

2.3 The Beckhoff Bus Terminal system


Up to 256 Bus Terminals, with 1 to 16 I/O channels per signal form

The Bus Terminal system is the universal interface between a fieldbus system and the sensor / actuator
level. A unit consists of a Bus Coupler as the head station, and up to 64 electronic series terminals, the last
one being an end terminal. Up to 255 Bus Terminals can be connected via the K-bus extension. For each
technical signal form, terminals are available with one, two, four or eight I/O channels, which can be mixed
as required. All the terminal types have the same mechanical construction, so that difficulties of planning and
design are minimized. The height and depth match the dimensions of compact terminal boxes.

Decentralised wiring of each I/O level

Fieldbus technology allows more compact forms of controller to be used. The I/O level does not have to be
brought to the controller. The sensors and actuators can be wired decentrally, using minimum cable lengths.
The controller can be installed at any location within the plant.

Industrial PCs as controllers

The use of an Industrial PC as the controller means that the operating and observing element can be
implemented in the controller's hardware. The controller can therefore be located at an operating panel, in a
control room, or at some similar place. The Bus Terminals form the decentralised input/output level of the

BC5250 Version: 2.0.0 9


Product overview

controller in the control cabinet and the subsidiary terminal boxes. The power sector of the plant is also
controlled over the bus system in addition to the sensor/actuator level. The Bus Terminal replaces the
conventional series terminal as the wiring level in the control cabinet. The control cabinet can have smaller
dimensions.

Bus Couplers for all usual bus systems

The Beckhoff Bus Terminal system unites the advantages of a bus system with the possibilities of the
compact series terminal. Bus Terminals can be driven within all the usual bus systems, thus reducing the
controller parts count. The Bus Terminals then behave like conventional connections for that bus system. All
the performance features of the particular bus system are supported.

Mounting on standardized mounting rails

The installation is standardized thanks to the simple and space-saving mounting on a standardized mounting
rail (EN 60715, 35 mm) and the direct wiring of actuators and sensors, without cross connections between
the terminals. The consistent labelling scheme also contributes.

The small physical size and the great flexibility of the Bus Terminal system allow it to be used wherever a
series terminal is also used. Every type of connection, such as analog, digital, serial or the direct connection
of sensors can be implemented.

Modularity

The modular assembly of the terminal strip with Bus Terminals of various functions limits the number of
unused channels to a maximum of one per function. The presence of two channels in one terminal is the
optimum compromise of unused channels and the cost of each channel. The possibility of electrical isolation
through potential feed terminals also helps to keep the number of unused channels low.

Display of the channel state

The integrated LEDs show the state of the channel at a location close to the sensors and actuators.

K-bus

The K-bus is the data path within a terminal strip. The K-bus is led through from the Bus Coupler through all
the terminals via six contacts on the terminals' side walls. The end terminal terminates the K-bus. The user
does not have to learn anything about the function of the K-bus or about the internal workings of the
terminals and the Bus Coupler. Many software tools that can be supplied make project planning,
configuration and operation easy.

Potential feed terminals for isolated groups

The operating voltage is passed on to following terminals via three power contacts. You can divide the
terminal strip into arbitrary isolated groups by means of potential feed terminals. The potential feed terminals
play no part in the control of the terminals, and can be inserted at any locations within the terminal strip.

Up to 64 Bus Terminals can be used in a terminal block, with optional K-bus extension for up to 256 Bus
Terminals. This count does include potential feed terminals, but not the end terminal.

Bus Couplers for various fieldbus systems

Various Bus Couplers can be used to couple the electronic terminal strip quickly and easily to different
fieldbus systems. It is also possible to convert to another fieldbus system at a later time. The Bus Coupler
performs all the monitoring and control tasks that are necessary for operation of the connected Bus
Terminals. The operation and configuration of the Bus Terminals is carried out exclusively by the Bus
Coupler. Nevertheless, the parameters that have been set are stored in each Bus Terminal, and are retained
in the event of voltage drop-out. Fieldbus, K-bus and I/O level are electrically isolated.

If the exchange of data over the fieldbus is prone to errors or fails for a period of time, register contents (such
as counter states) are retained, digital outputs are cleared, and analog outputs take a value that can be
configured for each output when commissioning. The default setting for analog outputs is 0 V or 0 mA. Digital

10 Version: 2.0.0 BC5250


Product overview

outputs return in the inactive state. The timeout periods for the Bus Couplers correspond to the usual
settings for the fieldbus system. When converting to a different bus system it is necessary to bear in mind the
need to change the timeout periods if the bus cycle time is longer.

The interfaces

A Bus Coupler has six different methods of connection. These interfaces are designed as plug connectors
and as spring-loaded terminals.

BC5250 Version: 2.0.0 11


Product overview

2.4 Technical data

2.4.1 Technical Data - BCxx50


Technical data BCxx5x
Processor 16 bit micro-controller
Diagnostics LEDs 2 x power supply, 2 x K-Bus
Configuration and programming software TwinCAT PLC

Fieldbus interface BC3150


Fieldbus PROFIBUS DP

Interfaces
Serial interface COM1 (RS232 for configuration and programming, automatic
baud rate detection 9600/19200/38400 baud)
Terminal Bus (K-Bus) 64 (255 with K-bus extension)

12 Version: 2.0.0 BC5250


Product overview

Technical data BC3150


Digital peripheral signals 2040 inputs/outputs
Analog peripheral signals 128 inputs/outputs
Configuration possibility via TwinCAT or the controller
Maximum fieldbus byte number 512 bytes input and 512 bytes output
Maximum number of bytes - PLC 2048 bytes of input data, 2048 bytes of output data
Bus connection D-sub, 9-pin
Power supply (Us) 24 VDC (-15 % /+20 %) Use a 4 A fuse or an NEC Class 2 power
supply to meet the UL requirements!

Input current (Us) 60 mA + (total K-bus current)/4


Starting current approx. 2.5 x continuous current
K-bus current (5 V) maximum 1000 mA
Power contact voltage (Up) maximum 24 VDC
Power contact current load (Up) maximum 10 A
Recomm. back-up fuse (Up) ≤10 A
Dielectric strength 500 V (power contact/supply voltage/fieldbus)
Weight approx. 100 g
Dimensions (W x H x D) approx. 44 mm x 100 mm x 68 mm
Permissible ambient temperature range -25 °C ... +60 °C
during operation
Permissible ambient temperature range -40 °C … +85 °C
during storage
Relative humidity 95 % no condensation
Vibration / shock resistance conforms to EN 60068-2-6 / EN 60068-2-27
EMC immunity / emission conforms to EN 61000-6-2 / EN 61000-6-4
Installation position variable
Protection class IP20
Approvals CE, cULus, ATEX

BC5250 Version: 2.0.0 13


Product overview

2.4.2 Technical data - DeviceNet

Fig. 2: BC5250

System data DeviceNet (BC5250)


Number of nodes 64
Number of I/O points depending on controller
Data transfer medium shielded, twisted copper cable, 2 x signal, 1 x CAN ground (recommended)
Cable length 500 m 250 m 100 m
Data transfer rate 125 kbaud 250 kbaud 500 kbaud
I/O communication types polling, bit-strobe, change of state, cycle
Amount of data 128 bytes input and 128 bytes output
Baud rate Automatic baud rate detection (for possible baud rates see data transfer rate)

14 Version: 2.0.0 BC5250


Product overview

2.4.3 Technical Data - PLC


PLC data BCxx5x
Programmability via serial programming interface or via the fieldbus
Program memory 48 kbyte
Source code memory 128 kbyte
Data memory 32 kbyte
Remanent flags 2 kbyte
PLC cycle time Approx. 3.0 ms for 1000 IL commands (without I/O cycle)
Programming languages IEC 6-1131-3 (IL, LD, FBD, ST, SFC)
Runtime 1 PLC task
Online Change Yes
Up/Down Load Code Yes/Yes

BC5250 Version: 2.0.0 15


Mounting and wiring

3 Mounting and wiring

3.1 Mounting

3.1.1 Dimensions
The Beckhoff Bus Terminal system is characterized by low physical volume and high modularity. When
planning a project it must be assumed that at least one Bus Coupler and a number of Bus Terminals will be
used. The mechanical dimensions of the Bus Couplers are independent of the fieldbus system.

Fig. 3: BCxx50

The total width of the fieldbus station is the width of the Bus Coupler/Bus Terminal Controller plus the width
of the Bus Terminals being used (incl. KL9010 bus end terminal). Depending on design, the Bus Terminals
are 12 mm or 24 mm wide. The height is 100 mm.

The BCxx50 series Bus Terminal Controllers are 68 mm deep.

16 Version: 2.0.0 BC5250


Mounting and wiring

3.1.2 Installation
The Bus Coupler and all the Bus Terminals can be clipped, with a light press, onto a 35 mm mounting rail. A
locking mechanism prevents the individual housings from being pulled off again. For removal from the
mounting rail the orange colored tension strap releases the latching mechanism, allowing the housing to be
pulled off the rail without any force.

Fig. 4: Release the locking mechanism by pulling the orange tab

Up to 64 Bus Terminals can be attached to the Bus Coupler on the right hand side. When plugging the
components together, be sure to assemble the housings with groove and tongue against each other. A
properly working connection cannot be made by pushing the housings together on the mounting rail. When
correctly assembled, no significant gap can be seen between the attached housings.

Fig. 5: Power contact on the left

Bus Terminals should only be pulled or plugged in switched-off state.


Insertion and removal of Bus Terminals is only permitted when switched off. The electron-
ics in the Bus Terminals and in the Bus Coupler are protected to a large measure against
Attention damage, but incorrect function and damage cannot be ruled out if they are plugged in un-
der power.

The right hand part of the Bus Coupler can be compared to a Bus Terminal. Eight connections at the top
enable the connection with solid or fine wires from 0.08 mm² to 2.5 mm². The connection is implemented with
the aid of a spring device. The spring-loaded terminal is opened with a screwdriver or rod, by exerting gentle
pressure in the opening above the terminal. The wire can be inserted into the terminal without any force. The
terminal closes automatically when the pressure is released, holding the wire safely and permanently.

BC5250 Version: 2.0.0 17


Mounting and wiring

3.2 Wiring

3.2.1 Potential groups, insulation testing and PE

Potential groups

A Beckhoff Bus Terminal block usually has three different potential groups:
• The fieldbus interface is electrically isolated (except for individual Low Cost couplers) and forms the
first potential group.
• Bus Coupler / Bus Terminal Controller logic, K-bus and terminal logic form a second electrically
isolated potential group.
• The inputs and outputs are supplied via the power contacts and form further potential groups.

Groups of I/O terminals can be consolidated to further potential groups via potential supply terminals or
separation terminals.

Fig. 6: Potential groups of a Bus Terminal block

Insulation testing

The connection between Bus Coupler / Bus Terminal Controller and Bus Terminals is realized automatically
by latching the components. The transfer of the data and the supply voltage for the intelligent electronics in
the Bus Terminals is performed by the K-bus. The supply of the field electronics is performed through the
power contacts. Plugging together the power contacts creates a supply rail. Since some Bus Terminals (e.g.
analog Bus Terminals or 4-channel digital Bus Terminals) are not looped through these power contacts or
not completely the Bus Terminal contact assignments must be considered.

The potential feed terminals interrupt the power contacts, and represent the start of a new supply rail. The
Bus Coupler / Bus Terminal Controller can also be used for supplying the power contacts.

PE power contacts

The power contact labelled PE can be used as a protective earth. For safety reasons this contact mates first
when plugging together, and can ground short-circuit currents of up to 125 A.

18 Version: 2.0.0 BC5250


Mounting and wiring

Fig. 7: Power contact on the left

It should be noted that, for reasons of electromagnetic compatibility, the PE contacts are capacitively
coupled to the mounting rail. This can both lead to misleading results and to damaging the terminal during
insulation testing (e.g. breakdown of the insulation from a 230 V power consuming device to the PE
conductor). The PE supply line at the Bus Coupler / Bus Terminal Controller must be disconnected for an
insulation test. In order to uncouple further feed locations for the purposes of testing, the feed terminals can
be pulled at least 10 mm out from the connected group of other terminals. In that case, the PE conductors do
not have to be disconnected.

The power contact with the label PE must not be used for other potentials.

BC5250 Version: 2.0.0 19


Mounting and wiring

3.2.2 Power supply


Risk of injury through electric shock and damage to the device!
Bring the Bus Terminals system into a safe, de-energized state
before starting mounting, disassembly or wiring of the components!
DANGER

Supply of Bus Terminal Controller and Bus Terminals (Us)

The Bus Terminal Controller requires a supply voltage of 24 VDC.

The connection is made by means of the upper spring-loaded terminals labelled 24 V and 0 V. This supply
voltage is used for the electronic components of the Bus Coupler / Bus Terminal Controllers and (via the K-
bus) the electronic components of the Bus Terminals. It is galvanically separated from the field level voltage.

Fig. 8: Terminal points for the Bus Terminal Controller supply

Fig. 9: UL identification

Note the UL requirements for the power supply.


To comply with the UL requirements, the 24 VDC supply voltage for Us must originate
• from an isolated source protected by a fuse of max. 4 A (according to UL248) or
DANGER
• from a voltage supply complying with NEC class 2.
An NEC class 2 voltage source must not be connected in series or parallel with another
NEC class 2 corresponding voltage source!

20 Version: 2.0.0 BC5250


Mounting and wiring

No unlimited voltage sources!


To comply with the UL requirements, Us must not be connected with unlimited voltage
sources.
DANGER

Power contacts supply (Up)

The bottom six connections with spring-loaded terminals can be used to feed the supply for the peripherals.
The spring-loaded terminals are joined in pairs to a power contact. The feed for the power contacts has no
connection to the voltage supply for the BC electronics.

The spring-loaded terminals are designed for wires with cross-sections between 0.08 mm2 and 2,5 mm2.

The assignment in pairs and the electrical connection between feed terminal contacts allows the connection
wires to be looped through to various terminal points. The current load from the power contact must not
exceed 10 A for long periods. The current carrying capacity between two spring-loaded terminals is identical
to that of the connecting wires.

Power contacts

On the right hand face of the Bus Terminal Controller there are three spring contacts for the power contact
connections. The spring contacts are hidden in slots so that they cannot be accidentally touched. By
attaching a Bus Terminal the blade contacts on the left hand side of the Bus Terminal are connected to the
spring contacts. The tongue and groove guides on the top and bottom of the Bus Terminal Controllers and of
the Bus Terminals guarantees that the power contacts mate securely.

3.2.3 Programming cable


Use the KS2000-Z2 programming cable for serial programming of the Bus Terminal Controller. This cable is
included in the scope of supply of the KS2000 software, or it can be ordered separately (order identifier
KS2000-Z2).

Fig. 10: Programming cable KS2000-Z2

KS2000-Z2

The programming cable offers the option of programming the BCxx50 via the serial interface.

Do not interrupt the ground connection for the supply voltage


When the programming cable (between BCxx50 and PC) is connected, the ground connec-
tion of the Bus Terminal controller must not be interrupted or disconnected, since this may
Attention destroy the programming cable.

BC5250 Version: 2.0.0 21


Mounting and wiring

3.2.4 DeviceNet cabling

[Link] DeviceNet topology


CAN is a 2-wire bus system, to which all participating devices are connected in parallel (i.e. using short drop
lines). The bus must be terminated at each end with a 120 (or 121) Ohm termination resistor to prevent
reflections. This is also necessary even if the cable lengths are very short!

Fig. 11: Termination of the bus with a 120 Ohm termination resistor

Since the CAN signals are represented on the bus as the difference between the two levels, the CAN line is
comparatively not very sensitive to incoming interference (EMI). Both lines are affected, so the interference
has very little effect on the difference level.

Fig. 12: Insensitivity to incoming interference

[Link] Bus length


The maximum length of a CAN bus is primarily limited by the signal propagation delay. The multi-master bus
access procedure (arbitration) requires signals to reach all the nodes at effectively the same time (before the
sampling within a bit time). Since the signal propagation delays in the CAN connecting equipment
(transceivers, optocouplers, CAN controllers) are almost constant, the line length must be chosen in
accordance with the baud rate.

Baud rate Bus length


500 kbit/s < 100 m
250 kbit/s < 250 m
125 kbit/s < 500 m

[Link] Drop lines


Drop lines must always be avoided as far as possible, since they inevitably cause signal reflections. The
reflections caused by drop lines are not however usually critical, provided they have decayed fully before the
sampling time. In the case of the bit timing settings selected in the Bus Couplers it can be assumed that this
is the case, provided the following drop line lengths are not exceeded:

22 Version: 2.0.0 BC5250


Mounting and wiring

Baud rate Drop line length Total length of all drop lines
500 kbit/s <5m < 25 m
250 kbit/s < 10 m < 50 m
125 kbit/s < 20 m < 100 m

Drop lines must not have termination resistors.

Fig. 13: Sample topology of drop lines

[Link] Star hub

Star Hub (Multiport Tap)

Shorter drop line lengths must be maintained when passive distributors ("multiport taps"), such as the
Beckhoff ZS5052-4500 Distributor Box. The following table indicates the maximum drop line lengths and the
maximum length of the trunk line (without the drop lines):

Baud rate Drop line length with multiport Trunk line length (without drop
topology lines)
500 kbit/s < 1,2 m < 66 m
250 kbit/s < 2,4 m < 120 m
125 kbit/s < 4,8 m < 310 m

[Link] DeviceNet cable


Screened twisted-pair cables (2x2) with a characteristic impedance of between 108 and 132 Ohm is
recommended for the CAN wiring.

ZB5200 CAN/DeviceNet Cable

The ZB5200 cable material corresponds to the DeviceNet specification, and is also suitable for CANopen
systems. The ready-made ZK1052-xxxx-xxxx bus lines for the Fieldbus Box modules are made from this
cable material. It has the following specification:
• 2 x 2 x 0.34 mm² (AWG 22) twisted pairs
• double screened · braided screen with filler strand
• characteristic impedance (1 MHz): 126 ohm
• Conductor resistance 54 Ohm/km
• sheath: grey PVC, outside diameter 7.3 mm
• printed with "InterlinkBT DeviceNet Type 572" as well as UL and CSA ratings
• stranded wire colors correspond to the DeviceNet specification
• UL recognized AWM Type 2476 rating
• CSA AWM I/II A/B 80 °C 300 V FT1
• corresponds to the DeviceNet "Thin Cable" specification

BC5250 Version: 2.0.0 23


Mounting and wiring

Fig. 14: Structure of CAN/DeviceNet cable ZB5200

[Link] Shielding
The shield is to be connected over the entire length of the bus cable, and only galvanically grounded at one
point, in order to avoid ground loops.
The design of the screening, in which HF interference is diverted through R/C elements to the mounting rail
assumes that the rail is appropriately earthed and free from interference. If this is not the case, it is possible
that HF interference will be transmitted from the mounting rail to the shield of the bus cable. In that case the
shield should not be attached to the couplers - it should nevertheless still be fully connected through.

Notes related to checking the CAN wiring can be found in the Trouble Shooting section.

[Link] Cable colors


Suggestion for using the Beckhoff DeviceNet cables at the Bus Terminal and the Fieldbus Box:
BK52x0 pin Fieldbus Box pin FC520x pin Function ZB5200 cable color
BX5200 (X520) PIN
5 2 5 V+(red) red
4 4 4 CAN high (CAN+, white
white)
3 1 3 SHIELD Filler strand
2 5 2 CAN low (CAN-, blue) blue
1 3 1 V- (black) Black

[Link] FC520x: 5-pin open style connector


The DeviceNet bus line is connected to the FC5201 and FC5202 DeviceNet PCI cards via 5-pin open style
connectors with the following pin assignment.

Pin Assignment
5 V+(red)
4 CAN high (CAN+, white)
3 SHIELD
2 CAN low (CAN-, blue)
1 V- (black)

The unlisted pins are not connected.

Note: an auxiliary voltage up to 30 VDC may be connected at pin 9 (some CAN devices use this for supplying
the transceivers).

24 Version: 2.0.0 BC5250


Mounting and wiring

[Link] BK52x0/BX5200: 5-pin open style connector


The BK52x0/BX5200 (X520) Bus Couplers have a recessed front surface on the left hand side with a five pin
connector.
The supplied DeviceNet connecting socket can be inserted here.

Fig. 15: BK51x0/BX5100 connection socket assignment

The left figure shows the socket in the BK52x0/BX5200 Bus Coupler. Pin 5 is the connection strip's top most
pin. Pin 5 is not used. Pin 4 is the CAN high connection, pin 2 is the CAN low connection, and the shield is
connected to pin 3 (which is connected to the mounting rail via an R/C network). CAN-GND can optionally be
connected to pin 1. If all the CAN ground pins are connected, this provides a common reference potential for
the CAN transceivers in the network. It is recommended that the CAN GND be connected to earth at one
location, so that the common CAN reference potential is close to the supply potential. Since the CANopen
BK52x0/BX5200 Bus Couplers provide full electrical isolation of the bus connection, it may in appropriate
cases be possible to omit wiring up the CAN ground.

[Link] ZS1052-3000 Bus Interface Connector


The ZS1052-3000 CAN Interface Connector can be used as an alternative to the supplied connector. This
makes the wiring significantly easier. There are separate terminals for incoming and outgoing lines and a
large area of the shield is connected via the strain relief. The integrated termination resistor can be switched
externally. When it is switched on, the outgoing bus line is electrically isolated - this allows rapid wiring fault
location and guarantees that no more than two resistances are active in the network.

[Link] Fieldbus Box: M 12 DeviceNet socket

Fieldbus Box: M12 DeviceNet socket

With the IPxxxx-B520 and IL230x-B520 Fieldbus Box modules, a five-pole M12 connector is used for the bus
connection.

BC5250 Version: 2.0.0 25


Mounting and wiring

Fig. 16: Pin assignment: M12 plug, fieldbus box

BECKHOFFoffer plugs for field assembly, passive distributor's, termination resistors and a wide range of
preassembled cables for the Fieldbus Box system. Details be found in the catalog, or under
[Link]

26 Version: 2.0.0 BC5250


Parameterization and Commissioning

4 Parameterization and Commissioning

4.1 Start-up behavior of the Bus Terminal Controller


When the Bus Terminal Controller is switched on it checks its state, configures the K-bus, creates a
configuration list based on the connected Bus Terminals and starts its local PLC.
The I/O LEDs flash when the Bus Terminal Controller starts up. If the system is in an error-free state, the I/O
LEDs should stop flashing after approx. 2-3 seconds. In the event of a fault the error type determines which
LED flashes (see chapter Diagnostic LEDs).

Fig. 17: Start-up behavior of the Bus Terminal Controller

4.2 Configuration

4.2.1 Overview

Configuration types

The Bus Terminal controllers of the BCxx50, BCxx20 and BXxx00 series can be configured in two different
ways: DEFAULT CONFIG or TwinCAT CONFIG.

DEFAULT-CONFIG

Bus Terminals are mapped in the order they are inserted, i.e. first the complex Bus Terminals followed by the
digital Bus Terminals.

BC5250 Version: 2.0.0 27


Parameterization and Commissioning

The complex Bus Terminals are mapped as follows:


• Word Alignment
• complex representation

The process image depends on the connected terminals!


The process image changes when a terminal is added or removed!

CAUTION

The data of the fieldbus slaves interface are referred to as PLC variables. The PLC variables have
addresses from %QB1000 and %IB1000

The DEFAULT CONFIG (without PLC program) can also be used for writing and testing of the Connected
Bus Terminals. To this end, the Bus Terminal Controller must be scanned in the System Manager, and
FreeRun mode must be enabled (to use this function, no PLC program may be active on the Bus Terminal
Controller).

TWINCAT-CONFIG

In the TwinCAT CONFIG the Bus Terminals and PLC variables can be freely linked as required (TwinCAT
System Manager file required). The configuration is transferred to the coupler via the System Manager
and ADS.

The following is required for the TwinCAT configuration (TC file):


• Via the fieldbus (PROFIBUS, CANopen, Ethernet)
PROFIBUS: (BC3150, BX3100)
◦ PC with FC310x from version 2.0 and TwinCAT 2.9 build 1000
◦ BX3100 with CIF60 or CP5412
◦ TwinCAT 2.9 build 946
(NOTE: with PROFIBUS cards from Hilscher only one ADS communication is permitted, i.e.
either System Manager or PLC Control)
CANopen: (BC5150, BX5100)
◦ PC with FC510x from version 1.76 TwinCAT build 1030
DeviceNet: (BC5250, BX5200)
◦ on request
Ethernet: (BC9050, BC9020, BC9120, BX9000)
◦ PC with TwinCAT 2.10 build 1322
• Via the serial ADS TwinCAT 2.9 build 1010
◦ BX3100 version 1.00
◦ BX5100 version 1.00
◦ BX5200 version 1.10
◦ BX8000 version 1.00
◦ BC3150, BC5150, BC5250, BC9050, BC9020, BC9120 from firmware B0
◦ For BC8150 from TwinCAT 2.10 build 1243

BCxx50 and BXxx00 can be parameterized via the System Manager of the TwinCAT program.
• Variable I/O mapping
• Type-specific PROFIBUS data (BC3150 and BX3100 only)
• RTC (real-time clock) (BX series only)
• SSB (Smart System Bus) (BX series only)
• PLC settings
• K-Bus settings

The configuration can be transferred to the BCxx50 or BXxx00 via fieldbus ADS protocol or serial ADS
protocol.

28 Version: 2.0.0 BC5250


Parameterization and Commissioning

The TwinCAT configuration can be used to link variables, I/Os and data. The following is possible:
• PLC - K-BUS
• PLC fieldbus (e.g. PROFIBUS slave interface to PLC)
• K-bus fieldbus (only for BX controllers)
• Support for TwinSAFE terminals (only BX controllers from firmware 1.17)

In addition, the TwinCAT configuration can be used to parameterize special behavior, for example whether
data are preserved or set to "0" in the event of a fieldbus error.
The real-time clock can be set via a tab in the system manager.

Work steps

[Link] the fieldbus address


[Link] the System Manager and create a TC file
[Link] fieldbus data in the TC file
[Link] the TC file
[Link] a new system manager, creating a PC file and reading in saved TX file
[Link] a link to a PLC task
[Link] the configuration
[Link] the TwinCAT system
[Link] the TC file in the System Manager, complete the configuration and transfer it to the BCxx50,
BCxx20 or BXxx00
10. Transfer the program to BCxx50, BCxx20 or BXxx00
11. Creating a boot project

4.2.2 Creating a TwinCAT configuration


In order to configure a Bus Terminal Controller of the BCxx50, BCxx20 or BXxx00 series, create a BX file in
the System Manager. To simplify matters, files for the basic units have already been prepared. Open the
corresponding Bus Terminal Controller with New from Template.

Fig. 18: Creating a TwinCAT configuration

Select the corresponding Bus Terminal Controller.

BC5250 Version: 2.0.0 29


Parameterization and Commissioning

Fig. 19: Selecting the Bus Terminal Controller

All Bus Terminal Controller components are now available:


• Fieldbus interface
• K-bus interface [} 45]
• PLC Program [} 47]
• SSB (only Bus Terminal Controllers of the BX series)

Please refer to the relevant chapter for device configuration.

4.2.3 Downloading a TwinCAT configuration


The TwinCAT configuration is loaded into the Bus Terminal Controller via ADS protocol.

Serial ADS protocol

(all Bus Terminal Controllers of the BXxx00 and BCxx50 series)

Enter the serial ADS connection, as described in the chapter Serial ADS [} 36].

ADS protocol via the fieldbus

(BC3150, BC5150, BC9x20, BC9050, BX3100, BX5100, BX9000 only)

A prerequisite is that TwinCAT operates as master and is engaged in data exchange, i.e. the physical and
fieldbus configuration must be complete, and data exchange must take place between the master
(e.g. fieldbus master card) and the Bus Terminal Controller.

Choose Target System

Select the Bus Terminal Controller onto which the configuration is to be loaded. Use the function key F8 to
open the dialog for downloading your file to the corresponding device.

30 Version: 2.0.0 BC5250


Parameterization and Commissioning

Fig. 20: Downloading a TwinCAT configuration

Select the corresponding Bus Terminal Controller.

Fig. 21: Selecting the Bus Terminal Controller

The state of the Bus Terminal Controller is shown at the bottom right of the System Manager.

Fig. 22: State of the Bus Terminal Controller

In Config mode / FreeRun the configuration can now be downloaded to Bus Terminal Controller. If the Bus
Terminal Controller is in Stop mode, ADS communication is not yet activated. In this case, it is not possible
to download the configuration.

To activate the TwinCAT configuration select Ctrl+Shift+F4 or Activate Configuration.

Fig. 23: Activating the TwinCAT configuration

BC5250 Version: 2.0.0 31


Parameterization and Commissioning

The current configuration is loaded onto the Bus Terminal Controller. The display will show Store Config, and
the BUS and I/O LED will flash. Once the configuration is successfully loaded onto Bus Terminal Controller,
TwinCAT Config should appear in the display of a BXxx00. The corresponding program can now be
transferred to the Bus Terminal Controller (program-download via the fieldbus).

4.2.4 Uploading a TwinCAT configuration


The TwinCAT configuration is loaded into the Bus Terminal Controller via ADS protocol.

Serial ADS protocol

(all Bus Terminal Controllers of the BCxx50, BCxx20 and BXxx00 series)

Enter the serial ADS connection, as described in the chapter Serial ADS [} 36].

ADS protocol via the fieldbus

(BC3150, BC5150, BC9x20, BC9050, BX3100, BX5100, BX9000 only)

A prerequisite is that TwinCAT operates as master and is engaged in data exchange, i.e. the physical and
fieldbus configuration must be complete, and data exchange must take place between the master
(e.g. fieldbus card) and the Bus Terminal Controller.

Choose Target System

Select the Bus Terminal Controller onto which the configuration is to be loaded. Use the function key [F8] to
open the dialog for downloading your file to the corresponding device.

Fig. 24: Choose Target System

Select the corresponding Bus Terminal Controller.

32 Version: 2.0.0 BC5250


Parameterization and Commissioning

Fig. 25: Selecting the Bus Terminal Controller

The state of the Bus Terminal Controller is shown at the bottom right of the System Manager.

Fig. 26: State of the Bus Terminal Controller

Click on the red folder. The TwinCAT configuration will now be uploaded.

Fig. 27: Uploading the TwinCAT configuration

4.2.5 Resources in the Bus Terminal Controller


The memory resources assigned in the Bus Terminal Controller are shown in the System Manager in the
Resources tab of the Bus Terminal Controller.

Mapping code

The mapping code is required for calculating the TwinCAT configuration (see Figure Memory for the code
mapping). The percentages are added here. In the example from Fig. Memory for code mapping, 8% of the
memory is allocated to the mapping calculation.

BC5250 Version: 2.0.0 33


Parameterization and Commissioning

Fig. 28: Memory for code mapping

Data memory mapping

Data memory for mapping. The values are to be considered individually, i.e. each value can be up to 100%.

Fig. 29: Data memory mapping

Used code and data memory

Fig. Code and data memory (1) "Used PLC code" in %.


Fig. Code and data memory (2) "Used PLC data" in %.
Fig. Code and data memory (3) "Used PLC source" in %.

34 Version: 2.0.0 BC5250


Parameterization and Commissioning

Fig. 30: Code and data memory

Other memory

Fig. Other Memory (1) "Used Near Heap" is required for the COM interface and SSB. % values.
Fig. Other Memory (2) "Used Huge Heap" is required for the ADS communication. % values. This value
should be less than 30 %.
Fig. Other Memory (3) "Used File Area" is required for the TwinCAT configuration, the TSM file and the
16 kbyte flash access. % values.

Fig. 31: Other memory

BC5250 Version: 2.0.0 35


Parameterization and Commissioning

4.2.6 ADS connection via serial interface


(from firmware version [Link] or 0.99x, Bus Terminal Controllers of the BX series and for all BCxx50)

From TwinCAT 2.9 build 1020 (TwnCAT level PLC, NC or NCI)

Use only a serial connection


To ensure trouble-free operation of the ADS link via the serial interface, only a serial con-
nection to the BX controller is allowed.
Note After successful configuration via the System Manager, close the System Manager before
starting programming.

AMS Net ID in delivery state (default)


For BX9000
The default AMS Net ID is [Link].1.1. If the IP address of the BX9000 is changed,
Note
the AMS Net ID of the BX9000 also changes. There is a menu option for displaying the cur-
rent AMS Net ID.
Example: If you change the IP address to [Link], the AMS Net ID changes to
[Link].1.1.
For BC9050, BC9020, BC9120
The default AMS Net ID is [Link].[DIP switch].1.1. If the IP address of the BX9xxx is
changed, the AMS Net ID of the BX9xxx also changes.
Example: If you change the IP address to [Link], the AMS Net ID changes to
[Link].1.1.
BC9050: DEFAULT 172.16.21.[DIP-Switch].1.1
BC9020: DEFAULT 172.16.22.[DIP-Switch].1.1
BC9120: DEFAULT 172.16.23.[DIP-Switch].1.1

Initializing the ADS connection

Enter the Bus Terminal Controller in the remote connection under TwinCAT. Click on the TwinCAT icon and
open the features menu. The following settings can be made under the >AMS Remote< tab.

Fig. 32: Properties of the remote connection

Remote Name: Any


AMS-Net-ID: [Link].1.1 (Default)
Address: COM Port: Baud rate, parity, data bits, stop bits
Transport: Select "COM port"

When the Bus Terminal Controller is switched on, the default AMS Net ID is always "[Link].1.1" (except all
Ethernet Controllers).
The AMS Net ID can be changed as required. Please note that the new AMS Net ID cannot be changed
again in this way.

If you need to change the new AMS Net ID again, you have to restart the Bus Terminal Controller, so that
the AMS Net ID is reset to the default AMS Net ID, "[Link].1.1".
You can now change the AMS Net ID again.

36 Version: 2.0.0 BC5250


Parameterization and Commissioning

Strings can only be entered at the second call


No strings can be entered under address when the dialog is first called (see above). Enter
the name, AMS Net ID and transport type and close the dialog. With the second call you
Note can enter your COM port.

The communication starts when TwinCAT is in Config mode (TwinCAT icon is blue) or RUN mode (TwinCAT
icon is green). The COM interface remains open until a TwinCAT stop occurs (TwinCAT icon is red). It is
then available again for other programs. No error message is issued if the COM interface is used by another
program during a TwinCAT restart (e.g. by the KS2000 configuration software).

AMS Net ID after ADS connection via the fieldbus


If you have addressed the Bus Terminal Controller with an ADS connection via the fieldbus
before the serial ADS was used, the AMS Net ID was automatically changed by the System
Note Manager. In this case a new serial ADS connection is only possible, if the AMS Net ID is
adjusted.

BX series: reading the AMS Net ID

The current AMS Net ID can be read from the menu via the display of BX series Bus Terminal Controller.

AMS AMS Net ID


[Link].1.1

4.2.7 DeviceNet slave interface

[Link] DeviceNet slave interface EDS file

BX5200

EDS file [Link] (for controllers other than TwinCAT) ([Link]


bc5250/Resources/eds/[Link])

EDS file [Link] ([Link]


eds/[Link])

For TwinCAT both EDS files must be copied into the directory TwinCAT\IO\DeviceNet .

Image for [Link] ([Link]


zip/[Link])

BC5250

EDS file [Link] (for controllers other than TwinCAT) ([Link]


bc5250/Resources/eds/[Link])

EDS file [Link] ([Link]


eds/[Link])

For TwinCAT both EDS files must be copied into the directory TwinCAT\IO\DeviceNet .

Image for [Link] ([Link]


zip/[Link])

BC5250 Version: 2.0.0 37


Parameterization and Commissioning

[Link] DeviceNet slave interface


There are two types of configuration. In the default configuration (delivery state) the DeviceNet data of the
DeviceNet Slave interface map from the address 1000 of the BX5200/BC5250 and the first 8 bytes are
activated. The length of the DeviceNet data and the characteristics of the local controller can be edited via
the function blocks.
In the TwinCAT configuration, any required configuration can be created via the System Manager and
variables can be connected in any required combination via the DeviceNet slave interface.

Default Configuration

In this configuration, the DeviceNet data are mapped as follows:

DeviceNet data

Number Read/Write BX5200/BC5250 process image


8 bytes (Polling Mode) Rx/Tx %IB1000...%IB1007/QB1000...
%QB1007

If it is required to send or receive more/less than 8 bytes of data, the default setting must be changed by
means of the function block (see DeviceNet-specific function blocks).

Characteristics of DeviceNet communication

The following characteristics can be set. Mixed operation of the DeviceNet communication types is not
possible.

Polling

The master module ("scanner") sends the output data cyclically to the assigned devices and receives the
input data in a response telegram.

Change-of-State

Telegrams are sent as soon as their contents have changed.

Cyclic

The modules send the data automatically after a cycle time has elapsed.

Strobed

The scanner requests the input data using a broadcast telegram to all the devices.

[Link] TwinCAT configuration


The TwinCAT configuration enables free, address-independent mapping of the PLC data to the CAN slave
interface.

TwinCAT configuration

For the configuration you need the TwinCAT System Manager and an ADS connection to the BX/BCxx50.

The ADS connection can be established via the serial interface (see serial ADS).

38 Version: 2.0.0 BC5250


Parameterization and Commissioning

[Link] Address
The address of the DeviceNet Slave interface is set via two rotary selection switches. The default setting is
11. All addresses from 0 to 63 are permitted. Each address may only occur once in the network. The
address is edited when the BX Controller is switched off. The switches can be set to the required position
using a screwdriver. Ensure that the switches engage correctly. The lower switch is the 10-multiplier, the
upper switch is the 1-multiplier. The changed address is active as soon as the BX Controller is switched on
again.

Example

You want to set address 34.


- lower rotary selection switch S311: 3
- upper rotary selection switch S310: 4

Fig. 33: Setting the node ID

[Link] Baud rate

Auto-Baud-Rate

In order for automatic baud rate detection to function, it is necessary for a number of valid telegrams to be
present on the bus at the desired baud rate. The RUN and CAN ERR LEDs blink in rapid alternation while
the baud rate search is in progress. Once a baud rate was detected and accepted, the Bus Terminal
Controller continues with the initialization.

A software reset does not lead to a new baud rate search. The previously active baud rate is maintained.

[Link] Master setting

[Link].1 Master parameterization

Configuration at a Rockwell/Allen Bradley controller

The BX5200 and BC5250 have two configuration types. In the default configuration, the coupler is supplied
and has the following DeviceNet characteristics:
• AutoBaud
• 8 bytes inputs DN (from address %IB1000) - these are then the outputs on the master
• 8 bytes outputs DN (from address %QB1000) - these are then the inputs on the master

If it is necessary to change the preset data, a special library is required.

In the TwinCAT configuration, it is possible with the aid of the System Manager to set the DN Slave-specific
characteristics. The library is not to be used for the default configuration.

BC5250 Version: 2.0.0 39


Parameterization and Commissioning

The EDS file and the icon file are always integrated in the RSNetworx with the EDS wizard:

Fig. 34: EDS Wizard

Finally the DeviceNet network is searched with the Network-Browse for the nodes within the network. If the
BC/BX are correctly connected to the network with the correct baud rate, they are recognized and
correspondingly displayed:

40 Version: 2.0.0 BC5250


Parameterization and Commissioning

Fig. 35: Network Browse

Double-clicking the icon opens the configuration dialog for the units.

Below Parameter appear the I/O data lengths that are currently set at the BC/BX.

Fig. 36: I/O data lengths set on the BC/BX

BC5250 Version: 2.0.0 41


Parameterization and Commissioning

The produced and consumed data should always be considered from the point of view of the network, i.e.
BC/BX produce data for DeviceNet and consume data from DeviceNet.
• The data produced are thus the input data of the master, i.e. data that are sent from the BC/BX to the
master: BC/BX Produced Size = Input Size Scanner
• The data consumed are the output data of the master, i.e. data that are sent from the master to the
slave: BC/BX Consumed Size = Output Size Scanner

A double-click on the Scanner/DeviceNet Master icon opens the configuration dialog. The recognized
modules appear in the Available Devices list and must now be added to the Scanlist.

Fig. 37: Adoption of the detected modules into the scan list

A double-click on the icon of the device to be configured opens the dialog for setting the I/O data lengths

42 Version: 2.0.0 BC5250


Parameterization and Commissioning

Fig. 38: Setting of the I/O data lengths

• BC/BX Produced-Size = Input-Size


• BC/BX Consumed-Size = Output-Size

Furthermore, it must be ensured that the I/O operation mode selected here corresponds to the I/O mode
selection.

The Interscan Delay, that is the time between each I/O cycle, must be selected according to the
requirements of the BC/BX with respect to the size of the PLC program and the I/O data lengths.

BC5250 Version: 2.0.0 43


Parameterization and Commissioning

Fig. 39: Selection of the interscan delay

If there are components in the network that require a fast I/O cycle, the I/O cycle can be set to Background
under Poll Rate in the I/O parameter settings. More detailed information about this can be obtained from the
scanner manual.

Fig. 40: Setting the poll rate

44 Version: 2.0.0 BC5250


Parameterization and Commissioning

4.2.8 K-bus
Bus Terminal and end terminal required
To operate a Bus Terminal Controller of the BC or BX series, at least one Bus Terminal
with process image and the end terminal must be connected to the K-bus.
Note

BX Settings tab

Fig. 41: BX Settings tab

Check Terminals during Start-up

When a boot project is created, the current Bus Terminal configuration is stored. The connected Bus
Terminals are checked when the Bus Terminal Controller restarts. If this option is selected, the Bus Terminal
Controller does not enter into data exchange. The PLC project will not be started.

Auto K-Bus Reset

Once a K-bus error has been rectified, the Bus Terminal Controller automatically resumes the data
exchange.

Once a K-Bus error has been rectified, the outputs become active again im-
mediately!
Ensure that the outputs are reactivated immediately and that analog outputs retain their
CAUTION programmed value, if this is not dealt with in your PLC project.

Clear Outputs on Breakpoint

If breakpoints are set in PLC Control, the K-Bus is no longer processed, i.e. the outputs are set to a safe
state (zero).

K-Bus Sync Mode

Writing and reading of the Bus Terminals can take place synchronously with task 1 or the fieldbus.

BC5250 Version: 2.0.0 45


Parameterization and Commissioning

K-Bus Re-Trigger

If the processor is busy dealing with the PLC project or the SSB, the K-Bus cannot be processed for a
certain amount of time. This leads to triggering of the Bus Terminal watchdog and dropping of the outputs.
The Bus Terminal Controller is set such that the K-bus watchdog is re-triggered 3 times after 85 ms. The K-
Bus watchdog would then be activated.
K-Bus Re-Trigger 0: 100 ms
K-Bus Re-Trigger 1: 2 x 85 ms = 170 ms
K-Bus Re-Trigger 2: 3 x 85 ms = 255 ms
K-Bus Re-Trigger 3: 4 x 85 ms = 340 ms

Reaction on K-Bus Error

In the event of a K-Bus error, the K-Bus inputs are set to "0" or retain their last state.

Response on PLC-Stop

The user can set the behavior of the fieldbus output data in the event of the PLC project being stopped. The
master will use these data as input data. In the event of a PLC stop, the data can be set to "0" or remain
unchanged.

BX Diag tab

Display of the cycle time for task 1, K-bus, fieldbus processing and the SSB load.

Fig. 42: BX Diag tab

Factory Settings: the Bus Terminal Controller is set to its delivery. These settings are reactivated via Restart
System or by switching the system off and on again (display shows DEFAULT-CONFIG).
Reset Maximum Values: resets the maximum values

46 Version: 2.0.0 BC5250


Parameterization and Commissioning

K-Bus variables

PLC interface: Not supported (only included for moving CX or BX projects)

K-bus state: see Diagnostics

4.2.9 PLC

[Link] Inserting a PLC project


For variable mapping, configuration has to be specified in the system manager. This is where the link
between PLC and hardware is specified. The variables can process and link bit, byte, word or data
structures. Automatic addressing via the System Manager is possible, but should be checked for offset.

Word alignment, byte orientation


With data structures, ensure that the Bus Terminal Controller saves the data in word align-
ment and the System Manager operates byte-oriented (see Data structures [} 59])
Note

A valid project has to be compiled and saved in PLC Control. These data are saved as a *.tpy file. For
inserting a PLC project, right-click on PLC - Configuration. Select your current PLC project.

Fig. 43: Selecting the PLC project

Link the PLC variable with the hardware (e.g. digital Bus Terminal).

BC5250 Version: 2.0.0 47


Parameterization and Commissioning

Fig. 44: Connecting PLC variable and hardware

Once all links have been created, activate the configuration Actions/Activate Configuration (Ctrl+Shift+F4)
and start TwinCAT Set/Reset TwinCAT to Run Mode. Ensure that you have selected the correct target
system (bottom right in the System Manager window).

Fig. 45: Target system display

48 Version: 2.0.0 BC5250


Parameterization and Commissioning

[Link] Measuring the PLC cycle time


The task time is set in PLC Control. The default setting is 20 ms.

Fig. 46: Setting the task time

In the default setting, the PLC program is called every 20 ms, as long as the general cycle time is less than
20 ms. To determine the load of your system, the PLC cycle time can be measured in the System Manager.
In order to ensure trouble-free operation, the set task time should be 20-30 % higher than the measured total
cycle time. A precise cycle time breakdown can be found under K-Bus tab [} 45] description. The total cycle
time is displayed with the TcBase library (see [Link] or [Link]).

BC5250 Version: 2.0.0 49


Parameterization and Commissioning

Fig. 47: Displaying the PLC cycle time

4.2.10 Configuration software KS2000


Bus Terminal controllers of the BCxx50, BXxx20 and BXxx00 series cannot be parameterized and
configured with the KS2000 configuration software. These devices must be configured with the TwinCAT
System Manager.

The KS2000 configuration software offers configuration and diagnostic support for the Bus Terminals
attached to the Bus Terminal Controller.
It is advisable to set the baud rate in the KS2000 configuration software and the BCxx50 BCxx20 and
BXxx00 to 38400 baud (8 data bits, even, 1 stop bit).

COM1 - automatic baud rate detection


The COM 1 interface of the BXxx00 features automatic baud rate detection between
9.6 kbaud and 56.4 kbaud.
Note

Required KS2000 version


Configuration or diagnostics of Bus Terminals at BXxx00 is supported from KS2000 version
4.3.14.
Note

In some Bus Terminals (e.g. KL25xx, KL6811, KL6201, KL6401) the following parameters must be set in
order to be able to use the configuration dialogs:
• A PLC project or boot project must be deactivated.
• The BX controller must be in its default configuration. Set the manufacturer’s setting or switch to Config
Mode in the TwinCAT System Manager (blue TwinCAT icon).
• The BX controller must be in FreeRun mode. Activate it with the TwinCAT System Manager.

You can now log in with the KS2000 configuration software via ADS (port 100) or the serial cable and use
the KS2000 dialogs in the Bus Terminals.

50 Version: 2.0.0 BC5250


Programming

5 Programming

5.1 BCxx50 PLC features


Description Value
Data memory 32 kbyte
Program memory 48 kbyte minus task-configuration minus POUs during online
change
Source code memory 128 kbyte
RETAIN 2 kbyte
INPUT 2 kbyte
OUTPUT 2 kbyte
FLAG 4 kbyte
Max. variable size 16 kbyte
Max. POUs Limited by memory

5.2 TwinCAT PLC


The Beckhoff TwinCAT Software System turns any compatible PC into a real-time controller with a multi-PLC
system, NC axis control, programming environment and operating station. The TwinCAT programming
environment is also used for programming the BC/BX. If you have TwinCAT PLC (Windows NT4/2000/XP)
installed, you can use the fieldbus connection or the serial port for downloading and debugging software.

TwinCAT I/O or TwinCAT PLC can also be used as the Ethernet Master (host), in order to exchange process
data with the Bus Terminal Controller. TwinCAT provides you with the System Manager as a configuration
tool, as well as the drivers and the ADS protocol.

Bus Terminal Controllers of the BCxx50, BCxx20 and BXxx00 series

These 2nd-generation Bus Terminal Controllers are configured with the TwinCAT System Manager and
programmed with TwinCAT PLC Control. TwinCAT PLC must be installed for these couplers (Windows NT4,
Windows 2000, Windows XP).

Programming and program transfer


• via the serial interface [} 71]
• via the fieldbus interface (only for Bus Terminal controllers for PROFIBUS, CANopen and Ethernet)

Online change

The Bus Terminal Controllers of the BX series and the BCxx50 support online change. This means that the
PLC program is replaced with a new program without interrupting the program. The switch-over to the new
program occurs after the task is completed. This means that two versions of the PLC program have to be
stored. 512 kbyte are available, which therefore have to be divided by two, leaving 256 kbyte for the actual
PLC program. In addition, several kbyte are required for task configuration etc. During an online change,
dynamic data are stored in memory. Should a program approach the memory limit (program size greater
than 240 kbyte), the online change may no longer work, even though the program may still be written to the
BX after "Rebuild all".

When is online change not available?

Online change is not available under certain conditions,.


• Inserting of a new library
• Changing the task setting
• "Rebuild all"

BC5250 Version: 2.0.0 51


Programming

• Controller memory limit is almost reached (PLC program greater than 90%)

5.3 TwinCAT PLC - Error codes


Error type Description
PLC compiler error Maximum number of POUs (...) exceeded
PLC compiler error Out of global data memory ...

Error POUs

For each function block one POU (process object unit) is created. 256 function blocks are available by
default.

Fig. 48: Maximum number of POUs exceeded

If libraries are integrated this value may be insufficient. In this case, the number of POUs should be
increased.

To this end, open in PLC Control under Projects/Options...

Fig. 49: Menu path Projects / Options / Controller Settings

...the controller settings.

52 Version: 2.0.0 BC5250


Programming

Fig. 50: Controller settings

Changing these settings will deactivate online changes.

Global memory error

Fig. 51: Global memory insufficient

2 x 16 kbyte of data are available by default. If large data quantities are to be used, this range should be
increased. A maximum of 14 data segments are possible for the BX.

Fig. 52: Menu path Projects / Options / Build

BC5250 Version: 2.0.0 53


Programming

Fig. 53: Build

5.4 Remanent data


2000 kbyte of remanent data are available for the BX controller. These data are declared as VAR RETAIN in
PLC Control:

Example
VAR RETAIN
Test :BOOL;
Count :INT;
END_VAR

Retain data are located between VAR RETAIN and END_VAR. These data are stored in a NOVRAM and
are consistent across the whole 2 kbyte range. The RETAIN data are stored in the NOVRAM after each
cycle. For 2 kbyte approx. 2 ms are required (for 1 kbyte approx. 1 ms). The variables can be configured
locally or globally. Allocated variables (%MB, %QB, %IB) cannot be used as remanent data.

Do not use VAR_RETAIN in function blocks


VAR_RETAIN should not be used in function blocks. All FB data are copied into the retain
memory. This leads to an unnecessary increase in cycle time, and the retain memory is
Note filled with unnecessary data.

Do not use variables with address as remanent data


Variables that have been assigned an address (%MB, %QB, %IB) must not be used as re-
manent data.
Note

Example for remanent data in the function block

This should be avoided, if possible, since all the data of a function block, in which even just a single
remanent bit is found, are stored by default. A program sample can be found below.

Function block test (no program code required - in ST semicolon is sufficient)


FUNCTION_BLOCK Test
VAR_INPUT
END_VAR
VAR_OUTPUT
END_VAR
VAR

54 Version: 2.0.0 BC5250


Programming

END_VAR
VAR_IN_OUT
Counter :INT;
END_VAR

MAIN program
PROGRAM MAIN
VAR
fb_Test:Test;
END_VAR
VAR RETAIN
iCounter1:INT;
END_VAR
fb_Test(Counter:=iCounter1);

5.5 Allocated flags


4 kbyte of allocated flags are available. They can be used to assign different variable types to the same
address, e.g. for converting strings to bytes. Data can also be placed here that can be read or written via
ADS by the controller.

Allocated variables are not remanent data


For the Bus Terminal Controllers of the BX series and the BCxx50 the allocated variables
are not saved as remanent data.
Note

Reading/writing of allocated flags via ADS

The flags may also be read via the controller and ADS. In PROFIBUS, the DPV-1 services are used for this
purpose, in CANopen SDO communication is used.
The AmsNetID can be obtained from the System Manager, or it can be displayed via the Bus Terminal
Controller menu.
The PLC port number is 800.

Index group Meaning Index offset (value range)


0x4020 Flag (only BXxxx0) 0..4096

Example

BX program
VAR
Flag_01 AT %MB0: WORD;
END_VAR

TwinCAT PC/CX master program


VAR
fbADRSREAD: ADSREAD;
Flag_M: WORD;
END_VAR
fbADRSREAD(
NETID:='[Link].2.3' , (* AMSNetId BX *)
PORT:=800 , (* 800 - PLC *)
IDXGRP:=16#4020 , (* 0x4020hex falgs *)
IDXOFFS:=0 , (* byte offset *)
LEN:=2 , (* Lenght byte *)
DESTADDR:=ADR(Merker) ,
READ:=TRUE ,
TMOUT:=t#1s );
IF NOT [Link] THEN
fbADRSREAD(READ:=FALSE);
END_IF

BC5250 Version: 2.0.0 55


Programming

5.6 Local process image in delivery state


The process image of the BX and BCxx50 series consists of input, output and flag areas. In addition, there
are unallocated data without fixed address. They are created without specifying an address. For these
variable types the memory allocation is as follows:
• BCxx50 48 kbyte,
• BC9x20 128 kbyte,
• BXxx00 256 kbyte.

For the allocated data 2048 bytes of input data and 2048 bytes of output data are available. In the default
configuration, i.e. in delivery state of the BX5200/BC5250, all connected Bus Terminals are assigned a fixed
address. The data for DeviceNet communication are to be found from the address offset 1000dec. The
amount of DeviceNet data in the default configuration is 8 bytes.

INPUTS OUTPUTS
Bus Terminal %IB0 ... Bus Terminal %QB0 ...
DeviceNet DATA (PLC variables) %IB1000 ... DeviceNet DATA (PLC variables) %QB1000 ...
... %IB2047 maximal ... %QB2047 maximal

The maximum number of data via the fieldbus is 128 bytes inputs and outputs for the BC5250 and 256 bytes
inputs and outputs for the BX5200.

DeviceNet data

Mode Read/Write BX process image


polling mode Rx/Tx %IB1000...%IB1007/QB1000...
%QB1007

If you want to use additional data or another mode, then use the TwinCAT configuration or the library for the
default configuration.

Addressing of the connected Bus Terminals

The default setting is for all the connected Bus Terminals to be assigned to the local process image.
Mapping within the Bus Terminal Controller is carried out according to the following rule:
First come all the complex Bus Terminals, in whatever sequence they are physically inserted, followed by the
digital Bus Terminals which are padded to a whole byte. The default mapping of the complex Bus Terminals
is:
• complete evaluation
• Intel format
• Word alignment

Example

Bus Terminal Controller: 1 x BX5200 or BC5250


Position 1: 1 x KL1012
Position 2: 1 x KL1104
Position 3: 1 x KL2012
Position 4: 1 x KL2034
Position 5: 1 x KL1502
Position 6: 1 x KL3002
Position 7: 1 x KL4002
Position 8: 1 x KL6001
Position 9: 1 x KL9010

56 Version: 2.0.0 BC5250


Programming

Process image

Bus Terminal Position Input image Output image


KL1501 5 %IB0...%IB5 %QB0...%QB5
KL3002 6 %IB6...%IB13 %QB6...%QB13
KL4002 7 %IB14...%IB21 %QB14...%QB21
KL6001 8 %IB22...%IB29 %QB22...%QB29
KL1012 1 %IX30.0..30.1 -
KL1104 2 %IX30.1..30.5 -
KL2012 3 - %QX30.0..30.1
KL2034 4 - %QX30.2..30.5
KL9010 9 - -

Address of the Bus Terminals in the local PLC


If you do not know the address of the Bus Terminals that you have assigned to the local
PLC (BCxx00):
Note Perform your hardware configuration in the System Manager. After you have entered all the
Bus Terminals and PLC variables, click with the right mouse button on the BCxx00 in the
hardware tree, and select the menu item Export variables information.... A file is saved, and
this file can be inserted in the System Manager under Project - Import. Now you will have
the entry TwinCAT import under the global variables, and you will find here all the variables
that you have assigned to the local PLC (BCxx00).

5.7 Mapping the Bus Terminals


The precise assignment of the byte-oriented Bus Terminals may be found in the configuration guide for the
particular bus terminal. This documentation is available on the Beckhoff Products & Solutions CD or on the
Internet under [Link]

Byte oriented Bus Terminals Bit oriented Bus Terminals


KL15x1 KL10xx, KL11xx, KL12xx, KL17xx, KM1xxx
KL25xx KL20xx, KL21xx, KL22xx, KL26xx, KL27xx, KM2xxx
KL3xxx
KL4xxx
KL5xxx
KL6xxx
KL7xxx
KL8xxx
KL9110, KL9160, KL9210, KL9260

5.8 Creating a boot project


The following memory resources are available for generating the boot project
• approx. 250 kbyte flash on the Bus Terminal controllers of the BX series;
• approx. 48 kbyte flash on the Bus Terminal controllers of the BCxx50 series.

PLC Control

After logging into TwinCAT PLC Control, a boot project can be created.
• Opening a PLC project
• Selecting the target system (or selection the serial interface)
• Logging into the BX/BCxx50

BC5250 Version: 2.0.0 57


Programming

• Creating a boot project (Online\Create boot project)

The PLC LED lights up green once a valid boot project is available on the BX/BCxx50.

In the Bus Terminal controllers of the BX series, the PLC LED flashes orange while boot project is created.
The PLC LED lights up orange if no boot project is available on the BX.

Deleting a boot project

The boot project can be deleted from the Bus Terminal Controller. The following steps must be followed:
• Opening the project
• Logging into the Bus Terminal Controller
• Deleting the boot project (Online\Delete boot project)

The PLC LED lights up orange when the boot project is deleted.

Using the current project as boot project


After an online change the old project is still shown as boot project. To use the current
project (after the online change) as the boot project, the boot project has to be recreated.
Note

Bypassing the start of the boot project*

With the Bus Terminal controllers of the BX series, starting of the boot project during booting can be
prevented by pressing the Navi button. This does not delete the boot project. The project is reloaded when
the Bus Terminal Controller is rebooted.

* from version 0.85

5.9 Local process image in the TwinCAT configuration


The TwinCAT configuration (TwinCAT CONFIG) enables free mapping between fieldbus, K-bus and PLC
variables. Variables can be linked independent of their address via the System Manager.

58 Version: 2.0.0 BC5250


Programming

Fig. 54: Changing variable links

Fig. 55: Linking a variable with an input

In the default configuration all Bus Terminals are assigned fixed addresses. If a Bus Terminal is inserted, the
whole address range may be shifted. The TwinCAT configuration enables allocated variables to be linked to
a Bus Terminal, as required. This is parameterized in the System Manager, and the configuration is then
downloaded to the Bus Terminal Controller (see TwinCAT configuration [} 27]). It is also possible to upload
an existing TwinCAT configuration.

5.10 Communication between TwinCAT and BX/BCxx50


For transferring data from TwinCAT to the Bus Terminal Controller, it makes sense to organize the data in a
structure. Please note the following to account for the differences in data management on the two systems.
• If two different data types are sent in sequence (e.g. byte and INT), the following variable is set to the
next even address offset
• Boolean variables should never be allocated individually within a structure, since they would invariably
occupy 1 byte. Boolean expressions should always be masked in a byte or word.

BC5250 Version: 2.0.0 59


Programming

Example 1: A structure on the BX/BCxx50 and on the PC

Variable BX/BCxx50 memory PC memory (TwinCAT)


Byte %..B0 %..B0
INT (1) %..B2 %..B1
INT (2) %..B4 %..B3

Due to the fact that another variable type (INT) follows the first byte, in the BX/BCxx50 it was assigned the
next free even address. In order to achieve the same data structure on both systems, a dummy byte has to
be inserted in the PC project (see example 2).

Example 2: A structure on the BX/BCxx50 and on the PC with the same memory allocation

Variable BX/BCxx50 memory PC memory (TwinCAT)


Byte %..B0 %..B0
Byte %..B1 (not necessarily required, since the system %..B1
(dummy) deals with this itself if the variable does not exist)
INT (1) %..B2 %..B2
INT (2) %..B4 %..B4

Data structure
Type PB_Data
STRUCT
wVar_1:WORD;
iValue_1:INT;
iValue_2:INT;
iValue_3:INT;
END_STRUCT
END_TYPE

Creating a variable structure


VAR_Global
strData_Out AT %QB1000:PB_Data; (*PLC Variables *)
bInput_01 AT %IX0.0:BOOL; (* Input from a terminal *)
END_VAR

Small programming example


strData_Out.wVar_1.0:=bInput_01;

Do not use real values in a mixed data structure


A mixed data structure should not contain real values. If this is nevertheless the case, the
high and low words must be swapped in the BX/BCxx50 or in the TwinCAT master project.
Note It is better to use an array of Real values or to transfer the Real values individually.

Larger fieldbus data blocks


You can transfer larger fieldbus data blocks, in order to have a reserve for your structure.
Disadvantage: These reserves are then transferred with each fieldbus telegram, resulting in
Note overload of the fieldbus communication.

5.11 Up- and downloading of programs


The Bus Terminal Controller has a memory for the source code. It can be used for storing the program, the
task configuration, and the libraries. Should the memory be insufficient, the source code may be stored
without task configuration and libraries. This takes up significant less memory space!

General settings

The timing of the source code download to the target system can be specified via Edit/Options. Open the
options menu.

60 Version: 2.0.0 BC5250


Programming

Fig. 56: Opening the options menu

Select Source Download.

Fig. 57: Selecting Source Download

Here you can set which parts of the source code are to be downloaded to the Bus Terminal Controller, and
when.

Source code only: the prx file with information on the online change is transferred. Login via online change
is possible (the PLC does not stop).
All files: as Source code only, plus all required libraries.
Source code only (compile info excluded): only the prx file is transferred. Login is only possible when the
PLC stops.

Which option you can use depends on the size of your projects.

Downloading a program

The source code can be transferred to the target system on request. This requires the user to be logged in
with his program. Under Online/Source code download the program code can now be transferred to the Bus
Terminal Controller.

BC5250 Version: 2.0.0 61


Programming

Fig. 58: Downloading the program code

After a short delay, a window will open that indicates the download progress.

Fig. 59: Download progress

Uploading a program

For uploading the program code again, open a new file in PLC Control. Then click on the PLC button.

62 Version: 2.0.0 BC5250


Programming

Fig. 60: Uploading a program

Select the data transfer route:


• BCxx50 or BX via AMS, if you are connected to the Bus Terminal Controller via the fieldbus, or
• BCxx50 or BX via serial, if you are connected to the Bus Terminal Controller via the serial interface.

Fig. 61: Selecting the data transfer route

Then select the device and confirm with OK.

Fig. 62: Selecting the device

The source code will now be uploaded.

BC5250 Version: 2.0.0 63


Programming

Password

You can protect your project with a password (in PLC Control Project/Options/Passwords).

5.12 Libraries

5.12.1 Libraries overview


The TwinCAT Automation Software offers various libraries for the BCxx50 series Bus Terminal Controllers
(Bus Coupler with PLC functionality) (see BECKHOFF Information System).

Download

The libraries are also included in this documentation. To extract the libraries, left-click on the link and copy
the libraries to directory TwinCAT\PLC\LIB.
• Standard ([Link]

• TcSystemBCxx50 ([Link]

TcSystemBCxx50 requires the TcBaseBCxx50 library.


• TcBaseBCxx50 ([Link]

• [Link] ([Link]

Use the library that matches the firmware


The latest firmware requires the latest library. If you update your Bus Terminal Controller,
please also update the libraries.
Note Copy these libraries to the LIB directory, remove these libraries from your project and add
them again.

TcSystemBCxx50
ADS Version Firmware
BC3150 BC5150 BC5250 BC8150 -
ADSREAD B0 B0 B1 B0 -
ADSWRITE B0 B0 B1 B0 -
ADSRDWRT B0 B0 B1 B0 -
ADSWRTCTL B0 B0 B1 B0 -
ADSRDSTATE B0 B0 B1 B0 -
ADSRDDEVINFO B0 B0 B1 B0 -

Bit Functions Version Firmware


BC3150 BC5150 BC5250 BC8150 -
CLEARBIT32 B0 B0 B1 B0 -
CSETBIT32 B0 B0 B1 B0 -
GETBIT32 B0 B0 B1 B0 -
SETBIT32 B0 B0 B1 B0 -

64 Version: 2.0.0 BC5250


Programming

Controller Version Firmware


BC3150 BC5150 BC5250 BC8150 -
FB_BasicPID - B0 B0 B1 B0 -
- - - - - - -

File Access Version Firmware


BC3150 BC5150 BC5250 BC8150 -
FB_ReadFromFile - - - - -
FB_WriteToFile - - - - -
FB_ReadWriteFile - - - - -

Memory Functions Version Firmware


BC3150 BC5150 BC5250 BC8150 -
MEMCMP B0 B0 B1 B0 -
MEMCYP B0 B0 B1 B0 -
MEMMOVE B0 B0 B1 B0 -
MEMSET B0 B0 B1 B0 -

NOVRAM Functions Version Firmware


BX3100 BX5100 BX5200 BX8000 -
- - - - - - -

SFC Version Firmware


BC3150 BC5150 BC5250 BC8150 -
AnalyzeExpression - - - - -
AppendErrorString - - - - -
SFCActionControl - - - - -

System / Time / TBus Version Firmware


BC3150 BC5150 BC5250 BC8150 -
DRAND B0 B0 B1 B0 -
SYSTEMTIME_TO_DT B0 B0 B1 B0 -
DT_TO_SYSTEMTIME B0 B0 B1 B0 -
GetSysTick B0 B0 B1 B0 -
PresetSysTick B0 B0 B1 B0 -
Reboot B0 B0 B1 B0 -

Debug Version Firmware


BC3150 BC5150 BC5250 BC8150 -
F_ReadDebugTimer B0 B0 B1 B0 -
F_StartDebugTimer B0 B0 B1 B0 -

5.12.2 Data structure strBX5200_Set


The DeviceNet-specific blocks allow the setting of the DeviceNet-specific parameters in the default
configuration of the BX5200 or BC5250. Thus the length of the I/O data, the baud rate, the ERP (Expected
Racket Rate) and the transmission mode can be set from the local PLC project. The block is not required for
the TwinCAT configuration, as in this case the settings are created via the System Manager.
• BX5200/BC5250 library

BC5250 Version: 2.0.0 65


Programming

([Link]
• Example of BC5250

([Link]
• Example of BX5200

([Link]

BXBC52x0_Settings

Fig. 63: Function block BXBC52x0_Settings

Function block BXBC52x0_Settings

VAR_INPUT
bWriteSet :BOOL;
bReadSet :BOOL;
strDeviceNet_Set :DeviceNet_Set;

Key

bWriteSet: Rising edge starts the block and reads/writes the parameters if these have changed. The Bus
Coupler must then be restarted. The user is notified if/when the bReboot_Necessary flag is set.
bReadSet: Positive edge reads the set DeviceNet parameters.
strDeviceNet_Set: Data structure for the DeviceNet slave interface.

VAR_OUTPUT
bBusy :BOOL;
bError :BOOL;
iErrorId :WORD;
strDeviceNet :DeviceNet_Setting;
bReboot_Necessary :BOOL;

Key

bBusy: The block is active as long as it is TRUE.


bError: Error bit.
iErrorId: Error number.
strDeviceNet: The type, the firmware and the DeviceNet slave parameters are output here.
bReboot_Necessary: If this bit is TRUE after the bBusy is set to FALSE, then the BC/BX52x0 must be
restarted so that the DeviceNet settings are saved.

Data structure strBX5200_Set

The settings for the DeviceNet slave interfaces are transferred with the following data structure.
TYPE ST_COMConfig:
STRUCT
iInputData :INT; (*BX5200: 0..255/BC5250 0..127*) )1
iOutputData :INT; (*BX5200: 0..255/BC5250 0..127*) )1
E_Mode :ENUM;(*0-polling,1-bit-strobe, 2-change of state, 3-cycle*)

66 Version: 2.0.0 BC5250


Programming

iERP :INT; (*100ms, ERP*4=Watchdog*)


E_BaudRate :ENUM;(*0-125kBaud, 1-250kBaud, 2-500kBaud, 3-AutoBaud*)
END_STRUCT
END_TYPE
)1 If the DN mode is only 8 Byte In and 8 Byte Output allowed. That is fix and you can´t change it.

Key

iInputData: Number of input data (from the point of view of the BX). Size in bytes [BX5200: 0..255 bytes,
BC5250: 0..127 bytes]
iOutputData: Number of output data (from the point of view of the BX). Size in bytes [BX5200: 0..255 bytes,
BC5250: 0..127 bytes]
E_Mode: DeviceNet Mode
iERP: Expected Racket Rate. This value multiplied by 4 results in the watchdog
E_BaudRate: DeviceNet Baudrate

iErrorId

Return parameter iErrorId Meaning


0 no Error
-1 Wrong BX or BC Typ
-2 Wrong firmware version (BC5250 Version 5 or higher, BX5200 110 or
higher)
0x1000_xxxx xxxx ADS Error Code (see ADS Return Code)

5.12.3 TcBaseBX

[Link] System task information


VAR_GLOBAL
SystemTaskInfo : SYSTEMTASKINFOTYPE;
END_VAR

System flags are implicitly declared variables. Using the Input Assistant, a variable SystemTaskInfoArr can
be found under system variables. This variable is a field with four structures of type SYTEMTASKINFOTYPE
[} 67]. The structure definition can be found in the system library. The index in this field is the task ID.

Development environment Target platform PLC libraries to be linked


TwinCAT v2.9.0 BCxx50, BC9x20 Controller [Link]

[Link] System Task Info Type


TYPE SYSTEMTASKINFOTYPE
STRUCT
active : BOOL;
taskName : STRING(16);
firstCycle : BOOL;
cycleTimeExceeded : BOOL;
cycleTime : UDINT;
lastExecTime : UDINT;
priority : BYTE;
cycleCount : UDINT;
END_STRUCT
END_TYPE

Key

active: This variable indicates whether the task is active.


taskName: the task name.
firstCycle: During the first PLC task cycle, this variable has the value: TRUE.
cycleTimeExceeded: this variable indicates whether the set task cycle time was exceeded.
cycleTime: set task cycle time in multiples of 100 ns.

BC5250 Version: 2.0.0 67


Programming

lastExecTime: cycle time required for the last cycle in multiples of 100 ns.
priority: set task priority.
cycleCount: cycle counter.

Development environment Target platform PLC libraries to be linked


TwinCAT v2.9.0 BCxx50, BC9x20 Controller [Link]

[Link] System info


VAR_GLOBAL
SystemInfo : SYSTEMINFOTYPE;
END_VAR

System flags are implicitly declared variables. Using the Input Assistant, a variable Systeminfo can be found
under system variables. The type SYSTEMINFOTYPE [} 68]is declared in the system library. For accessing
the variable, the system library has to be integrated in the project.

Development environment Target platform PLC libraries to be linked


TwinCAT v2.9.0 BCxx50, BC9x20 Controller [Link]

[Link] System information type


TYPE SYSTEMINFOTYPE
STRUCT
runTimeNo : BYTE;
projectName : STRING(32);
numberOfTasks : BYTE;
onlineChangeCount : UINT;
bootDataFlags : BYTE;
systemStateFlags : WORD;
END_STRUCT
END_TYPE

Key

runTimeNo: indicates the number of the runtime system (1).


projectName: project name as STRING.
numberOfTasks: number of tasks contained in the runtime system (max. 1).
onlineChangeCount: number of online changes since the last complete download.
bootDataFlags: Reserved
systemStateFlags: Reserved.

Development environment Target platform PLC libraries to be linked


TwinCAT v2.9.0 BCxx50, BC9x20 Controller [Link]

[Link] ADS

[Link].1 Local ADS Port Numbers

Port number Description


100 [} 69] dec Reading and writing of registers and tables from the coupler and the complex Bus
Terminals
801 [} 69] dec Local PLC process image

68 Version: 2.0.0 BC5250


Programming

[Link].2 ADS services

Local process image task 1 port 800 or 801

Data can be read from and written to the local process image. If it is necessary for outputs to be written, it is
important to ensure that they are not used by the local PLC, because the local controller will overwrite these
values. The data are not associated with a watchdog, and therefore must not be used for outputs that would
have to be switched off in the event of a fault.

Index group Meaning Index offset (value range)


0xF020 Inputs 0...2047
0xF030 Outputs 0...2047
0x4020 Flags 0...4095

ADS services

AdsServerAdsState

Data type (read only) Meaning


String Start - the local PLC is running
Start - the local PLC is stopped

AdsServerDeviceState

Data type (read only) Meaning


INT 0: Start - the local PLC is running
1: Start - the local PLC is stopped

AdsServerType

Data type (read only) Meaning


String BX PLC Server

Register Port 100

On the Bus Terminal Controllers of the BX series, and on the BCxx50, the ADS port number for register
communication is fixed at 100.

Index Group Index offset (value range) Meaning


Hi-Word Lo-Word
0 [READ ONLY] 0...127 0..255 Registers in the Bus Coupler
Hi-Word, table number of the Bus Coupler
Lo-Word, register number of the table
1...255 0...3 1-255 Register of the Bus Terminals
Hi-Word, channel number
Lo-Word, register number of the Bus Terminal

Minimum timeout
When reading the register, the time out of the ADS block has to be set to a time longer than
1 second.
Note

Setting the password


When writing to the registers, the password has to be set (see the documentation for the
particular Bus Terminal).
Note

BC5250 Version: 2.0.0 69


Programming

[Link] BX debugging function


These functions can be used for measuring command execution times in a PLC project. The unit is a tick.
One tick corresponds to 5.12 µs.

Start Debug Timer function

Fig. 64: Function block F_STARTDEBUGTIMER

Calling this function starts the timer. The return value is "0".

Read Debug Timer function

Fig. 65: Function block F_READDEBUGTIMER

This function reads the timer value. The return value has to be multiplied with 5.12 µs.

Example
VAR
Timer_BX :WORD;
i :INT;
END_VAR

Program
F_STARTDEBUGTIMER();
For i:=0 to 1000 do
;
END_FOR
Timer_BX:=F_READDEBUGTIMER();

70 Version: 2.0.0 BC5250


Programming

5.13 Program transfer via the serial interface


Every Bus Terminal Controller can be programmed via the PC's RS232 interface.

Select the serial interface in TwinCAT PLC Control.

Fig. 66: Selecting the data transfer route - serial interface

The settings for the serial interface, port number, baud rate etc. are found under Online/Communication
parameters in PLC Control.

The Bus Terminal Controller requires the following setting:


• Baud Rate: 9600/19200/38400/57600 baud (automatic baud rate detection)
• Stop bits: 1
• Parity: Straight line

Fig. 67: Parameterization of the serial interface

Program transfer via the serial interface and ADS

The Bus Terminal Controller can be programmed via the PC's RS232 interface. Before you can work with the
Bus Terminal Controller, TwinCAT must be notified of it (see serial ADS [} 36]).

Select the ADS connection in TwinCAT PLC Control.

BC5250 Version: 2.0.0 71


Programming

Fig. 68: Selecting the data transfer route - AMS

PLC Control can be accessed via Online/Communication Parameters....

Fig. 69: Selecting the device

72 Version: 2.0.0 BC5250


DeviceNet communication

6 DeviceNet communication

6.1 DeviceNet Introduction

Fig. 70: DeviceNet

DeviceNet is an open system based on CAN. CAN was developed some years ago by R. Bosch for data
transmission in motor vehicles. Millions of CAN chips are now in use. A disadvantage for application in
automation is that CAN does not contain definitions for the application layer. CAN only defines the physical
and data link layer.

DeviceNet specifies a uniform application layer and this makes it possible to use the CAN protocol for
industrial applications. ODVA (the Open DeviceNet Vendor Association) is an independent association which
supports manufacturers and users of the DeviceNet system. ODVA ensures that all devices which conform
to the specification can operate together in one system, regardless of their manufacturer.

Fig. 71: Example of DeviceNet in use

DeviceNet is a sensor/actuator bus system. It is internationally standardised (EN50325) and is based on


CAN (Controller Area Network). DeviceNet supports a number of communication types for the input and
output data:
• Polling: The master module ("scanner") sends the output data cyclically to the assigned devices and
receives the input data in an answer telegram.
• Change-of-State: Telegrams are sent as soon as their contents have changed.
• Cyclic : The modules send the data automatically after a cycle time has elapsed.
• Strobed: The scanner requests the input data using a broadcast telegram to all the devices.

The DeviceNet devices support all I/O communication types.

The DeviceNet devices are parameterized via acyclical services (explicit messaging).

The effective utilization of the bus bandwidth allows DeviceNet, particularly in Change-of-State mode, to
achieve short system reaction times in spite of the relatively low data rates. The BECKHOFF DeviceNet
devices have a powerful implementation of the protocol. Through active participation in the ODVA's technical
committees, BECKHOFF are contributing to the further development of this bus system, and has in this way
itself gathered profound DeviceNet expertise.

BC5250 Version: 2.0.0 73


DeviceNet communication

Configuration

The node address is set in the range from 0 to 63 using two decimally coded rotary switches. The data
transfer rate set at the DeviceNet scanner is automatically recognized by the DeviceNet Box (auto baud
rate). "Electronic Data Sheets" (EDS files) for DeviceNet configuration tools are available for download from
the Beckhoff internet site ([Link] and on the BECKHOFF product CDs. Special I/O
parameters that are not covered by the DeviceNet standard can be set via the KS2000 software (serial
connection) or via acyclical explicit messages.

Diagnostics

The extensive diagnostic functions of the BECKHOFF DeviceNet devices allow rapid fault localisation. The
diagnostic messages are transmitted over the bus and collated by the master. The status of the network
connection, the device status, the status of the inputs and outputs and of the power supply are displayed by
LEDs.

Data transfer rates

Three data transfer rates from 125 kbaud to 500 kbaud are available for different bus lengths. The effective
utilization of the bus bandwidth allows DeviceNet to achieve short system reaction times at relatively low
data rates.

Topology

DeviceNet is based on a linear topology. The number of devices participating in each network is logically
limited by DeviceNet to 64, but physically the present generation of drivers allows up to 64 nodes in one
network segment. The maximum possible size of the network for any particular data rate is limited by the
signal propagation delay required on the bus medium. For 500 kbaud, for instance, the network may extend
100 m, whereas at 125 kbaud the network may reach up to 500 m. At low data rates the size of the network
can be increased by repeaters, which also allow the construction of tree structures.

Bus access procedures

CAN utilizes the Carrier Sense Multiple Access (CSMA) procedure, i.e. all participating devices have the
same right of access to the bus and may access it as soon as it is free (multi-master bus access). The
exchange of messages is thus not device-oriented but message-oriented. This means that every message is
unambiguously marked with a prioritized identifier. In order to avoid collisions on the bus when messages
are sent by different devices, a bit-wise bus arbitration is carried out at the start of the data transmission. The
bus arbitration assigns bus bandwidth to the messages in the sequence of their priority. At the end of the
arbitration phase only one bus device occupies the bus, collisions are avoided and the bandwidth is optimally
exploited.

Configuration and parameterization

The TwinCAT System Manager allows all the DeviceNet parameters to be set conveniently. An "eds" file
(electronic data sheet) is available on the BECKHOFF website ([Link] for the
parameterization of BECKHOFF DeviceNet devices using configuration tools from other manufacturers.

6.2 Network Management

in preparation

6.3 Object directory

in preparation

74 Version: 2.0.0 BC5250


DeviceNet communication

6.4 ADS-Communication

6.4.1 ADS services

Local process image task 1 port 800 or 801

Data can be read from and written to the local process image. If it is necessary for outputs to be written, it is
important to ensure that they are not used by the local PLC, because the local controller will overwrite these
values. The data are not associated with a watchdog, and therefore must not be used for outputs that would
have to be switched off in the event of a fault.

Index Group Meaning Index offset (value range)


0xF020 Inputs 0...2047
0xF030 Outputs 0...2047
0x4020 Flags 0...4095

ADS services

AdsServerAdsState

Data type (read only) Meaning


String Start - the local PLC is running
Start - the local PLC is stopped

AdsServerDeviceState

Data type (read only) Meaning


INT 0: Start - the local PLC is running
1: Start - the local PLC is stopped

AdsServerType

Data type (read only) Meaning


String BX PLC Server

Register port 100

On the Bus Terminal Controllers of the BX series, and on the BCxx50, the ADS port number for register
communication is fixed at 100.

Index group Index offset (value range) Meaning


Hi-Word Lo-Word
0 [READ ONLY] 0...127 0..255 Registers in the Bus Coupler
Hi-Word, table number of the Bus Coupler
Lo-Word, register number of the table
1...255 0...3 1-255 Register of the Bus Terminals
Hi-Word, channel number
Lo-Word, register number of the Bus Terminal

Minimum timeout
When reading the register, the time out for the ADS block has to be set to a time longer
than 1 second.
Note

BC5250 Version: 2.0.0 75


DeviceNet communication

Setting the password


When writing to the registers, the password has to be set (see the documentation for the
particular Bus Terminal).
Note

76 Version: 2.0.0 BC5250


Error handling and diagnosis

7 Error handling and diagnosis

7.1 Diagnostics
DeviceNet state

In many cases it is important to know whether the communication with the higher-level master is still OK. To
this end, link the NodeState variable with your PLC program. A TwinCAT configuration is required for this
purpose.

Fig. 72: DeviceNet diagnostics byte in the System Manager

Error number Description Remedy


0 no error none
1 Node is deactivated by the scanner, node is no longer Check the configuration
in the masters scan-list.
For Slave Devices it means that there is no Data-
Exchange between the Master and the Slave. The
Master has released the DeviceNet Slave
2 No data exchange between node and DeviceNet Check the connection
Master, node access timeout
18 Node is configured, ready for data exchange none
42 Electronic Key Error: Vendor ID Check identity of DeviceNet
slave
43 Electronic Key Error: Device Type Check identity of DeviceNet
slave
44 Electronic Key Error: Product Code Check identity of DeviceNet
slave
45 Electronic Key Error: Revision Check identity of DeviceNet
slave
46 Error writing start-up attributes Check identity of DeviceNet
slave
47 Wrongproduced IO-Data length Check identity of DeviceNet
slave
48 Wrong consumed IO-Data length Check identity of DeviceNet
slave
49 Idle Mode (for Slave Devices): no valid IO-Data is Check whether the master is in
exchanged via DeviceNet idle mode

BC5250 Version: 2.0.0 77


Error handling and diagnosis

Reading fieldbus state by ADS

You can read the fieldbus state via ADSREAD in the default configuration or in the TwinCAT configuration.

Parameter ADSREAD function block Description


NetID local – empty string
Port 1
IndexGroup 16#0006
IndexOffset 16#000C_AE00
LEN 1

State of the K-bus

An internal bus or Bus Terminal error is indicated in the K-bus state variable. A more precise fault description
can be obtained via a function block (in preparation). To this end, link the K-bus state variable with your PLC
program.

Fig. 73: State of the K-bus

Error bit Description Error type


0 No error No error
Bit 0 K-bus error Error
Bit 2 K-Bus is re-triggered Note

Reading K-Bus state by ADS

You can read the fieldbus state via ADSREAD in the default configuration or in the TwinCAT configuration.

Parameter ADSREAD function block Description


NetID local – empty string
Port 1
IndexGroup 16#0006
IndexOffset 16#000C_9000
LEN 1

78 Version: 2.0.0 BC5250


Error handling and diagnosis

7.2 Diagnostic LEDs


The Bus Terminal Controller has LEDs that indicate the status. The row of LEDs on the left describes the
status of the fieldbus and of the PLC. The row of LEDs on the right indicates the supply voltage and the K-
Bus state.

Fig. 74: LEDs

POWER LEDs for diagnostics of power supply

LED (Power LEDs) Meaning


LED Us LED off: Bus Terminal Controller has no 24 VDC voltage
LED Up LED off: No power supply 24 VDC connected at the power contacts

LEDs for K-Bus diagnostics

LED (Power LEDs) Meaning


LED RUN LED off: no K-bus update
LED on, flashes: K-bus running
LED ERR LED off: No error
LED flashes: see K-Bus error code

BC5250 Version: 2.0.0 79


Error handling and diagnosis

Error codes for K-Bus diagnosis


Error code Error code argument Description Remedy
0 - EMC problems • Check power supply for undervoltage or overvoltage
peaks
• Implement EMC measures
• If a K-bus error is present, it can be localized by a restart
of the coupler (by switching it off and then on again)
1 0 EEPROM checksum er- Enter factory settings with the KS2000 configuration software
ror
1 Code buffer overflow Insert fewer Bus Terminals. The programmed configuration has
too many entries in the table
2 Unknown data type Software update required for the BX Controller
2 - reserved -
3 0 K-bus command error • No Bus Terminal inserted
• One of the Bus Terminals is defective; halve the number
of Bus Terminals attached and check whether the error is
still present with the remaining Bus Terminals. Repeat
until the defective Bus Terminal is located.
4 0 K-bus data error, break Check whether the n+1 Bus Terminal is correctly connected; re-
behind the BX Con- place if necessary.
troller
n Break behind Bus Ter- Check whether the KL9010 Bus End Terminal is connected
minal n
5 n K-bus error in register Exchange the nth Bus Terminal
communication with
Bus Terminal n
6 0 Error at initialization Replace BX Controller
1 Internal data error Perform a hardware reset on the BX Controller (switch off and on
again)
2 DIP switch changed af- Perform a hardware reset on the BX Controller (switch off and on
ter a software reset again)
7 0 Note: cycle time was Warning: the set cycle time was exceeded. This indication (flash-
exceeded ing LEDs) can only be cleared by booting the BX Controller
again.
Remedy: increase the cycle time
9 0 Checksum error in Transmit program to the BX again
Flash program
1 Incorrect or faulty library Remove the faulty library
implemented
10 n Bus Terminal n is not Check the nth Bus Terminal. The boot project must be deleted if
consistent with the con- the insertion of an nth Bus Terminal is intentional.
figuration that existed
when the boot project
was created
14 n nth Bus Terminal has Start the BX Controller again, and if the error occurs again then
the wrong format exchange the Bus Terminal.
15 n Number of Bus Termi- Start the BX Controller again. If the error occurs again, restore
nals is no longer correct the manufacturers setting using the KS2000 configuration soft-
ware
16 n Length of the K-bus Start the BX Controller again. If the error occurs again, restore
data is no longer correct the manufacturers setting using the KS2000 configuration soft-
ware

80 Version: 2.0.0 BC5250


Error handling and diagnosis

LED bus - fieldbus diagnostics

LED BUS LED CONNECT LED OVERFLOW Meaning


OFF
on off off No fieldbus connected, Bus Terminal Controller
searches for the baud rate, 24 V DeviceNet voltage
missing
flashes Blink off Stopped, no error, Bus Terminal Controller
searches for the baud rate
off on off No error
off flashes off Bus OFF, wrong baud rate
off off on Warning Level

LED PLC - PLC diagnostics

LED Meaning
PLC LED LED on: PLC running
LED off: PLC stopped

BC5250 Version: 2.0.0 81


Appendix

8 Appendix

8.1 Firmware Update


Firmware update program

The firmware update program is required for loading a new firmware to the Bus Coupler. The program is
transferred via the serial interface.

Note for BX3100:


Updates are not available with BX3100 firmware 0.64 (or lower). If these devices need updating, send the
BX3100 to the manufacturer with a corresponding note.

Beckhoff Automation GmbH & Co. KG


Service Department
Stahlstr. 31
33415 Verl, Germany

Firmware update program 241 ([Link]


zip/[Link]) 71 kbytes (for Windows NT4.0 SP6, 2000, XP).

The program [Link] and the file [Link] have to be in the same directory. Open
the program by double-clicking on [Link].

Update for Bus Terminal Controllers

BX series

Select the appropriate device of - in this example "Serial interface (BX)".

Fig. 75: Selecting a BX series Bus Terminal Controller

BCxx50 series

Select the corresponding device, in this case "Serial Interface".

82 Version: 2.0.0 BC5250


Appendix

Fig. 76: Selecting a BC series Bus Terminal Controller

BX and BCxx50 series

Then select the COM port.

Fig. 77: Select the COM port

Open the file you wish to download.

Fig. 78: Open the firmware file

Start the download via the green 'traffic light'. The download begins after about a minute, and is then also
shown on the BX's display. After successful download (approx. 2 to 3 minutes) the Bus Terminal Controller
reboots automatically.

BC5250 Version: 2.0.0 83


Appendix

Fig. 79: Status messages relating to the firmware update

8.2 General operating conditions


The following conditions must be met in order to ensure flawless operation of the fieldbus components.

Environmental conditions

Operation

The components may not be used without additional protection in the following locations:
• in difficult environments, such as where there are corrosive vapors or gases, or high dust levels
• in the presence of high levels of ionizing radiation

Condition Permissible range


Permissible ambient temperature during operation see technical data
Installation position variable
Vibration resistance conforms to EN 60068-2-6
Shock resistance conforms to EN 60068-2-27
EMC immunity conforms to EN 61000-6-2
Emission conforms to EN 61000-6-4

Transport and storage

Condition Permissible range


Permissible ambient temperature during storage -25°C... +85°C
Relative humidity 95 %, no condensation
Free fall up to 1 m in the original packaging

Protection classes and types

Condition Permissible range


Protection class in accordance with IEC 536 (VDE A protective conductor connection to the profile rail is
0106, Part 1) necessary!
Protection class conforms to IEC 529 IP20 (protection against contact with a standard test
finger)
Protection against foreign objects Less than 12 mm in diameter
Protection against water no protection

84 Version: 2.0.0 BC5250


Appendix

Component identification

Every supplied component includes an adhesive label providing information about the product's approvals.
For sample, on the BK2000 Bus Coupler:

The following information is printed on the label:


Printed item Meaning for this label
Precise product identification Lightbus Coupler BK2000
Supply voltage Us 24 VDC (Use a 4 A fuse or a Class 2 power supply
to meet UL requirements)
Data transfer rate 2.5 Mbaud
Manufacturer Beckhoff Automation GmbH & Co. KG
CE mark Conformity mark
UL mark Mark for UL approval. UL stands for the
Underwriters Laboratories Inc., the leading
certification organization for North America, based
in the USA.
C = Canada, US = USA,
UL file number: E172151

Production identification From left to right, this sequence of characters


indicates the week of production (2 characters),
the year of production (2 characters), the software
version (2 characters) and hardware version (2
characters), along with any special indications (4
characters).
In this case the device is a BK2000
- produced in calendar week 9
- of 2001
- with firmware version BF
- in hardware version 6
- without special designation

8.3 Approvals
Conformity mark

CE

Protection class

IP20 conforms to EN60529

BC5250 Version: 2.0.0 85


Appendix

8.4 Test standards for device testing


EMC

EMC immunity

EN 61000-6-2

Electromagnetic emission

EN 61000-6-4

Vibration / shock resistance

Vibration resistance

EN 60068-2-6

Shock resistance

EN 60068-2-27

8.5 Bibliography
German books

General fieldbus technology


• Gerhard Gruhler (Pub.): Feldbusse und Geräte-Kommunikationssysteme, Praktisches Know-How
mit Vergleichsmöglichkeiten. (Fieldbus and Device Communication Systems, Practical Know-how with
Comparative Resources) Franzis Verlag, 2001. 244 pages. ISBN 3-7723-5745-8

8.6 List of Abbreviations


CAN

Controller Area Network. Serial bus system standardized in ISO 11898 that is used as the basic technology
for CANopen

CiA

CAN in Automation e.V.. An international association of manufacturers and users based in Erlangen,
Germany.

COB

Communication Object. A CAN telegram with up to 8 data bytes.

COB-ID

Communication Object Identifier. Telegram address (not to be confused with the node address). CANopen
uses the 11-bit identifier according to CAN 2.0A.

NMT

Network Management. One of the service primitives of the CANopen specification. Network management is
used to initialize the network and to monitor nodes.

86 Version: 2.0.0 BC5250


Appendix

PDO

Process Data Object. A CAN telegram for the transfer of process data (e.g. I/O data).

RxPDO

Receive PDO. PDOs are always identified from the point of view of the device under consideration. Thus a
TxPDO with input data from an I/O module becomes an RxPDO from the controller's point of view.

SDO

Service Data Object. A CAN telegram with a protocol for communication with data in the object directory
(typically parameter data).

TxPDO

Transmit PDO (named from the point of view of the CAN node).

BC5250 Version: 2.0.0 87


Appendix

8.7 Support and Service


Beckhoff and their partners around the world offer comprehensive support and service, making available fast
and competent assistance with all questions related to Beckhoff products and system solutions.

Beckhoff's branch offices and representatives

Please contact your Beckhoff branch office or representative for local support and service on Beckhoff
products!

The addresses of Beckhoff's branch offices and representatives round the world can be found on her internet
pages:
[Link]

You will also find further documentation for Beckhoff components there.

Beckhoff Headquarters

Beckhoff Automation GmbH & Co. KG

Huelshorstweg 20
33415 Verl
Germany

Phone: +49(0)5246/963-0
Fax: +49(0)5246/963-198
e-mail: info@[Link]

Beckhoff Support

Support offers you comprehensive technical assistance, helping you not only with the application of
individual Beckhoff products, but also with other, wide-ranging services:
• support
• design, programming and commissioning of complex automation systems
• and extensive training program for Beckhoff system components

Hotline: +49(0)5246/963-157
Fax: +49(0)5246/963-9157
e-mail: support@[Link]

Beckhoff Service

The Beckhoff Service Center supports you in all matters of after-sales service:
• on-site service
• repair service
• spare parts service
• hotline service

Hotline: +49(0)5246/963-460
Fax: +49(0)5246/963-479
e-mail: service@[Link]

88 Version: 2.0.0 BC5250


List of illustrations

List of illustrations
Fig. 1 The principle of the Bus Terminal ................................................................................................ 9
Fig. 2 BC5250........................................................................................................................................ 14
Fig. 3 BCxx50 ........................................................................................................................................ 16
Fig. 4 Release the locking mechanism by pulling the orange tab.......................................................... 17
Fig. 5 Power contact on the left ............................................................................................................. 17
Fig. 6 Potential groups of a Bus Terminal block .................................................................................... 18
Fig. 7 Power contact on the left ............................................................................................................. 19
Fig. 8 Terminal points for the Bus Terminal Controller supply............................................................... 20
Fig. 9 UL identification ........................................................................................................................... 20
Fig. 10 Programming cable KS2000-Z2 .................................................................................................. 21
Fig. 11 Termination of the bus with a 120 Ohm termination resistor ....................................................... 22
Fig. 12 Insensitivity to incoming interference........................................................................................... 22
Fig. 13 Sample topology of drop lines ..................................................................................................... 23
Fig. 14 Structure of CAN/DeviceNet cable ZB5200................................................................................. 24
Fig. 15 BK51x0/BX5100 connection socket assignment ......................................................................... 25
Fig. 16 Pin assignment: M12 plug, fieldbus box ...................................................................................... 26
Fig. 17 Start-up behavior of the Bus Terminal Controller ........................................................................ 27
Fig. 18 Creating a TwinCAT configuration............................................................................................... 29
Fig. 19 Selecting the Bus Terminal Controller ......................................................................................... 30
Fig. 20 Downloading a TwinCAT configuration........................................................................................ 31
Fig. 21 Selecting the Bus Terminal Controller ......................................................................................... 31
Fig. 22 State of the Bus Terminal Controller............................................................................................ 31
Fig. 23 Activating the TwinCAT configuration.......................................................................................... 31
Fig. 24 Choose Target System ................................................................................................................ 32
Fig. 25 Selecting the Bus Terminal Controller ......................................................................................... 33
Fig. 26 State of the Bus Terminal Controller............................................................................................ 33
Fig. 27 Uploading the TwinCAT configuration ......................................................................................... 33
Fig. 28 Memory for code mapping ........................................................................................................... 34
Fig. 29 Data memory mapping ................................................................................................................ 34
Fig. 30 Code and data memory ............................................................................................................... 35
Fig. 31 Other memory.............................................................................................................................. 35
Fig. 32 Properties of the remote connection............................................................................................ 36
Fig. 33 Setting the node ID ...................................................................................................................... 39
Fig. 34 EDS Wizard ................................................................................................................................. 40
Fig. 35 Network Browse........................................................................................................................... 41
Fig. 36 I/O data lengths set on the BC/BX............................................................................................... 41
Fig. 37 Adoption of the detected modules into the scan list .................................................................... 42
Fig. 38 Setting of the I/O data lengths ..................................................................................................... 43
Fig. 39 Selection of the interscan delay................................................................................................... 44
Fig. 40 Setting the poll rate...................................................................................................................... 44
Fig. 41 BX Settings tab ............................................................................................................................ 45
Fig. 42 BX Diag tab.................................................................................................................................. 46
Fig. 43 Selecting the PLC project ........................................................................................................... 47
Fig. 44 Connecting PLC variable and hardware ...................................................................................... 48

BC5250 Version: 2.0.0 89


List of illustrations

Fig. 45 Target system display.................................................................................................................. 48


Fig. 46 Setting the task time .................................................................................................................... 49
Fig. 47 Displaying the PLC cycle time ..................................................................................................... 50
Fig. 48 Maximum number of POUs exceeded......................................................................................... 52
Fig. 49 Menu path Projects / Options / Controller Settings...................................................................... 52
Fig. 50 Controller settings........................................................................................................................ 53
Fig. 51 Global memory insufficient .......................................................................................................... 53
Fig. 52 Menu path Projects / Options / Build ........................................................................................... 53
Fig. 53 Build............................................................................................................................................. 54
Fig. 54 Changing variable links................................................................................................................ 59
Fig. 55 Linking a variable with an input.................................................................................................... 59
Fig. 56 Opening the options menu........................................................................................................... 61
Fig. 57 Selecting Source Download......................................................................................................... 61
Fig. 58 Downloading the program code................................................................................................... 62
Fig. 59 Download progress ..................................................................................................................... 62
Fig. 60 Uploading a program ................................................................................................................... 63
Fig. 61 Selecting the data transfer route.................................................................................................. 63
Fig. 62 Selecting the device..................................................................................................................... 63
Fig. 63 Function block BXBC52x0_Settings ............................................................................................ 66
Fig. 64 Function block F_STARTDEBUGTIMER..................................................................................... 70
Fig. 65 Function block F_READDEBUGTIMER ...................................................................................... 70
Fig. 66 Selecting the data transfer route - serial interface ....................................................................... 71
Fig. 67 Parameterization of the serial interface ....................................................................................... 71
Fig. 68 Selecting the data transfer route - AMS....................................................................................... 72
Fig. 69 Selecting the device..................................................................................................................... 72
Fig. 70 DeviceNet .................................................................................................................................... 73
Fig. 71 Example of DeviceNet in use....................................................................................................... 73
Fig. 72 DeviceNet diagnostics byte in the System Manager ................................................................... 77
Fig. 73 State of the K-bus ........................................................................................................................ 78
Fig. 74 LEDs ............................................................................................................................................ 79
Fig. 75 Selecting a BX series Bus Terminal Controller............................................................................ 82
Fig. 76 Selecting a BC series Bus Terminal Controller............................................................................ 83
Fig. 77 Select the COM port .................................................................................................................... 83
Fig. 78 Open the firmware file.................................................................................................................. 83
Fig. 79 Status messages relating to the firmware update........................................................................ 84

90 Version: 2.0.0 BC5250

You might also like