Getting started with B&R, "Hello community" first project, backend "PLC" part

Introduction

  • The aim of this how-to is not to cover theory in details
  • It is a simple, step-by-step guide, similar to a Hello World application, for someone who has no experience with B&R and who wants to quickly bring B&R PLC to life using Automation Studio and get first feeling. :coffee:

What do you need

  • Download, install and register your copy of Automation Studio (www.br-automation.com), you can use evaluation license for first test
  • Check what type of PLC you have, this example is for PLC X20CP1583 with CF card, but can be used for any B&R PLC
  • you need CF card and CF card reader
  • your laptop with Automation Studio will be connected directly to PLC using ethernet cable

Procedure - hw configuration

  • make a new project and use option define new hardware manually

  • select type of your PLC, type number must be the same

  • set a suitable IP address and subnet mask that is out of the IP network range of your development notebook. In our example PLC will have 192.168.0.1 and local laptop ethernet port 192.168.0.33, both uses same subnet mask 255.255.255.0

  • set SNMP to activated

  • don’t add any more hardware modules in this test project, nor any programs or other software components now.
  • plug CF card to reader and reader to your laptop
  • use offline installation of the project

  • select proper CF card from list and press button for Install on application storage

  • do not be worry about warning, partitions must be created

  • installation finished without error? Unplug CF reader from your laptop and plug CF card back to PLC, power on

  • boot the PLC with this minimal setup and check if the PLC boots into RUN (R/E Led solid green, RDY/F off, S/E solid green)… This will take some time after a offline Installation, and the PLC will automatically do 2 reboots while Installation is running.

  • in meantime configure your local ethernet laptop to be in the same network range like your PLC

  • PLC is on, status LEDS are ok, try to ping PLC to make sure that network communication was established

  • configure connection from your Automation Studio to PLC (manually or select PLC from the list)
  • press connection button

  • if connection is established, you can see in status bar PLC mode (RUN, SERV,…), type of PLC as well as version of Automation runtime

Procedure - sw configuration

  • insert your first program, use Structure text programming language

  • change to logical view, in object catalog select file form ST Program all In One and drag and drop to logical view

  • in your program package, open *.var file and declare two variables bSetMessage [BOOL] and sMsg[STRING80]

  • in your program package, open *.st file and insert simple IF logic into CYCLIC part of program

  • Change logical view to Physical view and select option to show Software

  • check that your program is already inserted in software, if not do it (drag and drop)

  • congratulation, you have just finished your first HELLO COMMUNITY program :star_struck:

Bonus procedure - first diagnostic :eyes:

  • any troubles or doubts about state of your PLC, in logger of PLC all important information is stored :thinking:

More curious about B&R PLC, would you like to know more about Logger, Monitor mode,Watch, Online functionality, debugging, etc.

You can study more :arrow_right:

Additional source of information

Related topic from out community, “goot to know” :muscle:

6 Likes

(post deleted by author)

Hi,

the popup message only means that a compile error happened.

Could you please check in the output window (lower left panel) what error occured?
Errors are marked as red lines, you can use the “Errors, Warnings, Messages” buttons in the output window additionally to filter for those message types.

Sorry, it turns out there was a slight error so that the memory was not detected, now it’s finished, are there examples of some programs such as turning on lights or three-phase motors?