Home
L-1076, System Manual PLCcore-5208
Contents
1. Hhernet 25 EPHY Han Go x Copen RM5 DO06D21B ETH TX 1 ETH IX 2 T EIH RE mS 4 mor ETH RX Y 6 sr T nc B ais ap 1000 1000 AD ae GND GND 3 r 7 A Sidd La Ba ASA ab E Pi al oa TP Shield yy ETH SPEED TDR ETH UNKIACT E ZAR CAN 10 8 Mg A END 4 PCAN TXO he 1 B q 3 NRO 4 to a 7 1 5 CANH 7 1 2 REF can 8 3 4 ont i w FS AD T4213510 R S BAE AND SNSHVDBI GND r r ue 1 Di D SURGX SURGX DB9M ela a a EB JPL d AD AN D RS232 G a 100n wm 10n 1 cr T GND 3 5 NE 2 41 a O ve DNB o Q 6 1 ao TAN ro Es sl o PUART TXDO T ToL soar 2 o PUART RXDO g RO a 48 maros 37 47 RO 5 4 di 28 NEC GD AD 3 tHe o 1122 G sho 11 GD 10 10n DBSEDUAL Figure 33 Reference design for interface circuit SYS TEC electronic GmbH 2009 L 1076e_1 Page 68 System Manual PLCcore 5208 Appendix C GNU GENERAL PUBLIC LICENSE The Embedded Linux uClinux used on the ECUcore 5208 is licensed under GNU General Public License version 2 The entire license text is specified below The PLC system used and the PLC and C C programs developed by the user are not subject to the GNU General Public License GNU GENERAL PUBLIC LICENSE Version 2 June 1991 Copyright C 1989 1991 Free Software Foundation Inc 59 Temple Place Suite 330 Boston MA 02111 1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document but changing it is not allowed P
2. SYS TEC electronic GmbH 2009 L 1076e_1 Page 49 System Manual PLCcore 5208 PLC Program C C Application VAR p BYTE pbVarl Varl AT MB128 0 BYTE END_VAR x pbVarl ShPImgClntGetDataSect n ShPImgLayoutDscrpt m_uiPImgMarkerOffs 128 lt Offset for MB128 0 r As described above ReadSectorTable and WriteSectorTable manage the copy process to exchange variable contents between the PLC and the C C program Following the example illustrated the Client C C application must enter an appropriate value into the WriteSectorTable to transfer the value of a variable from the C C application to the PLC program WriteSectorTable because the Client writes the variable to the Server specify offset and size of Varl and define sync type always or on demand WriteSectTab 0 m uiPImgDataSectOffs ShPImgLayoutDscrpt m_uiPImgMarkerOffs 128 WriteSectTab 0 m uiPImgDataSectSize sizeof BYTE WriteSectTab 0 m SyncType kShPImgSyncOnDemand define the WriteSectorTable with the size of 1 entry ShPImgC1ntSetupWriteSectTable WriteSectTab 1 If several variable pairs are generated within the same transfer direction for the data exchange between the PLC program and the C C application they should possibly all be defined in one coherent address range Thus it is possible to list them as one entry in the appropriate SectorTable The address of the first variable must be set as the SectorOffset a
3. BoardlD Firmware Version Remark 1007004 plccore 5208 z4 PLCcore 5208 Z4 CANopen communication with the programming PC via CANopen protocol Interface CANO 1007005 plccore 5208 25 PLCcore 5208 Z5 Ethernet communication with the programming PC via UDP protocol Interface ETHO The configuration of BoardlDs takes place via the serial interface COMO Therefore the CoLilo command prompt must be activated as described in section 7 2 Setting BoardlDs is carried out O SYS TEC electronic GmbH 2009 L 1076e_1 Page 34 System Manual PLCcore 5208 via the CoLilo command assign boardid by entering the corresponding number listed in Table 13 e g assign boardid 1007005 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 G_ COM1 19200baud Tera Term VT Ol x File Edit Setup Control Window Help CUcore 5208 boot ress SPACE key to abort autoboot procedure Autoboot aborted olilo assign boardid 1007005 oard type ID 1007005 olilo gt boardinfo arduare info PCB 4218 2 0 PLD 0 00 0 uto boot pin on oard nane ECUcore 5208 oard type ID 1007005 rder nunber 3390015 erial number 133650 Info block 1 Info block 2 Info block 3 Info block 4 Info block 5 urning 5312 bytes to flash 0x20000
4. 4 3 Control elements of the Development Kit PLCcore 5208 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 Table 3 Control elements of the Development Board for the PLCcore 5208 Pushbutton 0 S500 Digital Input DIO Process Image IlX0 0 Pushbutton 1 S501 Digital Input DI1 Process Image IX0 1 Pushbutton 2 S502 Digital Input DI2 Process Image IX0 2 Pushbutton 3 S503 Digital Input DI3 Process Image YoIX0 3 Pushbutton 4 S504 Digital Input DI4 Process Image IX0 4 O SYS TEC electronic GmbH 2009 L 1076e_1 Page 12 System Manual PLCcore 5208 Digital Output DO0 Process Image QX0 0 Digital Output DO1 Process Image QX0 1 Digital Output DO2 Process Image Y60X0 2 Digital Output DO3 Process Image QX0 3 Digital Output DO4 Process Image QxX0 4 Poti ADC R407 Analog Input AIO Process Image YoIW8 0 Test point DAC TP400 TP401 Analog Output AOO Process Image QW8 0 Run Stop Switch 8405 Run Stop to operate the PLC program Reset control see section 6 6 1 Run LED D403 Display of activity state of the PLC see section 6 6 2 Error LED D404 Display of error state of the PLC see section 6 6 3 Hex Encoding 5402 540
5. 36 Process Image Layout and Addressing ooocooconcccnnnacccccnnn 19 Programming ticas 18 R ReadSectorTable oooooocooocccncccinocococcccconccicnnnnos 49 Reference Desi9D ooococinococccncoconcnnnonnancnnnnnanos 67 RTO SUNG iaa 41 Run Stop SWitCh oooooonococccccnnccicocononcnnccnncnnnnnnns 21 Run Stop Switch Deletion of PLC Program 22 ENCOJINY AEA events A S 16 A as asas ais avi sa aaa aaa asai 21 Ss Selecting the firmware version 05 34 Setting the System Time LL kaka 41 Shared Process Image Activation sa ii dictada 49 API Description oooooooocccccnccicococonccccnncnncannn 52 Example ir asa kai ke esters eid tae 57 OVervieW A A aa peipei iia 48 SIQMALING si sai sis si aaa aaa idad 51 Variable PallS oooooonnnocccnnnnnnnnnnococcccccncnnncnnnns 49 ShPlmgCintGetDataSect ooooooccnnninccinincccccoos 53 ShPlmgCintGetHeader coooococicconinccinnciincccoo 53 ShPlmgClntLockSegment cooooicccincccicocicinaci n 54 ShPlmgCintRelease oooooconicccinccnnnnocnioninanncins 53 ShPimgCintSetNewDataSigHandler 53 SYS TEC electronic GmbH 2009 ShPlmgCIntSetUup coocoooocccocococonccononaninananancnino 52 ShPimgCintSetupReadSectTable 54 ShPlmgClntSetupWriteSectTable 54 ShPimgCintUnlockSegmennt ocoooocococococinccccns 54 ShPlmgClntWriteSectMarkNewData 55 ShpIMgdeMO cooocccccinnncconananncnnannnccnnnnne canas 55 shpimgdemo tar gZ n e 55 SO 1096 iia iaa 55
6. 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 hom H G lt group gt lt username gt Figure 17 exemplifies adding a new account on the PLCcore 5208 for user admin2 O SYS TEC electronic GmbH 2009 L 1076e_1 Page 39 System Manual PLCcore 5208 cx Telnet 192 168 10 248 PLCcore 5208 192 168 10 248 login PlcAdmin Password Welcome to Y a B 4 4 EB tot N For further information check http 7 uvwu uc linux org root gt adduser h home H G users admin2 Changing password for admin2 New passwo rd Password for admin2 changed by root root gt Figure 17 Adding a new user account Advice If the new user account shall be used to access WEB Frontend the user name must be entered into the configuration file plccore 5208 cfg for details about logging in to WEB Frontend please compare section 7 4 1 and 7 4 3 To delete an existing user account from the PLCcore 5208 Linux command deluser plus the respective user name must be used deluser lt username gt 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 passw plus the respective user name must be ente
7. means either the Program or any derivative work under copyright law that is to say a work containing the Program or a portion of it either verbatim or with modifications and or translated into another language Hereinafter translation is included without limitation in the term modification Each licensee is addressed as you Activities other than copying distribution and modification are not covered by this License they are outside its scope The act of running the Program is not restricted and the output from the Program is covered only if its contents constitute a work based on the Program independent of having been made by running the Program Whether that is true depends on what the Program does 1 You may copy and distribute verbatim copies of the Program s source code as you receive it in any medium provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty keep intact all the notices that refer to this License and to the absence of any warranty and give any other recipients of the Program a copy of this License along with the Program You may charge a fee for the physical act of transferring a copy and you may at your option offer warranty protection in exchange for a fee 2 You may modify your copy or copies of the Program or any portion of it thus forming a work based on the Program and copy and distribute such modifications or work under the term
8. 1076e_1 Page 76
9. 4IB0 0 BYTE bInBytel AT SIB1 0 BYTE wInWord AT IW0 0 BYTE wInWord 0 lt gt bInByte0 0 due to Big Endian wInWord 0 InBytel 0 wInWord 8 lt gt bInBytel 0 due to Big Endian wInWord 8 b bInByte0 0 In and outputs of thePLCcore 5208 are not negated in the process image Hence the H level at one input leads to value 1 at the corresponding address in the process image Contrariwise value 1 in the process image leads to an H level at the appropriate output 6 4 2 In and outputs of user specific baseboards 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 This implicates that the process image of PLCcore 5208 is significantly conditioned by the particular user specific in output circuit O SYS TEC electronic GmbH 2009 L 1076e_1 Page 19 System Manual PLCcore 5208 Including the software for in output components into the process image requires the Driver Development Kit for ECUcore 5208 order number SO 1101 6 5 Communication interfaces 6 5 1 Serial interfaces The PLCcore 5208 features 2 serial interfaces COMO 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 ECUc
10. C22 D22 GND O SYS TEC electronic GmbH 2009 L 1076e 1 Page 15 System Manual PLCcore 5208 GPIO PBUSCTL2 A23 BOOTSELECT PUART_RXDO GPIO_PCS3 VBAT PCAN_RXO PUART_RXD1 PUART_TXDO GND PCAN_TXO GND PUART_TXD1 3V3 3V3 PUART_RXD2 PUART_TXD2 SYS TEC electronic GmbH 2009 L 1076e_1 Page 16 System Manual PLCcore 5208 6 PLC Functionality of the PLCcore 5208 6 1 Overview The PLCcore 5208 realizes a complete uClinux based compact PLC as an insert ready core Core There the PLCcore 5208 is based on the hardware ECUcore 5208 and extends it by PLC specific functionality I O driver PLC firmware Both modules the ECUcore 5208 and the PLCcore 5208 use the same Embedded Linux uClinux as operating system Consequently the configuration and the C C programming of the PLCcore 5208 are almost identical with the ECUcore 5208 6 2 System start of the PLCcore 5208 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 Figure 6 shows the system start in detail Power on Reset For more details on how to deactivate the autarchic Linux start and to activate the CoLilo comm
11. END IF i l 1 l 1 I l I l setup read and write sector table ShPlmgCIntSetupReadSectTable ShPlmgClntSetupWriteSectTable END PROGRAM Marker access to variable in shared image pbVar1 bAnyData 3 5 Dynamic Library Daemon did shpimgclient c Shared Image 2 4 ReadSectTable ReadProclmage WriteSectTable WriteProclmage pc5208drv dld Kernel Object ko Proclmage Exchange Cycle pc5208drv ko 1 Read Local Inputs I O Access 2 Write Shared to Local l 3 Read Local to Shared t Run PLC Cycle 4 Write Shared to Local 5 Read Local to Shared Hardware 6 Write Local Outputs Figure 25 Overview of the shared process image O SYS TEC electronic GmbH 2009 L 1076e_1 Page 48 System Manual PLCcore 5208 Not all variables are utilizable via the shared process image within a C C application Only those directly addressed variables that the PLC program generates within the process image As shown in Figure 25 two separate process images are used for the data exchange with an external application inside of the PLC runtime system This is necessary to meet the IEC 61131 3 reguirement that the initial PLC process image may not be modified during the entire execution of one PLC program cycle Thereby the PLC program always operates with the inte
12. L 1076e_1 Page 7 System Manual PLCcore 5208 3 Product Description The PLCcore 5208 as another innovative product extends the SYS TEC electronic GmbH product range within the field of control applications 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 Figure 1 Top view of the PLCcore 5208 These are some significant features of the PLCcore 5208 High capacity CPU kernel Freescale 32 Bit MCF5208 ColdFire 166 MHz CPU clock 159 MIPS 32 MByte SDRAM Memory 4 MByte NOR FLASH Memory 64 MByte NAND Flash Memory 1x 10 100 Mbps Ethernet LAN interface with on board PHY 1x CAN 2 0B interface usable as CANopen Manager CiA 302 conform 3x asynchronous serial ports UART Flexible in output circuit by address data bus leading towards the outside Externally usable IC On board peripherals RTC temperature sensor On board software uClinux PLC firmware CANopen Master HTTP and FTP server Programmable in IEC 61131 3 and in C C Function block libraries for communication CANopen Ethernet and UART Function block libraries for hardware components RTC Counter PWM PTO Support of typical PLC control elements e g Run Stop switch Run LED Error LED uClinux based other user programs may run in parallel Easy HTML based configuration via WEB Browser Remote Login via Teln
13. O A sis saaa saaa aa asai a aka shears 61 Software Update PLC Firmware cccecceeeeeeeesteeeeeeeees 44 Softwareupdate uClinux Image c oococconnccccnnnnacocinononccinnnnnncnns 45 sot eee TR ee ner T ere reer er nae 9 ojoje e e a cronista dao Tazas 63 System Start E E EET 17 T Telnet Login to the PLCcore 5208 a e 36 Telnet Clienten nen eer a oer ana 25 Terminal Configuration 27 Terminal Program aaa kaka 25 Testing Hardware Connections oom 63 TETRDIZ td mates isaae 45 iShPlmgLayoutDSCiPlcocoocicccicininnicinnciconcccon 52 tShPlmgSeciDSCiP cooociconnnoninnionicociconncanncna nas 52 U UdpRemote Ctrl na ao 21 USB RS232 Adapter Cable 13 User Accounts Adding and deleting LL 39 Changing Passwords cceesseeeeeees 40 Predefined coccion 36 Ww WEB Frontend 2 ecccceceeeeeeeeeeeeeeeeeees 29 WINS G Piristi aariate a aa 38 WriteSector Table aaa 49 L 1076e 1 Page 75 System Manual PLCcore 5208 Document System Manual PLCcore 5208 Document number L 1076e 1 1 Edition September 2009 How would you improve this manual Did you detect any mistakes in this manual page Submitted by Customer number Name Company Address Please return your SYS TEC electronic GmbH suggestions to August Bebel Str 29 D 07973 Greiz GERMANY Fax 49 0 36 61 6279 99 Email info systec electronic com O SYS TEC electronic GmbH 2009 L
14. Program the distribution of the whole must be on the terms of this License whose permissions for other licensees extend to the entire whole and thus to each and every part regardless of who wrote it Thus it is not the intent of this section to claim rights or contest your rights to work written entirely by you rather the intent is to exercise the right to control the distribution of derivative or collective works based on the Program In addition mere aggregation of another work not based on the Program with the Program or with a work based on the Program on a volume of a storage or distribution medium does not bring the other work under the scope of this License O SYS TEC electronic GmbH 2009 L 1076e_1 Page 70 System Manual PLCcore 5208 3 You May copy and distribute the Program or a work based on it under Section 2 in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following a Accompany it with the complete corresponding machine readable source code which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange or b Accompany it with a written offer valid for at least three years to give any third party for a charge no more than your cost of physically performing source distribution a complete machine readable copy of the corresponding source code to be distributed under the terms of Sections 1
15. TEC electronic GmbH 2009 L 1076e_1 Page 55 System Manual PLCcore 5208 Table 17 Content of the archive files shpimgdemo tar gz File Necessary for all C C In particular for demo applications shpimgdemo shpimgclient c x shpimgclient h x shmclient c X shmclient h X shpimg h x global h x Makefile draft to be adjusted shpimgdemo c x trmio c x trmio h X trace c X The archive file shpimgdemo tar gz including the shared process image demo must be unzipped into any subdirectory following the path orojects ECUcore 5208 user within the Linux development system Therefore command tar must be called tar xzvf shpimgdemo tar gz During the unzipping process command iar independently generates the subdirectory shpimgdemo For example if the command is called in directory orojects EC Ucore 5208 user all archive files will be unzipped into the path orojects EC Ucore 5208 user shpimgdemo Figure 26 exemplifies the unzipping process of shoimgdemo tar gz within the Linux development system Terminal Fie Edit View Terminal Go Help vmware vm xubuntu cd projects ECUcore 5208 user vmware vm xubuntu projects ECUcore 5208 user tar xzvf shpimgdemo tar gz shpimgdemo shpimgdemo Makefile shpimgdemo trmio c shpimgdemo trace c shpimgdemo shpimg h shpimgdemo shpimgclient c shpimgdemo shmclient c shpimgdemo shmclient h shpimgdemo
16. USA Also add information on how to contact you by electronic and paper mail If the program is interactive make it output a short notice like this when it starts in an interactive mode Gnomovision version 69 Copyright C year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY for details type show w This is free software and you are welcome to redistribute it under certain conditions type show c for details The hypothetical commands show w and show c should show the appropriate parts of the General Public License Of course the commands you use may be called something other than show w and show c they could even be mouse clicks or menu items whatever suits your program You should also get your employer if you work as a programmer or your school if any to sign a copyright disclaimer for the program if necessary Here is a sample alter the names Yoyodyne Inc hereby disclaims all copyright interest in the program Gnomovision which makes passes at compilers written by James Hacker lt signature of Ty Coon gt 1 April 1989 Ty Coon President of Vice This General Public License does not permit incorporating your program into proprietary programs If your program is a subroutine library you may consider it more useful to permit linking proprietary applications with the library If this is what you want to do use the GNU Library General Public License instead of this License O SYS TEC
17. as described in section 7 9 Afterwards the new user name must be entered into the configuration file home ple plecore 5208 cfg Limiting the user login to one user account is cancelled by deleting the entry User in section Login see 7 4 3 Thus any user account may be used to configure the module By deactivating control box This configuration requires a Login in the field User Authorization of the configuration page see Figure 10 free access to the module configuration is made available without previous user login 7 4 2 PLC configuration via control elements of the Development Kit PLCcore 5208 The configuration via control elements of the PLCcore 5208 Development Board is preset upon delivery of the Development Kit PLCcore 5208 This allows for an easy commissioning of the module by using CAN interface CANO Due to a limited number of switch elements the initial setting of CANO is restricted The configuration via WEB Frontend as described in section 7 4 1 allows for other adjustments as well O SYS TEC electronic GmbH 2009 L 1076e_1 Page 31 System Manual PLCcore 5208 Node address CANO The node address for interface CANO is set via Hex Encoding switches S402 and S401 on the Development Board for PLCcore 5208 S402 High part of the node address S401 Low part of the node address Example S402 2 S401 0 gt resulting node address 20 Hex Bitrate CANO The bitrate for interface CANO is adjusted via bit positions 1
18. command hwclock r can be used to recall current values from the RTC Figure 19 exemplifies setting and displaying the system time O SYS TEC electronic GmbH 2009 L 1076e_1 Page 41 System Manual PLCcore 5208 ca Telnet 192 168 10 248 PLCcore 5208 192 168 10 248 login PlcAdmin Password Welcome to For further information check http uww uc linux org date 692216262608 55 22 16 26 55 UTC 2668 hwelock w date 22 10 21 13 UTC 2668 huclock r 22 10 21 16 2668 6 660666 seconds 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 Being usual for embedded systems most of this file system is read only which means that changes to this part can only be made by creating a new Linux Image for the PLCcore 5208 The advantage hereby is the resistance of a read only file system against damages in case of power breakdowns Those occur relatively often in embedded systems because embedded systems are usually simply turned off without previous shutdown Table 15 lists up writable paths of the file system during runtime Path home comprises a flash disk that provides part of the on board flash memory of the PLCcore 5208 as file sys
19. compare section 6 7 relation 1 1 to pulse SYS TEC electronic GmbH 2009 L 1076e 1 Page 21 System Manual PLCcore 5208 6 6 3 Error LED red The Error LED provides information about the error state of the control system The error state is represented through different modes Table 8 Display status of the Error LED LED Mode PLC Error State No error has occurred the PLC is in normal state Permanent light A severe error has occurred e The PLC was started using an invalid configuration e g CAN node address 0x00 and had to be stopped or e A severe error occurred during the execution of the program and caused the PLC to independently stop its state Run division by zero invalid Array access see below Slow flashing in A network error occurred during communication to the programming system the relation 1 1 to execution of a running program is continued This error state will be reset pulse independently by the PLC as soon as further communication to the programming system is successful Quick flashing in The PLC is in mode Reset compare section 6 7 relation 1 1 to pulse Quick flashing in The PLC is on standby but is not yet running relation 1 8 to pulse e The PLC has received a start command from the OpenPCS programming environment but the local Run Stop switch is positioned to Stop In case of severe system errors such as division by zero of invalid Array access the control syste
20. free commissioning of the PLCcore 5208 Therefore it combines all hard and software components that are necessary to create own applications the core module PLCcore 5208 the corresponding Development Board containing I O periphery and numerous interfaces the OpenPCS IEC 61131 programming system as well as further accessory 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 Thus the Development Kit may also be used for projects that require PLC with network connection The Development Kit PLCcore 5208 contains the following hardware components PLCcore 5208 Development Board for the PLCcore 5208 24V DC Power adapter Ethernet cable RS232 cable CD with programming software examples documentation and other tools O SYS TEC electronic GmbH 2009 L 1076e_1 Page 10 System Manual PLCcore 5208 The Development Board included in the Kit facilitates guick commissioning of the PLCcore 5208 and simplifies the design of prototypes for user specific applications based on this module Among other eguipment the Development Board comprises different power supply possibilities Ethernet interface CAN bus interface 5 push buttons and 5 LED as control elements for dig
21. fron 0x8000206c tarting sector 2 64K sector s will be erased starting fron sector 2 address 0x20000 5312 bytes uritten olilo gt 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 Alternatively the appropriate firmware version may be selected directly in the start script home etc autostart Therefore delete part Select PLC Type and insert the appropriate firmware instead e g PLC FIRMWARE PLC DIR plccore 5208 z5 SYS TEC electronic GmbH 2009 L 1076e 1 Page 35 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 Table 14 Predefined user accounts of the PLCcore 5208 User name Password Remark PlcAdmin Plc123 Predefined user account for the administration of the PLCcore 5208 configuration user administration software updates etc root Sys123 Main user account root of the PLCcore 5208 7 8 Login to the PLCcore 5208 7 8 1 Login to the command shell In some cases the administration of the PLCcore 5208 requires the entry of Linux commands in the command shell Therefore the user must be directly logged in at the modul
22. modify sublicense or distribute the Program is void and will automatically terminate your rights under this License However parties who have received copies or rights from you under this License will not have their licenses terminated so long as such parties remain in full compliance 5 You are not required to accept this License since you have not signed it However nothing else grants you permission to modify or distribute the Program or its derivative works These actions are prohibited by law if you do not accept this License Therefore by modifying or distributing the Program or any work based on the Program you indicate your acceptance of this License to do so and all its terms and conditions for copying distributing or modifying the Program or works based on it 6 Each time you redistribute the Program or any work based on the Program the recipient automatically receives a license from the original licensor to copy distribute or modify the Program subject to these terms and conditions You may not impose any further restrictions on the recipients exercise of the rights granted herein You are not responsible for enforcing compliance by third parties to this License 7 If as a consequence of a court judgment or allegation of patent infringement or for any other reason not limited to patent issues conditions are imposed on you whether by court order agreement or otherwise that contradict the conditions of this License
23. the configuration of the PLCcore 5208 via WEB Frontend SYS TEC electronic GmbH 2009 L 1076e_1 Page 30 System Manual PLCcore 5208 Z PLCcore 5208 Configuration Microsoft Internet Explorer Elle Edit View Favorites Tools Help Qw O 2 A D Dao sero Ol SSS Address E http 192 168 10 248 cqi bin cfgsetup cai Go Links 22 E Interface CANO Interface CAN1 Enable State DIP Hex Switch Enable State Disabled 2 NodelD Hex Ox f0x20 NodelD Hex 0x Poo Baudrate 125 kBiys z Baudrate i0kBiys Z Master Mode M Master Mode El Interface ETHO Port Number to communicate with eses OpenPCS PC Process Image User Authorization IV Enable extended I O s IV This configuration requires a Login F Share PLC process image Save Configuration Figure 10 PLC configuration via WEB Frontend If DIP Hex Switch is chosen as Enable State of Interface CANO the configuration of this interface takes place via local control elements of the Development Kit PLCcore 5208 see section 7 4 2 The standard setting factory setting of the PLCcore 5208 reguires a user login to access the WEB Frontend Therefore only the user name indicated in configuration file home plc plccore 5208 cfg is valid entry User in section Login see section 7 4 3 Procedures to modify the user login password are described in section 7 10 To allow module configuration to another user an appropriate user account is to be opened
24. to switch to CoLilo command prompt instead configuration mode The automatic boot of Linux operating system is connected with the simultaneous compliance with various conditions AND relation Consequently for disabling Linux Autostart it is sufficient to simply not comply with one of the conditions Table 9 lists up all conditions that are verified by the bootloader CoLilo All of them must be complied with to start an Autostart for the Linux Image Table 9 Conditions for booting Linux No Condition Remark 1 kfl 1 and auto 1 The Linux Image stored in the Flash must be declared as valid during CoLilo configuration and the Autostart of the image must be activated after Reset for corresponding CoLilo commands see section 7 13 2 2 Connection BOOTSELECT Ifthe CoLilo is started after Reset and connection not GND BOOTSELECT is set to GND potential e g by pressing push button Boot S404 on the Development Development board board the CoLilo stops the Linux booting procedure and Push button Boot S404 must activates its command prompt instead not be pressed upon Reset 3 No interruption of Autostart via If all conditions are met CoLilo verifies the serial COMO of the PLCcore 5208 interface COMO 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
25. will activate its own command prompt instead SYS TEC electronic GmbH 2009 L 1076e_1 Page 26 System Manual PLCcore 5208 Communicating with the bootloader CoLilo only takes place via the serial interface COMO 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 19200 Baud 8 Data bit 1 Stop bit no parity no flow control Tera Term Serial port setup Figure 7 Terminal configuration using the example of TeraTerm 7 3 Ethernet configuration of the PLCcore 5208 The main Ethernet configuration of the PLCcore 5208 takes place within the bootloader CoLilo and is taken on for all software components Linux PLC firmware HTTP server etc The Ethernet configuration is carried out via the serial interface COMO Therefore the CoLilo command prompt must be activated as described in section 7 2 Table 10 lists up CoLilo commands necessary for the Ethernet configuration of the PLCcore 5208 O SYS TEC electronic GmbH 2009 L 1076e_1 Page 27 System Manual PLCcore 5208 Table 10 CoLilo configuration commands of the PLCcore 5208 Configuration Command Remark MAC address set mac lt XX XX XX XX XX XX gt The MAC address worldwide is a clear identification oft he module and is assigned by the producer It should not be modified by the user IP address set
26. 1 3 User Manual CANopen extension for Network variables CANopen function blocks IEC 61131 3 Textbook about PLC programming according to IEC 61131 3 Manual no L 1008 IEC 61131 3 Programming Industrial Automation Systems John Tiegelkamp Springer Verlag ISBN 3 540 67 752 6 a short version is available as PDF on the OpenPCS installation CD Section 4 Section 5 Section 0 Section 7 Section 8 of this manual explains the commissioning of the PLCcore 5208 based on the Development Kit for the PLCcore 5208 describes the connection assignment of the PLCcore 5208 explains details about the application of the PLCcore 5208 e g the setup of the process image the meaning of control elements and it provides basic information about programming the module Moreover information is given about the usage of CAN interfaces in connection with CANopen describes details about the configuration of the PLCcore 5208 e g the configuration of Ethernet and CAN interfaces the Linux Autostart procedure as well as choosing the firmware version Furthermore the administration of the PLCcore 5208 is explained e g the login to the system the user administration and the execution of software updates defines the adaptation of in and outputs as well as the process image and it covers the data exchange between a PLC program and a user specific C C application via shared process image SYS TEC electronic GmbH 2009
27. 1 Configuration of node address CANO see section 7 4 2 Switch DIP Switch S400 Configuration of bitrate and master mode CANO see section 7 4 2 Table 6 in section 6 4 1 provides a complete listing of the process image 4 4 Optional accessory 4 4 1 USB RS232 Adapter Cable The SYS TEC USB RS232 Adapter Cable order number 3234000 provides a RS232 interface via an USB Port of the PC Together with a terminal program it enables the configuration of the PLCcore 5208 from PCs e g laptop computers which do not have RS232 interfaces any more see section 6 1 Figure 4 SYS TEC USB RS232 Adapter Cable O SYS TEC electronic GmbH 2009 L 1076e_1 Page 13 System Manual PLCcore 5208 4 4 2 Driver Development Kit The ECUcore 5208 Driver Development Kit order number SO 1101 allows the user to independently adjust the I O level to his own baseboard Section 8 2 provides information about the Driver Development Kit O SYS TEC electronic GmbH 2009 L 1076e_1 Page 14 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 W P Products name 7351 Series W P Products order number 7450 52 20 xx xx see W P Products Datasheet BDMJTAG e o o o o
28. 3 of DIP Switch S400 on the Development Board for PLCcore 5208 Table 11 lists the coding of bitrates supported Table 11 Setting the bitrate for CANO via DIP Switch EE Master mode CANO The Master mode is activated via Bit position 4 of DIP Switch S400 on the Development Board for PLCcore 5208 DIP4 OFF PLC is NMT Slave DIP4 ON PLC is NMT Master 7 4 3 Setup of the configuration file plccore 5208 cfg The configuration file home plc plecore 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 It is divided into Sections which include different entries Entry Table 12 shows all configuration entries Entries of section CANOJ take priority over settings via control elements see section 7 4 2 O SYS TEC electronic GmbH 2009 L 1076e_1 Page 32 System Manual PLCcore 5208 Table 12 Configuration entries of the CFG file Section Entry Value Meaning CANO Enabled 1 0 1 1 Interface CANO is activated configuration takes place via control elements of the Development Board factory setting see section 7 4 2 O Interface CANO is deactivated 1 Interface CANO is activated configuration takes place via entries of the configurat
29. 6 74 5 7 s A Bi 8 Ir 77 15 BL a TASIEREN TEO 6 Ie BL 6 B OH 3 RNS s mi T 3 HEXDIE w 8 12 7 2 m 6 B a a g i i OH iwa ae 127 a EA 2 L B TP3 El ar 1 2 ET TASIEREIN 28 B 1 c Pos gue 2 19 2 gt 2 s 1 GD E G 80 4 c DR 6 o ji 1 or amp 278 itt TASIEREIN FENCODE gt 2 ab JRN6 Wx ao Gb a DipSvitch 8 uu MAHOS s g rs 2 MH EL 8 1 6 RUNSTOP SWITCH 8 Ts 3 17 2 15 2 El pa 126 27 BLS El 1 ai 107 AE a 13 Us eo m TOS CEE EL 5 12 TAMOS T9 7 Wie BLE 6 11 4 2 TA BL CONG K TRO Bo i y 2 7 10 ws 1 id MRIS z ONG B EEE ELT El E Te 4 is ELE SIP 3 MB 38 sI afola coro s sko BLOG S Es Is pe 2 T 1 E BR a6 Jas NA B Kaiter MPID sA pini DRO A 10n DSI B m EL e R okola J Ae ik Lik 2 al Polo gue 2 Gb ab Gb DR 6 Has Ne 10n IET 2 ai sk R b GD BOOT RESET 2 MR N TASIREN a BOOISELECT i PWM TIMER aD a D 26 an 1 BRT 3 m 24 RG i r UN ERROR LED PIO PIM LED m a k DIOS RUNLED ss PIO PTIMER3 Butas 1 J TASTEREN D0 ERROR LED w RO w 4 a Figure 32 Reference design for I O interface connection SYS TEC electronic GmbH 2009 L 1076e 1 Page 67 System Manual PLCcore 5208
30. 8 Appendix A Firmware function scope of PLCcore 5208 Table 18 lists all firmware functions and function blocks available on the PLCcore 5208 Sign explanation FB Function block FUN Function Online Help OpenPCS online help L 1054 Manual SYS TEC specific extensions for OpenPCS IEC 61131 3 Manual no L 1054 PARAM 0 1 2 values 0 1 and 2 are valid for the given parameter Table 18 Firmware functions and function blocks of PLCcore 5208 Name Type Reference Remark PLC standard Functions and Function Blocks SR FB Online Help RS FB Online Help R TRIG FB Online Help F TRIG FB Online Help CTU FB Online Help CTD FB Online Help CTUD FB Online Help TP FB Online Help TON FB Online Help TOF FB Online Help Functions and Function Blocks for string manipulation LEN FUN L 1054 LEFT FUN L 1054 RIGHT FUN L 1054 MID FUN L 1054 CONCAT FUN L 1054 INSERT FUN L 1054 DELETE FUN L 1054 REPLACE FUN L 1054 FIND FUN L 1054 GETSTRINFO FB L 1054 CHR FUN L 1054 ASC FUN L 1054 STR FUN L 1054 VAL FUN L 1054 Functions and Function Blocks for OpenPCS specific task controlling ETRC FB L 1054 PTRC FB L 1054 GETVARDATA FB Online Help GETVARFLATADDRESS FB Online Help GETTASKINFO FB Online Help SYS TEC electronic GmbH 2009 L 1076e_1 Page 64 System Manual PLCcore 5208 Functi
31. 8 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 SYS TEC electronic GmbH 2009 L 1076e_1 Page 66 System Manual PLCcore 5208 Appendix B Reference design for the PLCcore 5208 38 VO Address Decoder ds tj eno LD 1h t uio Al 1 m vhi Ma MAHON 8 a A E 2168 8 L D4 25 aL m 24g RW 6 LTB Mky TPS 3 e IE z TR 3 CEE Lit LED m B Y Tt IRD hex dip 127 5 D a 16 ED Di R3 A6 la 5 01 ims Tes 510 oes 2 4 fest go woe Di To T ln Ci A TR mE e Sao ro TRO Sy ace LED m 8 fin THI CEE ae m Ey D MAHAR 10 2 q R 1 20 FA gt q aK g wo fon TR GD m i Do 2 RS A el Da R ab Push Buttons 5 a Hexcode e ia pios E T WHOS si Di6 2 E 48 uni 152 ie P 7 or P DT 3 17 Rua TASTEREIN AI B 1 c R B DIT 3 17 4 Dig a 16 Had s 2 2 2 a B DIN a 16 3 5 DIO 5 15 Amm H a B 4 e TE M B 1 2 D9 5 15 6 7
32. 8 must be located in this directory image bin SYS TEC electronic GmbH 2009 L 1076e_1 Page 45 System Manual PLCcore 5208 Tftpd32 by Ph Jounin ioj xi Current Directory CAPLCcore 5484 7 Browse Server interface 192 168 10 52 Show Dir Titp Server Titp Client DHCP server Syslog server Log viewer start time progress About Figure 23 TFTP server for Windows TFTPD32 A TFTP download of the uClinux Image requires that the Ethernet configuration of the PLCcore 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 Updating the uClinux Image of the PLCcore 5208 is only possible if uClinux is not running Hence Linux Autostart must be disabled prior to the updating process and CoLilo command prompt must be used instead Procedures are described in section 7 2 After Reset e g pushbutton 8403 on the Development Board the CoLilo command prompt answers To update the uClinux Image the following commands must be entered according to the following sequence Table 16 Command sequence to update the uClinux Image on the PLCcore 5208 Command Meaning set server lt ho
33. BILITY OF SUCH DAMAGES END OF TERMS AND CONDITIONS SYS TEC electronic GmbH 2009 L 1076e_1 Page 72 System Manual PLCcore 5208 How to Apply These Terms to Your New Programs If you develop a new program and you want it to be of the greatest possible use to the public the best way to achieve this is to make it free software which everyone can redistribute and change under these terms To do so attach the following notices to the program It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty and each file should have at least the copyright line and a pointer to where the full notice is found lt one line to give the program s name and a brief idea of what it does gt Copyright C lt year gt lt name of author gt This program is free software you can redistribute it and or modify it under the terms of the GNU General Public License as published by the Free Software Foundation either version 2 of the License or at your option any later version This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details You should have received a copy of the GNU General Public License along with this program if not write to the Free Software Foundation Inc 59 Temple Place Suite 330 Boston MA 02111 1307
34. GE 0ooccciccccocicnnococcnonononcnonono cnn nonnnn aaa aaa 48 8 1 1 Overview of the shared process iMage ooooocccccinocccccnnonccccnnoncnccnnnnnncnnnnnncnnnnnnncncnnnns 48 8 1 2 API of the shared process image client aaa aaa keksas aaa 51 8 1 3 Creating a user specific client application oooooocnnnninnnccnncnnnnnnnaconccncnccnncnnnnancnnno 55 8 1 4 Example for using the shared process image aaa aka aka 57 8 2 Driver Development Kit DDK for the PLCcore 5208 0ooocccicocccnnococicococoncncconnonnnn nana ncnnnnnn no 61 8 3 Testing the hardware CONNECTIONS cc aaa aaa aaaa aa akanai aaa aaa aa aaa aaa aaa 62 Appendix A Firmware function scope of PLCcore 5208 ccccccsssseesseeeeeeeeseeeeeeeseenes 64 Appendix B Reference design for the PLCcore 5208 ccssseeeeessseeeeeeseeneeeeeseeneeneeeees 67 Appendix C GNU GENERAL PUBLIC LICENSE ooonooooocccccccconcconanccncnncnonnnnnannnnnnnnnnnnnnnnannnas 69 MENON A i i G i a A i a 74 SYS TEC electronic GmbH 2009 L 1076e 1 Page 4 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 Please take some time to read through this manual carefully It contains important information about the commissioning configu
35. Initialization of read sector table failed Write Sector Table Marker Section bDirCtrl AT MB513 0 iSpeedCtrl AT MB514 0 ShPImgWriteSectTab 0 m_uiPImgDataSectOffs ShPImgLayoutDscrpt m_uiPImgMarkerOffs 515 ShPImgWriteSectTab 0 m_uiPImgDataSectSize sizeof BYTE sizeof WORD ShPImgWriteSectTab 0 m_SyncType kShPImgSyncOnDemand pbPImgVar_61131_bDirCtrl BYTE pabShPImgDataSect ShPImgLayoutDscrpt m_uiPImgMarkerOffs 515 psiPIlmgVar 61131 iSpeedCtrl short int pabShPImgDataSect ShPImgLayoutDscrpt m_uiPImgMarkerOffs 516 fRes ShPImgClntSetupWriteSectTable ShPImgWriteSectTab 1 if fRes printf n ERROR Initialization of write sector table failed Realization on the PLCcore 5208 To enable the execution of the shared process image demo without previous introduction into the Linux based C C programming for the PLCcore 5208 the module comes with a preinstalled translated and ready to run program version and PLC firmware Aome plc shpimgdemo The following description refers to this program version Alternatively the demo project can be newly generated from the corresponding source files 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 2 Open th
36. Kit for the ECUcore 5208 see section 8 2 If executed successfully the function delivers return value TRUE If an error occurs it will deliver return value FALSE Function ShPlmgCIntWriteSectMarkNewData BOOL ShPImgClntWriteSectMarkNewData unsigned int uiWriteDscrptIdx p For the content of a section that is held by the WriteSectorTable function ShPImgCIntWriteSectMarkNewData marks this content as modified This function is used for sections with SyncType kShPlmgSyncOnDemand to initiate the copy process of data from the shared process image into the local image of the PLC Function SAP mgClntWriteSectMarkNewData directly accesses the header of the shared process image without setting a semaphore before Hence it may only be used within the protected section in the code section between ShPimgCintLockSegment and ShPImgCIntUnlockSegment If executed successfully the function delivers return value TRUE If an error occurs it will deliver return value FALSE 8 1 3 Creating a user specific client application Software package SO 1096 VMware image of the uClinux development system is the precondition for the implementation of user specific C C applications It contains a complete Linux development system in the form of a 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 t
37. LSE Function ShPlmgClntGetHeader tShPImgHeader ShPImgClntGetHeader void Function ShPlmgClntGetHeader provides a pointer to the internally used structure type tShPlmgHeader to manage the shared process image The client application does usually not need this structure because all data that it includes can be read and written through functions of the API provided by the shared process image client Function ShPimgCintGetDataSect BYTE ShPImgClntGetDataSect void Function ShPlmgClntGetDataSect provides a pointer to the beginning of the shared process image This pointer represents the basic address for all accesses to the shared process image including the definition of sections ReadSectorTable and WriteSectorTable see section 8 1 1 SYS TEC electronic GmbH 2009 L 1076e_1 Page 53 System Manual PLCcore 5208 Functions ShPlmgClntLockSegment and ShPlmgCIntUnlockSegment BOOL ShPImgClntLockSegment void BOOL ShPImgClntUnlockSegment void To exclusively access the shared process image the client application has available two functions function ShPlmgCIntLockSegment to enter the critical section and function ShPImgCIntUnlockSegment to leave it The segment between both functions is called protected section because in this segment the client application holds unrivaled access to the shared process image see section 8 1 1 The consistency of read or written data is only guaranteed within such a protected section Ou
38. Labeling on the Remark Development Board Power supply X600 or X601 The 24V DC power adapter included in the delivery is intended for direct connection to X601 ETHO Ethernet X302 This interface serves as communication interface with the Programming PC and is necessary for the program download PLCcore 5208 Z5 order number 3390015 besides can be used freely for the user program COMO RS232 X304 on top This interface is used for the configuration of the unit e g setting the IP address and can be used freely for general operation of the user program COM1 RS232 X304 below Interface can be used freely for the user program COM2 RS422 X301 Interface can be used freely for the user program CANO CAN X303 This interface serves as communication interface with the Programming PC and is necessary for the program download PLCcore 5208 Z4 order number 3390014 besides can be used freely for the user program 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 O SYS TEC electronic GmbH 2009 L 1076e 1 Page 11 System Manual PLCcore 5208 Power 24V 1A ETHO COMO RS232 CANO Figure 3 Positioning of most important connections on the Development Board for the PLCcore 5208
39. Manual PLCcore 5208 The configuration file home plc plccore 5208 cfg includes the following factory settings Login Authorization 1 User P1cAdmin CANO Enabled 1 odeID 0x20 Baudrate 125 asterMode 1 ETHO PortNum 8888 ProcImg EnableExtlo 1 EnableSharing 0 7 5 Boot configuration of the PLCcore 5208 The PLCcore 5208 is configured so that after Reset the PLC firmware starts automatically Therefore all necessary commands are provided by the start script home etc autostart Hence the required environment variables are set and drivers are booted 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 7 6 Selecting the appropriate firmware version The PLCcore 5208 is delivered with different firmware versions Those vary in the communication protocol for the data exchange with the programming PC and they differ from each other regarding the availability of FB communication classes see section 6 3 The selection of the appropriate firmware version takes place in the start script home etc autostart By default the Board D of the module as set in the bootloader CoLilo is analyzed Table 13 lists up the assignments of firmware versions and BoardlDs Table 13 Assignment of BoardlDs and firmware versions for the PLCcore 5208
40. SYS TEC System Manual PLCcore 5208 User Manual Version 1 0 Edition September 2009 Document No L 1076e 1 SYS TEC electronic GmbH August Bebel Str 29 D 07973 Greiz Phone 49 3661 6279 0 Fax 49 3661 6279 99 Web http www systec electronic com Mail info systec electronic com SYS TEC electronic GmbH System House for distributed Automation System Manual PLCcore 5208 Status Changes Status released 1 0 O SYS TEC electronic GmbH 2009 L 1076e 1 Page 1 System Manual PLCcore 5208 This manual includes descriptions for copyrighted products that are not explicitly indicated as such The absence of the trademark symbol does not infer that a product is not protected Additionally registered patents and trademarks are similarly not expressly indicated in this manual The information in this document has been carefully checked and is believed to be entirely reliable However SYS TEC electronic GmbH assumes no responsibility for any inaccuracies SYS TEC electronic 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 Additionally SYS TEC electronic GmbH neither guarantees nor assumes any liability for damages arising from the impr
41. Stop switch should be positioned to Stop while the PLCcore 5208 is configured via WEB Frontend The standard setting factory setting requires a user login to configure the PLCcore 5208 via WEB Frontend This is to prevent unauthorized access Therefore user name and password must be entered see Figure 9 On delivery of the module the following user account is preconfigured see section 7 7 User PlcAdmin Password Plc123 SYS TEC electronic GmbH 2009 L 1076e_1 Page 29 System Manual PLCcore 5208 3 PLCcore 5208 Configuration Main Page Microsoft Internet Explorer File Edit View Favorites Tools Help O 0 020 P em 010 253 Address http 192 168 10 248 Bo Links gt Connect to 192 168 10 248 ax re 1 This configuration setup requires an user authorization Default Login User PlcAdmin Password Plc123 PlcAdmin v Start Configuration peed TF Remember my password Co J cm E Opening page http 192 168 10 248Jcgr bin cfgsetup cgl PE Ce ner 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 Figure 10 shows
42. W192 168 10 248 WinSCP 01 xj Local Mark Files Commands Session Options Remote Help 1010 5300 St Default S amp C HardDisk X a Gr M Ta home X a E Al 2 To C PLCcore 5208 Name cnt Type Changed E install plecore 5208 040 536 633 SH File 9 14 2009 1 14 22 AM ca 9 23 2008 8 47 AM rwxr xr x 1000 9 23 2008 8 47 AM rwexr xr x 1000 9 23 2008 8 47 AM rwxr xr x 1000 2 123 9 11 2009 rwxr xr x 1000 DB of 524 KiB in 0 of 1 OB of 2 123 B in 0 of 4 pE 2 p ZRename F4 Edit ES FS Copy L F6 Move CK F7 Create Directory X FS Delete 4 F9 Properties L F10 Quit B FP Figure 16 FTP client for Windows WinSCP After successful login configuration files on the PLCcore 5208 may be edited by using pushbuttons F4 or F4 Edit within the FTP client WinSCP select transfer mode Text With the help of pushbutton F5 or F5 Copy files may be transferred between the computer and the PLCcore 5208 e g for data backups of the PLCcore 5208 or to transfer installation files for firmware updates select transfer mode Binary 7 9 Adding and deleting user accounts Adding and deleting user accounts reguires the login to the PLCcore 5208 as described in section 7 8 1 Adding a new user account takes place via Linux command adduser In embedded systems such as the PLCcore 5208 it does not make sense to open a directory for every user Hence parameter H disables the opening of new directories By using parameter
43. _STR FB L 1054 NETNUMBER 0 CAN_GET_STATE FB L 1054 NETNUMBER 0 CAN_NMT FB L 1054 NETNUMBER 0 CAN_RECV_EMCY_DEV FB L 1054 NETNUMBER 0 CAN_RECV_EMCY FB L 1054 NETNUMBER 0 CAN_WRITE_EMCY FB L 1054 NETNUMBER 0 CAN_RECV_BOOTUP_DEV FB L 1054 NETNUMBER 0 CAN_RECV_BOOTUP FB L 1054 NETNUMBER 0 CAN_ENABLE_CYCLIC_SYNC FB L 1054 NETNUMBER 0 CAN SEND SYNC FB L 1054 NETNUMBER 0 O SYS TEC electronic GmbH 2009 L 1076e_1 Page 65 System Manual PLCcore 5208 Functions and Function Blocks for Ethernet interfaces UDP LAN GET HOST CONFIG FB L 1054 NETNUMBER 0 LAN ASCII TO INET FB L 1054 NETNUMBER 0 LAN INET TO ASCII FB L 1054 NETNUMBER 0 LAN_GET_HOST_BY_NAME FB L 1054 NETNUMBER 0 LAN_GET_HOST_BY_ADDR FB L 1054 NETNUMBER 0 LAN_UDP_CREATE_SOCKET FB L 1054 NETNUMBER 0 LAN_UDP_CLOSE_SOCKET FB L 1054 NETNUMBER 0 LAN UDP RECVFROM STR FB L 1054 NETNUMBER 0 LAN_UDP_SENDTO_STR FB L 1054 NETNUMBER 0 a All nonvolatile data is filed into directory home plc PlcPData bin on the PLCcore 5208 This file has a fix size of 32 kByte By calling function blocks of type NVDATA Xxx in a writing mode the modified data is directly stored into file home plc PlcPData bin flush Thus unsecured data is not getting lost in case of power interruption Interface COMO PORT 0 primarily serves as service interface to administer the PLCcore 520
44. a 26 Control Elements ErrorLED S 22 Run Stop Switch ooooooonococccccnnccccncononccnncnnno 21 O SYS TEC electronic GmbH 2009 RUNS ED iki a iii uni ia Adu tibiae 21 D dali a Aaa 41 Deletion of PLC Program 22 delser acota anais a sasas 40 Development Board CONNECHIONS a n aeta aaa 11 Control Elements 12 Development Kitioooocooococccnococococcccnccncncanonnnos 10 DIMENSION sere naa na a a 8 DIP SWIER sn n T 31 Driver Development Kit 14 61 E Embedded Linux aaa aaa aaa aaa 9 EMG lAW ects Stree anais iia ts os ais 5 Error k 5 B SPS Er ad 22 idp EAT 11 20 PLC program example c ceeee 21 F Ele SM dada 42 Firmware version Selecione 34 FTP Login to the PLCcore 5208 ococcincoccccccnn 37 FTP Client e a a 25 FUBi unta ads ed ei eae 9 G GNU ts a e e ASS e 9 GRE AT 69 H Hex Encoding SWitCh ooooonocicocccinnnnccccccnconoos 31 NWCIOCK iz n asa a a ia as as hee coat 41 A aa aa d ia aa aidas 63 K KOP aaa hh vette a Ta dat ns 9 L LINUX is Au aa is a i a aa ee 9 M Manuals OVENIBW arios ia i aie 6 Master Mode aa aaa aaa aaa aaa 32 Master Mode CANO snesen 32 N Node Address sinaat 32 Node Address CANO 32 L 1076e 1 Page 74 System Manual PLCcore 5208 O ODENP CS inne r land 9 P PIS Wii ata 40 PINOULA ii ei a ita 15 PLC program example ETA ais e ai ai Ba S a 21 plccore 5208 Cfg JLL Lake 30 32 45 PlePData bIN sinini ie ines ds cada dd 66 Predefined User Accounts
45. a Telnet client see below Suitable as Terminal program would be HyperTerminal which is included in the Windows delivery or Tera Term which is available as Open Source and meets higher demands downloadable from http ttssh2 sourceforge jp Telnet client Telnet Client allows the communication with command shell of the PLCcore 5208 via Ethernet connection to ETHO of the PLCcore 5208 Using Telnet clients requires a completed Ethernet configuration of the PLCcore 5208 according to section 7 3 As alternative solution to Telnet client all commands can be edited via a Terminal program to COMO of the PLCcore 5208 Suitable as Telnet client would be Telnet which is included in the Windows delivery or TeraTerm which can also be used as Terminal program see above FTP client An FTP client allows for file exchange between the PLCcore 5208 ET HO and the computer This allows for example editing configuration files by transferring those from the PLCcore 5208 onto the computer where they can be edited and get transferred back to the PLCcore 5208 Downloading files onto the PLCcore 5208 is also necessary to update the PLC firmware Advice The update of PLC firmware is not identical with the update of the PLC user program The PLC program is directly transferred to the module from the OpenPCS programming environment No additional software is needed for that Suitable as FTP client would be WinSCP which is available as Open Source d
46. a a id a i a asi ad 10 4 2 Electric commissioning of the Development Kit PLCcore 5208 oooonccccinocccccnnconcccconancncnnnns 11 4 3 Control elements of the Development Kit PLCcore 5208 c 0ooooocccccninncocococcccccccccnonaononccnnnnnnns 12 4 4 Optional accessory iii ita 13 44 1 USB RS232 Adapter Cable oooooccinnccinicccinnccoconocononcconccncnnnnnnnnnnnnnc cnn akiai aaa 13 442 Driver Development Kit ooooooninoccnnnnnnnncnconononccoccnnnnnonononncnnnnnnnnnnnn nn nnnnnnnnnnann nn nnnnnnnnnns 14 5 Pinout of the PLOcOre 5208 cisnes 15 6 PLC Functionality of the PLCcore 5208 ooommocccconcccccnononcccnnnnnncnnnnnnnccnennnnnnrrnnnnnerennnaas 17 G O iais i a ao a a i ai Tait i le ele a i A nisl a a eds 17 6 2 System start of the PLCcore 5208 000 0 cece ce cence eter ee eeeaeeeeeeaaeeeeeeaeeeeeeaeeeeneneeeeeeaas 17 6 3 Programming the PLCcore 5208 0 0 0 eeeeeeeeeeee aaa aa aaa aaa aaa aaa aaa aaa a aaa aaa 18 6 4 Process image of the PLCcore 5208 ccccinnnccinnnocociccnonnoncnonononannnnnn cnn rro o aaa aaa 18 6 4 1 In and Outputs of Development Kit PLCcore 5208 oooocccccccccccccocococcconccocnnnnnnnonnnos 19 6 4 2 In and outputs of user specific baseboardS oooooicoconococccnnccccnnonoononccnnnnncnannononnnn 19 65 Communication interfaces Likti ssis ias buti asi sias ai Aaa Us ij ka ai asi a Aaa 20 60 1 Seral mtengo Saa E a i ba a ii 20 6 5 2 CAN MeN aisiais bis Intas aidai i bi a sb a i a a i db 20 06 53 Ethernet inten a
47. a network variables and they is accessible from a PLC program via function blocks of type CAN_Xxx see section 6 8 and User Manual CANopen Extension for IEC 61131 3 Manual no L 1008 Section 6 8 provides detailed information about the usage of the CAN interface in connection with CANopen 6 5 3 Ethernet interface The PLCcore 5208 features 1 Ethernet interface ETHO Details about the hardware activation are included in the Hardware Manual Development Board ECUcore 5208 Manual no L 1074 The Ethernet interface serves as service interface to administer the PLCcore 5208 as well as for data exchange with other devices The interface is accessible from a PLC program via function blocks of type LAN Xxx see manual SYS TEC specific Extensions for OpenPCS IEC 61131 3 Manual no L 1054 O SYS TEC electronic GmbH 2009 L 1076e_1 Page 20 System Manual PLCcore 5208 The exemplary PLC program UdpRemoteCtrI illustrates the usage of function blocks of type LAN_Xxx within a PLC program 6 6 Control and display elements 6 6 1 Run Stop switch The Run Stop switch makes it possible to start and interrupt the execution of the PLC program Together with start and stop pushbuttons of the OpenPCS programming environment the Run Stop switch represents a logical AND relation This means that the PLC program will not start the execution until the local Run Stop switch is positioned to Run AND additionally the start command cold w
48. and 2 above on a medium customarily used for software interchange or c Accompany it with the information you received as to the offer to distribute corresponding source code This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer in accord with Subsection b above The source code for a work means the preferred form of the work for making modifications to it For an executable work complete source code means all the source code for all modules it contains plus any associated interface definition files plus the scripts used to control compilation and installation of the executable However as a special exception the source code distributed need not include anything that is normally distributed in either source or binary form with the major components compiler kernel and so on of the operating system on which the executable runs unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated place then offering equivalent access to copy the source code from the same place counts as distribution of the source code even though third parties are not compelled to copy the source along with the object code 4 You may not copy modify sublicense or distribute the Program except as expressly provided under this License Any attempt otherwise to copy
49. and prompt compare section 7 2 Start Linux Bootloader CoLilo Start Linux Operating System Load Module Drivers VO CAN RTC etc Start Servers HTTP Server FTP Server Start PLC Firmware Run PLC User Program Figure 6 System start of the PLCcore 5208 Details about the start script home etc autostart are covered in section 7 5 Run Boot Script home etc autostart For detailed information about PLC programming of the PLCcore 5208 compare section 6 3 O SYS TEC electronic GmbH 2009 L 1076e_1 Page 17 System Manual PLCcore 5208 6 3 Programming the PLCcore 5208 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 PLCcore 5208 firmware is based on standard firmware for SYS TEC s compact control units Conseguently it shows identical properties like other SYS TEC control systems This affects especially the process image setup see section 6 4 as well as the functionality of control elements Hex Encoding switch DIP Switch Run Stop switch Run LED Error LED Depending on the firmware version used PLCcore 5208 firmware provides numerous function blocks to the user to access communication interfaces Table 5 specifies the availability of FB communicati
50. annccnnnancnnnnns 32 7 5 Boot configuration of the PLCcore 5208 occcccinincccinnnococcconononcnnnononcnrnnnnn nn nr nano aaa 34 7 6 Selecting the appropriate firmware version oooooocinnnonocccnnccncconnnononcnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnno 34 T T Predefined US6r ACCOUNtS iatorra ki i a cb a a 36 7 8 L gin to the PLOcore 5208 i civic id a ada 36 7 8 1 Login to the command Shell cc aaa kaka kaka aaa aka aaa aaa aaa aaa aaa 36 T 82 Logintothe FT PServer ciel coincs ia k ia iai ed a ia i a en de ea 37 7 9 Adding and deleting user accounts 0 2 eee ee eeeeee aaa aa akies aa asas aaa aaa aaa aaa 39 7 10 How to change the password for user accounts 0oococinnocccnnococcnononancnnnnnnnnnn nono cnn nana nara 40 LIT Setting the system TIME oossoo a cc do 41 7 12 File system of the PLCcore 5208 c ooooccncccccnnococccocoononcnnnnnonnnnnnno nn aaa aaa aaa aaa aaa 42 7 13 Software update of the PLCcore 5208 oocococccccnnnccccnconononcconccnnnnnnonnnnnnnnnnnnnnmnnnnnnnnnnnnnnnnmnnns 43 7 13 1 Updating the PLC firmWware oooonnnncccnnnoncccnnnoncccnnnonccnnnnnnnccnnnnnnnncnn nn nn cn aaa 44 O SYS TEC electronic GmbH 2009 L 1076e_1 Page 3 System Manual PLCcore 5208 7 13 2 How to update the uClinux Image oooooccccinoccccnnnocccccononncccnnnnncccnnnnnnnc canon cccnnnnnncnnanns 45 8 Adaption of In Outputs and Process IMaJe ooooonccccccnnnnnnnnnncnnnnncncnonnnanannnnnnrnnnrnnrnnnanas 48 8 1 Data exchange via shared process IMA
51. arm or hot start is given by the OpenPCS user interface The order hereby is not relevant A run command given by OpenPCS while at the same time the Run Stop switch is positioned to Stop is visible through quick flashing of the Run LED green Positioned to WRes 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 The procedure for deleting a PLC program is described in section 6 7 6 6 2 Run LED green The Run LED provides information about the activity state of the control system The activity state is shown through different modes Table 7 Display status of the Run LED LED Mode PLC Activity State Off The PLC is in state Stop the PLC does not have a valid program the PLC has received a stop command from the OpenPCS programming environment or the execution of the program has been canceled due to an internal error Quick flashing in The PLC is on standby but is not yet executing relation 1 8 to pulse e The PLC has received a start command from the OpenPCS programming environment but the local Run Stop switch is still positioned to Stop Slow flashing in The PLC is in state Run and executes the PLC program relation 1 1 to pulse Quick flashing in The PLC is in mode Reset
52. ce 22 2 tikintis big vii ibis a i a i i a big debas 20 6 6 Control and display elements cicatrices 21 0 6 1 RUn STOD SWITCH kia bakais ias ita it dai ida 21 6 0 2 RunsLED green sie suns kius iais E th ii a sb i bi i abba 21 6 6 3 gt Error LED red cicatrices 22 6 7 Local d l tioniof a PLC program iii ia ibas 22 6 8 Using CANopen for CAN interfaces oooococinnnocinnnnncccccnnononcnnnnnoncnnnnn aaa aa aaa aaa 23 6 8 1 GAN interface GANO irori diareea atiam aaaeeeaa as id 24 6 8 2 Additional CAN interfaceS ooooconnncccnnnonccccononcccnnnonnccnnnnnncnnnnnnnnc naar nn cc naar nncc nana nnccnnnns 24 7 Configuration and Administration of the PLCcore 5208 cccssssssseeeeeeeeeeeeeeeeeenee 25 7 1 System requirements and necessary software t00lS ooooinnninnniconncnnncocnnccnnnannnn nana nan rnnnn nn 25 7 2 Activation Deactivation of Linux AutOStart ooccinnnnnnnnnncoccnnnnoconcnnnnnancnn nono aaa aaa 26 7 3 Ethernet configuration of the PLCcore 5208 0oocccocccinncoccccnococcnocnnnancnn nono aaa aaa 27 7 4 PLC configuration of the PLCcore 5208 ncocccinnnocicnnococcconononcnnnnnnnncnr nono nn arcano rca rca narran 29 7 4 1 PLC configuration via WEB Frontend ocoononcccnnnocccccnnnoncccnnnoncccnnnnnncnnnnnnccnnnnnnnccnnnns 29 7 4 2 PLC configuration via control elements of the Development Kit PLCcore 5208 31 7 4 3 Setup of the configuration file plecore 5208 Cf9 oooonnnccccnnnncccninnanccccnn
53. ceives notice about the process image setup managed by the PLC firmware If the PLC runtime system is not active when the function is called or if it has not generated a shared process image option Share PLC process image in the PLC configuration deactivated see section 8 1 1 the function will return with the return value FALSE If the initialization was successful the return value will be TRUE Function ShPimgCintRelease BOOL ShPImgClntRelease void Function ShPlmgClntRelease shuts down the shared process image client and disconnects the connection to the storage segment generated for the shared process image by the PLC runtime system If executed successfully the function delivers return value TRUE If an error occurs it will deliver return value FALSE Function ShPimgCintSetNewDataSigHandler BOOL ShPImgClntSetNewDataSigHandler tShPImgAppNewDataSigHandler pfnShPImgAppNewDataSigHandler p Function ShPimgCintSetNewDataSigHandler registers a user specific callback handler This callback handler is called after a synchronization of both images Registered callback handlers are cleared by the parameter NULL The callback handler is called within the context of a Linux signal handler Accordingly all common restrictions for the Linux signal handler also apply to the callback handler see section 8 1 1 If executed successfully the function delivers return value TRUE If an error occurs it will deliver return value FA
54. cess image with identical addresses All in and outputs listed in Table 6 are supported by this standard driver Table 6 In Output assignment of the Development Kit to the process image of the PLCcore 5208 I O of the Development Kit Address and Data type in the Process Image DIO DI4 IBO0 0 as Byte with DIO DI4 IX0 0 IX0 4 as single Bit for each input Ald 15Bit sign 0 32767 external ADC of the Development board see On Beard Temperature Sensor ID72 0 31Bit sign as 1 10000 C see DOO DO4 QB0 0 as Byte with DOO DO4 QX0 0 QX0 4 as single Bit for each output AOO 15Bit sign 0 32767 external DAC of the Development poar see 0 This marked components are only available in the process image if the Option Enable extended I Os is activated within the PLC configuration see section 7 4 1 Alternatively entry EnableExtlo can directly be set within section Proclmg 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 Advice The PLCcore 5208 works with Big Endian format Motorola Notation Consequently and on the contrary to controls using Little Endian format Intel Notation it is not possible to sum up several BYTE variables of the process image to one WORD or DWORD and to access Bits above Bit7 The following example shows issue described bInByte0 AT
55. e There are two different possibilities e Logging in is possible with the help of a Terminal program e g HyperTerminal or TeraTerm see section 7 1 via the serial interface COMO of the PLCcore 5208 analog to the procedure described for the Ethernet configuration in section 7 2 For the configuration of the terminal settings pay attention to only use CR carriage return as end of line character Login with user name and password is not possible for CR LF carriage return line feed e Alternatively the login is possible using a Telnet client e g Telnet or also TeraTerm via the Ethernet interface ETHO of the PLCcore 5208 For logging in to the PLCcore 5208 via the Windows standard Telnet client the command te nef must be called by using the IP address provided in section 7 2 e g telnet 192 168 10 248 A a Type the name of a program folder document or Internet resource and Windows will open it For you Open telnet 192 168 10 248 y Cancel Browse Figure 12 Calling the Telnet client in Windows SYS TEC electronic GmbH 2009 L 1076e_1 Page 36 System Manual PLCcore 5208 Logging in to the PLCcore 5208 is possible in the Terminal window if connected via COMO or in the Telnet window if connected via ETHO The following user account is preconfigured for the administration of the module upon delivery of the PLCcore 5208 also compare section 7 7 User PlcAdmin Password Plc123 ca Te
56. e 5208 is a module for the application in automation technology It features IEC 61131 3 programmability uses standard CAN bus and Ethernet network interfaces and a standardized network protocol Conseguently development times are short and hardware costs are reasonable PLC functionality is created on board through a CANopen network layer Hence it is not necessary for the user to create firmware O SYS TEC electronic GmbH 2009 L 1076e 1 Page 5 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 Software sided the PLCcore 5208 is programmed with IEC 61131 3 conform OpenPCS programming environment There are additional manuals for OpenPCS that describe the handling of programming tools and SYS TEC specific extensions Those are part of the software package OpenPCS Table 1 lists all relevant manuals for the PLCcore 5208 Table 1 Overview of relevant manuals for the PLCcore 5208 Information about In which manual Basic information about the PLCcore 5208 In this manual configuration administration process image connection assignment firmware update reference designs et cetera Deve
57. e PLC program example RunLight in the OpenPCS IEC 61131 programming system und build the project for a target hardware of the type SYSTEC PLCcore 5208 3 Select the network connection to the PLCcore 5208 und download the program 4 Start the PLC program on the PLCcore 5208 5 Login to the command shell of the PLCcore 5208 as described in section 7 8 1 SYS TEC electronic GmbH 2009 L 1076e_1 Page 59 System Manual PLCcore 5208 6 Switch to the directory home plc and call the demo program shpimgdemo cd home plc shpimgdemo The digital outputs of the PLCcore 5208 are selected as runlight The speed is modifiable via the analog input AlO Poti at the ADC of the Development Board With the help of pushbuttons S500 DIO and S501 DI1 the running direction can be changed After starting the demo program shpimgdemo on the PLCcore 5208 actual status information about the runlight is indicated cyclically in the terminal see Figure 28 cx Telnet 192 168 10 248 g For further information check http www uclinux org cd plc ple gt shpimgdemo Shared Process Image demo application for SYSTEC PLCcore 5208 Version 1 lt c 2006 2009 SYS TEC electronic GmbH www systec electronic com Setup shared process image client Shared process image layout MarkerS ize pShPImgHeader Bx41 4600090 pabShPlmgDataSect 0x41460118 Register signal handler Setup read and write sector table Pointer to pr
58. electronic GmbH 2009 L 1076e_1 Page 73 System Manual PLCcore 5208 Index MOMO inner a eis ia 42 Ihomeletc autostart cocc ooonnnncnncccionnono 17 34 home plc plccore 5208 Cfg oooooccciconocccncccoo 30 home plc PlcPData bin J 66 uo E a a 42 44 INarI MD si iii das ia a ee ai is eee 44 A ACCESSONY ote ias kina ene aa aaa 13 14 AUS Lia iais is ogi ita ae 39 Administration System Requirements 25 autostart nopan eai aiea E e 17 34 Autostart ont ltda da 17 AWE ot na ia aa aa Re 9 B Bitrate ua dd 32 Bitrate NU 32 Boot eo ele L 26 Boot configuration 34 Cc CANO Sc Saat Alaa 11 20 24 CANON eoccoconccononononnnnnnnnnnnnnnononenonenenenenenos 9 23 CANopen R 9 CANopen Master oocococccccccccccccccconononccnncnnnnnnnos 9 CE CONTONMIRY Lazikos a saaa dakai 5 CRG Eiles sa as una sad S 32 CoLilo command BoardID configuration 35 CoLilo Command Update uClinux Image 46 CoLilo Command Prompt Activation unidad 26 Terminal Configuration aaa 27 CoLilo Commands Ethernet Configuration 27 COM ita 20 COMO i kuodas i a dotes 11 20 COMTE nidad Aa 11 20 COM uta et eater doa eons 11 20 Communication FB cccccceeseeeeeeeeeeeeees 18 Communication interfaces CAN cuna tii Nanaia ek 20 COM hs tebe a Adie ed aula ae 20 ETA dee ais aki as o 20 Configuration CANO ed eee 31 Command 4 ia tas adidas aa dada 27 PLC ia o o keene 29 Configuration Mode aaa aa
59. ember element m_uiPlmgDataSectOffs defines the absolute start offset of the section within the shared process images The respective start offsets of the input output and marker sections can be determined through structure tShPimgLayoutDscrpt Member element m uiPlmgDataSectSize determines the size of the section which may include one or more variables Member element m_SyncType only applies to entries of the WriteSectorTable It determines whether the section is generally taken over from the shared process image into the local image whenever there are two successive PLC cycles kShPlmgSyncAlways or whether it is taken over on demand kShPlmgSyncOnDemand If classified as SyncOnDemand the data must be marked as modified by calling function ShPlmgCintWriteSectMarkNewData lt sets the member element m_fNewData to TRUE The client application should never directly modify this member element Function ShPimgCintSetup BOOL ShPImgClntSetup tShPImgLayoutDscrpt pShPImgLayoutDscrpt p Function ShPlmgCIntSetup initializes the shared process image client and connects itself with the storage segment for the shared process image which is generated by the PLC runtime system Afterwards it enters the start offsets and values of the input output and marker sections into the structure of type tShP lmgLayoutDscrpt provided upon function call Hence the SYS TEC electronic GmbH 2009 L 1076e_1 Page 52 System Manual PLCcore 5208 client application re
60. ess image The Client application receives information about the setup of the process image via function ShPlmgClntSetup This function enters start offsets and values of the input output and marker sections into the structure of type tShPlmgLayoutDscrpt Function ShPlmgClntGetDataSect provides the start address of the shared process image Upon defining a variable within the PLC program its absolute position within the process image is determined through sections l Input Q Output M Marker and offset e g MB128 0 In each section the offset starts at zero so that for example creating a new variable in the marker section would be independent of values in the input and output section Creating a corresponding pair of variables in the PLC program as well as in the C C application allows for data exchange between the PLC program and the external application Therefore both sides must refer to the same address Structure tShP mgLayoutDscrpt reflects the physical setup of the process image in the PLC firmware including input output and marker sections This is to use an addressing procedure for defining appropriate variables in the C C application that is comparable to the PLC program Hence also in the C C program a variable is defined in the shared process image by indicating the respective section and its offset The following example illustrates the creation of a corresponding variable pair in the PLC program and C C application
61. et Small dimension 72 x 51 mm There are different types of firmware available for the PLCcore 5208 They differ regarding the protocol used for the communication between Programming PC and PLCcore 5208 Order number 3390014 PLCcore 5208 Z4 CANopen communication with Programming PC via CANopen Protocol Interface CANO O SYS TEC electronic GmbH 2009 L 1076e_1 Page 8 System Manual PLCcore 5208 Order number 3390015 PLCcore 5208 Z5 Ethernet communication with Programming PC via UDP Protocol Interface ETHO Making PLC available as an insert ready core module with small dimensions reduces effort and costs significantly for the development of user specific controls The PLCcore 5208 is also very well suitable as intelligent network node for decentralized processing of process signals CANopen and UDP Additionally it can be used as basic component for special assemblies or as PLC in hard to access areas The on board firmware of the PLCcore 5208 contains the entire PLC runtime environment including CANopen connection with CANopen master functionality Thus the module is able to perform control tasks such as linking in and outputs or converting rule algorithms Data and occurrences can be exchanged with other nodes e g superior main controller I O slaves and so forth via CANopen network Ethernet UDP protocol and serial interfaces UART Moreover the number of in and outputs either is locally extendable or decentralized v
62. everal CAN interfaces like other PLC types such as the PLCcore 5484 or PLCmodule C32 If necessary more CAN interfaces can be connected to the module via the address data bus Please contact our support employee if you are interested in this option support systec electronic com SYS TEC electronic GmbH 2009 L 1076e_1 Page 24 System Manual PLCcore 5208 7 Configuration and Administration of the PLCcore 5208 7 1 System requirements and necessary software tools The administration of the PLCcore 5208 requires any Windows or Linux computer that has available an Ethernet interface and a serial interface RS232 As alternative solution to the on board serial interface 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 To administrate the PLCcore 5208 the following software tools are necessary Terminal program A Terminal program allows the communication with the command shell of the PLCcore 5208 via a serial RS232 connection to COMO of the PLCcore 5208 This is required for the Ethernet configuration of the PLCcore 5208 as described in section 7 3 After completing the Ethernet configuration all further commands can either be entered in the Terminal program or alternatively in
63. fig html http html PLCcore 5208 gif install sh ple plc version plc iodrvdemo plc plecore 5208 24 plc candru ko plc 5208 spidev ko plc plccore 5208 cfg plc stopplc plc plccore 5208 z5 plc runplc plc pc5208dru ko plc pc5208drv dld plc shpimgdemo Installation has been finished Please restart system to activate the new firmware root var tmp gt 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 is overwritten This results in a reset of the PLC configuration to default settings Consequently after an update the configuration described in section 7 4 should be checked and if necessary it should be reset 7 13 2 How to update the uClinux Image Updating the uClinux Image takes place via TFTP Trivial FTP within Linux bootloader CoLilo Therefore an appropriate TFTP server is necessary on the computer e g freeware TFTPD32 compare section 7 1 The program consists of only one EXE file that requires no installation and can be run immediately After the program start an appropriate working directory Current Directory should be created by clicking on pushbutton Browse e g C PLCcore 5208 The uClinux Image for the PLCcore 520
64. ftware Foundation write to the Free Software Foundation we sometimes make exceptions for this Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally NO WARRANTY 11 BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE THERE IS NO WARRANTY FOR THE PROGRAM TO THE EXTENT PERMITTED BY APPLICABLE LAW EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND OR OTHER PARTIES PROVIDE THE PROGRAM AS IS WITHOUT WARRANTY OF ANY KIND EITHER EXPRESSED OR IMPLIED INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU SHOULD THE PROGRAM PROVE DEFECTIVE YOU ASSUME THE COST OF ALL NECESSARY SERVICING REPAIR OR CORRECTION 12 INNO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER OR ANY OTHER PARTY WHO MAY MODIFY AND OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE BE LIABLE TO YOU FOR DAMAGES INCLUDING ANY GENERAL SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSI
65. global h shpimgdemo shpimgclient h shpimgdemo trmio h shpimgdemo shpimgdemo c vmware vm xubuntu projects ECUcore 5208 users Figure 26 Unzipping the archive files shpimgdemo tar gz in the Linux development system After unzipping and switching into subdirectory shpimgdemo the demo project can be created by calling command make SYS TEC electronic GmbH 2009 L 1076e_1 Page 56 System Manual PLCcore 5208 cd make shpimgdemo Figure 27 shows how the demo project shpimgdemo is generated in the Linux development system Fie Edit View Terminal Go Help vmware vm xubuntu projects ECUcore vmware vm xubuntu projects ECUcore global h shmclient c Makefile shmclient h shpimgclient vmware vm xubuntu projects ECUcore shpimgclient Terminal 5208 user cd shpimgdemo 5208 user shpimgdemo ls c shpimgdemo c trace c h shpimg h trmio c 5208 user shpimgdemo make trmio h Make Settings CFLAGS LDFLAGS LDLIBS 00 g Wall mcpu 5208 mcpu 5208 WL elf2fit I DNDEBUG Compiling Compiling Compiling Compiling Compiling Linking Done shpimgdemo c shpimgclient c shmclient c EMIO lt a trace c shpimademo Copy executeable shpimgdemo to destination tftpboot done vmware vm xubuntu projects ECUcore 5208 user shpimgdemo Figure 27 Generating the demo project shpimgdemo in the Linux development system Section 8 1 4 describes
66. hbutton S403 on the Development Board the PLCcore 5208 starts automatically using the current uClinux Image Advice After the configuration is finished the serial connection between the computer and the PLCcore 5208 is no longer necessary O SYS TEC electronic GmbH 2009 L 1076e_1 Page 47 System Manual PLCcore 5208 8 Adaption of In Outputs and Process Image 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 Implementing user specific C C applications is based on the Software package SO 1096 VMware Image of the uClinux development system for the ECUcore 5208 IEC 61131 3 PLC System User C C Application Application Application PLC Runtime System User C C Application int main int nArgCnt p char apszArg_pl PLC Application PROGRAM Prog1 i BYTE pbVar1 BYTE bAnyData 0x55 1 1 I 1 l 1 1 1 l 1 Local Image VAR i getaddress of variable in shared image Var AT MB128 0 BYTE I pbVar1 ShPlmgCintGetDataSect END VAR ShPimgLayoutDscrptm_uiPlmgMarkerOffs 5 128 lt Offs for MB128 0 IF Vart 16455 THEN e Do any thing
67. he interface does not provide communication objects for data exchange with other devices After downloading a PLC program or its reload from the non volatile storage after power on the required communication objects are dynamically generated according to the DCF file which is integrated in the PLC project Thus CAN interface CANO is extremely flexible and also applicable for larger amount of data For the PLC program all network variables are declared as VAR_EXTERNAL according to 1EC61131 3 Hence they are marked as outside of the control e g VAR_EXTERNAL NetVarl BYTE NetVar2 UINT END_VAR A detailed procedure about the integration of DCF files into the PLC project and about the declaration of network variables is provided in manual User Manual CANopen Extension for IEC 61131 3 Manual no L 1008 When using CAN interface CANO it must be paid attention that the generation of required objects takes place upon each system start This is due to the dynamic object directory Design instructions are included in the DCF file that is integrated in the PLC project Hence changes to the configuration can only be made by modifying the DCF file This implies that after the network configuration is changed modification of DCF file the PLC project must again be translated and loaded onto the PLCcore 5208 6 8 2 Additional CAN interfaces In general the PLC firmware used for PLCcore 5208 is able to simultaneously operate s
68. he client application must define a callback handler of the type tShP imgAppNewDataSigHandler e g static void AppSigHandlerNewData void fNewDataSignaled_1 TRUE This callback handler must be registered with the help of function ShPlmgClntSetNewDataSigHandler The handler is selected subsequent to a synchronization of the two images The callback handler of the client application is called within the context of a Linux signal handler the PLC runtime system informs the client using Linux function ki l Accordingly all common restrictions for the Linux signal handler also apply to the callback handler of the client application In particular it is only allowed to call a few operating system functions that are explicitly marked as reentrant proof Please pay attention to not make reentrant calls of local functions within the client application As shown in the example only a global flag should be set for the signaling within the callback handler This flag will later on be evaluated and processed in the main loop of the client application 8 1 2 API of the shared process image client As illustrated in Figure 25 the user specific C C application exclusively uses the API Application Programming Interface provided by the shared process image client This API is declared in the SYS TEC electronic GmbH 2009 L 1076e_1 Page 51 System Manual PLCcore 5208 header file shpimgclient h and implemented in the source file shp
69. he same host PC that already has the OpenPCS IEC 61131 programming system installed on it The VMware image of the Linux development system includes the GNU Crosscompiler Toolchain for Freescale MCF52xx processors Additionally it includes essential server services that are preconfigured and usable for effective software development Details about the VMware image of the Linux development system and instructions for its usage are described in the System Manual ECUcore 5208 Manual no L 1202 As illustrated in Figure 25 the user specific C C application uses the API files shpimgclient c and shpimgclient h which is provided by the shared process image client The shared process image client is based on services provided by the shared memory client files shmclient c and shmclient c Both client implementations are necessary to generate a user specific C C application The archive of the shared process image demos shpimgdemo tar gz contains the respective files To create own user specific client applications it is recommended to use this demo project as the basis for own adaptations and extensions Moreover this demo project contains a Makefile with all relevant configuration adjustments that are necessary to create a Linux application for the PLCcore 5208 Table 17 lists all files of the archive shpimgdemo tar gz and classifies those as general part of the C C application or as specific component for the demo project shpimgdemo O SYS
70. ia CANopen devices For this purpose the CANopen Chip is suitable It has also been designed as insert ready core module for the appliance in user specific applications 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 reguirements Saving the PLC program in the on board Flash Disk of the module allows an automatic restart in case of power breakdown Programming the PLCcore 5208 takes place according to IEC 61131 3 using the OpenPCS programming system of the company infoteam Software GmbH http Awww infoteam de This programming system has been extended and adjusted for the PLCcore 5208 by the company SYS TEC electronic GmbH Hence it is possible to program the PLCcore 5208 graphically in KOP FUB AS and CFC or textually in AWL or ST Downloading the PLC program onto the module takes place via Ethernet or CANopen depending on the firmware that is used Addressing in and outputs and creating a process image follows the SYS TEC scheme for compact control units Like all other SYS TEC controls the PLCcore 5208 supports backward documentation of the PLC program as well as the debug functionality including watching and setting variables single cycles breakpoints and single steps The PLCcore 5208 is based on Embedded Linux uClinux as operating s
71. ic C C application and are executed by Server PLC runtime system The Client defines ranges of the PLC process image from which it will read data ReadSectorTable or in which it will write data WriteSectorTable Hence the terms Read and Write refer to data tranfer directions from the viewpoint of the Client Sections to read and write may comprise all sections of the entire process image input output as well as marker sections This allows for example that a Client application writes data into the input section of the PLC process image and reads data from the output section Figure 25 shows the sequence of single read and write operations Prior to the execution of a PLC program cycle the physical inputs are imported into the local process image of the PLC 1 Afterwards all sections defined in WriteSectorTable are taken over from the shared process image into the local process image 2 By following this sequence a Client application for example is able to overwrite the value of a physical input This may be used for simulation purposes as well as for setting input data to constant values Forcen Similarly prior to writing the process image onto the physical outputs 6 sections defined in WriteSectorTable are taken over from the shared process image into the local process image 4 Thus a Client application is able to overwrite output information generated by the PLC program The PLC firmware provides the setup of the proc
72. imgclient c It contains the following types partly defined in shpimg h and functions Structure tShPimgLayoutDscrpt typedef struct definition of process image sections unsigned int m_uiPImgInputOffs start offset of input section unsigned int m_uiPImgInputSize size of input section unsigned int m_uiPImgOutputOffs start offset of output section unsigned int m_uiPImgOutputSize size of output section unsigned int m_uiPImgMarkerOffs start offset of marker section unsigned int m_uiPImgMarkerSize size of marker section J tShPImgLayoutDscrpt Structure ShPimgLayoutDscrpt describes the setup of the process image given by the PLC firmware The client application receives the information about the setup of the process image via function SAP mgClntSetup This function enters start offsets and values of input output and marker sections into the structure provided upon function calling Structure tShPlmgSectDscrpt typedef struct definition of data exchange section unsigned int m_uiPImgDataSectOffs unsigned int m_uiPImgDataSectSize tShPImgSyncType m_SyncType only used for WriteSectTab BOOL m_fNewData J tShPImgSectDscrpt Structure ShPlmgSectDscrpt describes the setup of a ReadSectorTable or WriteSectorTable entry that must be defined by the client Both tables support the synchronization between the local image of the PLC runtime system and the shared process image see section 8 1 1 M
73. incl implementation of Shared Process Image necessary to regenerate a user library C and H files Make file etc 3 I O driver demo application iodrvdemo in the source code allows for a quick and trouble free test of the I O drivers 4 Documentation The Driver Development Kit is based on the software package SO 1096 VMware Image of the uClinux development system It contains sources of the LinuxBSP used and it includes the necessary GNU Crosscompiler Toolchain for Freescale MCF52xx processors 8 3 Testing the hardware connections The PLCcore 5208 primarily is designed as vendor part for the application in industrial controls Hence the PLCcore 5208 typically is integrated in a user specific baseboard To enable trouble free inspection of correct I O activation the test program iodrvdemo is installed on the module together O SYS TEC electronic GmbH 2009 L 1076e_1 Page 62 System Manual PLCcore 5208 with the PLC firmware This test program is directly tied in with the I O driver and allows guick and direct access to the periphery At first if a PLC runtime system is running it must be guit This is to ensure that the test program iodrvdemo receives exclusive access to all I O resources To do so script stopplc may possibly be called cd home plc stopplc Afterwards the I O driver may be reloaded and the test program iodrvdemo may be started insmod 5208 spidev ko insmod pc5208drv ko iodrvdemo Fig
74. ion file below NodelD 1 127 or 0x01 Ox7F Node number for interface CANO decimal or hexadecimal with prefix Ox Baudrate 10 20 50 125 250 500 800 1000 Bitrate for interface CANO MasterMode O 1 1 Master mode is activated O Master mode is deactivated ET HO PortNum Default Port no 8888 Port number for the communication with the Programming PC and for program download only for PLCcore 5208 Z5 order number 3390015 Proclmg EnableExtlo 0 1 0 Only memory mapped I Os of the PLCcore 5208 are used for the process image 1 All I Os supported by the driver are used for the process image including Temperature Sensor as well as external ADC and DAC of the Development board for adaptation of process image see section 8 2 EnableSharing 0 1 0 No sharing of process image 1 Sharing of process image is enabled see section 8 1 Login Authorization 0 1 0 Configuration via WEB Frontend is possible without user login 1 Configuration via WEB Frontend reguires user login User Default Name PlcAdmin If entry User is available only the user name defined is accepted for the login to configure via WEB Frontend If the entry is not available any user registered on the PLCcore 5208 see section 7 9 may login via WEB Frontend SYS TEC electronic GmbH 2009 L 1076e_1 Page 33 System
75. ip lt XXX XXX XXX XXX gt This command sets the local IP address of the PLCcore 5208 The IP address is to be defined by the network administrator Network mask set netmask lt xxx xxx Xxx xxx gt This command sets the network mask of the PLCcore 5208 The network mask is to be defined by the network administrator Gateway address set gw lt XXX XXX XXX XXX gt This command defines the IP address of the gateway which is to be used by the PLCcore 5208 The gateway address is set by the network administrator Advice If PLCcore 5208 and Programming PC are located within the same sub net defining the gateway address may be skipped and value 0 0 0 0 may be used instead Saving the config save This command saves active configurations in configuration the flash of the 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 E COM1 19200baud Tera Term VT IO x File Edit Setup Control Window Help CUcore 5208 boot ress SPACE key to abort autoboot procedure Autoboot aborted olilo gt set ip 192 168 10 248 IP address 192 168 10 248 olilo gt set netnask 255 255 255 0 etnask 255 255 255 0 olilo gt conf ig save urning 5312 bytes to flash 0x20000 fron 0 8000296c tarting sector 2 64K
76. ital in and outputs and it comprises a potentiometer for the analog input Signals that are available from plug connectors of the PLCcore 5208 are linked to pin header connectors and enable easy connection of own peripheral circuitry Hence the Development Board forms an ideal experimentation and testing platform for the PLCcore 5208 The OpenPCS IEC 61131 programming system included in the Kit serves as software development platform and as debug environment for the PLCcore 5208 Thus the module can either be programmed graphically in KOP FUB AS and CFC or textually in AWL or ST Downloading the PLC program onto the module takes place via Ethernet or CANopen depending on the firmware that is used High capacity debug functionality such as watching and setting variables single cycles breakpoints and single steps simplify the development and commissioning of user software for this module 4 2 Electric commissioning of the Development Kit PLCcore 5208 A 24V DC power adapter necessary for running the Development Kit PLCcore 5208 and Ethernet and RS232 cables are already included in the Kit delivery For commissioning the Kit it is essential to use at least the power supply connections X600 X601 COMO X304 on top and ETHO X302 Furthermore connection CANO X303 is recommended Table 2 provides an overview over the connections of the Development Kit PLCcore 5208 Table 2 Connections of the Development Kit PLCcore 5208 Connection
77. ition The consistency of read or written data is only guaranteed within such a protected section Outside the protected section the shared process image may anytime be manipulated by the PLC runtime system The following example shows the exclusive access to the shared process image in the C C application ShPImgClntLockSegment i write new data value into Varl pbVarl bAnyData mark new data for WriteSectorTable entry number 0 ShPImgC1ntWriteSectMarkNewData 0 ShPImgClntUnlockSegment For the example above kShPlmgSyncOnDemand was defined as SyncType upon generating entry WriteSectorTable Hence taking over variable Var from the shared process image into the local image can only take place if the respective section was beforehand explicitly marked as updated Therefore it is necessary to call function ShPimgCintWriteSectMarkNewData Since function ShPlmgClntWriteSectMarkNewData does not modify the semaphore it may only be used within a protected section see example such as the code section between ShP mgCintLockSegment and ShPImgCIntUnlockSegment The synchronization between local image and shared process image by the PLC runtime system only takes place in between two successive PLC cycles A client application user specific C C program is not directly informed about this point of time but it can get information about the update of the shared process image from the PLC runtime system Therefore t
78. lnet 192 168 10 248 PLCcore 5208 192 168 10 248 login PlcAdmin Password Welcome to For further information check http www uclinux org Figure 13 Login to the PLCcore 5208 Figure 13 exemplifies the login to the PLCcore 5208 using a Windows standard Telnet client 7 8 2 Login to the FTP server The PLCcore 5208 has available a FTP server FTP Daemon that allows file exchange with any computer up and download of files The FTP server is started by the Internet Service Daemon inetd Due to security and performance reasons the FTP server is deactivated by default and must be started manually if required Therefore the user must first be logged in to the command shell of the PLCcore 5208 following the procedures described in section 7 8 1 Afterwards the following command must be entered in the Telnet or Terminal window enable ftpd sh This command brings about the modification of the configuration file inetd home etc inetd conf To activate the FTP server inetd must be rebooted Therefore the following command must be used etc rc d init d inetd sh restart Alternatively the PLCcore 5208 can be rebooted via Reset e g push button S403 on the Development board Figure 14 illustrates an example for starting the FTP server SYS TEC electronic GmbH 2009 L 1076e_1 Page 37 System Manual PLCcore 5208 cx Telnet 192 168 10 248 p PLCcore 5484_192 168 10 248 login PlcAdmin Password sh 2 65 H f
79. lopment of user specific C C applications System Manual ECUcore 5208 for the ECUcore 5208 PLCcore 5208 VMware Manual no L 1202 Image of the Linux development system Hardware description about the ECUcore 5208 Hardware Manual ECUcore 5208 PLCcore 5208 reference designs et cetera Manual no L 1232 Development Board for the ECUcore 5208 Hardware Manual Development Board 5208 PLCcore 5208 reference designs et cetera Manual no L 1074 Driver Development Kit DDK for the ECUcore Software Manual Driver Development Kit DDK 5208 for ECUcore 5208 Manual no L 1231 Basics about the OpenPCS IEC 61131 Brief instructions for the programming system programming system Entry OpenPCS Documentation in the OpenPCS program group of the start menu Manual no L 1005 Complete description of the OpenPCS IEC 61131 Online help about the OpenPCS programming programming system basics about the PLC system programming according to IEC 61131 3 Command overview and description of standard Online help about the OpenPCS programming function blocks according to IEC 61131 3 system SYS TEC extension for IEC 61131 3 User Manual SYS TEC specific extensions for String functions OpenPCS IEC 61131 3 UDP function blocks Manual no L 1054 SIO function blocks FB for RTC Counter EEPROM PWM PTO SYS TEC electronic GmbH 2009 L 1076e 1 Page 6 System Manual PLCcore 5208 CANopen extension for IEC 6113
80. m passes itself from state Run into state Stop This is recognizable by the permanent light of the Error LED red In this case the error cause is saved by the PLC and is transferred to the computer and shown upon next power on 6 7 Local deletion of a PLC program 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 To prevent deleting a PLC program by mistake it is necessary to keep to the following order 1 Position the Run Stop switch to MRes 2 Reset the PLCcore 5208 by pressing the reset pushbutton of the Development Board or through temporary power interrupt D Run LED green is flashing quickly in relation 1 1 to the pulse 3 Position the Run Stop switch to Run gt Error LED red is flashing quickly in relation 1 1 to the pulse O SYS TEC electronic GmbH 2009 L 1076e_1 Page 22 System Manual PLCcore 5208 4 Reposition Run Stop switch back to MRes within 2 seconds D PLCcore 5208 is deleting PLC program gt Run LED green and Error LED red are both flashing alternately 5 Reposition Run Stop switch to Stop or Run and reset again to start the PLCcore 5208 and bring it into normal working state If Reset of the PLCcore 5208 is ac
81. nd the sum of the variable sizes as SectorSize Combining the variables improves the efficiency and the performance of the copy processes For each entry of the WriteSectorTable an appropriate SyncType must be defined It determines whether the section is generally taken over from the shared process image into the local image whenever there are two successive PLC cycles kShPlmgSyncAlways or whether it is taken over on demand kShPlmgSyncOnDemand If classified as SyncOnDemand the data only is copied if the respective section before was explicitly marked as updated This takes places by calling function ShPImgCIntWriteSectMarkNewData and entering the corresponding WriteSectorTable Index e g 0 for WriteSectTab 0 etc kShPlmgSyncAlways is provided as SyncType for the ReadSectorTable the value of the member element m_SyncType is ignored The PLC firmware is not able to identify which variables were changed by the PLC program of the cycle before Hence all sections defined in ReadSectorTable are always taken over from the local image into the shared process image Thus the respective variables in the shared process image always hold the actual values The PLC firmware and the C C application both use the shared process image To prevent conflicts due to accesses from both of those in parallel running processes at the same time the shared process image is internally protected by a semaphore If one process requires access to the shared proce
82. ntegration of DCF files that are generated by an appropriate CANopen configurator On the one hand DCF files describe communication parameters of any device CAN Identifier etc and on the other hand they allocate network variables to the Bytes of a CAN telegram mapping The application of network variables only requires basic knowledge about CANopen 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 etc mostly also called CANopen Master In typical CANopen networks a programmable node in the form of a PLC SYS TEC electronic GmbH 2009 L 1076e_1 Page 23 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 Therefore upon system start via SDO it transfers DCF files generated by the CANopen configurator to the respective nodes 6 8 1 CAN interface CANO Interface CANO features a dynamic object dictionary This implicates that after activating the PLC t
83. o o o o o 46000000000 Board Connector Figure 5 Pinout of the PLCcore 5208 bottom view Figure 5 exemplifies the positioning of pin header connectors on the PLCcore 5208 The complete connection assignment of this module is listed up in Table 4 Appendix B includes reference designs for using the PLCcore 5208 in customer specific applications Table 4 Connections of the PLCcore 5208 completely sorted by connection pin Signal Pin Pin Signal Signal Pin Pin Signal GND A01 B01 IMR 2V5_EPHY C01 D01 ETH_TX RSTO A02 B02 RSTI GND C02 D02 ETH TX PFI A03 B03 PI2C DATA ETH RX C03 D03 ETH LINK ACT WDI A04 B04 GND ETH_RX C04 D04 GND TP 0 A05 B05 PI2C_CLK ETH_SPEED C05 D05 GPIO_PUART2 AO A06 BOG A10 D16 C06 D06 D24 GND A07 B07 A11 GND C07 D07 D25 A1 A08 B08 A12 D17 C08 D08 D26 A2 A09 B09 A13 D18 C09 Dog D27 A3 A10 B10 GND D19 C10 D10 GND A4 A11 B11 A14 D20 C11 D11 D28 A5 A12 B12 A15 D21 C12 D12 D29 GND A13 B13 A16 GND C13 D13 D30 A6 A14 B14 A17 D22 C14 D14 D31 A7 A15 B15 A18 D23 C15 D15 PSPI_ CS2 A8 A16 B16 GND PSPI_ CSO C16 D16 GND AQ A17 B17 A19 PSPI_ CS1 C17 D17 PSPI_ CSCAN ICS1 A18 B18 ICS4 PSPI_CLK C18 D18 PSPI MRST GND A19 B19 ICS5 GND C19 D19 GPIO PIRG1 RIW A20 B20 OE PSPI MTSR C20 D20 GPIO PIRG7 BWEO A21 B21 GPIO BWE1 GPIO_PTIMER2 C21 D21 GPIO_PCS2 GPIO PBUSCTLO A22 B22 GND GPIO PTIMER3
84. ocess image vaiables pbPImgVar_61131_bButtonGroup Bx4146B118 pbPI mg ar_61131_bLEDGroup x41468918 pbPI mgVar_61131_bLEDGroupi Bx41 468919 pbPlmgVUar 61131 usiSlidbarLen Bx41461318 pbPImgUar_61131_bStatus x4146131A pbPI mgVar_61131_bDirCtrl1 x4146131B psiPlmgUar 61131 iSpeedCtrl x4146131C Run program cycle exchange process image SET START PARAMETER Dir Left Speed Slidebar lt 8 Figure 28 Terminal outputs of the demo program shpimgdemo after start 7 By pressing pushbutton S503 DI3 the control of the runlight direction and speed is handed over to the demo program shpimgdemo Afterwards the running direction may be set by the C application by using the cursor pushbuttons left and right und in the terminal window and the speed may be changed by using cursor pushbuttons up and down f und SYS TEC electronic GmbH 2009 L 1076e_1 Page 60 System Manual PLCcore 5208 cx Telnet 192 168 10 248 E rS 4 Nesi pa Bx41 4600090 pabShPlmgDataSect 0x41460118 Register signal handler Setup read and wr rite sector table Pointer to proc image vaia bles _ pbPImgUar bButtonGroup pbPIngUar 1131 ZbLEDGroup pbPI mgVar_61131_bLEDGroupi pbPImgVar_61131_usiSlidbarLen pbPIngUar 61131 bStatus pbPI mgVar_61131_bDirCtrl psiPImgVar_61131_iSpeedCtrl Bx4146131C Run program cycle exchange process image Bx41468118 SET START PARAMETER peer ners Speed 6 Slidebar lt 8 ButtonGroup 0x08 RemoteC
85. on classes SIO CAN UDP for different PLCcore 5208 firmware versions Section 7 6 describes the selection of the appropriate firmware version Table 5 Support of FB communication classes for different types of the PLCcore Type of PLCcore 5208 Z3 PLCcore 5208 Z4 PLCcore 5208 Z5 Remark Interface Art no 3390013 Art no 3390014 Art no 3390015 CAN X X FB description see manual L 1008 UDP x X FB description see manual L 1054 SIO x x X FB description see manual L 1054 Table 18 in Appendix A contains a complete listing of firmware functions and function blocks that are supported by the PLCcore 5208 Detailed information about using the CAN interfaces in connection with CANopen is provided in section 6 8 6 4 Process image of the PLCcore 5208 The process image of PLCcore 5208 is significantly conditioned by the particular user specific in output circuit A precise definition of the process image always is only possible for concrete output circuit such as for the Development Kit PLCcore 5208 SYS TEC electronic GmbH 2009 L 1076e 1 Page 18 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 pro
86. ons and Function Blocks for handling of non volatile data NVDATA BIT FB L 1054 DEVICE 0 see NVDATA_INT FB L 1054 DEVICE 0 see NVDATA_STR FB L 1054 DEVICE 0 see Functions and Function Blocks for handling of time GetTime FUN Online Help GetTimeCS FUN Online Help DT CLOCK FB L 1054 DT ABS TO REL FB L 1054 DT REL TO ABS FB L 1054 Functions and Function Blocks for counter inputs and pulse outputs CNT FUD FB L 1054 not supported by standard I O driver PTO PWM FB L 1054 not supported by standard I O driver PTO TAB FB L 1054 not supported by standard I O driver Functions and Function Blocks for Serial interfaces SIO INIT FB L 1054 PORT 0 1 2 see SIO STATE FB L 1054 PORT 0 1 2 see SIO_READ_CHR FB L 1054 PORT 0 1 2 see SIO WRITE CHR FB L 1054 PORT 0 1 2 see SIO_READ_STR FB L 1054 PORT 0 1 2 see SIO_WRITE_STR FB L 1054 PORT 0 1 2 see Functions and Function Blocks for CAN interfaces CANopen CAN GET LOCALNODE ID FB L 1054 NETNUMBER 0 CAN_CANOPEN_KERNEL_STATE FB L 1054 NETNUMBER 0 CAN_REGISTER_COBID FB L 1054 NETNUMBER 0 CAN_PDO_READ8 FB L 1054 NETNUMBER 0 CAN PDO WRITE8 FB L 1054 NETNUMBER 0 CAN SDO READ8 FB L 1054 NETNUMBER 0 CAN SDO WRITE8 FB L 1054 NETNUMBER 0 CAN SDO READ STR FB L 1054 NETNUMBER 0 CAN_SDO_WRITE
87. ontrol enabled But tonGroup 6x88 E 0 Slidebar lt 8 SET NEW PARAMETER ir Speed 1 Slidebar lt 8 SET NEW PARAMETER y Speed 2 Slidebar lt 8 SET NEW PARAMETER ir Speed 3 Slidebar lt 8 oe SET NEW PARAMETER ir Speed 4 Slidebar lt 8 SET NEW PARAMETER p Speed 5 Slidebar lt 8 XXX SET NEW PARAMETER ir Right Speed 5 Slidebar lt 8 XX Figure 29 Terminal outputs of the demo program shpimgdemo after user inputs Figure 29 shows the terminal outputs of the demo program sApimgdemo in answer to activating the cursor pushbuttons The demo program shpimgdemo may be terminated by pressing Ctrl C in the terminal window 8 2 Driver Development Kit DDK for the PLCcore 5208 The Driver Development Kit DDK for the ECUcore 5208 resp PLCcore 5208 is distributed as additional software package with the order number SO 1101 It is not included in the delivery of the PLCcore 5208 or the Development Kit PLCcore 5208 The Software Manual Driver 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 Hence it allows for a separation of the PLC runtime system and I O drivers Consequently the user is able to comple
88. oper usage or improper installation of the hardware or software SYS TEC electronic GmbH further reserves the right to alter the layout and or design of the hardware without prior notification and accepts no liability for doing so Copyright 2009 SYS TEC electronic GmbH All rights including those of translation reprint broadcast photomechanical or similar reproduction and storage or processing in computer systems in whole or in part are reserved No reproduction may occur without the express written consent from SYS TEC electronic GmbH Inform yourselves Contact Direct Your local distributor Address SYS TEC electronic GmbH August Bebel Str 29 D 07973 Greiz GERMANY Ordering 49 0 36 61 62 79 0 E Information info systec electronic com ie UNGEN http www systec o eae bee eo electronic com distributors support systec electronic com Fax 49 0 36 61 6 79 99 Web Site http www systec electronic com 1st Edition September 2009 SYS TEC electronic GmbH 2009 L 1076e_1 Page 2 System Manual PLCcore 5208 Table of Contents A r INITOdUCLIOK Li ii ia aaa Na i a i li a E i a E i L a 5 2 Overview Where to find What cccccessseeeeeseseeeeeeseeneeeeseseeeeeesseeeeeeesseeeeeeeeseeeeeeeneees 6 3 Product Descrip cid aa 8 4 Development Kit PLCcore 5208 oocoomncoccconnccocccconannccncnnnnnnnnnnnnoc nn nro nn cnn cnn enanas 10 AN OVO EW LL iii Kea atei da adit detains halite A aaa
89. ore 5208 Manual no L 1074 COMO Interface COMO primarily serves as service interface to administer the PLCcore 5208 By default in boot script etc inittab it is assigned to the Linux process getty and is used as Linux console to administer the PLCcore 5208 Even though interface COMO may be used from a PLC program via function blocks of type S O Xxx see manual SYS TEC specific Extensions for OpenPCS IEC 61131 3 Manual no L 1054 only signs should be output in this regard The module tries to interpret and to execute signs that it receives as Linux commands To freely use an interface from a PLC program boot script etc inittab must be adjusted appropriately which is only possible by modifying the Linux image This requires software package SO 1096 VMware Image of the uClinux Development System for the ECUcore 5208 COM1 2 Interfaces COM1 COM2 are disposable and support data exchange between the PLCcore 5208 and other field devices kept under control of the PLC program Interfaces COM1 COM2 may be used from a PLC program via function blocks of type SIO Xxx see manual SYS TEC specific Extensions for OpenPCS IEC 61131 3 Manual no L 1054 6 5 2 CAN interface The PLCcore 5208 features 1 CAN interface CANO Details about the hardware activation are included in the Hardware Manual Development Board ECUcore 5208 Manual no L 1074 The CAN interface allow for data exchange with other devices vi
90. ownload from http winscp net It only consists of one EXE file that needs no installation and can be booted immediately Furthermore freeware Core FTP LE downloadable from http www coreftp com or Total Commander integrated in the file manager are suitable as FTP client O SYS TEC electronic GmbH 2009 L 1076e_1 Page 25 System Manual PLCcore 5208 TFTP server The TFTP server is necessary to update the Linux Image on the PLCcore 5208 Freeware TFTPD32 download from http tftpd32 jounin net is suitable as TFTP server It only consists of one EXE file that needs no installation and can be booted immediately For programs that communicate via Ethernet interface such as FTP client or TFTP server it must be paid attention to that rights in the Windows Firewall are released Usually Firewalls signal when a program seeks access to the network and asks if this access should be permitted or denied In this case access is to be permitted 7 2 Activation Deactivation of Linux Autostart During standard operation mode the bootloader CoLilo automatically starts the Linux operating system of the module after Reset or Power on Afterwards the operating system loads all further software components and controls the PLC program execution see section 6 1 For service purposes such as configuring the Ethernet interface see section 7 3 or updating the Linux Image see section 7 13 2 it is necessary to disable this Autostart mode and
91. ration and programming of the PLCcore 5208 It will assist you in getting familiar with the functional range and usage of the PLCcore 5208 This document is complemented by other manuals e g for the OpenPCS IEC 61131 programming system and the CANopen extension for IEC 61131 3 Table 3 in section 4 1 shows a listing of relevant manuals for the PLCcore 5208 Please also refer to those complementary documents For more information optional products updates et cetera we recommend you to visit our website http www systec electronic com The content of this website is updated periodically and provides to you downloads of the latest software releases and manual versions Declaration of Electro Magnetic Conformity for PLCcore 5208 EMC law The PLCcore 5208 has been designed to be used as vendor part for the integration into devices further industrial processing or as Development Board for laboratory development hard and software development After the integration into a device or when changes extensions are made to this product the conformity to EMC law again must be assessed and certified Only thereafter products may be launched onto the market The CE conformity is only valid for the application area described in this document and only under compliance with the following commissioning instructions The PLCcore 5208 is ESD sensitive and may only be unpacked used and operated by trained personal at ESD conform work stations The PLCcor
92. reamble The licenses for most software are designed to take away your freedom to share and change it By contrast the GNU General Public License is intended to guarantee your freedom to share and change free software to make sure the software is free for all its users This General Public License applies to most of the Free Software Foundation s software and to any other program whose authors commit to using it Some other Free Software Foundation software is covered by the GNU Library General Public License instead You can apply it to your programs too When we speak of free software we are referring to freedom not price Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software and charge for this service if you wish that you receive source code or can get it if you want it that you can change the software or use pieces of it in new free programs and that you know you can do these things To protect your rights we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the software or if you modify it For example if you distribute copies of such a program whether gratis or for a fee you must give the recipients all the rights that you have You must make sure that they too receive or can get the source code And you must sho
93. red passwd lt username gt Figure 18 exemplifies the password change for user PlcAdmin SYS TEC electronic GmbH 2009 L 1076e 1 Page 40 System Manual PLCcore 5208 ca Telnet 192 168 10 248 PLCcore 5208 192 168 10 248 login PlcAdmin Password Welcome to For further information check http uww uc linux org gt passwd PlcAdmin Changing sword for PlcAdmin New passu g ssword Password for PlcAdmin changed by root root gt m Figure 18 Changing the password for an user account 7 11 Setting the system time 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 Linux command date is structured as follows date options MMDDhhmm CC JYY ss Example date 09 22 10 20 2008 55 second Spaces in the parameter list are only inserted to present the example above clearly All spaces do not apply when the command is actually used To set the system time of the PLCcore 5208 to 2008 09 22 and 10 20 55 as shown in the example above the following commands are necessary date 092210202008 55 hwclock w The current system time is displayed by entering Linux command date without parameter Linux
94. rnal process image that is locally generated within the PLC runtime system Local Image in Figure 25 This is integrated within the PLC runtime system and is protected against direct accesses from the outside On the contrary the user specific external C C application always uses the shared process image Shared Image in Figure 25 This separation of two process images enables isolation between accesses to the PLC program and the external application Those two in parallel and independently running processes now must only be synchronized for a short period of time to copy the process data 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 Shared Memory Shared Image in Figure 25 Its task is to exchange data with external applications Hereby the PLC firmware functions as Server and the external user specific C C application functions as Client ReadSectorTable and WriteSectorTable both control the copying of data between the two process images Both tables are filled by the Client external user specif
95. rogram extract shows this using the example shpimgdemo c Function SAPlmgClntSetup inserts the start offsets of input output and marker sections into the structure ShP mgLayoutDscrpt Hence on the basis of the initial address provided by ShPimgCintGetDataSect the absolute initial addresses of each section in the shared process image can be determined To identify the address of a variable the variable s offset within the particular section must be added For example the absolute address to access the variable bRemoteDirCtrl AT MB515 0 BYTE results from the sum of the initial address of the shared process image pabShPlmgDataSect the start offset of the marker section ShPlmgLayoutDscrpt m_uiPlmgMarkerOffs fir M as well as the direct address within the marker section which was defined in the PLC program 515 for MB515 0 pbPImgVar 61131 bDirCtrl BYTE pabShPImgDataSect ShPImgLayoutDscrpt m_uiPImgMarkerOffs 515 The following code extract shows the complete definition of all variables in the demo project used for exchanging data with the PLC program Setup shared process image client fRes ShPImgClntSetup amp ShPImgLayoutDscrpt if fRes printf n ERROR Init of shared process image client failed pabShPImgDataSect ShPImgClntGetDataSect Read Sector Table Input Section bButtonGroup AT 1B0 0 ShPImgReadSectTab 0 m_uiPImgDataSectOffs ShPImgLayo
96. s of Section 1 above provided that you also meet all of these conditions a You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change b You must cause any work that you distribute or publish that in whole or in part contains or is derived from the Program or any part thereof to be licensed as a whole at no charge to all third parties under the terms of this License c If the modified program normally reads commands interactively when run you must cause it when started running for such interactive use in the most ordinary way to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty or else saying that you provide a warranty and that users may redistribute the program under these conditions and telling the user how to view a copy of this License Exception if the Program itself is interactive but does not normally print such an announcement your work based on the Program is not required to print an announcement These requirements apply to the modified work as a whole If identifiable sections of that work are not derived from the Program and can be reasonably considered independent and separate works in themselves then this License and its terms do not apply to those sections when you distribute them as separate works But when you distribute the same sections as part of a whole which is a work based on the
97. section 7 8 2 the respective firmware archive can be transferred into directory var tmp of the PLCcore 5208 see Figure 21 F z PLCcore 5208 PlcAdmin 192 168 10 248 WinSCP jol Local Mark Files Commands Session Options Remote Help oa asema E a Cay Dig ce C HardDisk mie C PLCcore 5208 Name Ext Size Type Changed a Parent di t 9 14 2009 1 14 23 AM OB of 524 KiB in O of 1 OB of 524 KiB in O of 1 F2Rename F4 Edit 235 FS Copy 3 F6 Move E F7 Create Directory gt lt F8 Delete y F9 Properties ITL F10 Quit Figure 21 File transfer in FTP client WinSCP Important To transfer the firmware archive via FTP transfer type Binary must be chosen If FTP client WinSCP is used the appropriate transfer mode is to be chosen from the menu bar After downloading the firmware archive it must be checked if the file transferred to the PLCcore 5208 has the exact same size as the original file on the computer compare Figure 21 Any differences in that would indicate a mistaken transfer mode e g Text In that case the transfer must be repeated using transfer type Binary After downloading the self extracting archive the PLC firmware must be installed on the PLCcore 5208 Therefore the following commands are to be entered in the Telnet window It must be considered that the file name for the firmware archive is labeled with a version identifier e g install plccore 5208 0408 0100
98. sector s will be erased starting fron sector 2 address x20000 5312 bytes uritten olill Figure 8 Ethernet configuration of the PLCcore 5208 SYS TEC electronic GmbH 2009 L 1076e_1 Page 28 System Manual PLCcore 5208 After the configuration is finished and according to section 7 2 all conditions for a Linux Autostart must be re established Upon Reset e g pushbutton S403 on the Development Board the module starts using the active configurations Advice After the configuration is finished the serial connection between PC and PLCcore 5208 is no longer necessary 7 4 PLC configuration of the PLCcore 5208 7 4 1 PLC configuration via WEB Frontend After finishing the Ethernet configuration see section 7 3 all further adjustments can take place via the integrated WEB Frontend of the PLCcore 5208 For the application of the PLCcore 5208 using the Development Kit basic configurations may also be set via local control elements see section 7 4 2 To configure the PLCcore 5208 via WEB Frontend it needs a WEB Browser on the PC e g Microsoft Internet Explorer Mozilla Firefox etc To call the configuration page prefix Atip 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 Advice To allow a fluent operation the Run
99. see section 8 2 If executed successfully the function delivers return value TRUE If an error occurs it will deliver return value FALSE Function ShPimgCintSetupWriteSectTable BOOL ShPiImgClntSetupWriteSectTable tShPImgSectDscrpt paShPImgWriteSectTab_p unsigned int uiNumOfWriteDscrptUsed p Function ShPlmgClntSetupWriteSectTable initializes the WriteSectorTable with the values defined by the client The client hereby determines those sections of the PLC process image from which it wants to write data see section 8 1 1 Parameter paShPlmgWriteSectTab p holds elements of structure ShPImgSectDscrpt and must be transferred as start address of a section Parameter uiNumOfWriteDscrptUsed_p indicates how many elements the section has For each entry in the WriteSectorTable the SyncType must be defined This SyncType defines whether the section is always taken over into the local image between two PLC cycles kShPlmgSyncAlways or only on demand kShPlmgSyncOnDemand If taken over on demand the respective section is explicitly marked as updated by calling O SYS TEC electronic GmbH 2009 L 1076e_1 Page 54 System Manual PLCcore 5208 ShPimgCintWriteSectMarkNewData The maximum amount of possible elements for the WriteSectorTable is defined by the constant SHPIMG WRITE SECT TAB ENTRIES and can only be modified if the dynamic library pc5208drv dld is generated again and at the time this requires SO 1101 Driver Development
100. sfers are based on logical point to point connections Peer to Peer between two nodes and allow the receipted exchange of data packages that may be larger than 8 Bytes Those data packages are transferred internally via an appropriate amount of CAN telegrams Both services are applicable for the interface CANO of the PLCcore 5208 SDO communication basically takes place via function blocks of type CAN_SDO_Xxx see User Manual CANopen Extension for IEC 61131 3 Manual no L 1008 Function blocks are also available for PDOs CAN_PDO_Xxx Those should only be used for particular cases in order to also activate non CANopen conform devices For the application of PDO function blocks the CANopen configuration must be known in detail The reason for this is that the PDO function blocks only use 8 Bytes as input output parameter but the assignment of those Bytes to process data is subject to the user Instead of PDO function blocks network variables should mainly be used for PDO based data exchange Network variables represent the easiest way of data exchange with other CANopen nodes Accessing network variables within a PLC program takes place in the same way as accessing internal local variables of the PLC Hence for PLC programmers it is not of importance if e g an input variable is allocated to a local input of the control or if it represents the input of a decentralized extension module The application of network variables is based on the i
101. sh for version 4 08 01 00 This number must be adjusted when commands are entered cd var tmp chmod x install plccore 5208 0408 0100 sh install plccore 5208 0408 0100 sh Advice The command shell of the PLCcore 5208 is able to automatically complete names if the Tab key is used tab completion Hence it should be sufficient to enter the first letters of each file name and the system will complement it automatically For example ins is completed to install plccore 5208 0408 0100 sh if the Tab key is used O SYS TEC electronic GmbH 2009 L 1076e_1 Page 44 System Manual PLCcore 5208 root gt cd var tmp root var tmp gt chmod x install plccore 5208 0408 0100 sh root var tmp gt install plccore 5208 0408 0100 sh PLCcore 5208 Runtime System Installer Checking PLCcore 5288 hardware for update requirements Extract new SPI driver plc 5268 spidev ko to tmp dir plc 5208 spidev ko Extract new 1 0 driver plc pc5208drv ko to tmp dir plc pc52B8dru ko 1 0 driver is already loaded try to unload old driver Try to load new 1 0 driver PLCcore 5208 hardware check ok Running installation please wait etc etc autostart etCc FC usr http http mime types http hoa conf http cgyi bin http cgi bin cfgsetup cfg http cgi bin cfgsetup cgi http html http html systec_logo jpg http htnl index html http html Pc5208Con
102. ss image this process enters a critical section by setting the semaphore first and receiving exclusive access to the shared process image second If the other process requires access to the shared process image at the same time it also must enter a critical section by trying to set the semaphore In this case the operating system identifies that the shared process image is already being used It blocks the second process until the first process leaves the critical section and releases the semaphore Thereby the operating system assures that only one of the two in parallel running processes PLC runtime system and C C application may enter the critical section and receives access to the shared process image To ensure that both processes do not interfere with each other too much they should enter the critical section as less as possible and only as long as necessary Otherwise the PLC cycle time may be extended and runtime variations Jitter may occur O SYS TEC electronic GmbH 2009 L 1076e_1 Page 50 System Manual PLCcore 5208 The client application has available two functions to set the semaphore and to block exclusive access to the shared process image Function ShPImgCIntLockSegment is necessary to enter the critical section and function ShPImgCIntUnlockSegment to leave it The segment between both functions is called protected section because in this segment the client application holds access to the shared process image without compet
103. st ip addr gt Setting the IP address of the TFTP server If TFTPD32 is used the address is shown in field Server Interface on the PC set image image bin Setting the file names for the uClinux Image to be loaded tftp 0x40300000 Downloading uClinux Image from the PC to the PLCcore 5208 flash 0x40000 Saving uClinux Image in the Flash of the PLCcore 5208 set kfl 1 To validate the uClinux Image stored in the Flash of the PLCcore 5208 set auto 1 Autostart of Linux Image after Reset is activated config save Saving the current configurations in the Flash O SYS TEC electronic GmbH 2009 L 1076e_1 Page 46 System Manual PLCcore 5208 E COM1 19200baud Tera Term VT IO x File Edit Setup Control Window Help CUcore 5208 boot ress SPACE key to abort autoboot procedure Autoboot aborted olilo gt set server 192 168 10 52 TP Server 192 168 10 52 olilo gt set inage inage bin Inage inage bin olilo gt tftp 0x40300000 TP dounload ounload address 40300000 sing FEC 0 on HAC 00 CF 52 08 CF 01 oard IP 192 168 10 248 oard netnask 255 255 255 07 0 0 0 0 18 168 10 52 tad ead 3089412 bytes 6035 blocks Inage size 3089412 0x2f2404 bytes olilo gt flash Ox40000j Figure 24 Downloading the uClinux Image to the PLCcore 5208 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 pus
104. stem 1k blocks Used Available Usez Mounted on 1197 1197 O 1004 1979 10 1969 14 var dev mtdblock4 65536 2356 63180 4 home voot gt Figure 20 Display of information about the file system Particular information about the system login and handling the Linux command shell of the PLCcore 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 reguired in exceptional cases e g to input new software that includes new functionality O SYS TEC electronic GmbH 2009 L 1076e 1 Page 43 System Manual PLCcore 5208 7 13 1 Updating the PLC firmware PLC firmware indicates the run time environment of the PLC PLC firmware can only be generated and modified by the producer it is not identical with the PLC user program which is created by the 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 reguires 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 Updating the PLC firmware takes place via a self extracting firmware archive that is transferred onto the PLCcore 5208 via FTP After starting the FTP server on the PLCcore 5208 command enable ftpd sh see
105. tely adapt the I O driver to own requirements without having to modify the PLC runtime system By using the DDK the following resources may be integrated into the I O level Periphery usually GPIO of the MCF5208 FlexBus memory mapped via address databus C Bus All other resources provided by the operating system e g file system and TCP IP Figure 30 provides an overview of the DDK structure and its components The DDK contains amongst others the source code of the Linux kernel driver pc5208drv ko and the Linux user library pc5208drv dla O SYS TEC electronic GmbH 2009 L 1076e_1 Page 61 System Manual PLCcore 5208 Userspace Applikationen PLC Runtime System plccore 5208 2x User C C Application C Source Code File System T AE MAT VO Driver Userspace Library pc5208drv dld Kernelspace VO Driver Kernel Module 5208 spidev ko pc5208drv ko I2C Driver Part of the uClinux Kernel Hardware Reference Schematics TMP101 Figure 30 Overview of the Driver Development Kit for the PLCcore 5208 Scope of delivery components of the DDK The DDK contains the following components 1 Source code for the uClinux kernel driver pc5208drv ko see Figure 30 includes all files necessary to regenerate kernel drivers C and H files Make file etc 2 Source code for the Linux user library pc5208drv dld see Figure 30 contains all files
106. tem This path is used to store all files modifiable and updatable by the user e g configuration files PLC firmware and PLC program files that have been loaded onto the module Directory tmp is appropriately sized to function as temporary buffer for FTP downloads of firmware archives for PLC software updates see section 7 13 1 SYS TEC electronic GmbH 2009 L 1076e_1 Page 42 System Manual PLCcore 5208 Table 15 File system configuration of the PLCcore 5208 Path Size Description home 65536 kByte Flash disk to permanently store files modifiable and updatable by the user e g configuration files PLC firmware PLC program data preservation in case of power breakdown tmp depending on RAM disk suitable as intermediate buffer for FTP downloads var due to tmp but no data preservation in case of power breakdown is a symbolic link to var tmp var 1979 kByte RAM disk which is used by the system to store temporary files no data preservation in case of power breakdown mnt Target for integrating remote directories it is not part of the PLCcore 5208 standard functionality Sizes of file system paths that are configured or still available can be identified by using the Linux command df DiskFree see Figure 20 cx Telnet 192 168 10 248 3 PLCcore 5268_192 168 16 248 login PlcAdmin Password Welcome to For further information check http www uclinux org root gt df Filesy
107. tended to make thoroughly clear what is believed to be a conseguence of the rest of this License 8 If the distribution and or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries so that distribution is permitted only in or among countries not thus excluded In such case this License incorporates the limitation as if written in the body of this License 9 The Free Software Foundation may publish revised and or new versions of the General Public License from time to time Such new versions will be similar in spirit to the present version but may differ in detail to address new problems or concerns Each version is given a distinguishing version number If the Program specifies a version number of this License which applies to it and any later version you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation If the Program does not specify a version number of this License you may choose any version ever published by the Free Software Foundation 10 If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different write to the author to ask for permission For software which is copyrighted by the Free So
108. the usage and handling of the demo project shpimgdemo on the PLCcore 5208 8 1 4 Example for using the shared process image The demo project shpimgdemo described in section 8 1 3 in connection with the PLC program example RunLight both exemplify the data exchange between a PLC program and a user specific C C application Technical background The PLC program generates some variables in the process image as directly addressable variables In a C C application all those variables are usable via the shared process image For the PLC program example RunLight those are the following variables variables for local control via on board I Os bButtonGroup AT 5IB0 0 BYTE iAnalogValue AT 31W8 0 INT bLEDGroup0 AT 0B0 0 BYTE bLEDGroupl AT 50B1 0 BYTES variables for remote control via shared process image uiRemoteSlidbarLen AT 3MW512 0 UINT out length of slidebar bRemoteStatus AT MB514 0 BYTE out Bit0 RemoteControl on off bRemoteDirCtrl AT MB515 0 BYTES in direction left right iRemoteSpeedCtrl AT SMW516 0 INT in speed O SYS TEC electronic GmbH 2009 L 1076e 1 Page 57 System Manual PLCcore 5208 Variables of the PLC program are accessible from a C C application via the shared process image Therefore sections must be generated for the ReadSectorTable and WriteSectorTable on the one hand and on the other hand pointers must be defined for accessing the variables The following p
109. they do not excuse you from the conditions of this License If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations then as a consequence you may not distribute the Program at all For example if a patent license would not permit royalty free redistribution of the Program by all those who receive copies directly or indirectly through you then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program If any portion of this section is held invalid or unenforceable under any particular circumstance the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances O SYS TEC electronic GmbH 2009 L 1076e_1 Page 71 System Manual PLCcore 5208 It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system it is up to the author donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice This section is in
110. tivated e g through temporary power interrupt while at the same time the Run Stop switch is positioned to MRes the module recognizes a reset requirement This is visible through quick flashing of the Run LED green This mode can be stopped without risk Therefore the Run Stop switch must be positioned to Run or Stop Error LED is flashing and it must be waited for 2 seconds The PLCcore 5208 independently stops the reset process after 2 seconds and starts a normal working state with the PLC program which was saved last 6 8 Using CANopen for CAN interfaces The PLCcore 5208 features 1 CAN interface CANO usable as CANopen Manager conform to CiA Draft Standard 302 The configuration of the interface active inactive node number Bitrate Master on off is described in section 7 4 The CAN interface allow for data exchange with other devices via network variables and it is usable from a PLC program via function blocks of type CAN_Xxx More details are included in User Manual CANopen Extension for IEC 61131 3 Manual no L 1008 The CANopen services PDO Process Data Objects and SDO Service Data Objects are two separate mechanisms for data exchange between single field bus devices Process data sent from a node PDO are available as broadcast to interested receivers PDOs are limited to 1 CAN telegram and therewith to 8 Byte user data maximum because PDOs are executed as non receipt broadcast messages On the contrary SDO tran
111. tpd D sh 2 05 tt Figure 14 Starting the FTP server Advice After command enable fipd sh is called once the FTP server is activated automatically for all following reboots To deactivate the FTP server command disable_ftpd sh is necessary WinSCP which is available as open source would be suitable as FTP client for the computer see section 7 1 It consists of only one EXE file needs no installation and may be started immediately After program start dialog WinSCP Login appears see Figure 15 and must be adjusted according to the following configurations File protocol FTP Host name IP address for the PLCcore 5208 as set in section 7 3 User name PicAdmin for predefined user account see section 7 7 Password Pic123 for predefined user account see section 7 7 Session Session Stored sessions Host name Port number en 192 168 10 248 21 Directories Preferences User name Password PleAdmin e c o Protocol File protocol FTP v Insecure Select color Advanced options About Languages Save Close 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 O SYS TEC electronic GmbH 2009 L 1076e 1 Page 38 System Manual PLCcore 5208 x PLCcore 5208 PlcAdmin
112. tside the protected section the shared process image may anytime be manipulated by the PLC runtime system To ensure that the client application does not interfere with the PLC runtime system too much the critical sections should be set as less as possible and only as long as necessary Otherwise the PLC cycle time may be extended and runtime variations Jitter may occur If executed successfully the function delivers return value TRUE If an error occurs it will deliver return value FALSE Function ShPimgCintSetupReadSectTable BOOL ShPImgClntSetupReadSectTable tShPImgSectDscrpt paShPImgReadSectTab_p unsigned int uiNumOfReadDscrptUsed_p Function ShPimgCintSetupReadSectTable initializes the ReadSectorTable with the values defined by the client The client hereby determines those sections of the PLC process image from which it wants to read data see section 8 1 1 Parameter paShPlmgReadSectTab p holds elements of the structure tShP mgSectDscrpt and must be transferred as start address of a section Parameter uiNumOfReadDscrptUsed_p indicates how many elements the section has kShPlmgSyncAlways is provided as SyncType for the ReadSectorTable The maximum amount of possible elements for the ReadSectorTable is defined by the constant SHPIMG_READ_SECT_TAB_ENTRIES and can only be modified if the dynamic library pc5208arv dlid is generated again and at the time this requires SO 1101 Driver Development Kit for the ECUcore 5208
113. ure 31 exemplifies the testing of the hardware connections using iodrvdemo cx Telnet 192 168 10 248 voot gt cd plc root ple gt stopplc CAN driver plc gt insmod 5208 plc gt insmod pc5208drv ko plc gt iodrudemo Test application for SYSTEC ECUcore 5208 board driver Version 1 60 lt c 2006 2009 SYS TEC electronic GmbH www systec electronic com P i t d EBB EB EBB EBERT 1 0 Driver version KernelModule 1 00 UserLib 1 00 Hardware CPU Board 4218 02 lt H BH gt CPU PLD 8 00 C GH gt I0 Board 4220 02 lt GH gt IO config Digital In 5 Digital Out 5 Analog In 1 Analog Out 1 Counter 6 PWM PTO 6 TempSensor 1 Driver Conf ig 8 Please Select B Exit this application 1 Run Basic 1 0 test digital I 0 and user switches 2 Run ADC test 3 DAC menu 4 Run EEPROM test L LCD menu T Run temperature sensor test P Run process image test Select 1 Basic 1 0 Test Start basic 1 0 main loop lt press ESC to abort gt DI 0x00 8x00 0x00 DA BxBB BxBB BxB1 Key HexSw Bx2B DipSw BxB8 R S M Sw RUN DI 0x00 0x00 0x00 D0 0x00 0x00 0x02 Key HexSu 0x20 Dip w 6x 8 DI 6x66 6x86 6x88 D0 0x00 0x00 0x04 Key HexSu Bx20 Dip w 6x 8 R DI 6x66 6x66 6x66 D0 0x00 0x00 0x08 Key HexSu 0x20 DipSu BxB8 R S M Su RUN Figure 31 Testing the hardware connections using iodrvdemo O SYS TEC electronic GmbH 2009 L 1076e 1 Page 63 System Manual PLCcore 520
114. utDscrpt m_uiPImgInputOffs 0 ShPImgReadSectTab 0 m_uiPImgDataSectSize sizeof BYTE ShPImgReadSectTab 0 m_SyncType kShPImgSyncAlways pbPImgVar_61131_bButtonGroup BYTE pabShPImgDataSect ShPImgLayoutDscrpt m_uiPImgInputOffs 0 Output Section bLEDGroup0 AT 0B0 0 bLEDGroupl1 AT QB1 0 ShPImgReadSectTab 1 m_uiPImgDataSectOffs ShPImgLayoutDscrpt m_uiPImgOutputOffs 0 ShPImgReadSectTab 1 m_uiPImgDataSectSize sizeof BYTE sizeof BYTE ShPImgReadSectTab 1 m_SyncType kShPImgSyncAlways pbPImgVar_61131_bLEDGroup0 BYTE pabShPImgDataSect ShPImgLayoutDscrpt m_uiPImgOutputOffs 0 pbPImgVar 61131 bLEDGroup1 BYTE pabShPImgDataSect ShPImgLayoutDscrpt m_uiPImgOutputOffs 1 O SYS TEC electronic GmbH 2009 L 1076e_1 Page 58 System Manual PLCcore 5208 Marker Section uiSlidbarLen AT MW512 0 bStatus AT MB514 0 ShPImgReadSectTab 2 m_uiPImgDataSectOffs ShPImgLayoutDscrpt m_uiPImgMarkerOffs 512 ShPImgReadSectTab 2 m_uiPImgDataSectSize sizeof unsigned short int sizeof BYTE ShPImgReadSectTab 2 m_SyncType kShPImgSyncAlways pbPImgVar 61131 usiSlidbarLen unsigned short int pabShPImgDataSect ShPImgLayoutDscrpt m_uiPImgMarkerOffs 512 pbPImgVar_61131_bStatus BYTE pabShPImgDataSect ShPImgLayoutDscrpt m_uiPImgMarkerOffs 514 fRes ShPImgClntSetupReadSectTabl ShPImgReadSectTab 3 if fRes printf n ERROR
115. w them these terms so they know their rights We protect your rights with two steps 1 copyright the software and 2 offer you this license which gives you legal permission to copy distribute and or modify the software Also for each author s protection and ours we want to make certain that everyone understands that there is no warranty for this free software If the software is modified by someone else and passed on we want its recipients to know that what they have is not the original so that any problems introduced by others will not reflect on the original authors reputations Finally any free program is threatened constantly by software patents We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses in effect making the program proprietary To prevent this we have made it clear that any patent must be licensed for everyone s free use or not licensed at all The precise terms and conditions for copying distribution and modification follow O SYS TEC electronic GmbH 2009 L 1076e_1 Page 69 System Manual PLCcore 5208 GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING DISTRIBUTION AND MODIFICATION 0 This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License The Program below refers to any such program or work and a work based on the Program
116. ystem This allows for an execution of other user specific programs while PLC firmware is running If necessary those other user specific programs may interchange data with the PLC program via the process image More information about this is provided in section 8 The Embedded Linux uClinux applied to the PLCcore 5208 is licensed under GNU General Public License version 2 Appendix C contains the license text All sources of LinuxBSP are included in the software package SO 1096 VMware Image of the uClinux development system for the ECUcore 5208 If you require the LinuxBSP sources independently from the VMware Image of the Linux development system please contact our support support systec electronic com The PLC system and the PLC and C C programs developed by the user are not subject to GNU General Public License SYS TEC electronic GmbH 2009 L 1076e_1 Page 9 System Manual PLCcore 5208 4 Development Kit PLCcore 5208 4 1 Overview The Development Kit PLCcore 5208 is a high capacity complete package at a particularly favorable price Based on a compact PLC it enables the user to perform decentralized network compatible automation projects Moreover it facilitates the user to get to know the advantages of graphical and textual PLC programming according to IEC 61131 3 compared to conventional programming languages Figure 2 Development Kit PLCcore 5208 The Development Kit PLCcore 5208 ensures quick and problem
Download Pdf Manuals
Related Search
Related Contents
Evaluation Guide Topcom 3900 Telephone User Manual Provisions - Portail de l`Etat à Saint Auto Reconciler 2013 - Encore Business Solutions Inc. DeLOCK 3m Toslink Standard PARTS MANUAL 700 SERIES MOWERS Eglo MARATEA 1 Mode d`emploi et d`entretien 。 取扱説明書をご熟読のうえ、正しく安全にお使いください。 ご使用前に Copyright © All rights reserved.
Failed to retrieve file