NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
BL2500 TD-0002-4 RS232 RS485 RJ-45 RCM3200 RS232/RS485 BL2500C 3-0231H 041215-H - Datasheet Archive
BL2500 EMBEDDED PLC USER'S MANUAL COPYRIGHT EMBEDDED PLC BL2500 User's Manual Part Number: TD-0002-4 © 2006 OEM Technology
Z-WORLD SINGLE BOARD COMPUTER BL2500 BL2500 EMBEDDED PLC USER'S MANUAL COPYRIGHT EMBEDDED PLC BL2500 BL2500 User's Manual Part Number: TD-0002-4 TD-0002-4 © 2006 OEM Technology Solutions Pty Ltd. All rights reserved worldwide. This document is the property of OEM Technology Solutions Pty Ltd and may not be copied, used or disclosed in whole or in part except with the prior written permission of OEM Technology Solutions Pty Ltd or if it has been furnished under contract with another party, as specified in that contract. The copyright and the foregoing restriction on copying, use and disclosure extend to all media in which this information may be embodied. No liability is accepted for errors or omissions in this document. The information contained within this document is subject to change without notice. TRADEMARKS EMBEDDED PLC is a registered trademark of OEM Technology Solutions Pty Ltd. Microsoft, Windows, Windows XP, Windows 2000 and Windows NT are registered trademarks of Microsoft Corporation in the United States and/or other countries. ISaGRAF is a registered trademark of ICS Triplex ISaGRAF Inc. Rabbit and Rabbit 3000 are registered trademarks of Rabbit Semiconductor. RabbitNet is a trademark of Z-World Inc. Dynamic C is a registered trademark of Z-World Inc. Indusoft is a registered trademark of Indusoft Ltd. All other brand or product names are trademarks or registered trademarks of their respective holders. NOTICE TO USERS When a system failure may cause serious consequences, protecting life and property against such consequences with a back-up system or safety device is essential. The buyer agrees that protection against consequences resulting in system failure is the buyer's responsibility. This device is not approved for life support or medical systems. OEM Technology Solutions Unit 13, 82 Reserve Road Artarmon NSW 2064 AUSTRALIA Telephone: +61 (2) 9966-9424 Fax: +61 (2) 9966-9429 www.oem.net.au EMBEDDED PLC BL2500 BL2500 User's Manual TABLE OF CONTENTS 1. 2. 3. 4. 5. INTRODUCTION.1 1.1 WHAT IS EMBEDDED PLC?.1 1.2 BL2500 BL2500 OVERVIEW .1 1.3 ABOUT THIS MANUAL .2 1.4 EMBEDDED PLC APPLICATION KIT .3 1.5 TEXT CONVENTIONS .3 1.6 WINDOWS CONVENTIONS .3 1.7 REFERENCE DOCUMENTS.4 1.8 ABBREVIATIONS AND TERMINOLOGY.4 GETTING STARTED .7 2.1 INTRODUCTION .7 2.2 SOFTWARE INSTALLATION .7 2.2.1 Installing ISaGRAF Workbench V3.50 .8 2.2.2 Installing EMBEDDED PLC Board Support Package (BSP) for BL2500 BL2500 .8 2.3 LICENSING THE ISAGRAF WORKBENCH.8 2.3.1 Adding the software license.9 2.3.2 Adding a hardware license (optional) .9 2.4 BL2500 BL2500 CONNECTIONS .10 2.4.1 Connect a Power Supply .10 2.4.2 Connect an Ethernet Cable .10 2.4.3 Connect an RS232 RS232 Cable (optional).12 2.5 RUNNING A SAMPLE APPLICATION .12 2.6 WHERE DO I GO FROM HERE? .14 RUNNING SAMPLE APPLICATIONS.15 3.1 RUNNING APPLICATIONS IN SIMULATION MODE .15 3.2 RUNNING APPLICATIONS THAT USE INTERNAL VARIABLES ONLY .17 3.3 RUNNING APPLICATIONS THAT USE BL2500 BL2500 INPUTS AND OUTPUTS .18 3.3.1 Creating I/O connectors.18 3.3.2 Downloading and running the ISaGRAF application.19 3.4 CREATING A NEW PLC APPLICATION.20 3.4.1 Using Function Blocks Diagrams .20 3.4.2 Using Quick Ladder Diagrams .25 3.4.3 Using Structured Text.27 3.4.4 Using Instruction List .29 3.4.5 Using Sequential Function Chart.30 3.4.6 Using Flow Chart .33 HARDWARE REFERENCE.35 4.1 DIGITAL INPUTS.35 4.2 DIGITAL OUTPUTS.36 4.3 ANALOG INPUT .36 4.4 ANALOG OUTPUT .37 4.5 COMMUNICATION INTERFACES.38 4.5.1 Serial Ports .38 4.5.2 Ethernet Port .39 4.6 LED INDICATORS.40 SOFTWARE REFERENCE .41 OEM Technology Solutions Page i EMBEDDED PLC BL2500 BL2500 User's Manual 5.1 6. 7. 8. 9. MORE ABOUT ISAGRAF . 41 5.1.1 Project Manager . 41 5.1.2 Program Manager. 41 5.1.3 Variable Definition. 41 5.1.4 Functional Module Programming. 41 5.1.5 IEC 61131-3 Language Editors . 42 5.1.6 Flow Chart Editor . 42 5.1.7 Document Generator . 42 5.1.8 Simulation . 42 5.2 ISAGRAF SOFTWARE REFERENCE. 43 5.2.1 I/O Boards. 43 5.2.2 ISaGRAF C Functions . 45 5.2.3 ISaGRAF C Function Blocks . 46 LOADING OR UPGRADING THE FIRMWARE KERNEL . 48 6.1 INTRODUCTION. 48 6.1.1 Installing EMBEDDED PLC Utility . 48 6.1.2 Connecting to the BL2500 BL2500 . 48 6.1.3 Loading and licensing the Firmware Kernel . 49 6.1.4 Configuring the Firmware Kernel . 50 6.2 EMBEDDED PLC UTILITY SOFTWARE REFERENCE . 51 6.2.1 Menu Commands . 51 6.2.2 Loading Shortcuts. 53 FAQ AND TROUBLESHOOTING . 54 7.1 KNOWN ISSUES . 54 7.1.1 BL2500 BL2500 with Rabbit 3000 Microprocessor Revision 0 (IL1T) . 54 7.1.2 BL2500 BL2500 with Large Sector Flash . 54 7.1.3 ISaGRAF Floating Point Arithmetic . 54 7.1.4 Reading/writing 32-bit integer/real analog variables via Modbus . 54 7.2 FAQ . 55 7.3 TROUBLESHOOTING . 57 7.3.1 Common Errors . 57 7.3.2 Before Contacting Technical Support. 58 SPECIFICATIONS . 60 8.1 ELECTRICAL AND MECHANICAL SPECIFICATIONS . 60 ABOUT INDUSOFT . 62 9.1 USING INDUSOFT WEB STUDIO WITH EMBEDDED PLC. 62 OEM Technology Solutions Page ii EMBEDDED PLC BL2500 BL2500 User's Manual LIST OF TABLES Table 1: Main Features of the EMBEDDED PLC Firmware Kernel V1.04 on the BL2500 BL2500 .2 Table 2: EMBEDDED PLC BL2500 BL2500 Serial Port Configuration .38 Table 3: BL2500 BL2500 Electrical, Mechanical and Environmental Specifications.61 LIST OF FIGURES Figure 1: Power Supply Connection.10 Figure 2: Ethernet connections .11 Figure 3: PC BL2500 BL2500 RS232 RS232 connection.12 Figure 4: BL2500 BL2500 Pinouts.35 Figure 5: BL2500 BL2500 Digital Inputs (Pull-up factory default).36 Figure 6: BL2500 BL2500 Digital Outputs .36 Figure 7: Schematic Diagram of the A/D Converter.37 Figure 8: Schematic Diagram of D/A Converters .37 Figure 9: BL2500 BL2500 Multidrop Network.39 Figure 10: RS485 RS485 Termination and Bias Resistors .39 Figure 11: RJ-45 RJ-45 Ethernet Port Pinout .39 Figure 12: Programming Cable Connection .49 Figure 13: BL2500 BL2500 Dimensions .60 OEM Technology Solutions Page iii EMBEDDED PLC BL2500 BL2500 User's Manual This page is intentionally left blank OEM Technology Solutions Page iv EMBEDDED PLC BL2500 BL2500 User's Manual Introduction 1. INTRODUCTION 1.1 WHAT IS EMBEDDED PLC? The EMBEDDED PLC system turns a Rabbit-based controller, such as the Coyote BL2500 BL2500 Single-BoardComputer (SBC), into a high performance and yet inexpensive Programmable Logic Controller (PLC). The Target PLC can be programmed using the EMBEDDED PLC ISaGRAF® Workbench in any of the standardized automation control programming languages IEC 61131-3: · Sequential Function Chart (SFC) · Function Block Diagram (FBD) · Ladder Diagram (LD) · Structured Text (ST) · Instruction List (IL) PLC ISaGRAF Workbench becomes an alternative to Dynamic C to program Rabbit-based controllers. EMBEDDED The EMBEDDED PLC system consists of two parts: · The Target PLC: A SBC BL2500 BL2500 powered with the RabbitCore® module RCM3200 RCM3200 (Rabbit 3000 microprocessor, 44.2 MHz clock speed, 512K Flash, 256K Battery-backed SRAM, 512K Fast SRAM and 10/100BaseT) and loaded with the EMBEDDED PLC Firmware Kernel (or refer to as the Kernel). The Firmware Kernel is distributed as a .bin file which is loaded to the Target through the EMBEDDED PLC Utility. The Kernel runs the PLC application in a loop (reading inputs evaluate the logic updating outputs) and also provides the communication interface between the Target and the Workbench. · The ISaGRAF Workbench: The Workbench provides a complete PLC programming environment, including an editor for each of the PLC programming languages, downloading PLC application to the target, simulation, program-debugging tools and on-line monitoring of the PLC application. 1.2 BL2500 BL2500 OVERVIEW The BL2500 BL2500 is an advanced Single Board Computer that incorporates flash memory, SRAM, digital I/O ports, A/D converter input, D/A converter outputs, RS232/RS485 RS232/RS485 ports and Ethernet interface (10/100 Mbps). The BL2500 BL2500 SBC gives PLC designers extremely low-cost embedded control for high-volume applications such as product control, factory equipment control, access control, HVAC and vending machines. The BL2500 BL2500's compact board size of 100 x 100 mm is easily mountable in standard 100 mm DIN rail trays. External connections via polarized locking industry standard Molex® type connectors enable rapid assembly with wire harnesses. These connectors also provide dependable cable harness connectivity to I/O. Main features of the EMBEDDED PLC Firmware Kernel running on the BL2500 BL2500 Target PLC, are shown in Table 1. OEM Technology Solutions Page 1 EMBEDDED PLC BL2500 BL2500 User's Manual Introduction Table 1: Main Features of the EMBEDDED PLC Firmware Kernel V1.04 on the BL2500 BL2500 Kernel filename BL2500C BL2500C_V1.04_3-0231H 3-0231H.bin SBC model supported BL2500 BL2500 with Rabbit core module RCM3200 RCM3200 (10/100BaseT, 512K Flash, 256K + 512K SRAM, 44.2 MHz clock speed). Z-World P/N: 101-0602 I/Os supported - 16 Digital Inputs - 8 Digital Outputs - 1 Analog Input (connected through AD0): 10 bits resolution, 0 3.3 V - 1 Analog Output (connected through DA1): 10 bits resolution, 0 3.3 V Communications Modbus RTU over TCP/IP using static IP address Modbus RTU over RS232 RS232 (using serial port E) or RS485 RS485 (using serial port D): - Baud rate: 19200, 9600, 4800, 2400, 1200 or 600 (configurable through EMBEDDED PLC Utility) - Parity: None - Data bits: 8 - Stop bits: 1 - Flow Control: None Minimum polling period time is 1 cycle duration for Modbus TCP and 2 x cycle duration for Modbus RTU over RS232/RS485 RS232/RS485. Cycle duration corresponds to the time that kernel executes one cycle (read inputs execute logic update outputs) Performance - Digital Input scan time is approx. 200 µs. - Analog Input scan time is approx. 83 ms. - Digital Output update time is approx. 30 µs per output. - Analog Output update time is approx. 120 µs. - Boolean instruction execution time is approx. 30 µs. - Program execution overhead is approx. 100 µs per program. Memory Space Maximum size of ISaGRAF application database is 50000 bytes. Size of ISaGRAF real-time database (holds variables, SFC engine data, C function and function blocks data) is 10000 bytes. Free root memory on the BL2500 BL2500 is approx. 9000 bytes. EMBEDDED PLC firmware kernel total code size is approx. 260000 bytes. ISaGRAF V3.50 features not supported by EMBEDDED PLC - On-line modifications. This feature enables the user to modify the application while the process is running. - Uploading application stored in the target. 1.3 ABOUT THIS MANUAL This manual provides instructions for installing, testing, configuring and interconnecting the Z-World SBC BL2500 BL2500 running the EMBEDDED PLC Firmware Kernel. Instructions are also provided for using the ISaGRAF Workbench. This User's Manual is divided into the following chapters: · This chapter provides and overview of the EMBEDDED PLC and information about this publication such as conventions used and reference documents. · Chapter 2, Getting Started: Explains how to install the different EMBEDDED PLC products and run a sample application. · Chapter 3, Running Sample Applications: Provides instructions how to run the different types of sample applications and also how to create a PLC application using the ISaGRAF Workbench. · Chapter 4, Hardware Reference: Provides a detailed description of the I/Os and communication ports present in the SBC BL2500 BL2500 and how to configure them in order to work with EMBEDDED PLC. OEM Technology Solutions Page 2 EMBEDDED PLC BL2500 BL2500 User's Manual Introduction · Chapter 5, Software Reference: Provides an overview of the ISaGRAF Workbench functionalities and detailed description of the ISaGRAF library elements (I/O boards software configuration, C functions and C function blocks) available from the ISaGRAF Workbench. · Chapter 6, Using EMBEDDED PLC Utility: Detailed description of the EMBEDDED PLC Utility. · Chapter 7, FAQ and Troubleshooting: Describes the known issues with this release, frequently asked questions and troubleshooting. · Chapter 8, Specifications: Describes the electrical, mechanical and environmental specifications of the BL2500 BL2500. · Chapter 9, About Indusoft: A brief description of Indusoft Web Studio and how can be used in conjunction with EMBEDDED PLC. 1.4 EMBEDDED PLC APPLICATION KIT The EMBEDDED PLC BL2500 BL2500 Application Kit contains the hardware and software needed to use the SBC BL2500 BL2500 with EMBEDDED PLC system. It contains: · BL2500 BL2500 Single Board Computer with Ethernet capability and pre-loaded with the EMBEDDED PLC Firmware Kernel. · 1.27mm programming cable. · Ethernet crossover cable. · EMBEDDED PLC BL2500 BL2500 CD-ROM, with complete product documentation on disk. · EMBEDDED PLC ISaGRAF V3.50 Workbench License Registration form. · Getting Started instructions. 1.5 TEXT CONVENTIONS This manual uses special formatting to help you quickly identify certain items, as follows: · Titles, labels, and new terms are indicated using italic text. · File names, messages and screen text are indicated using bold, courier text (for example, C:\OEMTech\Install.exe). · Variables and information you must provide are indicated using bold, italicized text enclosed in < and > brackets (for example, run the .exe file indicates you must provide a driver name). · Buttons, menu options and keyboard key are indicated in bold. · Text requiring special emphasis is in bold italic. · Some information is segregated into Note and Caution boxes as follows: Notes provide supplemental information related to the surrounding text, usually the text just preceding the note. Caution provides information necessary to prevent damage or problems. 1.6 WINDOWS CONVENTIONS This manual uses the following Windows conventions: · Dialog boxes (or dialogs) are windows that allow you to enter information. · Text boxes (or fields) are areas in dialogs where you can type in text. · Radio buttons are white circles in which a black dot appears or disappears when you click on the button. Typically, the black dot indicates that the option or function is enabled (active). The absence of a black dot indicates the option or function is disabled (inactive). OEM Technology Solutions Page 3 EMBEDDED PLC BL2500 BL2500 User's Manual Introduction · Check-boxes are white squares in which a check appears or disappears when you click on it with the cursor. Typically, the check indicates that the option or function is enabled (active). The absence of a check indicates the option or function is disabled (inactive). · Buttons are icons in boxes that appear "pressed" when you click on them. · Lists are panes (white boxes) in windows or dialog boxes containing two or more selectable options. · Combo-boxes have arrows that, when clicked, show part or all of an otherwise concealed list. Note: The dialogs and procedures described in this manual are valid for Windows 2000 and XP. Some terms may vary according to the operating system (type, language and version) you are using. 1.7 REFERENCE DOCUMENTS [1] 019-0120 · 041215-H 041215-H Coyote (BL2500 BL2500) C-Programmable Single-Board Computer with Ethernet User's Manual, 2002-2004 Z-World Inc. [2] ISaGRAF Version 3.5 User's Guide, 1994 2004 ICS Triplex ISaGRAF Inc. [3] 019-0108 · 050610-P 050610-P - Rabbit® 3000 Microprocessor User's Manual, 2002-2005 Rabbit Semiconductor. 1.8 ABBREVIATIONS AND TERMINOLOGY The following abbreviations are terms used throughout the document. Term Description A/D Analog to Digital BSP Board Support Package D/A Digital to Analog DDE Dynamic Data Exchange FAQ Frequently Asked Questions FBD Function Block Diagram FC Flow Chart HMI Human Machine Interface HVAC Heating, Ventilation and Air-Conditioning. This is sometimes referred to as climate control. I/O Input/Output IL Instruction List IWS LAN LD LED ODBC OPC Indusoft Web Studio Local Area Network Ladder Diagram Light Emitting Diode Open Database Connectivity OLE (Object Linking and Embedding) for Process Control PC Personal Computer PLC Programmable Logic Controller RAM Random Access Memory SBC Single Board Computer SCADA SFC Supervisory Control And Data Acquisition Sequential Function Chart OEM Technology Solutions Page 4 EMBEDDED PLC BL2500 BL2500 User's Manual SRAM ST TCP/IP USB Introduction Static Random Access Memory Structured Text Transport Control Protocol/Internet Protocol Universal Serial Bus OEM Technology Solutions Page 5 EMBEDDED PLC BL2500 BL2500 User's Manual Introduction This page is intentionally left blank OEM Technology Solutions Page 6 EMBEDDED PLC BL2500 BL2500 User's Manual Getting Started 2. GETTING STARTED 2.1 INTRODUCTION The EMBEDDED PLC Application Kit provides all the necessary tools to program the Z-World SBC BL2500 BL2500 (Coyote) via the ISaGRAF Soft Logic package. This chapter will help you to quickly install the necessary software to run a PLC sample application on the BL2500 BL2500 target using the ISaGRAF Workbench. This chapter contains also important information about licensing your product. To run the EMBEDDED PLC software products it is required to have a Personal Computer (PC) with at least a 133-MHz processor (550-MHz or faster processor is recommended). This PC will be referred as the Host. The PC must have the following hardware and software configuration: · Windows 2000 or XP operating system · 128 MB of RAM required; 256 MB or more recommended · 1.25 to 2 GB of available hard-disk space · CD-ROM or DVD-ROM drive · VGA or hardware that supports console redirection required; Super VGA supporting 800 x 600 or higher-resolution monitor recommended · 1 serial port (COM1 COM4) · Ethernet card Note: The EMBEDDED PLC Application Kit EMBEDDED PLC Firmware Kernel. If comes with one Z-World SBC BL2500 BL2500 pre-loaded with the you require to load the Firmware Kernel to another BL2500 BL2500 or to upgrade the current one, go to Chapter 6, which describes in detail the installation of the additional software and how to load or upgrade the EMBEDDED PLC Firmware Kernel to the Target. 2.2 SOFTWARE INSTALLATION The EMBEDDED PLC CD-ROM contains the following software: · ISaGRAF_V3.50: EMBEDDED PLC ISaGRAF V3.50 Workbench installer. This particular installation is intended to work in stand-alone mode or only with EMBEDDED PLC Rabbit-based targets. After installation of the Workbench, the software runs in a trial mode for 30 days. After period expires, license is required. · BL2500C BL2500C_BSP_V1.04_9-0003-006: EMBEDDED PLC Board Support Package (BSP) for the SBC BL2500 BL2500. It contains the EMBEDDED PLC BL2500 BL2500 Firmware Kernel and the ISaGRAF I/O boards and sample files to be installed in the ISaGRAF directory. · EmbeddedPLCUtility_V1.03_3-0237G 3-0237G: Microsoft Windows Installer of the EMBEDDED PLC Utility. The EMBEDDED PLC Utility allows you to load or upgrade the EMBEDDED PLC Firmware Kernel to a Rabbit-based Target. The installation of this software is optional and is described in Chapter 6. These software products can also be downloaded (in ZIP format) from the OEM Technology Solutions website www.oem.net.au. OEM Technology Solutions Page 7 EMBEDDED PLC BL2500 BL2500 User's Manual Getting Started 2.2.1 Installing ISaGRAF Workbench V3.50 Use the following procedure to install the EMBEDDED PLC - ISaGRAF Workbench V3.50 from the CDROM: 1. Insert the CD-ROM and open the ISaGRAF_V3.50 folder. 2. Double-click on ISAGRAF.EXE to launch the ISaGRAF installation wizard. Follow the instructions provided by the wizard to proceed with the installation. Note: It is recommended that the ISaGRAF Workbench be installed on a new directory to avoid confusing files with files from other ISaGRAF versions. 3. Once all the ISaGRAF files have been copied, the following group is added to your Programs group: 2.2.2 Installing EMBEDDED PLC Board Support Package (BSP) for BL2500 BL2500 Use the following procedure to install EMBEDDED PLC BSP for BL2500 BL2500 from the CD-ROM: 1. Go to BL2500C BL2500C_BSP_V1.04_9-0003-006 folder located in the root directory of the CD-ROM. 2. Open the ISaGRAF folder and double-click on INSTALL.EXE to launch the ISaGRAF installation wizard. Enter the location where the ISaGRAF Workbench was installed (default C:\ISAWIN) and press Install. The installation wizard will update the ISaGRAF main directory with the I/O boards, C functions, C function blocks and sample applications for the EMBEDDED PLC BL2500 BL2500 target. 2.3 LICENSING THE ISAGRAF WORKBENCH The ISaGRAF V3.50 Workbench you just installed runs for a trial period of 30-days before requiring licensing. When not licensed, you can not create, modify or export IEC programs to a library, or export variables to ASCII text file. You can license ISaGRAF using either hardware or software license. When using a hardware license, a dongle which you place on the parallel or USB port of your PC is delivered pre-programmed with the selected feature set. When using software license, you need to obtain a set of registration keys. The software license is specific to a PC (hardware configuration and Operating System). Therefore if you re-install the Operating System and then re-install ISaGRAF Workbench a new software license will be required. However, it is possible to transfer a software license from one PC to another. Section A.1.2.2 of the ISaGRAF User's Manual (See [2]) and the License Manager on-line help describe in detail how to transfer a software license. The EMBEDDED PLC Application Kit entitles you to a 32 I/O points software license. To obtain the software license follow these instructions: 3. Open the ISaGRAF License Manager (Start menu Programs ISaGRAF 3.5 Licensing). On the Available Components select ISaGRAF 3 Software License and press Add button. Click Option 32 on Number of IO Variables box and press OK button. The Setup Code SET: WDX32WDE15 WDX32WDE15 will be displayed in the Setup Code box. OEM Technology Solutions Page 8 EMBEDDED PLC BL2500 BL2500 User's Manual Getting Started 4. If you have access to the Internet and have an e-mail account: a) Press Proceed. button. A new mail message of your default e-mail client (such as Microsoft Outlook) will be displayed. Fill out the information on the message body: Contact details and Workbench Serial Number (located on the License Registration Form). Once you have filled out all the information, send the e-mail to support@oem.net.au. The e-mail client application must be running before pressing Proceed. button. b) Alternatively, if instead of e-mail client (such as Microsoft Outlook) you use web-based email or a command line e-mail (such as pine), compose manually a new message indicating the Workbench Serial Number that appears in the License Registration Form, User Code 1 and 2, and Contact details, and send it to support@oem.net.au. 5. Alternatively, if you do not have an e-mail address or access to the Internet, copy the User Code 1 and User Code 2 into the ISaGRAF License Registration Form that comes in the Application Kit and send the completed form to OEM Technology Solutions by fax (Fax Number: +61 2 9966 9429). 6. OEM Technology Solutions will send you the ISaGRAF software license within two business days of receiving the completed Form. Press Close button to close the License Manager. 2.3.1 Adding the software license The ISaGRAF software license consists of two sets of 4 Registration Keys. Upon reception of the Registration Keys, open License Manager and follow these instructions: 1. On the Available Components select ISaGRAF 3 Software License and press Add button. Select the purchased number of I/O points to license (32 if you purchased the EMBEDDED PLC Application Kit) and press OK button. 2. Enter the first set of Registration Keys and press Register button. Setup Code will change to SET: WDE15 WDE15. Enter the second set of Registration Keys and press Register button again. In the Selected Components ISaGRAF 3 Software License will be displayed as Active. Press Close button to close the License Manager. Congratulations! Your ISaGRAF Workbench is now licensed. Note: If you want to purchase a hardware license or upgrade your current software license, please contact OEM Technology Solutions (sales@oem.net.au) for pricing information and payment options. When you purchase a software license it is very important to include the following information in your Purchase Order: · Setup Code, User Code 1 and User Code 2. To obtain these codes open the ISaGRAF License Manager (Start menu Programs ISaGRAF 3.5 Licensing). On the Available Components select ISaGRAF 3 Software License and press Add button. Select the desired number of I/O points to license (128, 256 or Unlimited) and press OK button. The Setup and User codes appear on the License Manager window. If you press Proceed. button, a new e-mail message window is displayed (if you have an e-mail client running such as Microsoft Outlook). You can fill out the required information and send that e-mail to obtain license pricing and payment information. · Contact details (Company, Name, Address, Telephone, Fax and e-mail). 2.3.2 Adding a hardware license (optional) When using a hardware license (dongle) on Windows 2000/XP 2000/XP systems, you must install the Sentinel driver in order for the dongle to be seen. OEM Technology Solutions Page 9 EMBEDDED PLC BL2500 BL2500 User's Manual Getting Started Open the ISaGRAF_V3.50\Sentinel folder (located in the root directory of the CD-ROM) and doubleclick on Setup.exe. Follow the on-screen instructions to install the driver. After the installation is completed, connect the dongle to a parallel or USB port and open the License Manager (Start menu Programs ISaGRAF 3.5 Licensing). On the Selected Components list, the ISaGRAF 3 Hardware license will be shown active. 2.4 BL2500 BL2500 CONNECTIONS 2.4.1 Connect a Power Supply 1. Connect the AC adapter to header J2 on the BL2500 BL2500 as shown in Figure 1. Match the friction lock tab on the friction-lock connector to the back of header J2 on the BL2500 BL2500 as shown. The friction-lock connector will only fit one way. Plug in the AC adapter. Application Kits sold outside North America or Australia include a friction-lock connector that can be connected to header J2 on the BL2500 BL2500. Connect the leads from your power supply to the friction-lock connector to preserve the polarity indicated in the figure. The power supply should deliver 8 40 VDC at 500 mA. Figure 1: Power Supply Connection 2. Plug the AC Adapter. DS1 (yellow) and DS2 (red) LEDs indicate the Firmware Kernel status after the board has been powered up. If after 10 seconds DS2 (red) is turned off and DS1 (yellow) starts blinking, the Firmware Kernel is licensed and active. If DS2 (red) remains turned on during more than 10 seconds, it indicates that Kernel requires licensing. If DS1 and DS2 are off after powered-up, it indicates that the board has no EMBEDDED PLC Firmware Kernel loaded. In both cases, contact your local distributor. 2.4.2 Connect an Ethernet Cable The BL2500 BL2500 that comes in the EMBEDDED PLC Application Kit has the Firmware Kernel loaded, licensed and configured. The default factory configuration is: Modbus Slave Number = 1 Use Modbus TCP IP Address = 192.168.1.100 OEM Technology Solutions Page 10 EMBEDDED PLC BL2500 BL2500 User's Manual Getting Started Netmask = 255.0.0.0 Default gateway = 192.168.1.1 If you want to change the default values, go to section 6.1.4 for instructions how to change the configuration of the Target PLC. The following instructions will guide you on how to connect the Target PLC to the Workbench using TCP/IP. There are two ways of connecting the Target PLC to your PC via Ethernet (see Figure 2): · Using a crossover Ethernet cable (provided in the EMBEDDED PLC Application Kit) to connect directly the Target PLC to your PC; or, · If your PC is currently connected to an Ethernet hub, use a straight-through Ethernet cable (not provided in the EMBEDDED PLC Application Kit) to establish an Ethernet connection to the BL2500 BL2500 from the hub. Figure 2: Ethernet connections When your PC is connected directly to the BL2500 BL2500 via an Ethernet connection, you need to set (or change) the TCP/IP parameters of your computer in order to establish a proper connection with the BL2500 BL2500. If you require changing the TCP/IP configuration of the BL2500 BL2500, go to section 6.1.4 for instructions how to change the configuration of the Target PLC. To configure your PC with an IP address and netmask suitable for establishing a TCP/IP connection with a pre-configured BL2500 BL2500 Target PLC, follow these instructions (you might need Administrator privileges to perform these steps): 1. Go to Control Panel (Start button Settings Control Panel) and start Network Connections. 2. Select Local Area Connection and choose Properties (File menu Properties). 3. Select Internet Protocol (TCP/IP) and press Properties button. 4. Click on Use the following IP Address and fill in the following fields: 5. Press OK button to close the Internet Protocol (TCP/IP) Properties window. Press OK button to close the Local Area Connection Properties and to update the new TCP/IP values. 6. To verify the communication between your PC and the BL2500 BL2500 use the ping command. Open a Command Prompt window (Start button Programs Accessories Command Prompt) and type C:\ping 192.168.1.100 The command output should display the replies from the Target PLC. OEM Technology Solutions Page 11 EMBEDDED PLC BL2500 BL2500 User's Manual Getting Started 2.4.3 Connect an RS232 RS232 Cable (optional) If your Target PLC is configured to Use Modbus TCP you can go straight to Section 2.5. If your Target PLC is configured to Use RS232 RS232, connect a serial cable to a COM port of the PC and to the RS232 RS232 port E of the BL2500 BL2500. The RS232 RS232 cable must follow the diagram shown in Figure 3. A serial cable is not provided in the EMBEDDED PLC Application Kit. Figure 3: PC BL2500 BL2500 RS232 RS232 connection 2.5 RUNNING A SAMPLE APPLICATION Once you have established connection between your PC and the Target PLC, follow these instructions to run the sorting sample application. This sample application displays a SpotLight which shows different tokens being sorted depending on size and colour (see the Project Description at the bottom of the Projects Management window). This PLC application was written in Flow Chart. 1. Start ISaGRAF Workbench by double-clicking on the ISaGRAF 3.5 shortcut on your desktop or Start button Programs ISaGRAF 3.5 Projects. On the Projects Management window, doubleclick on the sorting project. 2. On the SORTING - Programs window select Debug menu Link setup. On the PC-PLC link parameters window check the Target Slave Number is set to 1 and ETHERNET communication port is selected. Press Setup button and check the IP address of the BL2500 BL2500 target is set to 192.168.1.100. Press OK button to close this window. Press OK button to close the PC-PLC link parameters window. OEM Technology Solutions Page 12 EMBEDDED PLC BL2500 BL2500 User's Manual Getting Started If you are using RS232 RS232, on the PC-PLC link parameters window select COM port and press Setup button. Select the baud-rate (19200 to 600) depending on the current value of the Target PLC. 3. Select Debug menu Debug to open the Debugger window. The Debugger window is displayed with a No application message. Note: If the Debugger window shows that an application is currently running (`' active) on the Target PLC, press Stop button on the toolbar to stop the application before downloading a new one. You can also stop the application from the Debugger window menu (File menu Stop application). 4. On Debugger window, select File menu Download. Select "RABBIT: TIC code for Rabbit-based controllers" on the Download window and press Download button. 5. A progress bar on the Debugger window will show the progress of the downloading process. Once the downloading is completed, the application runs immediately and the SpotLight window shown below is displayed. Troubled? If you experienced problems running this application, such as an error message "Cannot install communication" or "Cannot start download target not ready", follow this checklist: 1. Make sure that the TCP/IP connection between the Target PLC and your PC is alive (use ping command). See Section 2.4.2 on how to configure TCP/IP parameters. 2. If connection is alive, repeat accurately the step-by-step instructions in this Section. Remember to put correctly the Target Slave Number and the IP address of the Target PLC in the PC-PLC link parameters window (Step 2). 3. If the Target PLC has already an application running, stop it before downloading a new one. If you still can not run this sample application, go to Chapter 7 (FAQ and Troubleshooting) which contains more information about how to troubleshoot your particular problem. OEM Technology Solutions Page 13 EMBEDDED PLC BL2500 BL2500 User's Manual Getting Started 2.6 WHERE DO I GO FROM HERE? The next chapter describes how to run the other sample applications and step-by-step instruction on how to create a simple PLC application. The ISaGRAF User's Manual and the ISaGRAF Workbench on-line help contain a complete description of the Workbench features and capability, as well as a complete PLC programming languages reference. The User's Manual can be found in the Documentation folder of the CD-ROM (ISaGRAF.pdf). OEM Technology Solutions Page 14 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 3. RUNNING SAMPLE APPLICATIONS The ISaGRAF Workbench provides two modes of running PLC applications: · Simulation mode. The PLC application runs entirely on the PC without the need to have a Target PLC connected. This mode is very useful to perform complete structural and functional tests prior to deploying the application to the target hardware. · Real mode. The PLC application is first downloaded to a Target PLC and then the Target PLC executes the application. The Workbench monitors the program execution as well as the status of internal and I/O variables. The EMBEDDED PLC ISaGRAF V3.50 Workbench plus the EMBEDDED PLC BL2500 BL2500 BSP, includes several sample applications. There are three types of sample applications: · Sample applications that use Virtual Boards (xai8, xao8, xbi8, xbo8, xmi8, xmo8). These applications can run ONLY in simulation mode: blinkseq: Same implementation with various languages. rfdemo: Complete SFC demo. rfsample: Sample described in ISaGRAF User's Guide (see [2]). rfsfc: Demonstrates SFC actions in SFC. · Sample applications that use internal variables only. These applications can be simulated or downloaded to the Target PLC. The Target PLC does not need to be connected to physical I/Os: bottlef: Flow Chart: Simulation of bottle production. rfstack: Demonstrates STACKINT function block. sorting: Flow Chart: Sorting of tokens depending on their size and colour. · Sample applications pre-configured to use BL2500 BL2500 I/O boards. These applications can be simulated or downloaded to the BL2500 BL2500 Target PLC and requires that the Target is connected to physical I/Os: b25qld: Demo with Quick LD programming. b25rota: Rotation of 2 BL2500 BL2500 on-board LEDs (DS3 and DS4) and 2 digital outputs. b25scope: Signal generation (BL2500 BL2500 Analog Out) and SpotLight. A description of each of the sample applications appears at the bottom of the ISaGRAF Project Manager. 3.1 RUNNING APPLICATIONS IN SIMULATION MODE Use the following procedure to run any sample application in simulation mode: 1. Open the ISaGRAF Project Management by double-clicking on the ISaGRAF Projects icon on your Desktop or selecting Start menu Programs ISaGRAF 3.5 Projects. OEM Technology Solutions Page 15 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 2. Double-click on the sample application (for example, rfdemo) to open the Programs Manager window. 3. On the Programs Manager window, select Debug Simulate (or press Simulate button the toolbar). The Debugger, I/O simulation and Debug program windows are displayed. on 4. The I/O simulation window shows the I/O boards used by the application (Boards 0 to 4). Board 0 (column 0) has 8 digital inputs; Board 1 (column 1) has 8 analog inputs; Board 2 (column 2) has 8 message (strings) outputs; Board 3 (column 3) has 8 digital outputs and Board 4 (column 4) has 8 analog outputs. On Board 0 (column 0) click on Input 1 and Input 4, a message start and Lead are displayed in message outputs 4 and 5 respectively; and Board 3 will show the LED outputs being turned ON in sequence. On the Debug programs window the Drive and Lead programs change to active state. Unset the digital input 4 and set any of the digital inputs 5 (Flash) or 6 (Random). 5. To close the simulation of the application, close the Debugger window. Close the Programs window. 6. Try with other sample applications such as the one listed in the introduction of this chapter. All the sample applications can run in simulation mode. OEM Technology Solutions Page 16 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 3.2 RUNNING APPLICATIONS THAT USE INTERNAL VARIABLES ONLY The Target PLC and your PC must be connected through Ethernet, RS232 RS232 or RS485 RS485. Use the following procedure to run any sample application that uses only internal variables: 1. Open the ISaGRAF Project Management by double-clicking on the ISaGRAF Projects icon on your Desktop or selecting Start menu Programs ISaGRAF 3.5 Projects. On the Projects Management window, double-click on the bottlef project. 2. On the BOTTLEF - Programs window select Debug menu Link setup. On the PC-PLC link parameters window enter the Target Slave Number (corresponds to the Modbus Slave number of the Target PLC) and the Communication port (ETHERNET for Modbus TCP or COM for Modbus RTU over RS232/RS485 RS232/RS485): a) If ETHERNET is selected press Setup button and enter the IP address of the target (default is 192.168.1.100). Press OK button. Press OK button to close the PC-PLC link parameters window Caution: Do not change the port number from 1100 otherwise the Ethernet communication with the ISaGRAF Workbench will not work. This port is used exclusively by the communication between ISaGRAF Workbench and the EMBEDDED PLC target. b) If serial COM port is selected (COM1 COM4) press Setup button and select either 19200, 9600, 4800, 2400, 1200 or 600 baud rate depending on the current configuration of your EMBEDDED PLC target. Note: The EMBEDDED PLC Kernel supports baud rates from 19200 to 600. The other parameters are fixed: no parity, 8 data bits, 1 stop bit and no flow control. Note also that ISaGRAF supports serial ports COM1 to COM4. If you are using a USB-to-serial converter cable check that the com port assigned is between COM1 and COM4. If not, change the serial port settings on your Windows Operating System (see Section 7.2). Many USB-to-serial converters are assigned to COM5 port or higher after its installation. 3. Select Debug menu Debug to open the Debugger window. If Debugger window displays " active" message, stop the current application that is running by pressing the Stop button is displayed. on the toolbar or select File menu Stop application. A "No application" message 4. Download the bottlef application by selecting File menu Download. Select "RABBIT: TIC code for Rabbit-based controllers" on the Download window and press Download button. A progress bar on the Debugger window will show the progress of the downloading process. Once the downloading is completed the application runs immediately and the SpotLight window is displayed. In the SpotLight, double-click on the START button and press TRUE button. The bottle production will start. OEM Technology Solutions Page 17 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 5. On the Debugger window, select Options menu Parameters. Change the Cyclic refresh duration value to 200. This value corresponds to the refresh rate of the SpotLight. Press OK button. 6. On the SpotLight window, double-click on the t#1s box. Change the variable SPEED value to t#200ms and press Write button. The bottle production will speed up by a factor of two. 7. Repeat this procedure for the rfstack application. 3.3 RUNNING APPLICATIONS THAT USE BL2500 BL2500 INPUTS AND OUTPUTS 3.3.1 Creating I/O connectors The EMBEDDED PLC Application Kit comes with a bag of cables, connectors and crimp terminals in order to connect to the I/Os of the BL2500 BL2500. To create an I/O connector you will need to assemble a wiring harness using the friction-lock connectors and crimp terminals supplied with the EMBEDDED PLC Application Kit. In addition, you will need: · Wire-22 to 30 AWG (0.33 mm2 to 0.049 mm2) for the 0.1" crimp terminals, 22 to 26 AWG (0.33 mm2 to 0.13 mm2) for the 0.156" crimp terminals · Wire cutters and wire insulation stripper · Crimp tool (pliers may be used, but a crimp tool provides a better crimp with a stronger force) Follow these steps to build your wire harness: 1. Prepare a few lengths of wire about 30 cm (12") long. The wires should have different colours of insulation to facilitate identifying the connections. 2. Trim about 2 3 mm (0.1") of insulation from your wire. 3. Position the wire in the crimp terminal as shown in the figure. 4. Use a crimp tool or pliers to first crimp the bare wire, then the insulation as shown in figure. 5. Insert the crimp terminals with wires into the frictionlock connector with the tab on the crimp terminal facing the opening on the side of the friction-lock connector. Insert the crimp terminal until the tab snaps into place in the side opening. 6. Repeat these steps until all the wires and crimp terminals have been assembled. Note: On 10-pin friction-lock connectors, insert a plug into the hole indicated in last figure to polarize your connector to help prevent offsetting the connector by one pin when you attach it to your BL2500 BL2500. Polarizing plugs are not included in EMBEDDED PLC Application Kit. OEM Technology Solutions Page 18 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 3.3.2 Downloading and running the ISaGRAF application Use the following procedure to download a sample application (b25qld) to the BL2500 BL2500 Target that uses physical I/Os. The Target PLC must be running a licensed EMBEDDED PLC Firmware Kernel and be connected to 4 digital inputs (use the procedure above to create an I/O connector). It also assumes that the Target is connected to the PC either via Ethernet or serial port. 1. Open the ISaGRAF Project Management by double-clicking on the ISaGRAF Projects icon on your Desktop or selecting Start menu Programs ISaGRAF 3.5 Projects. On the Projects Management window, double-click on the b25qld project. 2. Select Debug Link setup (or press Link Setup) and configure the Target PLC PC link. Follow the guidelines on Step 2 of the previous section. 3. Select Debug Debug (or press Debug) to open the Debugger window. If an application is on the toolbar). On the Debugger window select File running, stop it (press Stop button Download to download the b25qld application to the target. A progress bar on the Debugger window shows the progress of the download process. Once the downloading is completed the application starts running and the following SpotLight window is displayed. 4. The Digital inputs IN00 and IN01 of the BL2500 BL2500 are wired as the Left and Right switches on the b25qld application. The BL2500 BL2500 on-board LED DS3 is the output of the light. The BL2500 BL2500 digital inputs IN02 and IN03 move the window's screen to the left and right respectively. 5. To check the I/O connections, close the Debugger window and on the B25QLD B25QLD Programs window select Project I/O connection. Check the wiring of the channels. OEM Technology Solutions Page 19 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications Follow the same procedure to run the b25rota application. This application will turn ON the BL2500 BL2500 onboard LEDs (DS3 and DS4) in sequence. 3.4 CREATING A NEW PLC APPLICATION The following Section describes how to use the ISaGRAF Workbench to create simple PLC applications using the 5 IEC 611131-3 PLC programming languages (FBD, LD, ST, IL and SFC) and Flow Chart that later you will download to the BL2500 BL2500 Target PLC. The Target PLC must be connected to physical I/Os. It also assumes that the Target is connected to the PC either via Ethernet or serial port. To create (or modify) PLC applications the ISaGRAF Workbench must be licensed. The PLC application that is written using 6 different languages, implements a simple Boolean operation (XOR) between digital input IN00 and IN01 (SW1 and SW2 Boolean variables respectively). The DS3 LED (LED1 Boolean output variable) is used as the output. 3.4.1 Using Function Blocks Diagrams 1. Open the ISaGRAF Project Management by double-clicking on the ISaGRAF Projects icon on your Desktop or selecting Start menu Programs ISaGRAF 3.5 Projects. On the Projects Management window, select File menu New. 2. On the Create new project window, enter the name of the project (for example b25test1) and press OK button. The name of project should no exceed 8 characters. The b25test1 project is then listed in the Projects Management window. 3. Select Edit menu Set comment text. Enter a brief description of this project and press OK button. This description will be displayed next to the project name in the Projects Management window. 4. Double-click on b25test1 project. An empty B25TEST1 B25TEST1 Programs window is displayed. 5. Select File menu New. On the New program window enter the name of the program (for example, FBtest1); a brief comment; select the Language to FBD; select Begin Style and press OK button. The FBtest1 program is displayed in the B25TEST1 B25TEST1 Programs window. 6. On the B25TEST1 B25TEST1 Programs window select File menu Dictionary to open the Dictionary window. OEM Technology Solutions Page 20 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 7. Select Tools menu Quick declaration. Enter Numbering from 1 to 2, Symbol name SW and Attributes = Input as shown in figure below. Press OK button. 8. On the Dictionary window, the SW1 to SW2 variables are listed. 9. On the B25TEST1 B25TEST1 Dictionary double-click on the empty row. Enter the name LED1 and select it as output. 10. On the Dictionary window, select Integers/Reals tab. Press Insert objects button or select Edit menu New. Enter the following information on the Integer/Real Variable window: Name = AD0, Comment = Analog Input AD0, Unit = V, Attributes = Input and Format = Real. Press Store button. Repeat this step to create the analog output variable (Name = DA1, Comment = Analog Output DA1, Unit = V, Attributes = Output and Format = Real). Press Cancel to close the Integer/Real Variable window. OEM Technology Solutions Page 21 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 11. Save the current dictionary by selecting File menu Save. Close the Dictionary window. 12. On the B25TEST1 B25TEST1 Programs window double-click on FBtest1 program. Press Insert variable on the toolbar and click on the working area. On the Select variable window select SW1 button and press OK button. SW1 variable box is drawn on the working area. Place SW2 and LED1 variables following the same procedure. 13. Select on the Function blocks combo box the exclusive OR (=1) function block and click on the working area. The exclusive OR (=1) function block is displayed. 14. Select button on the toolbar and move SW1 and SW2 variables to the left of the function block; also move the LED1 variable to the right of the function block. 15. Click on Draw connection line button on the toolbar and press left mouse button on the SW1 variable and drag the line towards the function block. A connection line will be drawn between SW1 and IN1 of the function block. Repeat the same procedure to connect SW2 with IN2 of the function block and LED1 with Q of the function block (connection lines are dragged always from left to right). 16. Save the program by selecting File menu Save. Press OK button on the Update diary window. Close the FBtest1 FBD/LD Program window. 17. On the B25TEST1 B25TEST1 Programs window click on I/O connection button OEM Technology Solutions on the toolbar. Page 22 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 18. Double-click on Slot 0 or press Set board/equipment button on the toolbar. Select bl25di board (BL2500 BL2500 Digital Inputs) and press OK button. The bl25di I/O board is placed in Slot 0. Double-click on Channel 1. On the Connect I/O channel window press Connect button several times until all the free variables are connected. Press Close button. 19. Double-click on Slot 1 and select bl25led (BL2500 BL2500 on-board LEDs) board. Double-click on Channel 1 and connect the free variable LED1. Press Close button. 20. Double-click on Slot 2 and select bl25ai (BL2500 BL2500 Analog Input) board. Double-click on Channel 1 and connect the AD0 variable. Press Close button. 21. Double-click on Slot 3 and select bl25ao (BL2500 BL2500 Analog Output) board. Double-click on Channel 1 and connect the DA1 variable. Press Close button. Select File menu Save (or press Save button on the toolbar) to save the I/O connection. Close the I/O connection window. 22. Before downloading the PLC application to the Target PLC, the application needs to be compiled. On the B25TEST1 B25TEST1 Programs window, select Make menu Compiler Options to check that RABBIT: TIC code for Rabbit-based controllers is selected. Press OK button. If RABBIT target is not selected, click on RABBIT target and press Select button. Alternatively you can double-click on RABBIT target. OEM Technology Solutions Page 23 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 23. Select Make menu Make application to compile the PLC application. The Code generator window is displayed. Press Exit button. 24. Select Debug Link setup (or press Link Setup) and configure the Target PLC PC link. Follow the guidelines on Step 2 of Section 3.2. 25. Select Debug Debug (or press Debug) to open the Debugger window. If an application is running, stop it (press Stop button on the toolbar). On the Debugger window select File Download to download the b25test1 application to the Target PLC. A progress bar on the Debugger window shows the progress of the download process. Once the downloading is completed the B25TEST1 B25TEST1 Debug programs window is displayed (On the Debugger window the application state will be RUN). 26. Double-click on FBtest1 program. The FBTEST1 FBD/LD Programs window is displayed with the variables in BLUE or RED colour depending on its current state, FALSE or TRUE respectively. If the digital input IN00 of the BL2500 BL2500 is short circuited, SW1 is FALSE and LED DS3 will be turned ON as well as the state of LED1 in the Programs window will change. The PLC program implements a Boolean XOR operation on SW1 and SW2 with the result set on the LED1. OEM Technology Solutions Page 24 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 27. On the FBTEST1 FBD/LD Programs window select File menu Dictionary. On the dictionary window click on Integers/Reals tab. Double-click on DA1 variable and set its value to 1.5 V (any value in the 0 3.3 V range). Connect a multimeter between DA1 and AGND of the BL2500 BL2500 and check that the voltage is 1.5 V. 28. To stop the monitoring of the PLC application, close the Debugger window. The programs and dictionary windows in debug mode will be closed. 3.4.2 Using Quick Ladder Diagrams 1. Open the ISaGRAF Project Management by double-clicking on the ISaGRAF Projects icon on your Desktop or selecting Start menu Programs ISaGRAF 3.5 Projects. On the Projects Management window, select File menu New. 2. On the Create new project window, enter the name of the project (for example b25test2) and press OK button. The name of project should not exceed 8 characters. The b25test2 project is then listed in the Projects Management window. 3. Select Edit menu Set comment text. Enter a brief description of this project and press OK button. This description will be displayed next to the project name in the Projects Management window. 4. Double-click on b25test2 project. An empty B25TEST2 B25TEST2 Programs window is displayed. 5. Select File menu New. On the New program window enter the name of the program (for example, LDtest1); a brief comment; select the Language to Quick LD; select Begin Style and press OK button. The LDtest1 program is displayed in the B25TEST2 B25TEST2 Programs window. OEM Technology Solutions Page 25 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 6. Follow Steps 6 to 11 in Section 3.4.1 to create and populate the application's Dictionary with SW1 and SW2 Boolean input variables (connected to Channel 1 and 2 of the bl25di I/O board respectively); and LED1 Boolean output variable connected to Channel 1 of the bl25led I/O board. 7. On the B25TEST2 B25TEST2 Programs window double-click on LDtest1 program. The Quick Ladder Diagram Editor contains an editing grid, a logical matrix where each cell of the matrix may contain up to one LD symbol. Press F2: Contact on the left button rung. A new rung with one contact and one coil is created. on the toolbar to insert a new 8. Double click the rung comment (* *) cell to insert a comment such as (*Exclusive OR logic for switching on LED*). 9. Double click the contact on the rung and select SW1 for an input. 10. With the SW1 contact selected, press F3: Contact on the right button on the toolbar. 11. Double click the new contact and select SW2 variable. Click once on the Coil/contact type button to negate this contact. 12. Select the Select button on the toolbar. Select both contacts on the rung by clicking on one contact and dragging the mouse over to the next contact before releasing the mouse button. Press F4: Parallel contact button to create two new contacts in parallel with the selected contacts. 13. Repeat steps 9 and 11 except negate the SW1 contact with the Coil/contact type button this time instead of the SW2 contact. 14. Double click on the coil on the rung and select LED1 for an output. 15. The LDtest1 program should now appear as follows: 16. Save the program by selecting File menu Save. Press OK button on the Update diary window. Close the LDtest1 QuickLD Program window. 17. Follow Steps 17 to 25 in Section 3.4.1 to compile the application and download it to the Target PLC. 18. Double-click on LDtest1 program. The LDTEST1 Quick LD Programs window is displayed with the variables in BLUE or RED colour depending on its current state, FALSE or TRUE respectively. Press the SW1 (short-circuit digital input IN00) and the LED1 will be turned ON as well as the state of LED1 in the Programs window will change. The PLC program implements a Boolean XOR operation on SW1 and SW2 with the result set on the LED1. OEM Technology Solutions Page 26 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 19. To stop the monitoring of the PLC application, close the Debugger window. The programs and dictionary windows in debug mode will be closed. 3.4.3 Using Structured Text 1. Open the ISaGRAF Project Management by double-clicking on the ISaGRAF Projects icon on your Desktop or selecting Start menu Programs ISaGRAF 3.5 Projects. On the Projects Management window, select File menu New. 2. On the Create new project window, enter the name of the project (for example b25test3) and press OK button. The name of project should not exceed 8 characters. The b25test3 project is then listed in the Projects Management window. 3. Select Edit menu Set comment text. Enter a brief description of this project and press OK button. This description will be displayed next to the project name in the Projects Management window. 4. Double-click on b25test3 project. An empty B25TEST3 B25TEST3 Programs window is displayed. 5. Select File menu New. On the New program window enter the name of the program (for example, STtest1); a brief comment; select the Language to ST; select Begin Style and press OK button. The STtest1 program is displayed in the B25TEST3 B25TEST3 Programs window. OEM Technology Solutions Page 27 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 6. Follow Steps 6 to 11 in 3.4.1 to create and populate the application's Dictionary with SW1 and SW2 Boolean input variables, and LED1 Boolean output variable. 7. On the B25TEST3 B25TEST3 Programs window double-click on STtest1 program. 8. Type in a comment in comment parentheses (* *) such as (* Exclusive OR logic for switching on LED *). When entered correctly comments are highlighted green. 9. Press Enter to move to the next command line in the ST program editor. 10. To enter Keyword commands, either click the desired button in the Keywords tool box or type it, such as for an `if' statement, either click IF in the Keyword tool box or type IF on the command line. When correctly entered Keyword commands are highlighted pink. 11. To enter inputs, outputs, or variables, for example input switch SW1, either select Edit Insert variable SW1 or type SW1 on the command line. 12. Type the following command lines under the entered comment: IF SW1 = SW2 THEN LED1 := FALSE; ELSE LED1 := TRUE; END_IF; 13. The LDtest1 program should now appear as follows: 14. Save the program by selecting File menu Save. Press OK button on the Update diary window. Close the STtest1 ST Program window. 15. Follow Steps 17 to 25 in 3.4.1 to compile the application and download it to the Target PLC. 16. Double-click on STtest1 program. The STTEST1 ST Programs window is displayed. Press the SW1 (short-circuit digital input IN00) and the LED1 will be turned ON as well as the state of LED1 in the Programs window will change. The PLC program implements a Boolean XOR operation on SW1 and SW2 with the result set on the LED1. 17. To stop the monitoring of the PLC application, close the Debugger window. The programs and dictionary windows in debug mode will be closed. OEM Technology Solutions Page 28 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 3.4.4 Using Instruction List 1. Open the ISaGRAF Project Management by double-clicking on the ISaGRAF Projects icon on your Desktop or selecting Start menu Programs ISaGRAF 3.5 Projects. On the Projects Management window, select File menu New. 2. On the Create new project window, enter the name of the project (for example b25test4) and press OK button. The name of project should not exceed 8 characters. The b25test4 project is then listed in the Projects Management window. 3. Select Edit menu Set comment text. Enter a brief description of this project and press OK button. This description will be displayed next to the project name in the Projects Management window. 4. Double-click on b25test4 project. An empty B25TEST4 B25TEST4 Programs window is displayed. 5. Select File menu New. On the New program window enter the name of the program (for example, ILtest1); a brief comment; select the Language to Quick IL; select Begin Style and press OK button. The ILtest1 program is displayed in the B25TEST4 B25TEST4 Programs window. 6. Follow Steps 6 to 11 in 3.4.1 to create and populate the application's Dictionary with SW1 and SW2 Boolean input variables, and LED1 Boolean output variable. 7. On the B25TEST4 B25TEST4 Programs window double-click on ILtest1 program. 8. Type in a comment in comment parentheses (* *) such as (* Exclusive OR logic for switching on LED *). When entered correctly comments are highlighted green. 9. Press Enter to move to the next command line in the IL program editor. 10. To enter Keyword commands, either click the desired button in the Keywords tool box or type it, such as for an `AND' statement, either click AND in the Keyword tool box or type AND on the command line. When correctly entered Keyword commands are highlighted pink. 11. To enter inputs, outputs, or variables, for example input switch SW1, either select Edit Insert variable SW1 or type SW1 on the command line. 12. Type the following command lines under the entered comment: LD SW1 XOR SW2 ST LED1 13. The ILtest1 program should now appear as follows: OEM Technology Solutions Page 29 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 14. Save the program by selecting File menu Save. Press OK button on the Update diary window. Close the ILtest1 ST Program window. 15. Follow Steps 17 to 25 in 3.4.1 to compile the application and download it to the Target PLC. 16. Double-click on ILtest1 program. The ILTEST1 ST Programs window is displayed, with the line numbers visible and the TRUE or FALSE current state for each variable displayed in the Value column. Short circuit digital input IN00 to set SW1 to FALSE, the LED1 will be turned ON as well as the state of LED1 in the Programs window will change. The PLC program implements a Boolean XOR operation on SW1 and SW2 with the result set on the LED1. 17. To stop the monitoring of the PLC application, close the Debugger window. The programs and dictionary windows in debug mode will be closed. 3.4.5 Using Sequential Function Chart 1. Open the ISaGRAF Project Management by double-clicking on the ISaGRAF Projects icon on your Desktop or selecting Start menu Programs ISaGRAF 3.5 Projects. On the Projects Management window, select File menu New. 2. On the Create new project window, enter the name of the project (for example b25test5) and press OK button. The name of project should not exceed 8 characters. The b25test5 project is then listed in the Projects Management window. 3. Select Edit menu Set comment text. Enter a brief description of this project and press OK button. This description will be displayed next to the project name in the Projects Management window. 4. Double-click on b25test5 project. An empty B25TEST5 B25TEST5 Programs window is displayed. OEM Technology Solutions Page 30 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 5. Select File menu New. On the New program window enter the name of the program (for example, SFCtest1); a brief comment; select the Language to SFC; select Begin Style and press OK button. The SFCtest1 program is displayed in the B25TEST5 B25TEST5 Programs window. 6. Follow Steps 6 to 11 in Section 3.4.1 to create and populate application's Dictionary with three Boolean variables (SW1, SW2 and LED1). 7. On the B25TEST5 B25TEST5 Programs window double-click on SFCtest1 program. 8. Click on below Step 1. Click on OR divergence single divergence and then on Transition to add a single divergence. Click on below to add a transition after the single divergence. Click on below the transition and add Step 2 by pressing Step button. Repeat the same procedure to add Transitions 3, 4 and 5, Step 3, a single divergence and a Jump to Step 1. The final program screen should be as shown below. 9. Double-click on Transition 1 and write the expression SW1 XOR SW2; on the Transition GT1 ST/LD editor that is displayed. OEM Technology Solutions Page 31 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 10. Double-click on Transition 2 and write the expression not(SW1 XOR SW2); on the Transition GT2 ST/LD editor that is displayed. 11. Double-click on Step 2 and write the action LED1(S); on the Step GS2 that is displayed. Add the action LED2(R); on Step 3. 12. Save the program by selecting File menu Save. Press OK button on the Update diary window. Close the SFCtest1 Program window. 13. Follow Steps 17 to 25 in 3.4.1 to compile the application and download it to the Target PLC. 14. Double-click on SFCtest1 program. The SFCTEST1 SFC Program window is displayed. The step currently active is shown with a black box. Short circuit digital input IN00 to change the activity to Step 2 which set the LED1 (DS3 LED) output to TRUE. 15. To stop the monitoring of the PLC application, close the Debugger window. The programs and dictionary windows in debug mode will be closed. OEM Technology Solutions Page 32 EMBEDDED PLC BL2500 BL2500 User's Manual Running Sample Applications 3.4.6 Using Flow Chart 1. Open the ISaGRAF Project Management by double-clicking on the ISaGRAF Projects icon on your Desktop or selecting Start menu Programs ISaGRAF 3.5 Projects. On the Projects Management window, select File menu New. 2. On the Create new project window, enter the name of the project (for example b25test6) and press OK button. The name of project should not exceed 8 characters. The b25test6 project is then listed in the Projects Management window. 3. Select Edit menu Set comment text. Enter a brief description of this project and press OK button. This description will be displayed next to the project name in the Projects Management window. 4. Double-click on b25test6 project. An empty B25TEST6 B25TEST6 Programs window is displayed. 5. Select File menu New. On the New program window enter the name of the program (for example, FCtest1); a brief comment; select the Language to FC; select Begin Style and press OK button. The FCtest1 program is displayed in the B25TEST6 B25TEST6 Programs window. 6. Follow Steps 6 to 11 in 3.4.1 to create and populate the application's Dictionary with SW1 and SW2 Boolean input variables, and LED1 Boolean output variable. 7. On the B25TEST6 B25TEST6 Programs window double-click on FCtest1 program. and place the comment box in the FCtest1 Flow Chart 8. Select the Insert a comment button editor. Double click on the box to type in a comment such as "Exclusive OR logic for switching on LED". 9. Select the Insert a test button and place it between the "Begin" symbol and the "End" symbol. Double click on it to display the editing box for that symbol. Rename it SW1 = SW2, and type in the code SW1 = SW2. 10. Select the Insert an action button and place one on each of the two flow links from the test. Double click on the action symbol placed on the "Yes" flow link to display the editing box. Rename it LED1_OFF and type in the code: LED1 := FALSE; Double click on the action symbol placed on the "No" flow link to display the editing box. Rename it LED1_ON and type in the code: LED1 := TRUE; OEM Technology Solutions Page 33 EMBEDDED PLC BL2500 BL2500 User's Manual 11. Select the Insert a Repeat-Until button Running Sample Applications and place it in between the "Begin" symbol and the "SW1 = SW2" test symbol. Press Delete to just leave the flow line connector behind . 12. Select the flow link between the "Begin" symbol and the "End" symbol and delete it to allow for the program to run continuously without ending. 13. Click on the flow line connector that both the "LED_OFF" and the "LED_ON" action symbols connect to. Select the Insert a flow button and connect both the "LED_OFF" and the "LED_ON" action symbols to the flow line connector remaining from Step 11. This allows the "SW1 = SW2" test to repeat continuously, so if either of SW1 or SW2 change it can test again and change the LED1 output. 14. The FCtest1 Flow Chart should now appear as follows: 15. Save the program by selecting File menu Save. Press OK button on the Update diary window. Close the FCtest1 Flow Chart window. 16. Follow Steps 17 to 25 in 3.4.1 to compile and download it to the Target PLC. 17. Double-click on FCtest1 program. The FCTEST1 Flow Chart window is displayed. Short circuit the digital input IN00 (SW1 will be FALSE), the LED1 will be turned ON as well as the state of LED1 in the Programs window will change. The PLC program implements a Boolean XOR operation on SW1 and SW2 with the result set on the LED1. 18. To stop the monitoring of the PLC application, close the Debugger window. The programs and dictionary windows in debug mode will be closed. The ISaGRAF User's Manual (See [2]) and the on-line help of the ISaGRAF Workbench describes in detail all the Workbench functionalities (editor, simulation, debugger, etc.) including also a reference manual of the PLC programming languages (IEC 61131-3). OEM Technology Solutions Page 34 EMBEDDED PLC BL2500 BL2500 User's Manual Hardware Reference 4. HARDWARE REFERENCE The Figure 4 shows the signal names and connectors of the BL2500 BL2500. The BL2500 BL2500 are equipped with five 1 × 10 friction-lock connector terminals (J1, J3, J9, J11, and J12) where pin 9 is removed to polarize the connector terminals, a 2 × 5 RS-232 RS-232 signal header, a 2 × 5 programming header, and an RJ-45 RJ-45 Ethernet jack on the Rabbit core module. The RJ-45 RJ-45 jacks at J4 and J5 labelled RabbitNet® are serial I/O expansion ports for use with RabbitNet I/O boards. Caution: The RabbitNet jacks do not support Ethernet connections. Be careful to connect your Ethernet cable to the jack labelled Ethernet. Two 4-pin 0.156" friction-lock connector terminals at J7 and J8 are installed to supply power (DCIN and +5 V) to the RabbitNet peripheral boards. Two 2-pin 0.156" friction-lock connector terminals at J2 and J10 are for power supply and +K connections. Figure 4: BL2500 BL2500 Pinouts For detail about electrical and mechanical specifications of the BL2500 BL2500 go to Section 8.1. 4.1 DIGITAL INPUTS The BL2500 BL2500 has 16 digital inputs, IN00-IN15 IN00-IN15. IN00-IN13 IN00-IN13 and IN15 are each protected over a range of -36 V to +36 V, and IN14 is protected over a range of -36 V to +5 V. The inputs are factory-configured to be pulled up to +3.3 V; IN00-IN07 IN00-IN07 can also be pulled up to +K or they can be pulled down to 0 V by changing a surface-mounted 0 W resistor. Figure 5 shows a sample digital input circuit. IN00-IN07 IN00-IN07 and IN15 are protected against noise spikes by a low-pass filter composed of a 22 k series resistor and a 10 nF capacitor. OEM Technology Solutions Page 35 EMBEDDED PLC BL2500 BL2500 User's Manual Hardware Reference Figure 5: BL2500 BL2500 Digital Inputs (Pull-up factory default) The actual switching threshold between a zero and a one is between 0.9 V and 2.3 V for all 16 inputs, i.e. VINLMax = 0.9 V and VINHMin = 2.3 V. IN00-IN13 IN00-IN13 and IN15 are each fully protected over a range of -36 V to +36 V, and can handle short spikes of ±40 V. IN14 is protected over a range of -36 V to +5 V. 4.2 DIGITAL OUTPUTS The BL2500 BL2500 has eight digital outputs, OUT0-OUT7, each of which can sink up to 200 mA. Figure 6 shows a wiring diagram for using the digital outputs in a sinking configuration. Figure 6: BL2500 BL2500 Digital Outputs +K is an externally supplied voltage of 3.3 - 40 V DC, and should be capable of delivering all the load currents. Although a connection to a +K supply is not absolutely required with sinking outputs, it is highly recommended to protect against current spikes when driving inductive loads such as relays and solenoids. Connect the positive +K supply to pin 1 of friction-lock connector terminal J10 and the negative side of the supply to pin 2 of friction-lock connector terminal J10. A friction-lock connector is recommended to connect this supply because the +K inputs are not protected against reverse polarity, and serious damage to the BL2500 BL2500 may result if you connect this supply backwards. 4.3 ANALOG INPUT The A/D converter, shown in Figure 7, compares the DA0 voltage to AD0, the voltage presented to the A/D converter. DA0 therefore cannot be used for the D/A converter when the A/D converter is being used. Note: Only DA1 is available for EMBEDDED PLC as DA0 is used by the A/D converter. OEM Technology Solutions Page 36 EMBEDDED PLC BL2500 BL2500 User's Manual Hardware Reference Figure 7: Schematic Diagram of the A/D Converter The A/D converter programs DA0 using a successive-approximation binary search until DA0 equals the A/D converter input voltage. That programmed DA0 voltage is then reported as the A/D converter value. The A/D converter transforms the voltage at DA0 into a 13.2 mV window around DA0. Because the A/D converter circuit uses a 13.2 mV window, the accuracy is ±6.6 mV. DA0 can range from 0.1 V to 3.1 V, which represents 227 steps of 13.2 mV. This represents a resolution of approximately 8 bits. Since the D/A converter is able to change the DA0 output in 3.22 mV steps, there are 930 steps over the range from 0.1 V to 3.1 V. This represents a resolution of approximately 10 bits. The A/D converter has no reference voltage. There is a relative accuracy between measurements, but no absolute accuracy without calibration. This is because the +3.3 V supply can vary ±5%, the pulse-width modulated outputs might not reach the full 0 V and 3.3 V rails out of the Rabbit 3000 microprocessor, and the gain resistors used in the circuit have a 1% tolerance. For these reasons, each BL2500 BL2500 needs to be calibrated individually, with the constants held in software, to be able to rely on an absolute accuracy. The BL2500 BL2500 has this calibration support. An A/D conversion takes approximately 83 ms. 4.4 ANALOG OUTPUT Two D/A converter outputs, DA0 and DA1, are supplied on the BL2500 BL2500. These are shown in Figure 8. Note: Only DA1 is available for EMBEDDED PLC BL2500 BL2500 as DA0 is used by the A/D converter. Figure 8: Schematic Diagram of D/A Converters The D/A converters have no reference voltage. Although they may be fairly accurate from one programmed voltage to the next, they do not have absolute accuracy. This is because the +3.3 V supply can change ±5%, the PWM outputs might not achieve the full 0 V and 3.3 V rail out of the processor, and OEM Technology Solutions Page 37 EMBEDDED PLC BL2500 BL2500 User's Manual Hardware Reference the gain resistors in the circuit have a 1% tolerance. The D/A converters therefore need individual calibration, with the calibration constants held in software before absolute accuracy can be relied on. The BL2500 BL2500 has such calibration. Pulse-width modulation (PWM) is used for the D/A conversion. The digital signal, which is either 0 V or 3.3 V, will be a train of pulses. This means that if the signal is taken to be usually at 0 V (or ground), the pulses will be some 3.3 V pulses of varying width. The voltage will be 0 V for a given time, then jump to 3.3 V for a given time, then back to ground for a given time, then back to 3.3 V, and so on. A hardware filter that consists of a resistor and capacitor averages the 3.3 V signal and the 0 V signal over time. Therefore, if the time that the signal is at 3.3 V is equal to the time the signal is 0 V, the duty cycle will be 50%, and the average signal will be 1.65 V. If the time at 3.3 V is only 25% of the time, then the average voltage will be 0.825 V. Thus, the software needs to only vary the time the signal is at 3.3 V with respect to the time the signal is at 0 V to achieve any desired voltage between 0 and 3.3 V. It is very easy to do pulse-width modulation with the Rabbit 3000 microprocessor because the chip's architecture includes an advanced PWM feature. 4.5 COMMUNICATION INTERFACES 4.5.1 Serial Ports The BL2500 BL2500 can be configured (using EMBEDDED PLC Utility) to use either one RS-232 RS-232 (serial port E) or the RS485 RS485 (serial port D). The serial port chosen will be used as the communication channel with either the ISaGRAF Workbench or a Modbus master. The serial port A is used by the programming cable. Table 2: EMBEDDED PLC BL2500 BL2500 Serial Port Configuration Serial Port Use Header A Programming Port J3 (Rabbit core module) D RS-485 RS-485 (3-wires) J9 E RS-232 RS-232 (3-wires) J6 4.5.1.1 RS-232 RS-232 The BL2500 BL2500 RS-232 RS-232 serial communication is supported by an RS-232 RS-232 transceiver. This transceiver provides the voltage output, slew rate, and input voltage immunity required to meet the RS-232 RS-232 serial communication protocol. Basically, the chip translates the Rabbit 3000's CMOS/TTL signals to RS-232 RS-232 signal levels. Note that the polarity is reversed in an RS-232 RS-232 circuit so that a +3.3 V output becomes approximately -6 V and 0 V is output as +6 V. The RS-232 RS-232 transceiver also provides the proper line loading for reliable communication. RS-232 RS-232 can be used effectively for distances of up to 15 m. 4.5.1.2 RS-485 RS-485 The BL2500 BL2500 has one RS-485 RS-485 serial channel, which is connected to the Rabbit 3000 Serial Port D through an RS-485 RS-485 transceiver. The half-duplex communication uses PA4 to control the transmit enable on the communication line. Using this scheme a strict master/slave relationship must exist between devices to insure that no two devices attempt to drive the bus simultaneously. The BL2500 BL2500 can be used in an RS-485 RS-485 multidrop network spanning up to 1200 m (4000 ft), and there can be as many as 32 attached devices. Connect the 485+ to 485+ and 485- to 485- using single twisted-pair wires as shown in Figure 9. Note that a common ground is recommended. OEM Technology Solutions Page 38 EMBEDDED PLC BL2500 BL2500 User's Manual Hardware Reference Figure 9: BL2500 BL2500 Multidrop Network The BL2500 BL2500 comes with a 220 W termination resistor and two 681 W bias resistors installed and enabled. The load these bias and termination resistors present to the RS-485 RS-485 transceiver limits the number of BL2500s in a multidrop network to one master and nine slaves, unless the bias and termination resistors are removed. When using more than 10 BL2500s in a multidrop network, or when you need the full common-mode immunity per the RS-485 RS-485 specification, leave the 681 W bias resistors in place on the master BL2500 BL2500, and leave the 220 W termination resistors in place on the BL2500 BL2500 at each end of the network. Figure 10: RS485 RS485 Termination and Bias Resistors 4.5.2 Ethernet Port Figure 11 shows the pinout for the RJ-45 RJ-45 Ethernet port (J4). Note that some Ethernet connectors are numbered in reverse to the order used here. Figure 11: RJ-45 RJ-45 Ethernet Port Pinout Three LEDs are placed next to the RJ-45 RJ-45 Ethernet jack, one to indicate an Ethernet link (LNK), one to indicate Ethernet activity (ACT), and one to indicate when the RCM3200 RCM3200 is connected to a functioning 100Base-T network (SPD). The RJ-45 RJ-45 connector is shielded to minimize EMI effects to/from the Ethernet signals. OEM Technology Solutions Page 39 EMBEDDED PLC BL2500 BL2500 User's Manual Hardware Reference 4.6 LED INDICATORS The EMBEDDED PLC Kernel running on the BL2500 BL2500 uses three LEDs to indicate status: · DS1 (yellow). When this LED is flashing every second, it indicates that the Target PLC is licensed and active. · DS2 (red). This LED is turned ON after reset the Target PLC. If the Target PLC is not licensed the LED will remain ON indefinitely. If the Target PLC is licensed the LED will be turned OFF after 8 seconds. Also, this LED is turned ON during configuration of the Target PLC. DS3 and DS4 (yellow) LEDs are used via ISaGRAF Workbench I/O boards. OEM Technology Solutions Page 40 EMBEDDED PLC BL2500 BL2500 User's Manual Software Reference 5. SOFTWARE REFERENCE 5.1 MORE ABOUT ISAGRAF 5.1.1 Project Manager The ISaGRAF methodology begins with the preparation of a detailed project specification. This step is common to all PLC programming techniques and is usually the result of a thorough analysis of the project and consultation between the integrator and the user. Distributed applications can be represented as several ISaGRAF projects grouped together in the project list. Distributed applications can be edited, simulated or debugged on the same Windows screen. 5.1.2 Program Manager With the program manager the application specification is divided into smaller functional modules. The exact operation that is to be performed within each module is defined at that stage. ISaGRAF's program management facilities allow the user to define each of these modules, their operations and their interaction to form the complete application. 5.1.3 Variable Definition All variables are declared or imported in the ISaGRAF dictionary. When this step is achieved, during programming, a mouse click will insert the variable in the program. Any external database can be imported to build the ISaGRAF dictionary. A quick declaration allows many variables to be declared with one command and an easy to use mapping tool is provided for Modbusbased SCADA systems such as Indusoft®. For a brief description about Indusoft and how to use it in conjunction with EMBEDDED PLC see Chapter 9. The EMBEDDED PLC Firmware Kernel implements three types of Modbus communication: Modbus over TCP/IP, Modbus RTU over RS232 RS232 and Modbus RTU over RS485 RS485. The EMBEDDED PLC Kernel can run only one protocol at one time. Note: EMBEDDED PLC has the TCP/IP port 502 reserved (this port can not be modified) to support Modbus over TCP/IP communications. Since ISaGRAF Workbench uses a different TCP/IP port for communication with the Target PLC (port 1100), the Workbench and a Modbus master (HMI or SCADA) can communicate with the Target at the same time, i.e. when the Target is configured as Modbus over TCP/IP the ISaGRAF Workbench and a Modbus master can share the same physical line (Ethernet). However, when the Target is using either RS232 RS232 or RS485 RS485 only an ISaGRAF Workbench or a Modbus master can be connected to the target at any one time. 5.1.4 Functional Module Programming The next step in the ISaGRAF methodology is the actual programming of the various functional modules. This can be done using any one of the six supported languages: · Sequential Functional Chart (SFC) · Function Block Diagram (FBD) · Ladder Diagram (LD) · Structured Text (ST) · Instruction List (IL) · Flow Chart (FC) OEM Technology Solutions Page 41 EMBEDDED PLC BL2500 BL2500 User's Manual Software Reference 5.1.5 IEC 61131-3 Language Editors In February 1993, responding to the need for standards to reduce training costs and guaranteed portability, the IEC issued the IEC 61131-3 standard: a specification of five PLC programming languages that can be freely mixed to define automation and control procedures. In August 1996, ISaGRAF version 3.2 received the certificate of PLC open compliance class of IEC 61131-3 (base level IL). 5.1.5.1 Sequential Function Chart Editor SFC divides the process cycle into a number of well defined steps, separated by transitions. SFC is the core language of the IEC 61131-3 standard. The other languages are used to describe the actions performed within the steps and the logical conditions for the transitions. Parallel processing can easily be described using SFC. 5.1.5.2 Function Block Diagram Editor The FBD is a graphical language that allows the user to build complex procedures by taking existing function blocks from the ISaGRAF library and wiring them together on the screen. ISaGRAF includes a library with more than 60 blocks ready to use. Users can enlarge this library by writing functions and function blocks in LD/FBD/ST/IL or C. 5.1.5.3 Ladder Diagram Editor The ladder diagram is one of the most familiar methods of representing logical equations and simple actions. The ISaGRAF ladder diagram editor offers the best compromises between high level graphic capabilities and easy to use keyboard driven programming. 5.1.5.4 Structured Text Editor Structured text is a high level structured language with a syntax similar to Pascal, but more intuitive to the automation engineer. This language is mainly used to implement complex procedure that cannot be easily expressed with graphical languages (IF/THEN/ELSE, FOR, WHILE, etc.). 5.1.5.5 Instruction List Editor Instruction list is a low level language similar to the simple textual PLC languages. 5.1.6 Flow Chart Editor In addition to the five IEC 61131-3 languages ISaGRAF implements another graphical language, Flow Chart. Flow Chart is a decision diagram, which can also be used to describe sequential operations. 5.1.7 Document Generator ISaGRAF features a self-documentation capability that can automatically generate the project's most current project description, project architecture, history of modifications, I/O wiring lists, dictionaries and cross references. 5.1.8 Simulation Without any target hardware platform, the programmer can validate the complete application in the office. With ISaGRAF's powerful simulator on the workbench, the user can perform structural and functional tests of each module separately or on the global application. The simulator makes it easy to trace the program execution and to see the status of any internal variable. The I/O hardware can be fully simulated and internal status and variables manual forced by the user. OEM Technology Solutions Page 42 EMBEDDED PLC BL2500 BL2500 User's Manual Software Reference During simulation, editors can be opened in debug mode to see how programs are executed. Note: Not all C functions and C function blocks are available for simulation. Section 5.2.2 and 5.2.3 describes C functions and C function blocks that are specific to the BL2500 BL2500 and are not available for simulation. 5.2 ISAGRAF SOFTWARE REFERENCE This section presents information about the specific elements of the ISaGRAF Workbench Library for the EMBEDDED PLC BL2500 BL2500 (I/O boards, C functions and C function blocks). 5.2.1 I/O Boards ISaGRAF I/O board library for the BL2500 BL2500 is included as part of the BL2500 BL2500 BSP to make it easy to communicate with the BL2500 BL2500 supported inputs and outputs. These I/O boards are described in the following sub-sections. 5.2.1.1 BL2500 BL2500 Digital Inputs Board Name: bl25di Description: Monitors IN00 - IN15 of the BL2500 BL2500 Digital Inputs Parameters: None Number of Channels: 16 Connection Terminals: IN00 to IN15 Connection for positive signal channel 1 to 16 GND Connection for negative signal all channels Channel Value Correspondence: TRUE When digital input pulled up to greater than 2.3 V (VINHMin) FALSE When digital input pulled down to less than 0.9 V (VINLMax) OEM Technology Solutions Page 43 EMBEDDED PLC BL2500 BL2500 User's Manual Software Reference 5.2.1.2 BL2500 BL2500 Digital Outputs Board Name: bl25do Description: Controls OUT0 - OUT7 of the BL2500 BL2500 digital sinking outputs Number of Channels: 8 Connection Terminals: OUT0 to OUT7 Connection of channels 1 to 8 Channel Value Correspondence: TRUE Digital output is short-circuit to 0 V FALSE Digital output is open circuit 5.2.1.3 BL2500 BL2500 On-board LEDs Name: bl25led Description: Controls the BL2500 BL2500 on-board LEDs DS3 and DS4 Number of Channels: 2 Connection Terminals: None Channel Value Correspondence: TRUE LED is ON FALSE LED is OFF 5.2.1.4 BL2500 BL2500 Analog Input Board Name: bl25ai Description: Monitors AD0 Analog Input of the BL2500 BL2500 (10-bit resolution over 0-3.3V range) Number of Channels: 1 Connection Terminals: AD0 Connection for positive signal channel 1 AGND Connection for negative signal channel 1 Channel Value Correspondence: Analog REAL type variable: Voltage input in the range 0 3.3 V. OEM Technology Solutions Page 44 EMBEDDED PLC BL2500 BL2500 User's Manual Software Reference 5.2.1.5 BL2500 BL2500 Analog Output Board Name: bl25ao Description: Controls DA1 Analog Output of the BL2500 BL2500 (10-bit resolution over 0-3.3V range) Number of Channels: 1 Connection Terminals: DA1 Connection for positive signal channel 1 AGND Connection for negative signal channel 1 Channel Value Correspondence: Analog REAL type variable: Voltage output in the range 0 3.3 V. 5.2.2 ISaGRAF C Functions 5.2.2.1 KERNVER kernver versi Arguments: MSG versi EMBEDDED PLC kernel version number (minimum message length 8) Description: Returns the kernel version number. (* ST Equivalence *) result := kernver(); Remarks: Not available for simulation. 5.2.2.2 RD_TIME rd_time Sel Q Arguments: Sel INT format of the time and date in the output message (Q) Q MSG time, date and day of the week (depending of Sel value) If Sel = 0, Q format is YYYY/MM/DD; If Sel = 1, Q output format is HH:MM:SS OEM Technology Solutions Page 45 EMBEDDED PLC BL2500 BL2500 User's Manual Software Reference If Sel = 2, Q output format is the day of the week Description: Gives the time, date and the day of the week depending on the value of argument sel. (* ST Equivalence *) result := rd_time(sel); Remarks: Not available for simulation. 5.2.3 ISaGRAF C Function Blocks 5.2.3.1 SET_TIME set_time Trigger yy mm dd hh minute ss dOfWeek result Arguments: Trigger BOO if Rising edge, sets the time and date of the BL2500 BL2500 yy INT Year (1900 - 2050) mm INT Month (1 - 12) dd INT Day of month (1 -31) hh INT Hour (0 - 23) minute INT Minute (0 - 59) ss INT Second (0 - 59) DOFWEEK INT Day of the week (0 - 6, 0 means Sunday) result BOO 1 if operation was successful; 0 otherwise Description: Set the time and date of the BL2500 BL2500 Real Time Clock. (* ST Equivalence *) result := set_time(trigg, yy, mm, dd, hh, minute, ss, dOfWeek); Remarks: Not available for simulation. OEM Technology Solutions Page 46 EMBEDDED PLC BL2500 BL2500 User's Manual OEM Technology Solutions Software Reference Page 47 EMBEDDED PLC BL2500 BL2500 User's Manual Loading or Upgrading the Firmware Kernel 6. LOADING OR UPGRADING THE FIRMWARE KERNEL 6.1 INTRODUCTION The EMBEDDED PLC Utility is used to load the EMBEDDED PLC Firmware Kernel to the Rabbit-based Target such as the SBC BL2500 BL2500. The Firmware Kernel, once loaded into the Target, requires a license key to run. The EMBEDDED PLC Utility does not check for an existing license key before loading the Kernel. Thus, a new license key is required after a Kernel is loaded to a Targe