Page 3
GmbH neither guarantees nor accepts any liability whatsoever for consequential damages resulting from the use of this manual or its associated product. SYS TEC electronic GmbH reserves the right to alter the information contained herein without prior notification and does not accept responsibility for any damages which might result.
PLC configuration of the PLCcore-5208................29 7.4.1 PLC configuration via WEB-Frontend..............29 7.4.2 PLC configuration via control elements of the Development Kit PLCcore-5208 ..31 7.4.3 Setup of the configuration file "plccore-5208.cfg"........... 32 Boot configuration of the PLCcore-5208 ................34 Selecting the appropriate firmware version .................
Page 5
Creating a user-specific client application .............. 55 8.1.4 Example for using the shared process image ............57 Driver Development Kit (DDK) for the PLCcore-5208 ............61 Testing the hardware connections ..................62 Appendix A: Firmware function scope of PLCcore-5208 ..........64 Appendix B: Reference design for the PLCcore-5208 ............67...
System Manual PLCcore-5208 1 Introduction Thank you that you have decided for the SYS TEC PLCcore-5208. This product provides to you an innovative and high-capacity PLC-kernel which – due to its numerous interfaces – is well-suitable as communication and control processor for embedded applications.
System Manual PLCcore-5208 2 Overview / Where to find what? The PLCcore-5208 is based on SYS TEC ECUcore-5208 hardware and is extended by PLC-specific functionality (I/O driver, PLC firmware). There are different hardware manuals for all hardware components such as the ECUcore-5208 and the PLCcore-5208 (the hardware of both modules is identical), development boards and reference circuitry.
Page 8
Development Kit for the PLCcore-5208. describes the connection assignment of the PLCcore-5208. Section 5 explains details about the application of the PLCcore-5208, e.g. the setup of the Section 0 process image, the meaning of control elements and it provides basic information about programming the module.
In the form of an insert-ready core module, it provides to the user a complete and compact PLC. Due to CAN and Ethernet interfaces, the PLCcore-5208 is best suitable to perform decentralized control tasks.
Page 10
The address/data bus leading towards the outside provides to the user most effective degrees of freedom for designing the in-/output circuit of the PLCcore-5208. Therewith, all in- and outputs of the PLCcore-5208 can be flexibly adjusted to respective requirements. Saving the PLC program in the on- board Flash-Disk of the module allows an automatic restart in case of power breakdown.
Thus, the Development Kit forms the ideal platform for developing user-specific applications based on the PLCcore-5208. It allows for a cost-efficient introduction into the world of decentralized automation technology. All components included in the Kit enable in- and output extensions of the PLCcore-5208 through CANopen-I/O-assemblies.
Figure 3 shows the positioning of the most important connections of the Development Board for the PLCcore-5208. Instead of using the 24V DC power adapter included in the Kit, the power supply may optionally take place via X600 with an external source of 24V/1A.
The Development Kit PLCcore-5208 allows for easy commissioning of the PLCcore-5208. It has available various control elements to configure the module and to simulate in- and outputs for the usage of the PLCcore-5208 as PLC kernel. In Table 3 control elements of the Development Board are listed and their meaning is described.
System Manual PLCcore-5208 5 Pinout of the PLCcore-5208 Connections of the PLCcore-5208 are directed to the outside via two pin header connectors that are double-row (with each 2 x 52 pins) and mounted on the bottom of the module. Appropriate female headers as correspondent to the PLCcore-5208 are available from company "W+P Products":...
Page 17
PUART_RXD2 PUART_TXD2 Advice: The PLCcore-5208 only executes a PLC program if the Run/Stop switch is positioned to "Run". If no Run/Stop switch is intended for the usage of the PLCcore-5208 on an application-specific baseboard, the coding for "Run" must be hard-wired at the module connections (also see reference design in Appendix B).
By default, the PLCcore-5208 loads all necessary firmware components upon Power-on or Reset and starts running the PLC program afterwards. Hence, the PLCcore-5208 is suitable for the usage in autarchic control systems. In case of power breakdown, such systems resume the execution of the PLC program independently and without user intervention.
The PLCcore-5208 is programmed with IEC 61131-3-conform OpenPCS programming environment. There exist additional manuals about OpenPCS that describe the handling of this programming tool. Those are part of the software package "OpenPCS". All manuals relevant for the PLCcore-5208 are listed in Table 1.
System Manual PLCcore-5208 6.4.1 In- and Outputs of Development Kit PLCcore-5208 The PLCcore-5208 is delivered with a preinstalled I/O driver that supports the in- and outputs and the control elements that are available on the Development Kit PLCcore-5208. Compared to other SYS TEC compact control systems, the standard I/O driver obtains a process image with identical addresses.
6.5 Communication interfaces 6.5.1 Serial interfaces The PLCcore-5208 features 2 serial interfaces (COM0 … COM1) that function as RS-232 and 1 serial interface (COM2) that function as RS-422. Details about hardware activation are included in the "Hardware Manual Development Board ECUcore-5208" (Manual no.: L-1074).
Positioned to "MRes" ("Modul Reset"), the Run/Stop switch allows for local deletion of a PLC program from the PLCcore-5208. This might for example be necessary if an error occurs and the PLC program is running an infinite loop and consequently, accessing the OpenPCS programming environment is no longer possible.
If the Run/Stop switch is positioned to "MRes" ("Modul Reset") (see section 6.6.1), it is possible to delete a program from the PLCcore-5208. This might for example be necessary if an error occurs and the PLC program is running an infinite loop and consequently, accessing the OpenPCS programming environment is no longer possible.
In a CANopen network, exchanging PDOs only takes place in status "OPERATIONAL". If the PLCcore-5208 is not in this status, it does not process PDOs (neither for send-site nor for receive-site) and consequently, it does not update the content of network variables. The CANopen Manager is in charge of setting the operational status "OPERATIONAL", "PRE-OPERATIONAL"...
System Manual PLCcore-5208 is used as CANopen-Manager. The PLCcore-5208 is optionally able to take over tasks of the CANopen Manager. How the Manager is activated is described in section 7.4. As CANopen Manager, the PLCcore-5208 is able to parameterize the CANopen I/O devices ("CANopen-Slaves") that are connected to the CAN bus.
SYS TEC offers a USB-RS232 Adapter Cable (order number 3234000, see section 4.4.1) that provides an appropriate RS232 interface via USB port. All examples referred to in this manual are based on an administration of the PLCcore-5208 using a Windows computer. Procedures using a Linux computer would be analogous.
If all conditions are met, CoLilo verifies the serial COM0 of the PLCcore-5208 interface COM0 of the PLCcore-5208 for about 1 second after Reset regarding the reception of SPACE signals (ASCII 20H). If such a signal is received within that time, CoLilo will disable the Linux Autostart and will activate its own command prompt instead.
Communicating with the bootloader "CoLilo" only takes place via the serial interface COM0 of the PLCcore-5208. As receiver on the computer one of the terminal programs must be started (e.g. HyperTerminal or TeraTerm, see section 7.1) and must be configured as follows (see Figure 7): •...
Page 29
PLCcore-5208. Modified configurations may be verified again by entering "?" in the "CoLilo" command prompt. Active configurations are permanently saved in the Flash of the PLCcore-5208 by command config save Modifications are adopted upon next Reset of the PLCcore-5208.
Internet Explorer, Mozilla Firefox etc.). To call the configuration page, prefix "http://" must be entered into the address bar of the WEB-Browser prior to entering the IP address of the PLCcore-5208 as set in section 7.2, e.g. "http://192.168.10.248". Figure 9 exemplifies calling the PLCcore-5208 configuration page in the WEB-Browser.
Page 31
System Manual PLCcore-5208 Figure 9: User login dialog of the WEB-Frontend All configuration adjustments for the PLCcore-5208 are based on dialogs. They are adopted into the file "/home/plc/plccore-5208.cfg" of the PLCcore-5208 by activating the pushbutton "Save Configuration" (also compare section 7.4.3). After activating Reset (e.g. pushbutton S403 on the Development Board), the PLCcore-5208 starts automatically using the active configuration.
Development Kit PLCcore-5208 (see section 7.4.2). The standard setting (factory setting) of the PLCcore-5208 requires a user login to access the WEB- Frontend. Therefore, only the user name indicated in configuration file "/home/plc/plccore-5208.cfg"...
7.4.3 Setup of the configuration file "plccore-5208.cfg" The configuration file "/home/plc/plccore-5208.cfg" allows for comprehensive configuration of the PLCcore-5208. Although, working in it manually does not always make sense, because most of the adjustments may easily be edited via WEB-Frontend (compare section 7.4.1). The setup of the configuration file is similar to the file format "Windows INI-File".
Page 34
1: Master mode is activated 0: Master mode is deactivated [CAN1] Enabled By default, section "[CAN1]" is not evaluated, but if necessary it enables the NodeID extension of PLCcore-5208 by an additional CAN interface (see section 6.8.2). Baudrate MasterMode [ETH0] PortNum Default Port no:...
If required, the start script "/home/etc/autostart" may be complemented by further entries. The script can be edited directly on the PLCcore-5208 in the FTP client "WinSCP" (compare section 7.1) using pushbutton "F4" or "F4 Edit".
Page 36
The modified setting can be verified by entering "boardinfo" at the "CoLilo" command prompt. Command config save persistently saves the current selection in the Flash of the PLCcore-5208. Figure 11 visualizes the configuration of the BoardID. Figure 11: Selecting the appropriate firmware version for the PLCcore-5208 After completing the configuration, all preconditions for a Linux Autostart must be reestablished according to section 7.2.
System Manual PLCcore-5208 7.7 Predefined user accounts All user accounts listed in Table 14 are predefined upon delivery of the PLCcore-5208. Those allow for a login to the command shell (serial RS232 connection or Telnet) and at the FTP server of the PLCcore-5208.
System Manual PLCcore-5208 Logging in to the PLCcore-5208 is possible in the Terminal window (if connected via COM0) or in the Telnet window (if connected via ETH0). The following user account is preconfigured for the administration of the module upon delivery of the PLCcore-5208 (also compare section 7.7):...
Page 39
Plc123 (for predefined user account, see section 7.7) Figure 15: Login settings for WinSCP After using pushbutton "Login", the FTP client logs in to the PLCcore-5208 and lists up the active content of directory "/home" in the right window. Figure 16 shows FTP client "WinSCP" after successful login to the PLCcore-5208.
By using parameter "-h /home" instead, the given directory "/home" is rather assigned to the new user. To open a new user account on the PLCcore-5208, Linux command "adduser" is to be used as follows: adduser -h /home -H -G <group>...
<username> 7.10 How to change the password for user accounts Changing the password for user accounts requires login to the PLCcore-5208 as described in section 7.8.1. To change the password for an existing user account on the PLCcore-5208, Linux command "passwd"...
Setting the system time requires login to the PLCcore-5208 as described in section 7.8.1. There are two steps for setting the system time of the PLCcore-5208. At first, the current date and time must be set using Linux command "date". Afterwards, by using Linux command "hwclock -w" the system time is taken over into RTC module of the PLCcore-5208.
System Manual PLCcore-5208 Figure 19: Setting and displaying the system time Upon start of the PLCcore-5208, date and time are taken over from the RTC and set as current system time of the module by the uClinux kernel. 7.12 File system of the PLCcore-5208 Pre-installed Embedded Linux (uClinux) on the PLCcore-5208 provides part of the system memory in form of a file system.
5208 is given attention in section 7.8. 7.13 Software update of the PLCcore-5208 All necessary firmware components to run the PLCcore-5208 are already installed on the module upon delivery. Hence, firmware updates should only be required in exceptional cases, e.g. to input new software that includes new functionality.
PLC user. The PLC user program is directly transferred from the OpenPCS programming environment onto the module. No additional software is needed. Updating the PLC firmware requires login to the command shell of the PLCcore-5208 as described in section 7.8.1 and login to the FTP server as described in section 7.8.2.
System Manual PLCcore-5208 Figure 22: Installing PLC firmware on the PLCcore-5208 Figure 22 exemplifies the installation of PLC firmware on the PLCcore-5208. After Reset the module is started using the updated firmware. Advice: If the PLC firmware is updated, the configuration file "/home/plc/plccore-5208.cfg"...
Page 47
5208 is completed according to procedures describes in section 7.3. To update the uClinux-Image it is necessary to have available another serial connection to the PLCcore-5208 in addition to the Ethernet connection. All configurations for the terminal program as described in section 7.2 apply (19200 Baud, 8 Data bit, 1 Stop bit, no parity and no flow control).
Page 48
After completing the configuration, conditions for a Linux Autostart must be reestablished according to instructions in section 7.2. After Reset is activated (e.g. pushbutton S403 on the Development Board), the PLCcore-5208 starts automatically using the current uClinux-Image. After the configuration is finished, the serial connection between the computer and the Advice: PLCcore-5208 is no longer necessary.
8.1 Data exchange via shared process image 8.1.1 Overview of the shared process image The PLCcore-5208 is based on the operating system Embedded Linux (uClinux). Thus, it is possible to execute other user-specific programs simultaneously to running the PLC firmware. The PLC program and a user-specific C/C++ application can exchange data by using the same process image (shared process image).
Page 50
An activation of option "Share PLC process image" within the PLC configuration enables data exchange with external applications (see section 7.4.1). Alternatively, entry "EnableSharing=" can directly be set within section "[ProcImg]" of the configuration file "/home/plc/plccore-5208.cfg" (see section 7.4.3). The appropriate configuration setting is evaluated upon start of the PLC firmware. By activating option "Share PLC process image", the PLC firmware creates a second process image as...
VMware image. Hence, it allows for an easy introduction into the C/C++ software development for the PLCcore-5208. Thus, the VMware image is the ideal basis to develop Linux-based user programs on the same host PC that already has the OpenPCS IEC 61131 programming system installed on it.
Page 60
(see section 8.1.3) and can be started afterwards. The following steps are necessary to run the shared process image demo on the PLCcore-5208: 1. Activate option "Share PLC process image" in the PLC configuration (see sections 8.1.1, 7.4.1 and 7.4.3).
Page 61
/home/plc ./shpimgdemo The digital outputs of the PLCcore-5208 are selected as runlight. The speed is modifiable via the analog input AI0 (Poti at the ADC of the Development Board). With the help of pushbuttons S500 (DI0) and S501 (DI1), the running direction can be changed. After starting the demo program "shpimgdemo"...
Development Kit for the ECUcore-5208" (Manual no.: L-1231) provides details about the DDK. The Driver Development Kit for the ECUcore-5208 (resp. PLCcore-5208) enables the user to adapt an I/O level to self-developed baseboards. The Embedded Linux (uClinux) on the PLCcore-5208 supports dynamic loading of drivers during runtime.
System Manual PLCcore-5208 Appendix A: Firmware function scope of PLCcore-5208 Table 18 lists all firmware functions and function blocks available on the PLCcore-5208. Sign explanation: Function block Function Online Help OpenPCS online help L-1054 Manual "SYS TEC-specific extensions for OpenPCS / IEC 61131-3", Manual no.:...
Page 67
("flush"). Thus, unsecured data is not getting lost in case of power interruption. Interface COM0 (PORT:=0) primarily serves as service interface to administer the PLCcore-5208. Hence, this interface should only be used for sign output. The module always tries to interpret and execute sign inputs as Linux commands (see section 6.5.1).
System Manual PLCcore-5208 Appendix B: Reference design for the PLCcore-5208 +3V 3 I/O Address Decoder C 13 G ND 100n +3V 3 /WR _led 74AHC 574 R 12 LED1 R /W /WR _k ey LED2 470R LED_gn LED3 +3V 3...
Need help?
Do you have a question about the PLCcore-5208 and is the answer not in the manual?
Questions and answers