• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Product
    • Design UI
    • Develop
    • Analyze and test
    • Deploy
    • Framework and toolbox
    • Compatibility
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Hardware - B&R Automation I/O Modules
  • B&R Automation I/O Modules
  • 4.11.14

B&R Automation Setup Guide

B&R Automation I/O Modules

B&R Automation I/O Modules

B&R Automation provide stackable Input/Output modules for the B&R Automation X20 ethernet / modbus buscoupler. For more information about the details of each specific B&R Automation I/O module or buscouplers, please consult the B&R Automation website, and do a search for the specific module or buscoupler.

X20

CDP Studio ModbusIO supports most of the X20 analog and digital modules for the X20 BC 0087. To see which specific modules are supported by CDP Studio, drag in a BR-Automation-X20-BC-0087-UDP from the ModbusIO Resource tree and add a ModbusMasterPacketAnalog and a ModbusMasterPacketDigital packet. Click into the packets and observe in the B&R-AutomationIOModules resource to see which modules are supported.

Default Configuration

The B&R X20 BC 0087 buscoupler has a default IP Address of 192.168.100.1 (when the network address switches are set to FF). The buscoupler reads analog values from modbus address 0x0 and writes analog values to modbus address 0x800. Digital input values are read from address 0x2000 and Digital output values are written to address 0x2400.

Note: The B&R X20 BC 0087 buscoupler must have a default module configuration, or the module mapping will be incorrect. To get a default mapping, use telnet to connect to the device IP Address.

To start telnet:

  • On Linux: Open a Terminal
  • On Windows: Open CMD (Press Windows+R to open “Run” box. Type “cmd” and then click “OK” to open a regular Command Prompt).

Type the following (press the [Return] or [Enter] key after each line in the blocks below):

telnet 192.168.100.1

where 192.168.100.1 is the IP address of the B&R X20 BC 0087. Once connected, type

flash erase

and after that, type

restart

After this the device will get a correct default module configuration, and it will also get the default IP Address (192.168.100.1).

Note: See the B&R Automation Modbus TCP documentation for more information about which modbus addresses can be accessed, how to set IP Address and so on.

Configuration

The BR-Automation-X20-BC-0087-TCP and BR-Automation-X20-BC-0087-UDP contain packets that set up the Watchdog so that on loss of communication, outputs go to default values. The timeout for the watchdog can be set (in milliseconds) in the Value of WatchDogTimeout Timeout TimeoutMilliseconds.

Due to the way Modbus addresses are implemented in the X20 buscoupler, the analog and digital data must be read and written separately. For this reason, there are two different packets to use: ModbusMasterPacketAnalog and ModbusMasterPacketDigital. It is very important to use the correct ModbusMasterPacket to send and receive the module data. The packet that holds the Analog data can be found in the B&R-AutomationIOModules in the Resource tree as ModbusMasterPacketAnalog. The packet that holds the Digital data can be found in the B&R-AutomationIOModules in the Resource tree as ModbusMasterPacketDigital. These packets are already set up with the correct Read and Write addresses to the corresponding areas for input and output for the X20 buscoupler, and with AlignOnByteBoundaryStrict alignment to handle digital module placement in the process image correctly.

For instance, if you only have analog modules, make sure to add a ModbusMasterPacketAnalog into the BR-Automation-X20-BC-0087-TCP or BR-Automation-X20-BC-0087-UDP configuration. Then add all the analog modules inside that. If the analog modules that you add are only inputs or only outputs, make sure to also adjust the packet FunctionCode to that of ReadHoldingRegisters (all inputs) or WriteMultipleRegisters (all outputs). If there is a mix of inputs and outputs (or a complex module), use FunctionCode ReadWriteMultipleRegisters. See the example for more information about adding packets.

Tools

To configure internals in the various modules and the buscoupler, the B&R tools Automation Studio FieldbusDESIGNER and Modbus TCP/IP Toolbox can be used. There is also an Excel sheet - Modbus TCP Mapping Tool - (to calculate modbus addresses of the I/O Modules) which can be useful for advanced users. These tools can all be downloaded from the B&R Automation website.

Note: Whenever modules are changed, added or removed, make sure to power-cycle the buscoupler, or the internal data-image might not be updated.

Note: Make sure to adjust / set the correct FunctionCode in the modbus packets as follows, or there will be communication problems:

  • If you only Read from a device, use ReadHoldingRegisters.
  • If you only write to a device, use WriteMultipleRegisters
  • If you both read and write a device, use ReadWriteMultipleRegisters.
  • When you add or remove or change modules, make sure to validate the FunctionCode for the packet that the modules belong to.

It is possible to add more packets to exchange more data with the buscoupler, or to exchange data from other areas of the buscoupler. Choose one of the appropriate ModbusMasterPackets from the B&R-AutomationIOModules resource in the Resource tree and then add IOModules and channels to that.

Note: In CDP Studio, I/O numbering start at 0, meaning that the first channel has the number 0.

See also Modbus I/O Channel scaling and Watchdog.

Note: For more information about CDP Technologies partnerships, see Our Partners and for detailed information on B&R Automation, see the B&R Automation website for more information about B&R Automation.

B&R Automation Setup Guide

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

    © Copyright 2022 CDP Technologies. Privacy and cookie policy.

    Return to top