Home

"user manual"

image

Contents

1. The system failed to read value from the module Please power off the system and plug the module again If the error occurred please replace anew module and contact Advantech for technical support The system failed to write value to the module Please power off the system and plug the module again If the error occurred please replace anew module and contact Advantech for technical support For counter module the system failed to start stop counter Please power off the system and plug the module again If the error occurred please replace anew module and contact Advantech for technical support For counter module the system failed to clear counting value Please power off the system and plug the module again If the error occurred please replace a new module and contact Advantech for technical support For counter module the system failed to clear overflow flag Please power off the system and plug the module again If the error occurred please replace a new module and contact Advantech for technical support For counter module the system failed to clear alarm flag Please power off the system and plug the module again If the error occurred 46 KH please replace a new module and contact Advantech for technical support 47
2. 27 we try to map the variable bValue to channel 0 so we double click on the first row of variable column Status I O Mapping Status i Information Channels Variable Mapping Channel Address Type Unit Description el 5 DO 0 QX0 0 BIT Digital Output pin 0 e DO 1 QXO 1 BIT Digital Output pin 1 DO 2 0 0 2 BIT Digital Output pin 2 r DO 3 QX0 3 BIT Digital Output pin 3 It will open the Input Assistant Dialog where you can choose one of available devices for the current slot The existing entry will be replaced by the new one in an occupied slot Click Plug Device to proceed Input Assistant PR Text search Categories Variables a O Application Application o E PLC_PRG PROGRAM A EG ib toconfig_Globals WR Gi Structured view Show documentation Documentation bValue BOOL VAR 28 Now we can download the application by performing command Login and then performing command Start The channel 0 of I O module will be lit up Status I O Mapping Status Information Channels Variable Mapping Channel Address Type Curren Prepay Unit Descn Aa e DO 0 ker BIT TRUE Digital O DO 1 sec BIT Digital O e DO 2 WQX BIT Digital O Note If the Advantech modules are correctly configured it will show a green circle icon next to the device name in the device tree If it shows a red triangle A see
3. lt Empty gt AR w 0075 active e P P Pa Pa P Pa Pa 21 Click the Scan network button to search for available devices in your local network You will then be prompted for the device selection Choose your target device and click OK to proceed Select Device Select the network path to the controller Wye Gateway 1 Device Name CODESYS Control WinCE Y3 0060 CODESYS Control H CODESYS Control WinCE Y3 0051 WinCE Y3 Device Address In Device editor it will show the connection status Please check that the colored status points are all in green Note Meaning of the colored status point on the gateway and the device Red Connection cannot be established Green Connection established Black Connection not defined 22 D PLC_PRG J Device x Communication Settings Applications Files Log PLC settings PLC shell Users and Groups Access Rights Task deployment Status L Information Scan network Gateway Device mm Gateway Gateway 1 w 0075 active w IP Address Device Name localhost CODESYS Control WinCE V3 Port Device Address 1217 0075 Target ID 1635 0001 Target Type 4096 Target Vendor ADWANTECH Target Version 3 5 5 30 3 5 Runthe Application We can download the application by performing command Login from the menu Online gt Login or press lt Alt F8 gt You will then be prompted for choosing login options Here we choose Login wit
4. User Manual Advantech CODESYS for ADAM 5560 CONTENTS 1 Jet e tel Leg e eier 1 1 About This Manlaleu ss 1 2 Organization of This Manual Installations e E A 2 1 TE EE EIERE 2 2 Add on Package Installation oocccooocnnccrononarononacononanos 2 2 1 First time Installaton 2 2 2 Windating the ET BE e RE Beie SE 3 1 Start CODOS VS ana 3 2 Created Project essen 3 3 VV GILG a Programs 3 4 CONNECT tothe Target Device nase 3 5 Hieft ele te e a an Advantech VO Modules ea 4 1 Insert I O Modules ImntoCODEsays 4 2 Map Variables to I O Modules occcccnccccnccnncnnnnnnnnononanananinanos 4 3 SUDOR gi GE 4 4 Digital Input Module 4 5 Digital Output Modules cccooccccoccncnnncnnonocononccnnnncononnarononinoss 4 6 Analog Input Modules cccooccncnncccnononcnonccncnaconenaconnonanononoss 4 7 Analog Output Modules cccccsescccessececesccceeseccaeececeueeceseuecesecessescessunecessneeees 35 4 8 Relay Output le re 37 4 9 Counter Frequency Modules 38 Diagnosis and FOUDIESMOOUINE nen ae ine 44 5 1 ENTORNO ICO EE 44 5 2 Read o ren 44 5 3 EIG Dee een 45 Chapter 1 Introduction 1 1 About This Manual This document describes the use of the CODESYS programming environment and the Wince runtime system for the Advantech ADAM 5560 series products Advantech provides add on package for CoDeSys which allows developers and end users to connected I O modules
5. i_radius const_PI We need to check the program for syntactic errors and perform command Build Si from the menu Build gt Build or press lt F11 gt Messages Totally 0 error s O warning s O message s typify code Compile complete 0 errors 0 warnings Note No code will be generated in this case Error messages will be displayed in the Messages window which is placed at the lower part of the user interface per default 3 4 Connect to the Target Device In this section we want to discuss how to connect to ADAM 5560 We need to set the active application by using Device editor It displays an icon of programming device the current gateway and the target device with their connection status The Device editor opens by double clicking the device name in the device tree Dene ax 5 Prices E Device x 1 Adantach Sana Project E Device Advantech ADAM 5S60 WinCE v3 dp i Lose Application B PLC_PRG PRG a 28 Task Configuration E Mac ach EN nc re e Comenunication Settings Applications Files Log PLC settings PLC shell Users and Groups Access Rights Task deployment Status gt Information scan network Gateway Device Ki Backplane Backplane lt Empty gt lt Empty gt lt Empty gt lt Empty gt Empty Empty gt lt Empty gt Empty gt Empty gt lt Empty gt Empty gt lt Empty gt Port lt Emply gt
6. Analog input 6 Analog input 7 Information Provide the brief information for current module 4 7 Analog Output Modules In this section we are going to introduce analog output modules The Module editor opens by double clicking the device name in the device tree It consists of four tab pages that is Status Configuration Status I O Mapping Status and Information Status Configuration Provide the channel status page for setting channel ranges Double click on the value column of the particular channel 35 Status Configuration 2 Status I O Mapping Status 1 Information Parameter P TypeOF 40 0 TypeOf 40 1 TypeOf 40 2 Type f 40 3 Type Enumeration of BYTE Enumeration of BYTE Enumeration of BYTE Enumeration of BYTE Value Default Value Unit Description 0 20 m v 0 20 mA 020 mA 020 mA 420 m 0 20 m 0 10 Y 0 20 m Status I O Mapping Show the I O mapping status between local variable to module channel Mapping The mapping status of each variable Note There are two categories of variables Channel values and Error ID Channel values The data type of each channel is in REAL For detailed variable mapping information see chapter 4 2 Error ID This variable holds the status of I O module and its data type is in Word 16 Bits Get module error ID by mapping the last variable in table For detailed error ID information see chapter 5 3 Address The starting physi
7. Next Step 2 You will then be prompted for the installation location By default CoDeSys will install to C Program Files 3S CODESYS but you can specify the location or folder name of your choice Click Next to proceed CODESYS V3 5 SP5 Patch 2 InstallShield Wizard Choose Destination Location Select folder where setup will install files Setup will install CODESYS V3 5 SP5 Patch 2 in the following folder To install to this folder click Next To install to a different folder click Browse and select another folder Destination Folder C Program Files 35 CODESYS In stallS held Step 3 Select all features and then click Next to proceed CODESYS V3 5 SP5 Patch 2 InstallShield Wizard Select Features Select the features setup will install Select the features you want to install and deselect the features you do not want to install MICODESYS v3 4 CODESYS Converter CODESYS V3 Next wi CODESYS Gateway generation object oriented MCODESYS OPC Server 3 programming tool for IEC i 61131 3 PLC programs W CODESYS Gateway V2 3 wi CODESYS Control Win v3 Description 1 35 GB of space required on the C drive 19 11 GB of space available on the C drive linstallShield Step 4 Complete to install CoDeSys and you ll see CoDeSys icon the desktop Click Finish to close the installation wizard CODESYS 3 5 SP5 Patch 2 InstallShield Wizard InstallShield Wizard Complete Th
8. choose one of available devices for the current slot The existing entry will be replaced by the new one in an occupied slot Click Plug Device to proceed and then press Close to close the device dialog Note You can remove the existing device by click Delete in context menu 26 7 Flug Device lt All vendors gt Vendor ADVANTECH ADVANTECH Dr ADAM S017UH ADVANTECH Uf anam sos ADVANTECH j ADAM Sep ADVANTECH Uf anam 5024 ADVANTECH lr ap 5051 ADVANTECH Uf ADAM S052 ADVANTECH Uf ADAM 5053 ADVANTECH Uf abam soss ADVANTECH j adam s056 ADVANTECH 7 Group by category C Display all versions For experts only C Display outdated versions Information Lt Name ADAM 5013 Vendor ADVANTECH Groups Version 3 5 5 30 Model Number Description 3 Channels RTD Input Module Plug selected device into the slot lt Emply gt You can select another target node in the navigator while this window is open 4 2 Map Variables to I O Modules In this section we want to discuss how to map variable of program to Advantech I O modules For more details on creating a new program please refer to chapter 3 Here we declare bValue in declaration part and set true in body part PROGRAM PLC PRG VAR bYalue true bYalue BOOL Open Module Editor by double clicking the device name in the device tree Double click on the variable column and choose mapping variable by clicking the button L J In this example
9. perform configurations and simple testing of the I O This manual supplies information about how to apply CoDeSys to control Advantech ADAM 5560 including software installation writing a new program in CoDeSys to testing ADAM I O modules 1 2 Organization of This Manual This user manual is divided into the following sections Introduction EI Installations Create and run a project O Advantech I O Modules Diagnosis and Troubleshooting Introduction This section gives the user a basic idea of this manual Installations This section provides instructions on how to install CoDeSys and Advantech Add on Package Create and run a project This section gives the new user a walk through in creating a simple program Advantech I O Modules This section introduces the detail configuration and mapping variables of Advantech ADAM I O modules Diagnosis and Troubleshooting This section provides instructions on how to troubleshooting and diagnose operation mistakes or module errors Chapter 2 2 Installations 2 1 CODESYS Installation Step1 Double click and execute the Setup_CODESYSV lt Version gt exe to start the installation assistant and then click Next to continue CODESYS V3 5 SP5 Patch 2 InstallShield Wizard Welcome to the InstallShield Wizard for CODESYS 3 5 SP5 Patch 2 The InstallShield Wizard will install CODESYS 3 5 SP5 Patch 2 on your computer To continue click
10. the chapter 5 for troubleshooting Gm Backplane Backplane ADAM_5056 ADAM 5056 A D apam_soi7 ADAM 5017 lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt PX P PO P PO 4 3 Support List Advantech provides 21 types of ADAM 5000 I O modules for various applications so far Following table is the I O modules support list In the following section we will introduce I O modules according to their types Module Name Specification Reference ADAM 5013 3 ch RTD Input Isolated ADAM 5017 8 ch Al Isolated Analog Input ADAM 5017P 8 ch Al w Independent Input Range Isolated ADAM 5017UH 8 ch Ultra High Speed Al 200KHz Isolated ADAM 5018 7 ch TC Input Isolated ADAM 5018P 7 ch TC Input w Independent Input Range Isolated Analog Output ADAM 5024 4 ch AO Isolated ADAM 5051 16 ch DI Non isolated 29 Digital Input Digital Output Digital 1 O Relay Output Counter Frequency ADAM 5051D ADAM 5051S ADAM 5052 ADAM 5053 ADAM 5056 ADAM 5056D ADAM 5056S ADAM 5056SO ADAM 5057S ADAM 5055S ADAM 5060 ADAM 5069 ADAM 5081 16 ch DI w LED 16 ch Isolated DI w LED 8 ch Isolated DI w LED 32 ch Isolated DI 16 ch DO 16 ch DO w LED 16 ch Isolated DO w LED 16 ch Source Type Isolated DO w LED 32 ch Isolated DO 16 ch Isolated DI O w LED 6 ch Relay Output 8 ch Power Relay Output w LED 4 ch 8 ch High Spee
11. 2 information s 1 9 debug message s lt All components gt a San Severity Time Semp Description Component Bl ac PRG o 0 lt Slot 1 gt Device not found or not matched loDrvADAM y o 0 lt Slot 1 gt Device not found or not matched ToDrvADAM On target machine we can also get error ID from CoDeSys WinCE runtime In the ADAM 5560 environment open runtime by double clicking the runtime icon 143 which is available on the lower right corner of the desktop Get error ID by performing command Errors from the menu Info gt Errors CODESYSGontrolwinGe Commands Info Errors IoDrvADAM lt Slot 1 gt Device not found or not matched iErrorID 32768 iInfoID O IoDrvADAM lt Slot 1 gt Device not found or not matched iErrorID 32768 ilnfolD O 5 3 Error ID Following table is the error ID for I O modules See 0x8000 The module didn t exist or match the setting module Make sure that the setting module matches for the device that is being plugged and check your module is plugged in ADAM 5560 appropriately 45 0x8008 The system failed to open the module Please close all programs and reboot If the system cannot returns to normal condition or the error occurred please contact Advantech for technical support The system was unable to complete configuration Please power off the system and plug the module again If the error occurred please replace anew module and contact Advantech for technical support
12. ODESYS Store 14 Chapter 3 3 Create and run a project 3 1 Start CoDeSys d Start CoDeSys by double clicking the CoDeSys icon mag which is available on the desktop Alternatively you can start the CoDeSys programming system with Start gt Programs gt 3S Software gt CoDeSys gt CODESYS V lt version gt When you start the programming system the first time after first installation on the system you will be asked to choose the default collection of settings and features Choose the Professional and then click Start to proceed Choose Default Environment Settings Before you begin using this software for the first time you need to specify the type of development activity you engage in the most This information is used to apply a predefined collection of settings to the development environment that is designed for your development activity You can choose to use a different collection of settings at any time From the Tools menu choose Options and then choose Features Choose your default environment settings Professional ene Description Recommended for users with advanced requirements All features are available and some user interface aspects show more complexity in order to unveil all possibilities of the system Before creating a project make sure that Advantech ADAM add on package is installed successfully Choose Package Manger from the Tools menu If the Advantech ADAM add on
13. ation part of the editor put the cursor behind VAR and press the Return key A new empty line will be displayed where you enter the declaration of variables Here we write a simple program to calculate the area of triangle and circle so declare i_base i_height i_radius which are of type INTEGER d_area of type REAL PROGRAM PLC_PRG VAR L base INT i height INT i radius INT END VAR VAR CONSTANT const PI REAL 3 14 END VAR VAR d area REAL END VAR In the body part of the PLC_PRG editor put the cursor in line 1 and enter the following lines 20 i i l l l i I l l l Ki Library Manager 5 i radius INT 5 PLC_PRG PRG i 6 END VAR 4 Task Configuration I Jl VAR CONSTANT I Bi i l Te i 8 const_PI REAL 3 14 PLC_PRG I 9 6 Gr i END VAR ackplane Backplane i 10 VAR I L lt Empty gt lt Empty gt 11 d_area REAL L lt Empty gt lt Empty gt 2 END VAR K lt Empty gt lt Empty gt WE L lt Empty gt lt Empty gt KEE L lt Empty gt lt Empty gt 1 f Calculate triangle area E _ lt Empty gt lt Empty gt 2 i base 5 Body pa rt l K lt Empty gt lt Empty gt 3 i height 7 i 4 darea i_base i_height 0 5 e e gt l E i Device window 1 Calculate circle area 6 i_radius 6 i i dd Calculate triangle area i_base 5 i height 7 d area i_base j height 0 5 Calculate circle area i_radius 6 d area i radius
14. cal address of the variables for this I O group The board shown below has 4 analog outputs This will require 4 DWORD addresses Note Meaning of address expression Directly Mapped variable Q Physical Output D Double word 32 Bits S N The starting address Type The data type of each variable Description The description of each variable 36 Status Configuration Status UO Mapping Status i Information Channels Variable Mapping Channel Address Type Unit Description a A0 0 0DO REAL Analog output 0 AO 1 ODI REAL Analog output 1 e AO 2 0D2 REAL Analog output 2 AO 3 003 REAL Analog output 3 45 Errar IWS Errar ID curent Status The reserved page Information Provide the brief information for current module 4 8 Relay Output Modules In this section we are going to introduce relay output modules The Module editor opens by double clicking the device name in the device tree It consists of three tab pages that is Status I O Mapping Status and Information Status I O Mapping Show the I O mapping status between local variable to module channel It consists of seven columns Mapping The mapping status of each variable Note There are two categories of variables Channel values and Error ID Channel values The data type of each channel is in single bit Set the value to true for switching on the channel false for switching off For detailed variable mapping i
15. components will be installed Customized setup Full control over which package components are installed Recommended For advanced users 11 Step 3 Select all versions and then click next Installation Target Yersions Advantech ADAM CODESYS ADD ON 1 0 0 0 One or more components in this package will modify existing versions Please select all the versions which should be upgraded by this package Y CODESYS 3 5 SP5 Patch 2 Composer Dedicated Y co DESYS 3 5 SP5 Patch 2 Step 4 After the files have installed you will see the completion screen Click Finish to close the installation wizard 12 Installation Setup Completed Advantech ADAM CODESYS ADD ON 1 0 0 0 The package has been successfully installed Click Finish to exit the wizard or Next to see the summary 2 2 2 Updating the Package It s highly recommended that you uninstall the previous version package before updating and installing new add on package so you can access to Control Panel and uninstall the previous version package manually Alternatively we can start CoDeSys and perform command Package Manager from the menu Tools gt Package Manager Select the package you want to uninstall and then click Uninstall Click Close to close the package manager After uninstalling the old package successfully please refer to First time Installation 13 Package Manager C
16. d Counter Frequency 4 4 Digital Input Modules In this section we are going to introduce digital input modules Non isolated Isolated Isolated Isolated Non isolated Non isolated Isolated Isolated Isolated Isolated Isolated Isolated Isolated The Module editor opens by double clicking the device name in the device tree It consists of three tab pages that is Status I O Mapping Status and Information Status I O Mapping Show the I O mapping status between variable to module channel It consists of seven columns Mapping The mapping status of each variable Note There are two categories of variables Channel values and Error ID Channel values The data type of each channel is in single bit If the value is true it means that the channel is on false for off For detailed variable mapping information see chapter 4 2 30 Error ID This variable holds the status of I O module and its data type is in Word 16 Bits Get module error ID by mapping the last variable in table For detailed error ID information see chapter 5 3 Address The starting physical address of the variables for this I O group The board shown below has 16 digital inputs This will require either 16 Boolean addresses or 2 Byte addresses Note Meaning of address expression Directly Mapped variable Physical Input X Single bit S N1 S N2 The starting address The first number means the starting b
17. d Start If it shows a red triangle A it means that I O module encountered several errors while running S Backplane Backplane abdam_sose ADAM 5056 A Ir abam_soi7 ADAM 5017 lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt an pn PO PO 5 2 LogInformation We can get log information from Advantech CoDeSys or target machine i e ADAM 5560 In Advantech CoDeSys development environment double click the device name in the device tree to open Device editor Select the Log dialog and it will display the log of the Advantech I O module A log entry line contains the following information Severity There are four categories warnings errors exceptions information The display of the entries of each category can be switched on or off by using the corresponding button from the bar above the listing Each button always contains the current number of loggings in the respective category Time Stamp Date and Time Description Description of the event for example Device not found or not matched 44 Component ID and name of the component Communication Settings Applications Files Log PLC settings PLC shell Users and Groups Access Rights J Advantech Sanne Project JE Device Advantech ADAM 5560 WinCE v3 NI PLC_PRG PRG 0 warningts O 2 error s E 0 exceptionis 13
18. dress Type The data type of each variable Description The description of each variable 41 status Configuration ES Status 1 0 Mapping status i Information Variable Mapping Channel Address Type Umit Desmppon Ae mn 1D0 DWORD CounterO 4 CTR 2 1D1 DWORD Counter 2 Ki CTR 4 1D2 DWORD Counter 4 ty CTR 6 103 DWORD Counter 6 gt CTR 0 Co 16 0 BIT Counter 0 Counting Status Ki CTR 2 Co IX16 1 BIT Counter 2 Counting Status iy CTR 4 Co 116 2 BIT Counter 4 Counting Status ip CTR 6 Co IX16 3 BIT Counter 6 Counting Status tp CTR 0 Ov 1X16 4 BIT Counter 0 Overflow Status CTR 2 Ov 1X16 5 BIT Counter 2 Overflow Status Ki CTR 4 Ov IX16 6 BIT Counter 4 Overflow Status z CTR 6 Ov IX16 7 BIT Counter 6 Overflow Status ALM O Lat IX17 0 BIT Counter 0 Latch Status ty ALM 1 Lat Ix17 1 BIT Counter 1 Latch Status Ki ALM 2 Lat IX17 2 BIT Counter 2 Latch Status ty ALM 3 Lat Ix17 3 BIT Counter 3 Latch Status e DO 0 0 0 0 BIT Digital Output pin O DO 1 QKO BIT Digital Output pin 1 e DO 2 00 2 BIT Digital Output pin 2 DO 3 0 0 3 BIT Digital Output pin 3 42 5 Diagnosis and Troubleshooting 5 1 Error Notification In chapter 4 we introduce how to write a program to control Advantech I O modules Ifthe Advantech modules are correctly configured it will show a green circle icon next to the device name in the device tree after performing command Login an
19. e InstallShield Wizard has successfully installed CODESYS 3 5 SP5 Patch 2 Click Finish to exit the wizard 2 2 Add on Package Installation Now that you have CoDeSys on your system you ll want to do a few steps to install add on package on your environment 2 2 1 First time Installation Step 1 Install the latest version of the add on package by double clicking the executable Advantech ADAM CODESYS ADD ON package Note If you get an error stating you must have administrative rights in order to install or uninstall a package on Window 7 you should turn UAC off 10 a Open User Account Control Settings by clicking the Start button o and then clicking Control Panel In the search box type uac and then click Change User Account Control settings b Move the slider to the Never notify position and then click OK wit you re prompted for an administrator password or confirmation type the password or provide confirmation You will need to restart your computer for UAC to be turned off For more information about notification options please refer to Microsoft website Step 2 When you are asked to choose setup type choose the Typical setup and then click Next Installation Choose Setup Type Advantech ADAM CODESYS ADD ON 1 0 0 0 Please select the type of setup you would like to perform Complete setup All package components will be installed The most commonly used package
20. equency of assigned time window and the range is from 0 1Hz to 1MHz We can assigned Frequency Acquisition Time in ms to get counter number within the time range Y Digital Filter UINT 1 65000 1 1 us Digital Filter P Freg Acq Time UINT 1 1000 1 1 ms Freg Acq Time For DO Alarm channels you can change the setting by double clicking and selecting an item from the pull down menus Mode Select DO or Local Alarm Latch Alarm Type Select High or Low i e high alarm or low alarm Alarm Limit Set alarm limit value Sending High alarm High alarm limit Initial value Sending Low alarm AS Low alarm limit zum Alarm Mapping Select counter channel number DOJALMO Channel config of DOJALM O Mode Enumeration of BYTE Local Alarm DO P Alarm Type Enumeration of BYTE High Low Alarm Mapping Enumeration of BYTE Channel 2 Channel 0 Alarm Limit DWORD 100 0 e DOJALM 1 Channel config of DOJALM 1 P Mode Enumeration of BYTE Local Alarm DO Alarm Type Enumeration of BYTE Low Low Y Alarm Mapping Enumeration of BYTE Channel 0 Channel 0 Alarm Limit DWORD Y 0 Status I O Mapping Show the I O mapping status between local variable to module channel Mapping The mapping status of each variable For detailed variable mapping information see chapter 4 2 Note There are three categories of variables Status variables Setting variables and Error ID Status variables These variables are read only a
21. h download for the first time and click OK to proceed Note Meaning of login options Login with online change Only the modified objects will be loaded Login with download The complete application will be loaded and initialized completely Login without any change The latest modifications will not be loaded CODESYS Application changed since last download What do you want to do Login with online change Login without any change 23 We run the program by performing command Start E from the menu Debug gt Start or press lt F5 gt The online view of PLC_PRG will be opened In the upper part a table shows the watch variables in application In the lower part you see the code lines as entered in offline mode supplemented by the little inline monitoring windows behind each variable showing the actual value Device Applicabion PLC_PRAG Expression Type Value A base INT 5 Lett INT 7 irete INT 6 cont PI REAL 3 14 d sen REAL 113 04 E 1 d Calculate triangle area i base 3 7 5 i eigh DV re 7 d areal 28 Elie i_basef 75 i heigh enz f Calculate circle area i radius E 6 d area 19 F i radiu i radiusf const BIG 14 F HETEN Stop the program by performing command Stop from the menu Debug gt Stop or press lt Shift F8 gt If you want to change into the offline mode and disconnect the programming system from the target device perf
22. here are two categories of variables Channel values and Error ID Channel values The data type of each channel is in single bit Set the value to true for switching on the channel false for switching off For detailed variable mapping information see chapter 4 2 Error ID This variable holds the status of I O module and its data type is in Word 16 Bits Get module error ID by mapping the last variable in table For detailed error ID information see chapter 5 3 32 Address The starting physical address of the variables for this I O group The board shown below has 16 digital inputs This will require either 16 Boolean addresses or 2 Byte addresses Note Meaning of address expression Directly Mapped variable Q Physical Output X Single bit S N1 N2 The starting address The first number means the starting byte the second number means the starting bit Type The data type of each variable Description The description of each variable Status The reserved page Information Provide the brief information to current module pa A gt amp Status I O Mapping Status gt Information Channels Variable Mapping Channel Address Type Unit Desorption e DO 0 Q 0 0 BIT Digital Output pin 0 o DO 1 Q 0 1 BIT Digital Output pin 1 DO 2 Q 0 2 BIT Digital Output pin 2 P DO 3 Q 0 3 BIT Digital Output pin 3 Pe DO 4 Q X0 4 BIT Digital Output pin 4 DO 5 Q 0 5 BIT Digital Output p
23. in 5 DO 6 OX0 6 BIT Digital Output pin 6 DO 7 Q 0 7 BIT Digital Output pin 7 DO 8 QX1 0 BIT Digital Output pin 8 DO 9 OX1 1 BIT Digital Output pin 9 a DO 10 Q 1 2 BIT Digital Output pin 10 DO 11 Q 1 3 BIT Digital Output pin 11 DO 12 2 QX1 4 BIT Digital Output pin 12 Fo DO 13 QX1 5 BIT Digital Output pin 13 DO 14 QX1 6 BIT Digital Output pin 14 e DO 15 0 1 7 BIT Digital Output pin 15 9 ErrorTD WO WORL Error ID currently happened in the IO device 33 4 6 Analog Input Modules In this section we are going to introduce analog input modules The Module editor opens by double clicking the device name in the device tree It consists of four tab pages that is Status Configuration Status I O Mapping Status and Information Status Configuration Provide the channel status page for setting channel ranges Double click on the value column of the particular channel Note For ADAM 5013 ADAM 5017 and ADAM 5018 all channels are restricted to the same channel range and base on the first channel ch 0 Status Configuration Status UO Mapping Status 1 Information Parameter Type Value Default Value Unit Description TypeOf AI O Enumeration of BYTE 420 mA Type f Al 1 Enumeration of BYTE 420 m Y TypeOf AI 2 Enumeration of BYTE 4 20 m TypeOf Al 3 Enumeration of BYTE 4 20 m P TypeOf ALA Enumeration of BYTE 020 m P TypeOF AI 5 Enumeration of BYTE 4 20 m TypeOf AI 6 Enumera
24. low A cyclic task which calls PLC_PRG A reference to the newest version of the Standard library currently installed Device ladvantech ADAM 5560 WinCE 3 ADVANTECH PLC_PRG in Structured Text ST Step 3 The project name now will appear in the title bar of the CoDeSys user interface and the Devices window Devices H 5 Advantech_Sample_Project TE Device Advantech ADAM 5560 WinCE v3 El Plc Logic ie Application Cl Library Manager E PLC_PRG PRG 4 Task Configuration MainTask 8 PLC_PRG 2 Backplane Backplane i lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt lt Empty gt 3 3 Write a Program In the Devices window double chick PLC_PRG PRG and language editor window will open The editor consists of a declaration part upper and a body part lower separated by a 19 screen divider The declaration part shows line numbers at the left border and the embracing keywords VAR and END_VAR for the variables declaration Devices Ii E PLC_PRG x Advantech_Sample_Project 1 PROGRAM PLC_PRG ec ar at on p a rt D Device Advantech ADAM 5560 WinCE v3 gt 2l var Jl Ple Logic 3 Application 3 i_base INT 4 1 height INT 7 d area i radius i radius const PI In the declar
25. nd hold the module status Name Data type Information Counting Number The total counting number Counting Status true for starting counting false for stop Overflow Status true for overflow Latch Status true for reach alarm latch Setting variables These variables are read write You can change the setting by changing the column value Data type Information DO value Single Bit Set the value to true for switching on the channel false for switching off 40 Clear to Startup Single Bit Set true for set current counting number to startup counting number Clear Overflow Single Bit Set true for clear overflow Clear Alarm Latch Single Bit Set true for clear the alarm latch For detailed variable mapping information see chapter 4 2 Error ID This variable holds the status of I O module and its data type is in Word 16 Bits Get module error ID by mapping the last variable in table For detailed error ID information see chapter 5 3 Address The starting physical address of the variables for this I O group The board shown below has 4 counter inputs and 4 digital outputs This will require 4 DWORD addresses for counter channel values and 4 Boolean addresses for digital outputs Note Meaning of address expression Directly Mapped variable Physical Input Q Physical Output X Single bit D Double word 32 Bits S N The starting ad
26. nformation see chapter 4 2 Error ID This variable holds the status of I O module and its data type is in Word 16 Bits Get module error ID by mapping the last variable in table For detailed error ID information see chapter 5 3 Address The starting physical address of the variables for this I O group The board shown below has 6 relay outputs This will require either 6 Boolean addresses or 1 Byte address 37 Type The data type of each variable Note Meaning of address expression Directly Mapped variable Q Physical Output X Single bit S N1 N2 The starting address The first number means the starting byte the second number means the starting bit Description The description of each variable Status The reserved page Information Provide the brief information to current module Status I O Mapping Status 1 Information Channels Variable E F F A A A Y 4 9 Mapping Channel DO 0 DO 1 DO 2 DO 3 DO 4 DO 5 Counter Frequency Modules Address oQXD 0 SOX 1 Ox0 2 OX0 3 oOX0 4 SCDE lWw Type BIT BIT BIT BIT BIT BIT Unut Description Digital Output pin O Digital Output pin 1 Digital Output pin 2 Digital Output pin 3 Digital Output pin 4 Digital Output pin 5 In this section we are going to introduce counter frequency modules The Module editor opens by double clicking the device name in the device tree It consists of fou
27. orm command Logout from the menu Online gt Logout or press lt Ctri F8 gt 24 Chapter 4 Advantech I O Modules 4 1 Insert I O Modules into CODESYS We can add and configure Advantech I O modules as objects in the device tree Note ADAM 5560 does NOT support hot plugging for I O modules An empty slot is identified by icon K and entry lt Empty gt lt Empty gt An already occupied slot shows icon Mand the device name Choose one of available slot and click Plug Device in context menu 0 Advantech_JO Advantech_IO RI Device Advantech ADAM 5560 FEN Device Advantech ADAM 5560 WinCE v3 ll Ple Logic S Pic Logic O Application ie Application CA Library Manager Mi Library Manager E PLC_PRG PRG E PLC_PRG PRG E Task Configuration E Task Configuration MainTask e MainTask dl PLC_PRG d PLC_PRG Backplane Backplane m Backplane Backplane K lt Empty gt lt Empty gt gt Uf ADAM_5051 ADAM 5051 K lt Empty gt lt Empty gt Plug Device E lt Empty gt lt Empty gt K lt Empty gt lt Empty gt K lt Empty gt lt Empty gt KE lt Empty gt lt Empty gt K lt Empty gt lt Empty gt K lt Empty gt lt Empty gt E lt Empty gt lt Empty gt K lt Empty gt lt Empty gt E lt Empty gt lt Empty gt K lt Empty gt lt Empty gt K lt Empty gt lt Empty gt It will open the Plug Device dialog where you can
28. package didn t show in manager please refer to Chapter 2 and update your package 16 ee Name Version Installation date Updateinfo License info A Advantech ADAM CODESSASD ON 1000 2014125 License no nt avait CODESYS Package Designer 3 5 5 0 2014 11 26 No license required a E Display versions 7 Search updates in background 3 2 Create a Project Step 1 To create a new project choose command New project from the File menu In the New Project dialog select Standard project in the Templates field and enter a Name and a Location path for the project file Press OK to confirm 17 E New Project Categories Templates 53 Libraries Cem Y 2 Projects o Empty project MEE Standard project project w 4 project containing one device one application and an empty implementation for PLC_PRG Name Advantech_Sample_Project Location C Documents and Settings USER My Documents Step 2 You will then be prompted for choosing devices Choose device Advantech ADAM 5560 WinCE V3 ADVANTECH and programming language Structured Text ST depend on developer for PLC_PRG Press OK to open the new project 18 Standard Project You are about to create a new standard project This wizard will create the following objects within this project One programmable device as specified below A program PLC_PRG in the language specified be
29. r tab pages that is Status Configuration Status I O Mapping Status and Information Status Configuration Provide the channel status page for setting channel ranges Double click on the value column of the particular channel The module contains counter channels and DO Alarm channels as shown image below 38 For counter channels we offer five types of counting mode Bi direction Up Down A B Phase for different application purposes The counter will count up or down according to your applications This counting function helps us obtain the most accurate data Before starting counting we have to set Startup Value i e Initial value and the default is O The data type of startup value is in DWORD Parameter Type Value Default Value Unit Description CTRO Channel config of CTR O Y Mode Enumeration of BYTE Bi directory vw Bi directory Startup Value DWORD 16R0 16 FFFFFFFF Erdrectary d CIR2 Channel config of CTR 2 P Mode Enumeration of BYTE Bi directory Y Startup Value DWORD 16 0 16 FFFFFFFF 0 GQ CIR4 Channel config of CTR 4 Mode Enumeration of BYTE Bi directory Bi directory Startup Value DWORD 16 0 16 FFFFFFFF 0 0 CTR Channel config of CTR 6 Mode Enumeration of BYTE Bi directory Bi directory 8 Startup Value DWORD 16 0 16 FFFFFFFF 0 O We can also set Digital Filter in us for high or low level minimum signal width to reduce noise spike Every counter channel can measure the fr
30. tion of BYTE zum 4 20 m P TypeOf AL Enumeration of BYTE 4 20 m 420 m Status I O Mapping Show the I O mapping status between variable to module channel Mapping The mapping status of each variable Note There are two categories of variables Channel values and Error ID Channel values The data type of each channel is in REAL For detailed variable mapping information see chapter 4 2 Error ID This variable holds the status of I O module and its data type is in Word 16 Bits Get module error ID by mapping the last variable in table For detailed error ID information see chapter 5 3 34 Address The starting physical address of the variables for this I O group The board shown below has 8 analog inputs This will require 8 DWORD addresses Note Meaning of address expression Directly Mapped varia Physical Input D Double word 32 Bits ble S N The starting address Type The data type of each variable Description The description of each variable Status Configuration Status I O Mapping Status Channels Variable Mapping Channel Z Al 0 Al 1 Ay Al 2 m Al 3 4p Al 4 1 ALS Z Al 6 1p Al 7 Status The reserved page L Information Address ell Zell L 103 104 IDS 106 SID SIDS WE Type REAL REAL REAL REAL REAL REAL REAL REAL Unit Description Analog input 0 Analog input 1 Analog input 2 Analog input 3 Analog input 4 Analog input 5
31. yte the second number means the starting bit Type The data type of each variable Description The description of each variable Status The reserved page Information Provide the brief information to current module 31 Status I O Mapping Status i Information Channels Variable Mapping Chamel Address Type Unit Description 8 DI 0 1X0 0 BIT Digital Input pin O 4p DI 1 1X0 1 BIT Digital Input pin 1 m DI 2 1X0 2 BIT Digital Input pin 2 p DI 3 1X0 3 BIT Digital Input pin 3 ap DI 4 180 4 BIT Digital Input pin 4 gt DI 5 IX0 5 BIT Digital Input pin 5 m DI 6 1 0 6 BIT Digital Input pin 6 Ay DI 7 1 0 7 BIT Digital Input pin 7 4p DI 8 IX1 0 BIT Digital Input pin 8 DI 9 IX1 1 BIT Digital Input pin 9 1 DI 10 IX1 2 BIT Digital Input pin 10 p DI 11 IX1 3 BIT Digital Input pin 11 i DI 12 SGINL A BIT Digital Inpuk pin 12 h DI 13 IX1 5 BIT Digital Input pin 13 i DI 14 IX1 6 BIT Digital Input pin 14 1 DI 15 1X1 7 BIT Digital Input pin 15 K Errorli TW WORI Error ID currently ha 4 5 Digital Output Modules In this section we are going to introduce digital output modules The Module editor opens by double clicking the device name in the device tree It consists of three tab pages that is Status I O Mapping Status and Information Status I O Mapping Show the I O mapping status between variable to module channel It consists of seven columns Mapping The mapping status of each variable Note T

Download Pdf Manuals

image

Related Search

Related Contents

  Pougne Ton Chinois v0.8 – Manuel    Service Manual - Genie Industries  sabrina カタログ (PDF 7.0MB)  ロックンプレーキ 取扱説明書  User Manual: Ready-To-Use Recombinant Adenovirus    Shuttle X50V2(B)  lire l`article - Bazar familial de Compton  

Copyright © All rights reserved.
Failed to retrieve file