- Manuals
- Brands
- Omron Manuals
- Software
- CX-PROGRAMMER V9
- Operation manual
-
Contents
-
Table of Contents
-
Bookmarks
Related Manuals for Omron CX-PROGRAMMER V9
Summary of Contents for Omron CX-PROGRAMMER V9
-
Page 1
Cat. No. W446-E1-12 SYSMAC CX-Programmer Ver. 9. CXONE-AL_C-V4/AL_D-V4 OPERATION MANUAL… -
Page 3
SYSMAC CX-Programmer Ver. 9.@ CXONE-AL@@C-V4/AL@@D-V4 Operation Manual Revised July 2010… -
Page 5
OMRON CX-Programmer – Operation Manual About this Manual (W446): This manual describes the operation of the CX-Programmer and consists of the following three parts. • Part 1: CX-Programmer This part describes the CX-Programmer software that is a PLC Programming Device, and also provides the overall precautions and the version upgrades information. -
Page 7
Warranty and Limitations of Liability WARRANTY (1) The warranty period for the Software is one year from either the date of purchase or the date on which the Software is delivered to the specified location. (2) If the User discovers a defect in the Software (i.e., substantial non-conformity with the manual), and returns it to OMRON within the above warranty period, OMRON will replace the Software without charge by offering media or downloading services from the Internet. -
Page 8
OMRON CX-Programmer – Operation Manual Application Considerations SUITABILITY FOR USE THE USER SHALL NOT USE THE SOFTWARE FOR A PURPOSE THAT IS NOT DESCRIBED IN THE ATTACHED USER MANUAL. CX-Programmer_Page (… -
Page 9
The license fee of the Software does not include service costs, such as dispatching technical staff. ERRORS AND OMISSIONS The information in this manual has been carefully checked and is believed to be accurate; however, no responsibility is assumed for clerical, typographical, or proofreading errors, or omissions. -
Page 10
This manual provides information for programming and operating the Unit. Be sure to read this manual before attempting to use the Unit and keep this manual close at hand for reference during operation. It is extremely important that a PLC and all PLC Units be used for the… -
Page 11
• Some Special I/O Units and CPU Bus Units operate with parameters that are stored in the CPU Unit. If one of these Units is selected for backup, restrictions will be displayed in the Comments Area of the Backup from PLC Dialog Box. -
Page 12
CS1W-CLK12/CLK52(-V1), that are connected to an external power supply are mounted to the PLC. If the 24-V side is grounded on the external power supply, a short will be created if the 0-V side of the peripheral device is grounded. When connecting peripheral devices, either ground the 0-V side of the external power supply or do not ground the external power supply at all. -
Page 13
D20000 and be sure that the size of data written does not exceed the size of the DM Area. When the data file is read from the Memory Card at startup, data will be written in the CPU Unit starting at D20000 even if another address was set when the AUTOEXEC.IOM… -
Page 14
The BKUP indicator will light on the front of the CPU Unit when the backup operation is in progress. Do not turn OFF the power supply to the CPU Unit when the BKUP indicator is lit. -
Page 15
Unless the CPU Bus Unit or Special I/O Unit settings have been previously transferred to the CPU Unit and the allocated DM Area/CIO Area data in the PLC data table for Special I/O Units or CPU Bus Units is to be overwritten, always click the No Button, shift the address, and repeat the transfer procedure. -
Page 16
• If you don’t know the device type and CPU type, but are connected directly to the CPU Unit on a serial line, select PLC — Auto Online to go online, and then select PLC — Edit — Information from the menus. -
Page 17
In the IO Table Window, right-click and select Unit Manufacturing information — CPU Unit. The following Unit Manufacturing information Dialog Box will be displayed Unit version Use the above display to confirm the unit version of the CPU Unit connected online. CX-Programmer_Page (… -
Page 18
These labels can be attached to the front of previous CPU Units to differentiate between CPU Units of different unit versions. Unit Version Notation In this manual, the unit version of a CPU Unit is given as shown in the following table. CPU Units on which no unit version is… -
Page 19
CPU Units Ver. 2.0 CPU Units Ver. 3.0 (Lot No.: 031002 on) (Lot No.: 040629 on) CP Series CP1H CPU Units CP1H-X@@ @@-@ CPU Units Ver. 1.0 or 1.1 CP1H-XA@@ @@-@ CP1H-Y@@ @@-@ CPU Units Ver. 1.1 CP1L CPU Units CP1L-M@@@ CPU Units Ver. -
Page 20
Units later Downloading and Uploading Individual Tasks Improved Read Protection Using Passwords Write Protection from FINS Commands Sent to CPU Units via Networks Online Network Connections without I/O Tables Communications through a Maximum of 8 Network Levels OK from lot number… -
Page 21: Table Of Contents
Connecting Online to PLCs via NS-series OK for up to 64 Setting First Slot Words groups Automatic Transfers at Power ON without a Parameter File Automatic Detection of I/O Allocation Method for Automatic Transfer at Power ON Operation Start/End Times…
-
Page 22: Ok Ok
Ver. 2.0 or later Downloading and Uploading Individual Tasks Improved Read Protection Using Passwords Write Protection from FINS Commands Sent to CPU Units via Networks Online Network Connections OK, but only if OK, but only if without I/O Tables I/O table…
-
Page 23: Ok Ok Ok
OK with CX- Programmer Ver. 7.2 or higher Note: CX-Programmer version 7.0 or higher is required to use functions added for unit version 4.0. Additional functions are supported if CX-Programmer version 7.2 or higher is used. CS1D CPU Units Unit version 3.0 (Ver. 3.0) is not supported.
-
Page 24
Using SFC programming in tasks OK with CX- Programmer Ver. 7.2 or higher Note: CX-Programmer version 7.0 or higher is required to use functions added for unit version 4.0. Additional functions are supported if CX-Programmer version 7.2 or higher is used. CX-Programmer_Page (… -
Page 25
Functions Supported by Unit Version for CJ2 CPU Units (CJ2H-CPU6@-EIP, CJ2H- CPU6@) Functions Added for Unit Version 1.3 CX-Programmer version 9.1 or higher is required to use functions added for unit version 1.3. CPU Units CJ2H CPU Units Models CJ2H-CPU6@-EIP… -
Page 26
Unit Version 1.0 All functions that are supported by unit version 4.0 or later of the CJ1 CPU Units are supported by unit version 1.0 of the CJ2 CPU Units. CX-Programmer version 8.0 or higher must be used to enable using unit version 1.0 of the CJ2 CPU Units. -
Page 27: Cx-Programmer_Page
Note 1. The unit version for the CP1H-X@@@@-@/XA@@@@-@ begins at 1.0. The unit version for the CP1H-X@@@@-@ begins at 1.1. CX-Programmer version 7.11 or higher is required to use CP1L CPU Units with unit version 1.0. xxiv CX-Programmer_Page (…
-
Page 28
2.0 Unit version 2.0 ×: Cannot be used, ∆: Can be used except for new functions added for unit versions, ❍: Can be used Note 1. It is not necessary to upgrade the version of the CX-Programmer if functionality that was enhanced for the upgrade of the CPU Unit will not be used. -
Page 29: Ok Ok Ok
1.1 Unit Ver.1.1 ×: Cannot be used, ∆: Can be used except for new functions added for unit versions, ❍: Can be used Note 1. As shown above, there is no need to upgrade to CX-Programmer version 4.0 as long as the functions added for unit version 2.0 or unit version 1.1 are not used.
-
Page 30: Cs1D Cpu
Device Type Setting The unit version does not affect the setting made for the device type on the CX-Programmer. Select the device type as shown in the following table regardless of the unit version of the CPU Unit. Series CPU Unit group…
-
Page 31
CPU Units Ver. 2.0 or later to a Pre-Ver. 2.0 CPU Units. After the above message is displayed, a compiling error will be displayed on the Compile Tab Page in the Output Window. An attempt was made using CX- Check the settings in the PLC Programmer version 4.0 or… -
Page 33
PART 1: CX-Programmer… -
Page 35
The following conventions are used to indicate and classify precautions in this manual. Always heed the information provided in them. Failure to heed precautions can result in injury to people or damage to the product. -
Page 36
OMRON PART 1: CX-Programmer Visual Aids The following headings appear in the left column of the manual to help you locate different types of information. Indicates information of particular interest for efficient and convenient operation of the product. Indicates lists of one sort or another, such as procedures, checklists etc. -
Page 37
PART 1: CX-Programmer About this Part This part describes the CX-Programmer application and its ability to create and maintain programs for use with OMRON SYSMAC CS/CJ/CP, CV and C PLCs. It does not provide detailed information concerning the PLCs themselves, for this information the commercial manual for the device must be consulted. -
Page 38
When the CJ2M is selected as the PLC model, function block area usage is displayed. Improvements for Host Link (SYSMAC WAY) Connections When the CP1E is selected as the PLC model, the network type can be set to SYSMAC WAY. -
Page 39
Version 8.3 Upgrade Information Functionality Improved from Version 8.2 to 8.3 Compatible PLC Models The functionality improvements are supported for CJ2H CPU Units with unit version 1.2 or later. TIMER and COUNTER Added as Symbol Data Types Previous version (version 8.2) New version (version 8.3) -
Page 40
This is called the EM Area force- setting/resetting function. Searching for Symbol Names and Displaying Usage Locations from Cross-reference Pop- Previous version (version 8.2) New version (version 8.3) Searching from cross-reference pop-ups was Symbol names can be specified directly in cross- possible only for address specifications. -
Page 41
PLC connected to the NV-series PT. connected to the NV-series PT. *Functionality improved in version 8.21 over version 8.20. CP1E CPU Unit Supported for Connecting Online to a PLC via an NS-series PT Previous version (version 8.1) New version (version 8.2) -
Page 42
Position Control Unit (CJ1W-NC@@4) parameters. In addition, the CAM Data Creation Software (WS02-MOPC2) can be used to convert cam data in a CSV file into data that can be used by a Position Control Unit, and the data can be imported to the PLC memory component of the CX-Programmer. -
Page 43
PART 1: CX-Programmer Version 8.0 Upgrade Information Functionality Improved from Version 7.2 to 8.0 Support has been added for the following PLC models as part of the version 7.2 to version 7.3 upgrade. Compatible PLC Models New CP-series CP1L CPU Units The CP-series CP1L CPU Units (CP1L-L10D@-@ and CP1L-M60D@-@) are supported. -
Page 44
DM Areas. DM Areas. Improvements to Online Functions With a CJ2 CPU Unit, you can easily connect to a PLC on an EtherNet/IP network. Improvements to Monitoring When registering an array variable in the Watch Window, it is now possible to register and monitor a selected range of array elements. -
Page 45
PART 1: CX-Programmer Version 7.2 Upgrade Information Functionality Improved from Version 7.0 to Version 7.2 Support has been added for the following PLC models as part of the version 7.0 to version 7.10 upgrade. Compatible PLC Models The high-speed CJ1-H-R CPU Units (CJ1-CPU@@H-R) are supported. -
Page 46
With this feature, it is not necessary to create ladder programming that generated errors using the FAL and FALS to generate errors. Also, it is easy to check the operation of the instructions, and check operation in the ladder program and NS-series touch panel when PLC errors occur. -
Page 47
Previous version (version 7.0) New version (version 7.2) When automatic online connection was It is not necessary for the user to select the computer’s serial port in performed from the computer’s serial port, it advance. was not necessary for the user to set the PLC… -
Page 48
New version (Ver. 7.0) The STRING data type could not be used in The STRING data type can be used as a data type in the ST language. the ST language. (See note.) With this capability, it is easy to set a variable containing text (ASCII) in another variable with a substitution operation (such as: a := ‘@READ’;). -
Page 49
Improvements in Data Trace/Time Chart Monitoring Previous version (Ver. 6.1) New version (Ver. 7.0) Up to eight words of data can be specified at the trace data for data Only one word of data could be specified at the tracing and timechart monitoring. -
Page 50
6.0 to version 6.1 upgrade: CP Series CP1H CPU Units (CP1H-XA and CP1H-X) Support for NSJ-series NSJ Controllers The PLC model (“device type”) can be set to “NSJ” and the CPU type can be set to the G5D. Support for FQM1 Unit Version 3.0 The new models of the FQM1 Flexible Motion Controller are now supported (i.e.,… -
Page 51
New version (Ver. 6.1) The CPU Unit’s error log could not be saved. The CPU Unit’s error log can be saved as a CSV file. The data collected in these CSV files can be analyzed or printed later with programs such as MS Excel. -
Page 52
If the PLC model is set to the CS/CJ-series, the CX-Integrator starts when Tools – automatically when Tools – Network Settings is selected. Network Configuration Tool If the PLC model is set to a model other than the CS/CJ-series, the CX-Net starts when was selected. Tools – Network Settings is selected. CX-Programmer Startup Method Previous version (Ver. -
Page 53
Unit Settings (Ethernet Units) Note: When downloading PLC memory data from the computer to an actual PLC, a warning will be displayed if the PLC memory area addresses to be transferred from the computer overlap the addresses of the Special Unit settings in the computer’s I/O Table Window. -
Page 54
Monitor FB Ladder Instance from the monitored while monitoring pop-up menu. At this point, it will be possible to monitor the status of I/O bits and the the program online. (It was… -
Page 55
OMRON PART 1: CX-Programmer Version 5.0 Upgrade Information The following tables outline the changes that have been made from version 4.0 to version 5.0 of the CX- Programmer. Functionality Improved from Version 4.0 to Version 5.0 Compatible PLCs CX-Programmer version 5.0 supports the following PLCs: CS/CJ-series CPU Unit Ver. -
Page 56
A list of all variables/addresses containing “temperature” are displayed. For example, select the item at the bottom of the list temp_alarm02, W0.05, The lower part of a device A temperature error (70 degrees min) to simply input the symbol name temp_alarm02. -
Page 57
Area 2, provided that the addresses are not the same. (manually set) with a CS/CJ- Example: The entire Data Link (i.e., Area 1 and Area 2) can be set in EM bank 0. series Controller Link Unit. Setting Local Network Tables (Using CX-Net Routing Tables) for the Serial Ports of Serial Communications Boards/Units (Ver. -
Page 58
OMRON PART 1: CX-Programmer Version 4.0 Upgrade Information The following tables outline the changes that have been made from version 3.3 to version 4.0 of the CX- Programmer. Functionality Improved from Version 3.3 to Version 4.0 Compatible PLCs CX-Programmer Version 4.0 supports the following PLCs: CS/CJ-series CPU Unit Ver. -
Page 59
Improvements to Program Development in Task Units • Downloading by Task (Program) (CS/CJ-series CPU Unit Ver. 2.0 or Later) Previous version (Ver. 3.3) New version (Ver. 4.0) When downloading a program… -
Page 60
WAIT (standby status). This function improves debugging efficiency when using multiple tasks. • Checking Whether the Same Address Is Being Used by Another Task (Program): Cross Reference Report Function (CS/CJ-series PLCs Only) Previous version (Ver. 3.3) New version (Ver. 4.0) -
Page 61
Improvements to Unit Error Log Display • Displaying Error Log for CPU Bus Units or Special I/O Units in the I/O Table Previous version (Ver. 3.3) New version (Ver. 4.0) The error log could not be… -
Page 62
OMRON PART 1: CX-Programmer Improvements to Comment Functions • Setting Multiple Comments (up to 16) for a Single Address, and Selecting a Label to Switch All the Comments Previous version (Ver. 3.3) New version (Ver. 4.0) A single comment could be… -
Page 63
New version (Ver. 4.0) The cross reference function By moving the cursor to an address in the ladder diagram and selecting Check usage only enabled the cross including unused, the usage list (with comments) can be displayed starting with the reference report to be selected address. -
Page 64
Previous version (Ver. 3.3) New version (Ver. 4.0) Mnemonic searches required Mnemonic searches do not require an asterisk * or parentheses () with function codes an asterisk * or parentheses () input after the mnemonic search target. with function code inputs after the mnemonic search target. -
Page 65
DM/EM Area data can be changed into PVs in bit units. Prevention of Leaving Set Forced Set/Reset Status • Checking the Forced Set/Reset Status when Changing from Online to Offline Previous version (Ver. 3.3) New version (Ver. 4.0) -
Page 66
Previous version (Ver. 3.3) New version (Ver. 4.0) FINS commands could be If a CS/CJ-series PLC of Ver. 2.0 or later is used, FINS commands can be used to used to access nodes up to access nodes up to eight. -
Page 67
Device Type to the CJ1M and the CPU Type to the CPU22. Creating a CX-Programmer Project for the CJ1M-CPU11/21 1. On the initial CX-Programmer display, select File – New and then set the Device Type to the CJ1M in the Change PLC Dialog Box. -
Page 68
PWM output 1 can be written and can be transferred, but an error will occur when the program is executed. Note: The Stop CPU on Instruction Error Option in the PLC Setup can be selected to stop program execution by creating a fatal error when an instruction error is detected. Instruction errors include instruction processing errors (the ER Flag will turn ON), DM/EM indirect addressing BCD errors, and illegal access errors. -
Page 69
OMRON PART 1: CX-Programmer Version 3.2 Upgrade Information The following tables outline the changes that have been made from version 3.1 to version 3.2 of the CX- Programmer. • New Models for Automatically Set Data Links Previous version New version (version 3.2) (version 3.1) -
Page 70
• The send data sizes is the same for all nodes for each area. • Area 1 is selected from the bit-access areas (e.g., CIO Area) and area 2 is selected from word-access areas (e.g., DM Area). • Data link areas are allocated in ascending order of node addresses. -
Page 71
Master node Slave node • All slave nodes receive part of the data sent by the master node. In addition, (1) Area and Start Word each slave node receives unique data from the master node (see a to d in figure). -
Page 72
• Master node Slave node All slave nodes receive part of the data sent by the master node (1a in figure). (1) Area and Start Word • The master node receives all data sent by the slaves. The data sizes are fixed for all nodes. -
Page 73
New version (version 3.2) (version 3.1) DM/EM data files created with DM/EM data files created with the SYSMAC Support Software (SSS) or CV Support the SYSMAC Support Software (CVSS) can be imported from the PLC Memory Window. Software (SSS) or CV Support The following DM/EM data files can be imported. -
Page 74
OMRON PART 1: CX-Programmer Version 3.1 Upgrade Information The following tables outline the changes that have been made from version 3.0 to version 3.1 of the CX- Programmer. • Program Editing Functions Improvements to Global Replacement Operation Previous version (Ver. 3.0) New version (Ver. -
Page 75
Previous version (Ver. 3.0) New version (Ver. 3.1) Present values were changed from the Present values can be changed by pressing the Enter key on an operand that is menus. being monitored, or by double-clicking it. Start Address Setting when Monitoring Present Values in I/O Memory (Continuous Address Monitoring) Previous version (Ver. -
Page 76
Individual cells being monitoring in the PLC Memory Window can be selected while monitoring, the monitor status had and the Set | Value command or the Set Value button can be used to display to be cleared and then PLC | Transfer | the Set Present Value dialog box. -
Page 77
PLC. closed project file. (Select Compare Program from the File menu and select the file to be compared.) The results of verification can be saved to a file in CSV format. Added or omitted instructions were not… -
Page 78
Options | Rack/Slot Start Address can be selected during I/O table editing to set the start address could not be set for the start address for a specific Rack and slot (in addition to the start address for each slot). -
Page 79
Previous version (Ver. 3.0) New version (Ver. 3.1) An open project could not be Select Save As from the Project menu to save a project open in CX-Net under any saved under a new file name. desired name. (The file name could be set only when a new project was created. -
Page 80
New version (Ver. 3.1) When the local network table in The local network type is not set in the local network table in the routing tables for the routing tables were set, the CS-, CJ-, and CV-series PLCs and the network type is not displayed on the main local network type and the view. -
Page 81
PART 1: CX-Programmer Detailed Information Displays when Verifying Routing Tables Previous version (Ver. 3.0) New version (Ver. 3.1) Details were not displayed when Detailed results are displayed after verifying routing tables. verifying routing tables, making it difficult to find errors. CX-Programmer_Page (xlvii) -
Page 82
Using Microsoft Windows Features in CX-Programmer………………51 CHAPTER 4 Reference ………………. 59 PLCs and Projects…………………………59 Symbols …………………………..60 Program Editing…………………………74 Memory View Function……………………….88 When Function Block Definitions or SFC Programs Are Created ……….89 Mnemonic Program Editing……………………..91 Simulation…………………………..91 Working On-line…………………………93 Flash ROM Backup ……………………….105 Data Trace/Time Chart Monitoring ……………………106… -
Page 83
Default CX-Programmer Keyboard Mappings ………………..128 Default SYSMAC Support Soft Keyboard Mapping………………130 Default GPPQ Keyboard Mapping (CX-Programmer Ver. 9.@ Only)…………..132 APPENDIX B EtherNet/IP Connections from Windows XP (SP2 or Higher), Windows Vista and Windows 7………… 135 APPENDIX C Smart Input Mode …………..137 Input Procedure in Smart Input Mode……………………137… -
Page 84: Chapter 1 Technical Specifications
The following list describes important features that were present in CX-Programmer 2.1. ♦ Support for new PLCs – Full support has been added for the, CS1G-H, CS1H-H and CJ1G, CJ1G-H, CJ1H- H series PLCs and the D/S Gateway PLC (CPM2*-S*).
-
Page 85
♦ Watch Window — The watch window has been enhanced to enable addresses to be entered directly on the watch sheet. ♦ Key Mapping — The data of Keyboard Mapping can be saved to a file (*.mac) and loaded into a CX- Programmer. -
Page 86
Programmer on a computer. Memory Capacity The required RAM depends on the size of the programs that are created. For each Kstep of PLC programming, approximately 2 Mbytes of available RAM is required. If more than one PLC is registered in a project, the total RAM for the programs for all of the PLCs is required. -
Page 87: Functional Restrictions For Windows Vista And Windows 7
Online connections to PLCs on SYSMAC NET networks are not possible through a SYSMAC NET Support Board when SYSMAC NET is selected as the network type. • Online connections to CS1 Boards in computers are not possible when «CS1 board» is selected as the network type. •…
-
Page 88: Installing And Uninstalling The Software
CX-Programmer comes with a detailed context-sensitive help system. At any time while using the software, it is possible to get help on the particular point that is currently being worked on, or on general aspects of CX- Programmer. This system is intended to complement the manual, by providing an on-line reference to specific functions of the software.
-
Page 89
♦ Instant Help. A brief message appears in the status bar as menu commands and buttons are selected. ♦ On-line Status. This shows the on-line or off-line status of the PLC. If connection to a PLC is lost, the status bar will indicate this by flashing. -
Page 90: Technical Support
Specifications), no difficulties should be encountered. However, if there is a problem, contact Customer Services. If a problem occurs, check that it does not relate to a fault outside CX-Programmer, for instance, with CX- Server components. Check the following: ♦ The computer is working correctly.
-
Page 92: Chapter 2 Quick Start Guide
CX-Programmer is activated from the Start button in the Microsoft Windows taskbar. Once activated, CX-Programmer is displayed. CX-Programmer provides the facility to create a project file in which as many PLCs as required can be included. For each PLC, ladder program(s), addressing and network details, pre-set PLC memory, IO table, expansion instructions (if applicable) and programming symbols can be defined.
-
Page 93: Introducing Cx-Programmer Projects
To access the Full Version of CX-Programmer, the appropriate license number must be entered. The license number may be input at the time of installation or later. To enter an upgrade license number or re- enter the existing number after installation, follow these steps: 1, 2, 3……
-
Page 94
The status bar displays instant help, Network and Node numbers of current PLC, PLC on-line status, PLC mode, connected PLC and PLC type, PLC cycle time, on-line edit buffer size and current cursor position depending on which view is displayed. -
Page 95
The symbol table, the Mnemonics view and the I/O Comment view must be explicitly selected to be displayed. All views can be opened at the same time and can be selected via options associated with the Window menu. -
Page 96
♦ Grid Dots. Dots that display at the connection points of each cell. To display the grid, select the Grid button from the toolbar. ♦ Rung Margin Area. The area to the left of the Left bus-bar. The rung number and step number for each rung are shown here (rung number on the left). -
Page 97
It is possible to indicate the physical format of the data that is stored at an address. This additional data typing facility enables CX-Programmer to check whether the address is used consistently within programs. In the symbol tables, an icon is shown next to a symbol that indicates its data type. The Data Type set is as follows: Data Type… -
Page 98
Each PLC within a project has a ‘global’ symbol table that consists of symbols that can be used in any of its programs. When a PLC is added to a project, its global symbol table is filled with a pre-set list of symbols, dependant upon PLC type. -
Page 99: Using Cx-Programmer
PLC. Programming should be targeted at the PLC that is to be used. It is possible to change the PLC type at any time — the program(s) are then converted. However, since the conversion may not be perfect, it is best to set the correct PLC type at the beginning.
-
Page 100
Determine PLC setup parameters PLC configuration data. Create appropriate IO Table List all related IO devices and addresses. Some C-series PLCs do not support this function. Decide how to input and edit the program CX-Programmer offers two languages: ladder and mnemonic. -
Page 101
Starting a New Project Once the project requirements have been worked out on paper, the first step is to create a project and define the device entries for that project. A project can have multiple PLCs. CS/CJ/CP-series PLCs are multi-tasking and can therefore have more than one program associated with them in the project;… -
Page 102
CS/CJ-series PLCs ST or SFC can be selected as the program language when inserting programs. When using CS/CJ-series PLCs, however, the CPU Unit of the PLC being used must be unit version 4.0 or higher. Right-click Program in the project workspace to display the pop-up menu and select Insert Program – Ladder, Insert Program –… -
Page 103
Creating Symbols An important step in creating a Ladder Program is the definition of those PLC data areas that are to be referenced by the program. It is possible to skip this step, and use addresses directly within the program. It is better, however, to create symbolic names for the addresses so that the programs become more readable and maintainable. -
Page 104
When a comment dialog is displayed, select the OK pushbutton again. Note that the rung margin now shows a red mark down its side. This is to indicate that the rung is incomplete – the marker bar shows whenever the rung has an error. -
Page 105
13. Give the instruction a comment of ‘Red and amber lights on together’. 14. Place a New Contact at the start of the next rung to display the New Contact dialog. 15. Select ‘AmberTimerDone’ from the combo and select the OK pushbutton. When a comment dialog is displayed, select the OK pushbutton again. -
Page 106
10. To the right of the second contact, place a coil and assign it to ‘AmberLight’. 11. Press return when the selected cell is on the right of the rung. This will create a new line. 12. Below the left ‘AmberTimerDone’ contact (but on the same rung), place a New Closed Contact and assign it to the symbol ‘RedTimerDone’. -
Page 107
Task Transfer to PLC from the PLC Menu, and download a specified single task or multiple tasks. This function enhances the efficiency of program development by multiple personnel. Particularly, by downloading to the PLC by task (program), only the parts to be changed are reflected in the PLC, resulting in fewer working errors. -
Page 108
Program verification is possible offline between the current project and a closed project file. (Select Compare Program from the File menu and select the file to be compared.) The results of verification can be saved to a file in CSV format. -
Page 109
CS-, CJ-, CP-, CVM1, or CV-series PLC or to the I/O comment area in the allocated UM (user memory) in a C-series PLC. -
Page 110: Summary
Writing a Ladder program. Note: You can switch to the Smart Style Mode to use Smart Menus. This is the same mode as the one supported by the CX-Programmer for CP1E. Select Tools — Options and then set the Menu/Options Style on the General Tab Page to display in the Smart Style Mode (CX- Programmer version 9.0 or higher).
-
Page 112: Chapter 3 Project Reference
A section is like a chapter in a book – the PLC scans the sections in order. A list of the sections in a program is displayed in the project workspace under the program name. There is also a section list view showing the Start and End steps, which can be opened in the workspace window by clicking on a program name.
-
Page 113
Note that when the section is dropped, it will reposition its self immediately below the cursor. To drag a section to the top of the list, it must be dropped on the program item itself. -
Page 114
By selecting Section/Rung Manager from the Program Menu, the rung comment data can be read (imported) from the project in the personal computer, and operations can be performed to move the data up and down (CX- Programmer Ver. 4.0 or later). This function allows rung comments to be allocated to a program all at once after uploading the program under the following conditions, even if there is no comment file (COMMENTS.CMT) in… -
Page 115: Cross-Reference Report
A single program section may be uploaded for online-editing (reducing the transfer time to a minimum). However, it may not be downloaded since it is only a program segment. To download a program section, it is necessary to copy it into a complete program.
-
Page 116: Address Reference Tool
By selecting Duplicate usage in programs in the cross reference report function, a list can be checked for any bits/words that have been allocated an address already being used by another task (see note; CX-Programmer Ver. 4.0 or later). This function can be used to easily check whether the same address is being used by another task…
-
Page 117: Output Window
To go to the source of errors indicated in the Compile or Find Report tabs, double-click the message in the output window. It is also possible to use the Next Reference command from the Edit menu – this jumps to the location of the next message on the output window, whichever tab is on show.
-
Page 118
Values can be set in this window to a specific value to test program execution. Watch items can be monitored either on the Watch window (for any number of watch items) or on the Set New Value dialog (for one watch item). -
Page 119: Options And Preferences
OMRON It is not possible to view items that are of a Number type. Items that are of a Number type and are dropped into the watch window will not be displayed and an error message for each item is displayed in the transfer output window.
-
Page 120
1. Select the Diagrams tab within the Options dialog. 1, 2, 3… 2. Set the Show rung and step numbers to view the rung and step numbers at the left of the ladder display, in the rung margin. Deselecting gives a smaller rung margin. -
Page 121
PLCs The PLC tab provides a default PLC and CPU which appears when adding a new PLC to a project. Use the following procedure to change PLC preferences. 1. Select the PLC tab within the Options dialog. -
Page 122
PLC. CMT instructions are used during upload so that comments in a comment file can be linked back to the program properly. If this is not set for a PLC then it is not possible to upload comments, but compiled programs will be smaller since CMT instructions are not generated. -
Page 123
Click the SFC Font button to set the font used for the entire display of the SFC programming window. The Cell Width slider allows the width of the cells to be changed on the ladder window, giving more or less space for text to be displayed. -
Page 124
Name When this option is selected it is possible to set the number of lines to be shown for a symbol name, and whether they are shown above or below the element (i.e. above or below a contact or coil). -
Page 125
Note that it may not be possible to fit all of the requested information on the right of the instruction — the height of a cell is not determined by these choices. The ‘Attached comment’ is always shown first (i.e. highest priority), followed by the ‘Symbol Comment’ and then the descriptions. -
Page 126
(a) When the Previous window environment option is selected, CX-Programmer will open a project using the settings of last saved. (b) When the Show ladder only option is selected, the project will be opened with only the ladder view, all the other windows will be hidden. -
Page 127: Finding And Replacing
When Change All is selected from the Edit menu option, the Change All dialog to replace Addresses within the PLC will be opened. Enter the Find what and Replace with text as described in Using Find and Replace in this chapter, the replacement of the text will be applied throughout the entire PLC.
-
Page 128
When doing a text search information will only be found in a step, regardless of whether it is being filtered from the view or not. For example in the Symbol Name is not being displayed but the symbol is found to have a match, the symbol will still be highlighted. -
Page 129
PLCs and their global and local symbol tables and sections will be searched. Note that if search is started when the focus is on the I/O Comment view, the search will occur only on this view. CX-Programmer _Page 46… -
Page 130
In addition, it is possible to search for ‘Whole Word Only’ — a match will only be found if an entire word matches the text typed. If this option is not selected, then a match will be found if a word contains the text typed, and any text may be in front or behind the ‘Find What’ text in the same word. -
Page 131
Moving Addresses: It is possible to move a range of addresses. To do this, enter a range in the ‘Find What’ field, and enter a new start address for the start of the range in the ‘Replace’ field. Note that a dash must be included at the end of the ‘Replace’ field, indicating that a new range is given. -
Page 132: Properties
Hence, a single view focus will never open another view whereas if the scope is a program level then the search will continue for the scope covered by that of a normal search.
-
Page 133
(CS/CJ/CP-series PLCs only). The icon to the left of the project workspace changes according to the task type selected. Cyclic tasks represent the main program. The task can also be set to start on start-up of the PLC. -
Page 134: Using Microsoft Windows Features In Cx-Programmer
2. Choose the file type that is to be imported in the Files of type field. 3. Select the file that is to be opened from the File name field, or type in the name. Note that the file type is determined by the suffix (i.e. the part of the name following the ‘.’).
-
Page 135
♦ Float. The selected window expands to full screen width. Select the Float option to expand the window. ♦ Dock. Moves the window left, right, to the top, or to the bottom. Select the Dock option to return the view to its previous size. -
Page 136
The item should be dropped. The effect of the drop operation is shown by the mouse cursor. If a ‘+’ is shown at the bottom of the cursor, then the drop will have the effect of duplicating the item being dragged. -
Page 137
IO Table cannot be deleted separately. ♦ A PLC cannot be deleted if it is currently opened for communications or if it is acting as a gateway PLC. ♦ If a program is deleted, its associated (local) symbol table is deleted. -
Page 138
The Commented Rung dialog shows a list of rungs within sections that have been given comment properties. Use the shortcut key L to display this dialog. The first line of a rung’s comment is shown in a numbered list (the numbers start from 1 and do not indicate the rung number). -
Page 139
‘Allow Address-Referencing without Window’ option is set. When the diagram cursor is above a contact (or coil), it is possible to jump directly to a coil (or contact) that is using the same address. Use the ‘Space’ key to jump to the next coil (or contact) and ‘Shift’ + ‘Space’ key to jump backwards. -
Page 140
4. Check the Cool Look setting to ON to remove the box around each toolbar button. 5. Check the Large Buttons setting to ON to increase the size of the toolbar buttons. 6. Click the OK button to accept the settings or the Cancel button to abort the operation. Customizing a Toolbar Toolbars can be customized by dragging and dropping buttons from a selected category or from toolbar to toolbar. -
Page 141
2. Click the New button. This displays the New Toolbar dialog. 3. Enter a name for the new toolbar and click OK. The new toolbar will then be added to the list of toolbars and displayed on the screen. It can then be repositioned if necessary by dragging and dropping. -
Page 142: Chapter 4 Reference
The PLCs selected also affect which setup procedures need to be performed. For example, the CV-series and CS/CJ-series require setting up the IO Table via the IO Table object in the project workspace and using the PLC settings object to establish specific PLC characteristics.
-
Page 143: Symbols
PLC. Data Types In addition to an address or number, a symbol has a data type. This describes the physical format of the data that is held within the symbol, including its size. Since a symbol’s format is known, CX-Programmer is able to monitor the contents of the symbol in the correct way.
-
Page 144
• → WORD CHANNEL 2: NUMBER cannot be used in ST programs. An error will occur in the program check if this data type is used. 3: CX-Programmer Ver. 5.0 or higher 4: This data type is supported only by CX-Programmer Ver. 7.2 (CX-One Ver. 2.1) or higher. -
Page 145
Different data-types are used to refer to these different parts. These three parts can set to different comments, but to set the same comment for all three parts, use I/O Comment view to input a comment — Refer to I/O Comment View in Chapter 4 Reference for further information. -
Page 146
To insert a symbol into the symbol table, select a registered structure data type in data type view. Note: Data structure information will not be updated if you edit data structures in the symbol table and then download only the symbol table to the PLC. When you download a symbol table that contains data structures, always download the symbol table and the program together. -
Page 147
Note: Automatic address allocation is not possible for structure symbols. In the symbol table, specify an address in one of the above areas as the first address of the data structure. • Symbol Tables in Which Structure Symbols Can Be Registered Structure symbols can be registered in the following symbol tables. -
Page 148
Note: Only one-dimensional arrays are possible with CX-Programmer. An array variable is specified if more than one variable of the same data type is being used and those variables are to be managed as a group. Perform the following procedure to specify an array variable. -
Page 149
View Local Symbol button from the toolbar. It is possible to define a symbol at a local level with the same name as a symbol at global level. This is considered an override of the symbol definition. The program uses the symbol definition from its local level. -
Page 150
In order to allow sharing of symbols, it is necessary to link a CX-Server file with the project, which holds a copy of the desired symbols. This is set up using the Project Properties dialog. Once this is done, it is necessary to indicate which symbols are to be shared. -
Page 151
AutoGen_[Address], where ‘Address’ is replaced with the symbol’s address. If two or more symbols of this type have the same address, a (Copy Of #) is suffixed, where # is a unique number. CX-Programmer _Page 68… -
Page 152
The symbols are searched for using the order of precedence rule. If a new match is found then the operand will be linked to the new symbol. If however no match is found then the operand reverts to the physical address of the deleted symbol. -
Page 153
Procedure 1. Select Tools – Options from the menu. 2. Click the Symbols Tab and set the copy order and items to be copied in the Type and order of symbol attributes copied onto clipboard Field. Pasting Symbols with Errors In the following example only two of the Symbols are correct the others are not, attempting to insert all these Symbols into a symbol table will generate errors. -
Page 154
The exception is for symbols with automatically allocated addresses – in these cases, the program shows the name of the removed symbol in the places where it was used. It is then easy to see where an address needs to be assigned in the program. -
Page 155
A list of memory ranges may be entered for the PLC. The list is ordered, so that the first area in the list is allocated first. 2. Use the Add… button to add an area to the allocation list. A dialog is shown to input the details for the area: 3. -
Page 156
On pressing the OK button, the address range is checked for validity and an appropriate error message in a message box is displayed. On closing the message box the user is returned to this dialog and the first field that is considered to be in error. -
Page 157: Program Editing
From then on, anytime that user enters a new contact, coil, instruction or symbol with a fixed address, then that address is immediately marked as being used if it occurs within an auto allocation area. Any symbols that the user enters that don’t have a fixed address are immediately auto allocated an address if available.
-
Page 158
Row option and Delete Column option from the context sensitive menu. By inserting Vertical Up or Vertical Down, rungs cannot be combined into one. To do this, select the rungs to be combined and select Combine from the context sensitive menu. When a rung needs to be divided, select Split from the context sensitive menu to divide the rung into two. -
Page 159
Contact and Coil Editing The Edit Contact dialog or Edit Coil dialog allows the name or address of the contact or coil to be entered or selected from a list of global and local symbols. The name or address can also be defined as a new symbol from this dialog and inserted into the local or global symbol table. -
Page 160
3. The Differentiation status of the operand bit can be set to prevent it from being turned ON for more than one cycle after the execution condition goes from ON to OFF (Down) or OFF to ON (Up). Select the Up option for OFF to ON or the Down option for ON to OFF. -
Page 161
♦ Set. Set is available from the contact or coil context sensitive menu. The bit can be set to 1 or 0 by selecting the Set option from the contact or coil context sensitive menu followed by Value, To 1 or To 0. -
Page 162
The dialog can be displayed in two forms, either: simple dialog mode or detailed dialog mode. The default mode can be set in the Diagram tab in the Options dialog. To change the simple dialog mode to a detailed dialog mode, select Detail pushbutton. -
Page 163
CHAPTER 4 – Reference OMRON Filter Symbol Button and enter a text string in the Filter Symbol Dialog Box to limit the search to symbols with symbol names or I/O comments that contain the specified text string. A list of these address_comment or name_address_comment combinations will be displayed in the drop-down list. -
Page 164
Note: If the drop-down list is displayed without any search item input in the Symbol/Address Input field, all symbols that can be used will be listed. 5 Select one of the symbols from the drop-down list and click the Enter Key or the OK Button to input the selected symbol in the Symbol/Address Input field. -
Page 165
OFF to ON or from ON to OFF. Entering Operands An instruction operand can either be entered as a symbol, address or literal value. When entering an operand in the detailed dialog mode, the dialog shows the valid address ranges and types of operands that are allowed. -
Page 166
Note that a symbol can hold a value – the NUMBER data type is used. It is possible to search for a symbol from the operand box by pressing the ‘…’ button to its right (or by pressing F2). This presents a dialog that allows a symbol to be selected or created. -
Page 167
2. Select Address Incremental Copy from the Edit Menu. The Address Incremental Copy Dialog Box will be displayed. *1: If a function block is used in the selected section, this item cannot be selected from the menu. 3. In the Offset Field, input 16 in the Bit Box and 10 in the CH Box. -
Page 168
Program/Section Comments is selected on the Ladder Information tab of Options dialog, the comment of the program and section will be shown at the top of the ladder diagram view. Double-click the comments to edit. Comments should be added to rungs as they are written, so that it is easier to understand their functions when reviewing the program later. -
Page 169
CHAPTER 4 – Reference OMRON Text can be added as comments to the Ladder program either as notes that are not compiled or as rung comments that are compiled with the code (setting the Use Comment Instructions property of a PLC). Rung comments are typically used for introducing and explaining chapters of code. -
Page 170
Ladder option to toggle back to ladder format. It may not be possible to show the instructions in a ladder form. Program Reusability Parts of the program (single or multiple rungs, or a single program section) can be saved as a file (.cxr: text file) − −… -
Page 171: Memory View Function
OMRON Memory View Function The memory view function calculates and displays the amount of User Memory that is being used, the amount of User Memory that is still available, memory usage for function blocks, and other memory usage for the program that is open on the CX-Programmer.
-
Page 172: When Function Block Definitions Or Sfc Programs Are Created
When Function Block Definitions or SFC Programs Are Created If function blocks or SFC programs are used, related usage is also displayed. PLC Model Set to Any CS/CJ-series CPU Unit (Unit Version 3.0 or Later) Except the CJ2M Function Block Area…
-
Page 173
To display memory usage on the actual CPU Unit, upload the program from the CPU Unit so that the same program is in both the project and the actual CPU Unit and then use the memory view function. -
Page 174: Mnemonic Program Editing
CX-Programmer normalizes the new mnemonics and redraws the rung. It is possible that during the entry of the mnemonics, the rung can not be drawn in ladder form. In this case, it is shown as a statement list box on the Ladder program.
-
Page 175
The display can be made to scroll automatically during Step Run or Continuous Step Run operation. Also, the break points can be displayed in a list and the display can be made to jump to a specified break point in the list. -
Page 176: Working On-Line
If a serial port than can be connected online is found, the automatic connection is made from that serial port. Auto Online — EtherNet/IP Node Online You can automatically and easily connect online to a PLC when using CJ2 CPU Units connected to nodes on an EtherNet/IP network. Connection Types ♦…
-
Page 177
Example: 192.168.250.1 (default IP address for the built-in EtherNet/IP port of the CJ2H-CPU6@-EIP) The Browse Button can be used to select a PLC from a list if the IP address of the PLC to be connected to is not known. -
Page 178
On-line editing must be performed in this mode. ♦ Run Mode. This mode sets the PLC to execute the current program as a live operation. This mode is generally used for final testing, after a program has been thoroughly tested and debugged. CX-Programmer cannot write to the PLC while it is in this mode. -
Page 179
Programming On-line Once a program has been created and the project and PLC settings are satisfactory, the PLC can be connected to allow on-line operations to be performed. -
Page 180
With the PLC running in Monitor mode it is possible to make changes as if the PLC were not connected. The difference is that once a rung has been completed, it can be downloaded to the PLC while the program is running. -
Page 181
Error Log. Select the OK pushbutton to complete the operation. Downloading Programs to the PLC Programs can be downloaded to the PLC from the project when the PLC is in Program mode. If the PLC is not already in this mode, CX-Programmer changes the mode automatically. -
Page 182
The comparison results can be saved in a file by selecting Save As from the File menu in the Compare Result dialog box. If the file is saved from the overview display, the comparison results for all programs will be saved in CSV format. If the file is saved from the mnemonic display, the comparison results for the currently displayed program will be saved in CSV format. -
Page 183
PLC file-card directly using the Transfer to PLC option above. To write the program to the file-card, use the above steps to produce the program file on one of the computer’s disks. It is then possible to transfer the file between the disk drive and the file-card on a PLC using the CX-Server memory-card component –… -
Page 184
Pause Monitoring is an online function that allows the normal monitoring display to be frozen at a point in time, so that the logic of a program can be examined. The pause can be triggered either manually or by a trigger condition. -
Page 185
Changing the Minimum Cycle Time Online With CJ2H CPU Units with unit version 1.1 or later or CJ2M CPU Units, the minimum cycle time can be changed to a specified value even during PLC operation in MONITOR Mode when the cycle time is set to “constant”… -
Page 186
The set value that is changed here will not be updated in the Timings/Synchronous Tab Page in the PLC Setup. To update the PLC Setup, transfer the PLC Setup to the personal computer. Monitoring Synchronous Unit Operation (CJ2H CPU Units with Unit Version 1.1 or Later) The operating status of synchronous unit operation can be monitored. -
Page 187
PLC Information dialog. (Note that the PLC must be on line). Setting the PLC’s Clock When a PLC is on-line, its clock (if it has one) can be synchronized to the computer clock or the PLC clock can be set to a specific time. -
Page 188: Flash Rom Backup
CX-Programmer supports the Monitoring function of Flash ROM Backup for the CS1x-H, CJ1x-H, or CP1H series of PLCs. When a backup is started for a CS1x-H, CJS1x-H, or CP1H PLC the Backup Monitor dialog is displayed automatically in online mode, when the option ‘Display Backup Monitor Dialog automatically’ is selected on the PLC Properties dialog.
-
Page 189: Data Trace/Time Chart Monitoring
During the execution of a Data Trace, the PLC records the data values and holds them in an internal buffer. When the trace is complete, the values are uploaded from the PLC and displayed on the screen.
-
Page 190: Io Table
IO Table The IO table enables the map of racks and units needed by the PLC programs to be edited. It also allows the desired map to be compared with the actual map of the connected PLC when online. See the CX-Server PLC Tools User manual for details on editing the table.
-
Page 191
PART 1: CX-Programmer CHAPTER 4 – Reference OMRON CX-Programmer _Page 108… -
Page 192: Chapter 5 Advanced Topics
PLCs or projects, keeping the correct symbol set. It is possible to override the definition of a global symbol at local level, by redefining the symbol at the local level. CX-Programmer gives a warning when performing a program check, but the practice is allowed.
-
Page 193: Using Cx-Programmer With Other Applications
A CX-Programmer project is created, usually with the same name as the original file, but with the file extension of ‘CXT’ (the text version of the CXP file type). This can be opened from within CX-Programmer as normal, ensuring that the Files of type field within the Open CX-Programmer File dialog is set to ‘CX-Programmer Text…
-
Page 194
CX-Programmer has the ability to import and export symbol definitions to or from another package, such as a spreadsheet. The information is transferred in a text format, so it is also possible to use a word processor to define a set of symbols and use them within CX-Programmer. -
Page 195
If an address is entered then the address is searched for in the symbol tables in the order of precedence. If a symbol with the address is found then it is linked to the contact. If an address is not found then the contact has a physical address. -
Page 196: Converting Programs Between Plc Types
CHAPTER 5 – Advanced Topics If an operand is linked to a symbol in the global symbol table, this link may be overridden by creating a new symbol in the local symbol table with either the same name or the same address. The operand will then be linked to the local symbol.
-
Page 197
It is possible to protect several programs or chapters of programs using the ‘Partial protection password’. For each program that needs to be protected check the Protect program option and specify a range of steps on the protection tab of the Program Properties dialog. -
Page 198: Chapter 6 Converting A C500/C120/C**P Program To Cs/Cj/Cp/Cvm1 Format
It is possible to convert C500/C120/C**P programs to CS/CJ/CV-series programs. Also, it is possible to read programs and DM/HR area data from C500/C120/C**P PLCs to save in a file and write the saved programs and DM/HR areas data to C500/C120/C**P PLCs.
-
Page 199: C500/C120/C**P Program Backup
The program will be saved under the file name destination file name.txt in the same folder as the post- conversion destination file. (If a file with the same name already exists, the mnemonic text file will be saved as a txt file with the same name with a number added.)
-
Page 200: Conversion Table For C500/C120/C**P Instructions
CHAPTER 6 – Converting a C500/C120/C**P Program to CS/CJ/CP/CVM1 Format C500/C120/C**P Compare It is possible to compare UM and DM/HR area data saved in a file and data in a C500/C120/C**P PLC. Select Tools – C500/C120/CxxP Support – Compare PLC and File.
-
Page 201
PART 1: CX-Programmer CHAPTER 6 – Converting a C500/C120/C**P Program to CS/CJ/CP/CVM1 Format OMRON Before conversion After conversion C500 CS/CJ C**P Example Example CV Series Example Remarks /C120 Series DIFD DIFD 0000 DIFD 000000 DIFD 000000 TIMH TIMH 002 #0150… -
Page 202
PART 1: CX-Programmer OMRON CHAPTER 6 – Converting a C500/C120/C**P Program to CS/CJ/CP/CVM1 Format Before conversion After conversion C500 CS/CJ C**P Example Example CV Series Example Remarks /C120 Series FUN75 FUN75 00 10 SRD 0000 0010 SRD 0000 0010 FUN75 is converted to its corresponding instruction, SRD. -
Page 203
PART 1: CX-Programmer CHAPTER 6 – Converting a C500/C120/C**P Program to CS/CJ/CP/CVM1 Format OMRON Before conversion After conversion C500 CS/CJ C**P Example Example CV Series Example Remarks /C120 Series FUN88 FUN88 #0030 15 40 IORD IORD 40 15 &0030 READ… -
Page 204
PART 1: CX-Programmer OMRON CHAPTER 6 – Converting a C500/C120/C**P Program to CS/CJ/CP/CVM1 Format Memory Area Conversion Table The memory addresses used in the operands are automatically converted. Before conversion After conversion Memory area CS/CJ C500/C120 C**P CV Series Remarks… -
Page 205
PART 1: CX-Programmer CHAPTER 6 – Converting a C500/C120/C**P Program to CS/CJ/CP/CVM1 Format OMRON Auxiliary Area Conversion Table The addresses of the special auxiliary relays used in the operands are automatically converted as shown below. Before conversion After conversion Name… -
Page 206: Appendix A Toolbars And Keyboard Shortcuts
It is possible to redefine the toolbars. It is also possible to drag/drop the toolbar buttons between toolbars, or drag buttons off the toolbars to remove them. To do this, hold down the ‘Alt’ key and drag the button. It is also possible to redefine the keyboard shortcuts.
-
Page 207: Diagram Toolbar
New PLC Instruction – creates a new PLC instruction call. New Function Block Call – creates a new Function Block call in the program. New Function Block Parameter – creates a new Function Block parameter of a Function Block cell. Line Connect Mode – enables creating connection lines.
-
Page 208: Symbol Table Toolbar
Details – displays items as a report. Validate Symbols (Selected Item) – checks the current symbol table. Validate Symbols (All) – checks all symbol tables in the PLC. PLC Toolbar Work Online – toggles the connection to the selected PLC.
-
Page 209: Sfc Toolbar
Cancel Online-Edit – stops the online-edit, canceling any changes. Send Online Edit Changes – transfers the changes made in the online-edit. Go to Online Edit Rung – jumps to the top of the online-editing rung. Section/Rung Manager – shows a dialog to edit sections and rungs.
-
Page 210: Views Toolbar
Toggle Output Window – toggles whether the output window is on view. Toggle Watch Window – toggles the watch window On and Off. Show Address Reference Tool – toggles the add. ref. tool On and Off. Show Properties – shows the item properties window.
-
Page 211: Keyboard Shortcuts
Using the Keyboard Mapping feature it is possible to reassign or add new keyboard keys used as short-cuts for any of the menu/ tool bar commands. It is also possible to assign several different keys to action a particular command.
-
Page 212
[Edit] | [Replace] [Ctrl]+[H] Change All [Edit] | [Change All] [Ctrl]+[R] Go to Rung/Step [Edit] | [Go To] | [Rung /Step Number…] [Ctrl]+[G] Go to Rung Comment [Edit] | [Go To] | [Commented Rung] [L], [Alt]+[Shift]+[R] Go to next address reference… -
Page 213: Default Sysmac Support Soft Keyboard Mapping
Shift+N Go to Previous Jump Point Shift+B Default SYSMAC Support Soft Keyboard Mapping Basic operations Shortcuts for all functions except for the following are the same as the defaults for the CX-Programmer. Function Menu Shortcut keys View project workspace [View] | [Window] | [Workspace]…
-
Page 214
PART 1: CX-Programmer − OMRON Keyboard Shortcuts CX-Programmer Edit Program Shortcuts for all functions except for the following are the same as the defaults for the CX-Programmer. Function Menu Shortcut keys Delete a column [Edit] | [Delete Column] [Shift]+[F3], [Ctrl]+[Alt]+[Right]… -
Page 215: Default Gppq Keyboard Mapping (Cx-Programmer Ver. 9.@ Only)
Basic Operations The shortcuts for all basic operations are the same as the defaults for the CX-Programmer. Edit Program Shortcuts for all functions except for the following are the same as the defaults for the CX-Programmer. Function Menu Shortcut keys…
-
Page 216
− OMRON Keyboard Shortcuts CX-Programmer Find and Replace Shortcuts for all functions except for the following are the same as the defaults for the CX-Programmer. Function Menu Shortcut keys Go to Rung Comment [Edit] | [Go To] | [Commented Rung]… -
Page 218: Appendix B Ethernet/Ip Connections From Windows Xp (Sp2 Or Higher), Windows Vista And Windows 7
Ethernet ports. When using an EtherNet/IP connection to one of the following PLCs from an Ethernet port on a computer, you must change the settings of the Windows Firewall to enable using CX-Programmer communications. • CJ2H-CPU6@-EIP Applicable PLCs: •…
-
Page 219
Windows Firewall with Advanced Security Dialog Box. 4. Select New Rule under Inbound Rules in the Actions Area on the right side of the dialog box. 5. Make the following settings for each step in the New Inbound Rule Wizard Dialog Box, clicking the Next Button to move between steps. -
Page 220: Appendix C Smart Input Mode
Input Procedure in Smart Input Mode The following example shows how to input instructions in Smart Input Mode. (I/O comments are not input in this example. For details on how to input I/O comments, refer to Displaying and Selecting from Candidate Operands below.) Inputting Bits Example: Inputting LD 0.00…
-
Page 221
The top instruction in the list (MOV) will be entered, and the first operand will be displayed. Note: If the first candidate is OK, the operand can be input immediately, without inputting the Enter or Space Key. 3. Enter “D0” and press the Enter Key or the Space Key. -
Page 222
CIO 100.00 (word CIO 100). Also, if there is more than one other instance of the instruction that is being input in the same circuit, the difference will be taken between the operand addresses of the other instructions and it will be added to the address of the most recently input instruction. -
Page 223
Dialog Box. The dialog box for inputting comments will then be hidden. Order of Display of Candidate Operands In the Parameter List in the Ladder Diagram Options Dialog Box, you can select any of the following orders for displaying candidate operands. -
Page 224: Glossary Of Terms
0 and 1. A digit used in binary notation, which can take the value 0 or 1. The value of a bit, or combination of bits, can represent the status of a device or can be used in programming.
-
Page 225
A data format supported by CX-Programmer – base 10 (i.e. digits 0-9). Default A value automatically set by a program in the absence of user input or on initial entry to an application; such values can be overwritten. Device group A class of devices that share similar properties, each group can be sub-divided into device types. -
Page 226
Output The signal sent from a PLC to an external device. Output instruction A type of PLC instruction that appears at the right of a ladder rung – it cannot be connected to at the right. Output window An area of the CX-Programmer display reserved for compilation messages and search results. -
Page 227
Server 1. Server is used in DDE functions to contain a link to an outside application. Refer also to Server application. 2. A Server is the central processing point of a Network that is accessible to all computers. Signed Decimal A data format supported by CX-Programmer. -
Page 228: Index
Quick start — 9 Output window — 34 Tutorial — 16 PLC — 25, 26, 50, 59, 60, 67, 74, 75, 84, 87, 95, 96, 97, 98, CX-Server — 141 99, 102, 103, 104, 105, 137, 138, 140 CX-Net Network Configuration tool -…
-
Page 229
Grid — 13, 75 Horizontal — 23, 74 Help — See on-line help Instruction — 21, 22, 74 Help and how to access it — 5 Instruction availability — 82 Context Sensitive Help — 6 Invert (NOT) — 78 Help Topics — 5… -
Page 230
PLC — Copy elements from a program — 53 Access — 25, 26, 50, 59, 60, 67, 74, 75, 84, 87, 95, 96, 97, Cut elements from a program — 53 98, 99, 102, 103, 104, 105, 137, 138, 140… -
Page 231
Search — 45 Access Mnemonics view — 14, 91 Search and Replace — 46 Access PLC — 25, 26, 50, 59, 60, 67, 74, 75, 84, 87, 95, 96, Addresses — 47 97, 98, 99, 102, 103, 104, 105, 137, 138, 140… -
Page 232
Tutorial — 16 Symbols — 109 Undo an operation — 53 Zoom — 44, 52 Units — 144 Zoom to Fit — 44 Unlinking / Linking Symbols – Rules for — 112 Upload program from PLC — 25, 97 CX-Programmer _Page 149… -
Page 234
PART 2: CX-Server PLC Tools… -
Page 236
The following conventions are used to indicate and classify precautions in this manual. Always heed the information provided in them. Failure to heed precautions can result in injury to people or damage to the product. DANGER Indicates an imminently hazardous situation which, if not avoided, will result in death or serious injury. -
Page 237
PART 2: CX-Server PLC Tools Visual Aids The following headings appear in the left column of the manual to help you locate different types of information. Indicates information of particular interest for efficient and convenient operation of the product. 1, 2, 3…… -
Page 238
PLC clock. ♦ Chapter 10 Data Links. This chapter describes how the Data Link Editor enables a PLC to be configured so that it can participate in one, or more automatic data sharing schemes, over SYSMAC LINK and Controller Link networks, without the need for special programming. -
Page 239
I/O Table Window Functions ……………………20 Special I/O Unit and CPU Bus Unit Settings…………………..21 CPS File Overview ……………………….21 Specialized Tool Startup Overview (Supported when CX-Programmer Is Installed from CX-One) ….21 Displaying an I/O Table……………………….22 Displaying the CS/CJ/CP I/O Table Window………………..22 Displaying the C/CV I/O Table Window ………………….23 Unit Settings …………………………..23… -
Page 240
Unit Settings …………………………40 Host Link Port ………………………….40 Peripheral Port………………………….40 Peripheral Service……………………….40 Duplex Settings ………………………..41 Saving the PLC Setup to a CSV File (CJ2 CPU Units Only) …………..42 CV-Series PLC Settings……………………….43 PLC Startup …………………………43 Error Log ………………………….43 Execution Controls ……………………….43 Host Link Port ………………………….44 IO Refresh …………………………44… -
Page 241
Procedure Through Data Link Startup………………….126 Controller Link Automatic Setup ……………………127 SYSMAC LINK Automatic Setup ………………….129 Transferring Automatic Data Link Setup Parameters to the Startup Node……….131 Monitoring Data Link Status ……………………132 CHAPTER 11 Routing Tables…………..135 Opening an existing Routing Table ……………………135 Creating a new Routing Table ………………………135… -
Page 242
The Network View Screen ……………………..139 The Overview Screen ……………………..139 Table View Screen ……………………….140 Gateway Counter Settings ………………………140 Transferring a Routing Table to a PLC …………………..142 Transferring a Routing table from a PLC ………………..142 CHAPTER 12 PLC Backup Tool …………..143 Overview …………………………..143 PLC Backup Tool Operations……………………..144… -
Page 244: Chapter 1 Technical Specification
The CX-Server PLC Tools come with a context-sensitive online help system which is designed to complement this manual and to provide a quick reference at any point while using CX-Server PLC Tools when the manual is not to hand. This general help system uses a fast hypertext system which allows progressively detailed information about any topic to be obtained by selecting keywords within the descriptive text.
-
Page 245: Cx-Server Plc Tools: New Features
The CX-Server PLC Tools come with a detailed context-sensitive help system. At any time while using the software, it is possible to get help on the particular point that is currently being worked on, or on general aspects of the CX-Server PLC Tools. This system is intended to complement the manual, by providing online reference to specific functions of the software and how to use them.
-
Page 246: Help Topics
Help Topics For any of the PLC Tools select the Help Contents option on the Help menu. The Help system provides a standard look-up dialog under the Contents tab showing the contents of the PLC Tools Help file. Click on an item to read the associated information.
-
Page 247: Technical Support
If the installation instructions for this application have been followed (refer to Installation in this Chapter), no difficulties should be encountered. However, if there is a problem, contact Customer Services. If a problem occurs, check that it does not relate to a fault outside CX-Server or the PLC Tools. Check the following: ♦…
-
Page 248
Version number of CX-Server component or tool: Serial number of the software: Operating system and version number: Language of operating system: PLC type, model and CPU details: Type of communications in use: Serial Number Toolbus SYSMAC LINK SYSMAC NET Device Net… -
Page 250: Chapter 2 Plc Memory Component
The toolbar and status bar can both be turned on or off. Select Status Bar from the View menu to control the display of the status bar. Select Toolbar from the View menu to control the display of the PLC Memory toolbar.
-
Page 251: Plc Data Area
Once a format has been selected a keyboard filter is applied so that non-valid keystrokes are ignored. When in either Debug mode (for CV-series PLCs only) or Monitor mode: it is not possible to edit a read-only value. PC to PLC Communications The PLC Memory component permits the transfer of data to and from the PLC and allows comparisons to be made between data stored on the computer and the PLC.
-
Page 252
5. Select the Compare pushbutton to accept the settings or the Cancel pushbutton to abort the operation. Whilst comparing, all values resident on the PLC that are different to those on the PC are annotated in brackets. Further editing to the data area causes further differences between PC and PLC versions, and these are also annotated. -
Page 253
Timer/Counter Memory areas Whether online or offline the PLC Memory component enables the data in the Timer (TIM) and Counter (CNT) memory areas to be formatted using either Binary Coded Decimal (BCD), Hexadecimal or Decimal data types. -
Page 254: Monitoring Data
When an Online Transfer from a PLC, Compare or Monitor operation is executed, the PLC Memory Component will read the data from the PLC and display it in the currently selected data format. If the data can not be displayed in the currently selected format, then an error message will be displayed.
-
Page 255: Clearing And Filling Data Areas
A whole data area can be cleared by clicking on the Clear Data Area button from the toolbar. A whole data area can be populated with a particular value. Use the following procedure to fill a data area with a single value.
-
Page 256: Plc Address Area
Decimal, Decimal, Signed Decimal, Hexadecimal or Text. Any special address information is shown in the Attribute field. The attribute of a bit can be forced. It is not possible to force bit addresses that are read-only. Use the following procedure to apply a forced setting.
-
Page 257: Forced Settings
Address menu. Forced Settings It is possible to specify the state of an address regardless of its actual (physical) state, this is particularly useful for testing certain conditions or rungs in a ladder program. Once scanned, the Forced Status window displays the address, value and attributes for all forced bits.
-
Page 258: Plc Memory Management
Save pushbutton. PLC Memory files have a .MEM extension. Information saved to a file can be supplemented with header information set as a preference. Refer to Chapter 2 — PLC Memory Component for details of setting header information to a file.
-
Page 259: Plc Memory Preferences
1, 2, 3… 1. Select an item or items in a window. 2. Select the Copy button from the toolbar to copy the item, or the Cut button from the toolbar to move the item. 3. Select an area to move the items to, for instance copying data area values into another data area.
-
Page 260
4. Select the Prompt Before Closing an Active Monitor Window option if confirmation is required before closing a data area window that is being monitored. 5. Select the Beep on Invalid Input option to receive an audible beep when an invalid input to the PLC Memory component has been made. -
Page 261
PART 2: CX-Server PLC Tools CHAPTER 2 – PLC Memory Component OMRON CX-Server PLC Tools_Page 18… -
Page 262: Chapter 3 Io Table Component
♦ Actual IO Table. The real hardware configuration of the PLC units and slots on power-up. ♦ Registered IO Table. The internal PLC table: this is the one used by the PLC when running, regardless of the state of the actual hardware. It can be read and, for C2000 PLCs, CV-series PLCs and CS/CJ series PLCs, written to by the CX-Server software.
-
Page 263: Distinguishing Between The Cs/Cj/Cp And C/Cv I/O Table Windows
Window is always selected, regardless of the PLC model and operating system. Distinguishing between the CS/CJ/CP and C/CV I/O Table Windows The I/O Table Windows can be identified by the names in the project directory tree and the colors of icons, as shown in the following table.
-
Page 264: Special I/O Unit And Cpu Bus Unit Settings
(This function is supported by the CS/CJ/CP I/O Table Window only.) Even if new Special I/O Units and CPU Bus Units are purchased, the new Units parameters can be set just by installing the Unit’s CPS (Component and network Profile Sheet), so it isn’t necessary to upgrade the CX-Programmer.
-
Page 265: Displaying An I/O Table
CHAPTER 3 – IO Table Component OMRON Displaying an I/O Table Displaying the CS/CJ/CP I/O Table Window The CS/CJ/CP I/O Table Window is displayed when the PLC is a CS/CJ/CP-series PLC. Rack’s starting CIO address Slot number Number of Unit resources occupied Unit’s starting CIO address…
-
Page 266: Displaying The C/Cv I/O Table Window
Creating an IO Table Creation of an IO Table whilst connected to a PLC causes the Actual IO Table in the hardware to be written to the Registered IO Table. An IO Table can also be edited offline and stored to file, this method is usually employed when designing a PLC’s IO Table.
-
Page 267
Setting Parameters for CS/CJ/CP-series CPU Bus Units and Special I/O Units After the I/O table has been created, the I/O table and Special I/O Unit/CPU Bus Unit parameters can be transferred from the PLC and edited in the computer, as shown in the following example. -
Page 268
Always confirm system safety before clicking the Reset Button. Note 2: When the CX-Programmer creates the Special I/O Unit or CPU Bus Unit settings in the I/O Table Window, it automatically uses the latest version of the CPS file that is available in the computer. -
Page 269
Printing the I/O Table or Unit Parameter Settings The following procedure explains how to print the I/O table or a parameter list of Special I/O Unit and CPU Bus Unit settings. CX-Server PLC Tools_Page 26… -
Page 270: Settings For The C/Cv Series I/O Table Window
Creating an IO Table Creation of an IO Table whilst connected to a PLC causes the Actual IO Table in the hardware to be written to the Registered IO Table. An IO Table can also be edited offline and stored to file, this method is usually employed when designing a PLC’s IO Table.
-
Page 271
3. Select the OK pushbutton to complete the operation or the Cancel pushbutton to abort the operation. The Sysmac-Bus Master unit provides two types of slave units that can be applied to the slave rack in the same manner as a normal rack: ♦… -
Page 272: Unit Setup
Verifying Correct Configuration If a change is made to the IO configuration that affects a type of IO word or the number of words required by a unit, for instance adding or removing units, an IO verification error occurs. Select Verify from the Options menu to ensure that an IO verification error has not occurred.
-
Page 273
SYSMAC LINK, SYSMAC NET and Controller Link. This setup is only used if the Node Type is Master. The list box at the bottom of the chapter is only used when Data Link is set to one of the automatic options (i.e. not specific). -
Page 274: Displaying Unit Error Log In The Io Table
The Network Status tab provides network status information. It also activates the PLC to perform internode tests. Select the Start option to set the PLC to check for errors and report them. Select the Stop option to stop the PLC from detecting errors.
-
Page 275: Pc To Plc Communications
The Registered IO Table can be compared with the CX-Server IO Table and displays any differences. This option is helpful to confirm that a table that has been set up in CX-Server and has been transferred to the PLC, agrees with how the hardware is set up.
-
Page 276: Starting Specialized Support Tools
Special Application from the pop-up menu. ♦ If the Unit is right-clicked in the I/O table and Start Special Application — Start with Settings Inherited is selected, the PLC model information, Unit model, and online/offline status information will be passed to the Programming Support Tool automatically when it starts.
-
Page 277
Note: With some of the Programming Tools (CX-Integrator, CX-Protocol, and CX-Process Tool), the I/O Table Window can be opened from the Programming Tool as shown by the dotted lines above, but only when the PLC is online. CX-Server PLC Tools_Page 34… -
Page 278: Plc Specific Features
Hot Swapping Hot swapping is permitted for C1000H/C2000H PLCs and allows modules to be changed without having to power down. The modules swapped must be identical. To Hot Swap, select the Hot Swap option from the Options menu. Note: With a CS1D or CVM1D CPU Unit, hot swapping (i.e., online replacement) is possible during operation for Basic I/O Units and, for the CS1D, Special I/O Units and CPU Bus Units as well.
-
Page 279: Setting Rack Start Addresses
For CS1-series PLCs, SIOU’s, CPU SIOU’s and other units, unit manufacturing information can be retrieved, the data read and comments saved against each unit to a Compact Flash disk when fitted. Use the following procedure to view the unit manufacturing details: 1.
-
Page 281: Chapter 4 Plc Setup Component
The PLC Setup component allows the PLC settings to be entered for individual C-series PLCs, CV-series PLCs or CS1 PLCs. More than one PLC Setup component can be opened at any one time allowing a number of PLCs to be configured simultaneously.
-
Page 282: Settings
EM is reformatted automatically. To use EM rather than Memory Card, select the EM File Setting enabled setting and enter the EM Start File No. CS/CJ-series PLCs can use EM as file memory, either as or as well as Compact Flash disk. When transferred to the PLC, EM is formatted.
-
Page 283: Siou Refresh
The Unit Settings tab of the PLC Setup component allows timings for the individual rack slots associated with the PLC to be set. Select the required slot(s) from the rack field and the required unit setting; the default is 8 ms.
-
Page 284: Duplex Settings
Asynchronous processing. Synchronous likewise sets the Execution Mode to Synchronous processing. Peripheral Service Mode Instruction Execution Time — A value within and including the range of 5 to 255 or 0 can be entered as a valid setting. Peripheral Service Execution Time — A value within and including 0.1 to 25.5 can be entered as a valid setting. For more information on when this option is available, see Sync/Async Comms, Execution Mode, above.
-
Page 285: Saving The Plc Setup To A Csv File (Cj2 Cpu Units Only)
Division Size – If the EM Division Transmission option has been selected the value entered for the division size will determine the size of the EM area to transfer. Note that this setting only takes effect at startup or at the start of an operation.
-
Page 286: Cv-Series Plc Settings
The Error Log tab permits certain settings to be applied to error logging. Either Data Memory (DM) or Extended Memory (EM) areas can be selected to hold the PLC’s Error Log. Refer to Chapter 6 — PLC Error Component for a description of the Error Log.
-
Page 287: Host Link Port
1, 2, 3… 1. The Port Settings default to 9600 bps, 1 start bit, 7-bit data, 2 stop bits and Even parity. 2. Select a Unit Number setting for the Host Link port setting. This has a maximum value of…
-
Page 288: Address Enable
10 ms or a specific value can be set. Hold The Hold tab of the PLC Setup component allows the Hold area of the PLC’s Work Area memory to be defined. Use the following procedure to apply settings in the Hold tab.
-
Page 289: Cycle Time
The SIOU Area DM settings are highly PLC specific and are dependent upon PLC selected and the SIOU mode. Refer to the online help for detailed information. This option specifies that the status of the IOM hold bit is to be reset to OFF (ticked) or maintained when power is next turned on.
-
Page 290: Error Settings
The Peripheral Port, Comms Board A, Comms Board B and Host Link Port tabs of the PLC Setup component defines the settings for the connection between the PC and PLC. The default settings may be used or an alternative communications protocol defined. Use the following procedure to apply settings.
-
Page 291: High Speed Counters
3. Write: These setting are the same as Read, but without the option of selecting the ‘AR’ memory area. ♦ Area — This option defaults to IR area 1, but can be set to IR area 2, DM area, LR area or HR area. ♦…
-
Page 292: Pc To Plc Communications
PLC Status These options determine the status of the PLC. Append PLC Status on top of IN data — Select this button to Append PLC Status on top of IN data, or choose ‘Do not append PLC Status’. Do not append PLC Status — Select this button to not append PLC Status on top of IN data, or choose ‘Append PLC Status on top of IN data’.
-
Page 293: Chapter 5 Data Trace/Time Chart Monitor Component
The Data Trace/Time Chart Monitor component has two separate modes of operation: ♦ Data Trace. The PLC can be configured to trace a number of channels and bits and can sample these when a trigger condition is activated. When the PLC trace buffer is full or the user stops the trace, the trace buffer can be uploaded and viewed –…
-
Page 294: Types Of Data Trace Window
The following paragraphs discuss sampling ranges specific to PLC series. CS/CJ/CP-series PLC Sampling Range (Except for CJ2 CPU Units) The CS/CJ-series PLC can trace a maximum of 31 bits and 6 words and performs data tracing using one of the following methods: ♦…
-
Page 295: Cv-Series Plc Sampling Range
The buffer for Data Trace is 32K, 16K, or 8K words depending on model. CV-series PLC Sampling Range The CV-series PLC can trace a maximum of 12 bits and 3 words and performs data tracing using one of the following methods: ♦…
-
Page 296: For Cs/Cj/Cp-Series
Following is the Parameter setting method of Data Trace for CS/CJ/CP. Display [Data Trace Configuration] dialog box. 1 Select [Data Trace] from [PLC] menu on main window (in the case that Data Trace Window is already open and Time Chart Monitor is selected, [Operation]|[Mode]|[Data Trace]).
-
Page 297
4 Click on [Transfer(PC to PLC)] or [OK] after all settings are done. The setting details of each tab will be discussed later. Settings on [Settings] tab Set operation conditions of Data Trace. Select [Settings] Tab on [Data Trace Configuration] dialog box. Item Function [Trace Type] Select Data Trace type. -
Page 298
Input Symbol or the address to be trigger object. Select data Settings] type from Combobox. 1ch data, 2ch data and 4ch data can be set on CJ2 CPU. 1ch data can be set on PLC of CS/CJ/CP Series other than CJ2 CPU. -
Page 299
1 Select [Trace Object] tab on [Data Trace Configuration] dialog box. The following screen will appear. 2 Input trace object. The methods of trace object input are the three of the following. Input trace object with the combination of 1ch data, 2ch data, 4ch data, and bit. -
Page 300
• I/O Module AR Selection Function When you use a CJ2M CPU Unit, an auxiliary area address to be used in the Pulse I/O Module can be selected from a list and registered. Refer to the CJ2 CPU Unit Software User’s Manual (Cat. No. W473) for the detailed operation. -
Page 301
♦ Select [Trace Settings] tab to check trace settings. ♦ Select [Properties] tab to refer to trace properties. ♦ Right click on trace screen and select [Copy to Clipboard]. Paste the graph screen to the paint and so on is possible. -
Page 302
2 Select [Operation]| [Settings] on Data Trace window. [Data Trace Configuration] dialog box will appear as follows. Refer to “Parameter Settings of Data Trace for CS/CJ/CP” for the functions of the buttons located at the bottom. 3 Click on the tab of items to be set. -
Page 303
PLC. Check Box Note: A continuous data trace may not run continuously for the specified maximum time span. *1 Continuous tracing cannot be used if the synchronous control cycle is less than 3.0 ms. CX-Server PLC Tools_Page 60… -
Page 304
♦ Performance Monitor screen is displayed. Whether all trace data is obtained or not can be confirmed with the screen. When not all trace data is obtained, the speed at which CPU saves the sampling data to trace memory possibly exceeds the communications speed between PC and PLC. Adjust sampling intervals and the size of trace object accordingly. -
Page 305
Save of the Data Collected from Data Trace Window for CS/CJ/CP The result data collected from Data Trace or Time Chart Monitor can be saved to a general- purpose CSV file. Following is the format of CSV file to be saved. -
Page 306
2 Select [Operation]| [Settings] on Data Trace window. [Time Chart Monitor Configuration] dialog box will appear as follows. Refer to “Parameter Settings of Data Trace for CS/CJ/CP” for the functions of the buttons located at the bottom 3 Click on the items to be set. -
Page 307
PART 2: CX-Server PLC Tools CHAPTER 5 – Data Trace/Time Chart Monitor Component OMRON Settings on [Settings] Tab Set the execution conditions of logging. Select [Settings] tab on [Time Chart Monitor Configuration] dialog box. CX-Server PLC Tools_Page 64… -
Page 308
Settings on [Trace Object] Tab Set the object of Time Chart Monitor. The operation procedure is as same as the one on the previous topic:” Parameter Settings of Data Trace for CS/CJ/CP”. Refer to settings on [Trace Object] tab on the previous topic. -
Page 309: Convenient Functions Of Data Trace Window For Cs/Cj/Cp
♦ Select [Option]| [Measure]| [Value] on menu or click on on tool bar. The value will be displayed. The value of X axis (time axis) on cursor position will appear at the bottom of graph. The value of Y axis (present value axis) will appear on Legend.
-
Page 310: Managing The Data Trace/Time Chart Monitor
3. For Time Chart Monitor only, establish the sampling time and Buffer Size on the Sampling tab. 4. Apply a delay value in the Delay field. A negative value in this field advances the start of the trace before the trigger condition by the supplied interval value. A positive value in this field delays the trace after the trigger condition by the supplied value in sampling.
-
Page 311: Saving Data Trace Settings
The top graph illustrates the word addresses or symbols. The bottom graph illustrates the bit addresses or symbols. Each word address is colour coded. The word and bit addresses are listed in the left pane; the splitter bar can be…
-
Page 312
OMRON CHAPTER 5 – Data Trace/Time Chart Monitor Component moved by placing the mouse cursor over the splitter bar and dragging it to its new position to show more or less of the displayed numbers. The slider position, used to analyze the data returned by the data trace, can be moved by placing the mouse cursor over the graph slider and dragging it to its new position. -
Page 313: Syswin Data Trace And Time Chart Monitor Files
Select the Cancel pushbutton to abort the operation. The display of the Data Trace or Time Chart Monitor can be further refined by displaying a grid over the window. Select Grid from the Options menu to control the display of the grid.
-
Page 314: Chapter 6 Plc Error Component
When the PLC is in Program Mode, all errors can be cleared; when in Monitor mode, only the last error can be cleared. It is not always possible to clear an error when the PLC is in Run mode; in this instance, a dialog is displayed which allows an attempt to be made at clearing the error.
-
Page 315: Error Log
The Error Log tab of the PLC Error component displays the error history of the associated PLC including entry number, date and time of occurrence (if date and time stamping is supported by the PLC), code position and error details. The icon shown against the Entry number indicates the error status (unlike the Errors tab, there is no Status column).
-
Page 316: Manually Updating The Error Log
Clock tab is greyed-out. Manually Updating the Error Log Manual refresh of the Error Log is useful if it is desired to prevent other users from clearing the displayed error history. Use the following procedure to enable manual refresh of the error log.
-
Page 317: Displaying The Error Log
Displaying the Error Log The PLC Error component can be set so that it is only activated when an error in the PLC actually occurs (providing it is already open); for example, if the PLC Error component has been minimised it automatically returns to full size as the top window when an error is generated in the PLC.
-
Page 318: Chapter 7 Memory Card Component
This chapter describes the Memory Card component available to CV-series PLCs and CS/CJ-series PLCs and its ability to store and transfer data. File storage is achieved by a File memory card for a CV-series PLC and a Compact Flash or EM memory configured as ‘file memory’ for a CS1-series PLC.
-
Page 319: Memory Card Display
Memory Card component is active. Files held on the memory card can be compared with data in the PLC. File formats can be one of four types: ♦…
-
Page 320: Memory Card Properties
The Toolbar and status bar can both be turned on or off. Select Status Bar from the View menu to control the display of the status bar. Select Toolbar from the View menu to control the display of the PLC Memory toolbar.
-
Page 321
Data Memory to Flash Memory Backup function All of the Data Memory in the CP1H CPU Unit’s internal RAM can be backed up as DM initial values in the CPU Unit’s internal flash memory. The backed up data is known as Backup DM (DM initial values). -
Page 322: Chapter 8 Cx-Server Network Configuration Tool (Cx-Net)
PLC which is currently connected, not the CX-Server project PLC. Routing Tables contain the information necessary to allow communications between different networks including local and remote network address details; they are held in a specific area of PLC memory. Refer to Chapter 11 — for information regarding Routing Tables.
-
Page 323: Cx-Net And Cx-Server Projects
NET network contains one node acting as the ‘parent’ node or Data Link server (containing the Data Link table), unlike the SYSMAC LINK network where a copy of the Data Link table is sent to all nodes on that network. The Controller Link network operates in a similar manner to SYSMAC LINK except that the network is split into two areas with each node being associated with one or other of these areas.
-
Page 324: Adding A Device
(rather than what is defined in the CX-Server project for that setting). When a connection is made to an Ethernet network the Node box changes to a drop-down list, allowing the node to be changed in order to connect to a new PLC.
-
Page 325: Closing A Plc
Device Information into a CX-Server Project. When the Scan Serial Ports for PLCs dialog is first displayed, it shows the results of the last scan to be performed until the Refresh pushbutton has been clicked. Use the following procedure to scan for PLC connections.
-
Page 326: Displaying Plc Device Information
The main window of the CX-Net Network Configuration tool shows the current operating mode of the connected PLC. The PLC Set Mode dialog allows this to be changed. The run modes available to a PLC depend upon the PLC device type. Use the following procedure to set the PLC Mode.
-
Page 327: Testing The Network Connection
♦ Broadcast Nodes Test. This test examines all nodes on the network and is available for Ethernet, Controller Link and SYSMAC LINK only. This test may take some time for an Ethernet network which is not subject to the same size restrictions as Controller Link and SYSMAC LINK. The results show all nodes found and the PLC type if possible;…
-
Page 328: Network Settings
These tables contain the network and unit number information required. It is only necessary to set up routing tables if the end connection PLC is not a direct connection, i.e. using another PLC as a gateway connection. The routing table is held within the PLC(s) which acts as the gateway device. Different types of PLC and networks have different capabilities for routing.
-
Page 329: Data Link
Words of IO and DM can be set aside for use as data link words, which are allocated to various nodes in the network. Limits on the amount of data and number of nodes varies with the type of network and the type of PLC.
-
Page 330
After an editing session using the offline editor (i.e. after pressing the Edit pushbutton), the dialog can be updated using the Update pushbutton. Saving a Table The Save As dialog allows the displayed table to be saved to disk with a given name. Use the following procedure to save a table. 1, 2, 3…… -
Page 331
Select the Insert Table Item option from the Table menu. Address information can also be edited by double-clicking on the required node. The Add SYSMAC NET Data Link Table Item dialog allows the memory area at the node to be configured. Use the following procedure to configure the node. -
Page 332: Chapter 9 Plc Clock Tool
The PLC Clock tool provides a facility to monitor and set the PLC Clock and synchronise the PLC clock to the PC clock. The PLC Clock tool dialog can be set so that it remains ‘on top’ and is not obscured by other windows by clicking the right mouse button in the task bar and selecting the Always on Top option.
-
Page 334: Chapter 10 Data Links
Manual settings enable more flexible allocations, including the send size for each node, the sequence of nodes for sending and receiving, and the setting of nodes for sending only or receiving only. Use manual settings to create flexible data links to meet the requirements of the individual system (e.g., efficient utilization of memory, restrictions on allocated addresses, etc.).
-
Page 335
Automatic settings can be used for simple data exchanges involving fixed allocations, when all nodes are set for the same send size and the same data is to be shared among all nodes in order of node address. Using a Programming Device (such as the CX-Programmer or a Programming Console), set the data exchange method in the DM parameter area of the startup node. -
Page 336: User Interface Overview
PART 2: CX-Server PLC Tools OMRON CHAPTER 10 – Data Links User Interface Overview Datalink Component The following illustration shows the window used when constructing Controller Link or SYSMAC LINK data links manually. Toolbar Data Link Configuration window Node Editing…
-
Page 337
Verify Node Compares data link tables generated by CX-Net with data link tables stored in the PLC. If they do not match, a error dialog box is displayed. Data Link Displays the operation and data link status of manually set data links. -
Page 338
Delete Deletes data link tables. Verify Node Compares data link tables generated by CX-Net with data link tables stored in the PLC. If they do not match, a error dialog box is displayed. (10) Data Link Operation/Status Displays the operation and data link status of manually set data links. -
Page 339: Manually Setting Data Links
F10: Show Next Node Shows the next node. Manually Setting Data Links Follow the procedure described below to create data link tables manually for Controller Link or SYSMAC LINK data links. Note: There is no need to create a data link tables when data links are set automatically. For details on automatic setup, refer to Automatically Set Data Links.
-
Page 340: Procedure Through Data Link Startup
1) Data Link | Setup 2) Select either Controller Link Unit or SYSMAC LINK Unit as the Communications Unit mounted to the PLC. (For the local network only, i.e., when the network address is 0.) 3) File | Open 4) Online | Transfer to PLC…
-
Page 341: Creating Data Link Tables
CHAPTER 10 – Data Links OMRON Creating Data Link Tables Create a data link table for each node registered in the CX-Server file that is read. Make the settings for (1) to (8) below. (1) Participating data link nodes (7) Receive…
-
Page 342: System Configuration Example
PART 2: CX-Server PLC Tools OMRON CHAPTER 10 – Data Links Note 1: It is possible to add or delete nodes from the participating data link nodes (1) using the Datalink Wizard. Adding nodes Select Table | Add Source Link .
-
Page 343
DM800 The refresh sequence for nodes 1 and 2 is as follows: #1, #2, #3. For node 3, the order is #2, #1, #3. Node address 03 does not receive all of the data sent from node address 02. Rather, data from the 20 words (CIO 1240 to CIO 1259) beginning from the start address +10 words (i.e., the offset) is received in IR 300 to IR 319. -
Page 344: Creating Data Link Tables Offline
First create manually set data link tables offline. Datalink Wizard Operations While offline, select Setup from the Data Link menu in CX-Net. The Data Link dialog box will be displayed. Select either Controller Link or SYSMAC LINK, and then click the OK button.
-
Page 345
Set the addresses of the nodes that are to participate in the data links. In this case, input 1-3 to set node addresses 01 to 03. (To set node addresses 01, 02, and 04, for example, input 1,2,4.) Click the Next button or press the Enter key. -
Page 346
IR 93 Node 6 Node 5 Set node address 01 as shown in the following table, and then click the Next button or press the Enter key. Set node addresses 02 and 03 in the same way. Item Data set… -
Page 347
Sets CIO 1300 as the data link status start start address address. Start address 1300 Set node address 03 as shown in the following table, and then click the Next button or press the Enter key. Item Data set Description Node address −… -
Page 348
CHAPTER 10 – Data Links Reference: Fast Datalink Wizard Settings It is possible to generate a table with all nodes set for the same PLC type and the same areas (using Fast Default Table Generation), and then to modify individual nodes in the Node Editing window as required. -
Page 349
: The arrows indicate the direction of data transfer. Send areas are indicated by ovals in order of the addresses of nodes participating in the data links. The same color indicates that data is shared among nodes. Therefore, with the number of participating nodes represented by n, one oval and n-1 rectangles are shown for each node. -
Page 350
CHAPTER 10 – Data Links Node Editing Window Settings Set the data link details for each node (i.e., send size, receive size, reception offset) in the Node Editing window. Note: The Node Edit window appears in table format by default, as shown below. To convert it back into the earlier list format, select View | Show in List. -
Page 351
Setting Size (Send or Receive) and Offset ♦ The send size can be set for the local node row by double-clicking in the Size cell. (The default is the size set by the Datalink Wizard.) For remote node rows, the receive size can be set. (The default is the entire send size from remote nodes.) -
Page 352
OMRON CHAPTER 10 – Data Links Reference: Size modifications and offsets can be set in the Area Specify dialog box that is displayed by double-clicking on the data link configuration icon (oval for send area or rectangular for receive area Area Specify Dialog Box (Send Area) Specify send size. -
Page 353
The following window is displayed by selecting Table | Add Source Node from the Datalink Component menu or by clicking the button in the Toolbar. Specify the node address, PLC type, and the Area 1 and Area 2 memory areas, and then click the OK button. CX-Server PLC Tools_Page 110… -
Page 354
Deleting Nodes Added to the Data Links Select the node to be deleted from the Node Editing window. Delete the node by clicking the F8: Delete Node button in the Function Bar. Caution: If the node is deleted by clicking the button in the Toolbar, the deletion will be executed immediately. -
Page 355: Procedure Using Setup Example
The data link data for the selected node address is displayed here. The data link table for node address 01, the node to be edited, is displayed as a list in the Node Editing window on the right. Sends 30 words from the local node (node address 01), starting with CIO 01000 (i.e., CIO 01000 to CIO…
-
Page 356
Function Bar, or pressing the F4 or F5 function keys. F5: Move Down Area Double-click on the Offset cell, and input the data size to be offset. In this example, set the offset size to 10 words. With this setting, 20 words sent from node 01 will be received, starting from CIO 1000, and with an offset of 10 words (i.e., CIO 1010 to CIO 1030). -
Page 357: Checking Data Link Tables
CHAPTER 10 – Data Links OMRON Checking Data Link Tables Select Table | Validate Table in the Data Link Editor (Controller Link or SYSMAC LINK). The results of the check will be displayed as shown in the following illustration. Printing Data Link Tables Follow the procedure below to print data link tables that have been generated.
-
Page 358: Saving Data Link Tables
Input the file name (“Sample” in this example), and specify the location where the file is to be saved. Then click the Save button. The data will be saved to a file with a .cl3 extension added to the file name (i.e., “Sample.cl3”…
-
Page 359
Writing CSV Files (Saving) Once data link tables have been created, they can be written to CSV-format files. Select Save As from the File menu in the Datalink Component dialog box, and then select *.csv from the File of Type field. -
Page 360
Description Set value <node-param> <node> The node No. 1 to 62. An error will be generated if an out-of-range for the link. value is set when a file is loaded. (Node No.) The PLC type CS1G, CS1G-H, CS1H, CS1H-H, CJ1G, CJ1G-H, for the node. -
Page 361
OMRON Tag name Description Set value <area1> <start-type> Specify the area type for Link Area 1. Same as for status area type. (Link Area 1 type) <start-ch> The beginning word for Link Area 1. Same as for status area start address. -
Page 362
PART 2: CX-Server PLC Tools OMRON CHAPTER 10 – Data Links An example text data configuration for a CSV file is shown below. Note: Commas are used for delineation. (They are added when there are blank cells.) CX-Server PLC Tools_ Page 119… -
Page 363: Connecting Online
CHAPTER 10 – Data Links OMRON Connecting Online After the PLC has been registered, select either of the following types of registered PLCs for connecting online, depending on the CX-Net function used. 1) PLCs registered for direct connection 2) PLCs registered as nodes on a network…
-
Page 364: Reading And Transferring Data Link Tables
CHAPTER 10 – Data Links Reading and Transferring Data Link Tables After a data link table has been created, follow the procedure below for reading it and transferring it to all nodes participating in the data links. Reading the Data Link Table Select Data Link | Setup from the CX-Net.
-
Page 365
Transferring the Data Link Table Transferring to All Nodes on the Network Select Set All Nodes for Network Operation from the Datalink Component’s Online menu. Selecting this operation allows the data link tables to be transferred simultaneously to multiple PLCs. -
Page 366
The transfer results will be displayed. Note: As long as all the data link tables can be transferred to all of the PLCs attempted, Set All Nodes for Network Operation can be selected to transfer the data link tables simultaneously to multiple PLCs. If there are any PLCs with the power turned OFF, or with disconnected cables, use the following method to transfer the data link table to one PLC at a time. -
Page 367: Starting And Stopping Data Links (Including Status Displays)
Before performing the operations described below, connect online to a node where the data link table has been transferred. As long as the data link table is stored there, data link starting and stopping can be executed from any node.
-
Page 368
Select Datalink Operation/Status from the Online menu. The Datalink Status dialog box will be displayed. As shown below, the status of various items is displayed. The communications cycle time and refresh cycle time are updated only when this window is opened or when the PLC operating status is changed. -
Page 369: Automatically Set Data Links
Make the settings in the Automatic Datalink (Controller Link) or Automatic Datalink (SYSMAC LINK) dialog box. First make the settings for data link operation at PLC startup, and for the automatic data link setup parameters, and then transfer the data to the startup node.
-
Page 370: Controller Link Automatic Setup
Before executing the following operations, connect online to the PLC that is serving as the startup node. Select Data Link | Setup from the CX-Net. (For local network only, i.e., when network address is 0.) Clicking on this down arrow will…
-
Page 371
Select Start or Stop in the Power Up Run State field. Note: Selecting Start causes the data links to start when the PLC is powered up, without having to perform any other data link startup operation. When Automatic is selected, the automatic data link setup parameters can be set, as shown below. -
Page 372: Sysmac Link Automatic Setup
Before executing the following operations, connect online to the PLC that is serving as the startup node. Select Data Link | Setup from the CX-Net. (For local network only, i.e., when network address is 0.) Clicking on this down arrow will…
-
Page 373
• CIO 16CH, DM 32CH • CIO 32CH, DM 64CH Select the memory area for automatic setup (CIO Area only, DM Area only, or CIO and DM Areas), and select the area and word settings from the following list. Reference… -
Page 374: Transferring Automatic Data Link Setup Parameters To The Startup Node
Transferring Automatic Data Link Setup Parameters to the Startup Node The automatic data link parameters that have been set are then sent to the connected startup node PLC. It is also possible to read the automatic data link parameters that have been set for the PLC.
-
Page 375: Monitoring Data Link Status
Select Open from the PLC menu to connect online. Select Data Link | Setup. Select Controller Link or SYSMAC LINK, and then click the OK button. The Datalink Component dialog box will be displayed. Select Online and then Datalink Operation/Status. The Data Link Status dialog box will be displayed.
-
Page 376
PART 2: CX-Server PLC Tools OMRON CHAPTER 10 – Data Links The following items can be monitored for a particular SYSMAC LINK Unit. Tag name Contents General Displays the words allocated in the CIO and DM Areas. Error Information Data link errors, node setting errors, routing table errors, communications controller errors, communications setting errors, data verification errors, duplicate No. -
Page 378: Chapter 11 Routing Tables
The routing tables contain the network, unit number information required. It is only necessary to set up routing tables if the end connection PLC is not a direct connection, i.e. using another PLC as a gateway connection. The routing table is held within the PLC(s) which acts as the gateway device. Different types of PLC and networks have different capabilities for routing.
-
Page 379: Adding A Local Network
Note: The serial port of the CPU Unit and the serial port of the Serial Communications Board/Unit (unit version 1.2 or later) are displayed in the Unit directory in the SIOU Tab on the left. Right-click and select Insert CPU SIOU to set the local network address in the serial port and register in the local network table.
-
Page 380: Adding A Remote Network
Each new remote connection must be given a unique ID number in the range 1 to 127. Note that a remote network can not be given the same ID number as an existing Local Network. Click OK. This will add the remote connection with the specified ID number (shown in red) to the Local Network.
-
Page 381: Editing The Routing Table
PART 2: CX-Server PLC Tools CHAPTER 11 – Routing Tables OMRON Editing the Routing Table Open the appropriate routing table from the Network Configuration Tool dialog then use the following procedure to edit the table. 1, 2, 3… Local Network: ♦…
-
Page 382: Additional Features
Selecting the Overview tab will show all the routing tables in an graphical format. The relay node numbers are shown in the whites boxes and the remote network numbers in the red boxes. The numbers on the right are the Local Network numbers.
-
Page 383: Gateway Counter Settings
The remote settings section allows a series of entries for the Remote Network number, it’s corresponding Relay Network number and it’s corresponding Relay Node number. The slider control to the right of each section can be used to bring any more than the eight entries into view if so required.
-
Page 384
Set the GCT value under Set Gateway Counter during routing table setup using the following procedure. 1. Setting the Gateway Counter Offline: Open the PLC Routing Table window, select the Unit Tab in the directory list, and then right-click the icon for the local PLC node. Setting the Gateway Count Online: Open the PLC Routing Table window, select the Network Tab in the directory list, and then right-click the icon for a PLC node in the network. -
Page 385: Transferring A Routing Table To A Plc
Gateway Counter Setting Dialog Box during the routing table setup. If Expand(7) is selected, the routing tables cannot be transferred. Transferring a Routing Table to a PLC Once a routing table has been created or edited, the routing table may be transferred to the PLC using the following steps: 1, 2, 3……
-
Page 386: Chapter 12 Plc Backup Tool
PLC Backup Tool Overview The PLC Backup Tool can be used to back up, compare, and restore data, such as programs and unit parameters, of all the Units or of only specified Units in a PLC that is connected online.
-
Page 387: Plc Backup Tool Operations
The data in the connected PLC will be backed up as a batch. Compare Click this button to compare data. The data in a backup file can be compared to the data in the connected PLC or to the data in another backup file. Restore to PLC Click this button to restore data.
-
Page 388: Communications Settings For The Target Plc
♦ If the PLC Backup Tool is started from the CX-Programmer Tools Menu, the communications of the CX-Programmer will be inherited. ♦ If the PLC Backup Tool is started from the Windows Start Menu, click the Communication Settings Button and specify the PLC to connect to.
-
Page 389
Connecting directly to PLC Select the gateway PLC. Select the target PLC. Setting Procedure 1, 2, 3… Click the Communication Settings Button in the PLC Backup Tool Dialog Box. The following Communication Settings Dialog Box will be displayed. CX-Server PLC Tools_Page 146… -
Page 390
PART 2: CX-Server PLC Tools OMRON CHAPTER 12 – PLC Backup Tool Select either the PLC Direct Connection or Connection via Gateway Option and click the Change Settings Button. The following Change PLC Dialog Box will be displayed. PLC Direct Connection Set the PLC Model and Network Type of the target PLC. -
Page 391
CHAPTER 12 – PLC Backup Tool OMRON Connection via Gateway Set the PLC Model and Network Type of the gateway PLC and click the OK Button. The Change PLC Dialog Box for the target PLC will be displayed. Select Gateway. -
Page 392: Backing Up Plc Data To The Computer
Backup Note: When the Backup from PLC Button is clicked, the Tool will connect to the PLC that is specified in the current communications settings. Check that the target PLC and network type are correct before performing the backup procedure.
-
Page 393
The following Backup from PLC (1/2) Dialog Box will be displayed after an online connection is made to the PLC. The registered I/O tables will be read from the connected PLC and all Units in the PLC will be displayed in the list. -
Page 394
Special I/O Unit or CPU Bus Unit together with the CPU Unit when backing up or restoring data. If the data from both Units is not backed up or restored together, unexpected operation may occur in the controlled system. -
Page 395
CHAPTER 12 – PLC Backup Tool OMRON Select the Units that you want to back up by selecting the boxes in the number column, and then click the Next Button. The Backup from PLC (2/2) Dialog Box will be displayed so you can enter attributes for the backup file. -
Page 396
Note 2: Do not change the folder structure or move files in the backup folder. If any changes are made, it will become impossible to read the data for the comparison and restore operations. -
Page 397: Comparing Data
PART 2: CX-Server PLC Tools CHAPTER 12 – PLC Backup Tool OMRON Comparing Data Data in backup files can be compared with data from other backup files or data from connected PLC, and the results shown. PLC Backup Tool Backup folder…
-
Page 398
2. Select the comparison source backup file and the target PLC or backup file and click the Compare Button. 3. A Confirm Connection Dialog Box will be displayed if the backup file is being compared to a PLC. -
Page 399
PART 2: CX-Server PLC Tools CHAPTER 12 – PLC Backup Tool OMRON 5. A Comparing Dialog Box will be displayed to indicate that the comparison operation is being executed and the comparison status will be displayed in the Log Display Area. Note: If the read protection has been set for the connected PLC, the protection must be cleared before the data can be compared. -
Page 400
PART 2: CX-Server PLC Tools OMRON CHAPTER 12 – PLC Backup Tool 6. Click the OK Button. The following Comparison Results Dialog Box will be displayed. Source backup file and PLC model on the computer. Destination PLC or backup file, and PLC model. -
Page 401
OMRON Detailed Display of the Comparison Results 1, 2, 3… Double-click the Unit in the comparison results list. The Details of Unmatched Item Dialog Box will be displayed. The data saved in the Unit is displayed. Whether the data matches is displayed. -
Page 402: Restoring Data
., Configuration Comparison Results, Setting Comparison Results, Data Name, Comparison Target Lot No Comparison Results Restoring Data PLC data can be restored to a previous state by transferring backup file data to a connected PLC. PLC Backup Tool Backup folder Default name:…
-
Page 403
Set the communications settings of the target PLC in the PLC Backup Tool Dialog Box. Note: When the Restore to PLC Button is clicked, the Tool will connect to the PLC that is specified in the current communications settings. Check that the target PLC and network type are correct before performing the restore procedure. -
Page 404
If the correct data is not restored, unexpected operation may occur in the controlled system after the data is restored. • Some Special I/O Units and CPU Bus Units operate with parameters that are stored in the CPU Unit. If one of these Units is selected for backup, restrictions will be displayed in the Comments Area of the Backup from PLC Dialog Box. -
Page 405
3. Select the check boxes for the data to be restored. 4. Click the Start Button. To restore all of the data, do not select the Select the unit data Check Box and click the OK Button. If the CPU Unit is not in PROGRAM mode, the following dialog box will be displayed to confirm that it is OK to change the operating mode. -
Page 406
When restoration has been completed, the following Restoration Completed Dialog Box will be displayed. • Always turn the power supply to the PLC OFF and then ON after restoring data. If the WARNING power supply is not turned OFF and then ON, memory in the PLC may not be updated to the restored data, which may cause unexpected operation of the controlled system. -
Page 407
When the configuration information in the backup file is displayed in the Restore to PLC Dialog Box, you can start the Support Software for specific Units to check the data before restoring it to the Unit. This function is supported for the following Units. -
Page 408
Clearing UM and Task Read Protection If read protection is set for the UM area or any tasks in the CPU Unit, the protection must be cleared before you can back up, compare, or restore data for the Unit. Before you can begin any of these procedures, a dialog box will be displayed to allow you to clear protection. -
Page 410: Appendix A Toolbars And Keyboard Shortcuts
APPENDIX A – Toolbars and Keyboard Shortcuts APPENDIX A Toolbars and Keyboard Shortcuts The following tables summarise the toolbars and keyboard shortcuts available from each component and tool. The F1 function key is common across all components and tools and provides context help. Toolbars…
-
Page 411: Data Trace/Time Chart Monitor Component
PART 2: CX-Server PLC Tools APPENDIX A – Toolbars and Keyboard Shortcuts OMRON Data Trace/Time Chart Monitor Component Toolbars Keyboard Shortcuts Ctrl+O …. Open Open Ctrl+PgUp ..Zoom In Save Ctrl+PgDn ..Zoom Out Configure Trace/Time Chart Zoom Out Restore Zoom…
-
Page 412: Memory Card Component
PART 2: CX-Server PLC Tools OMRON APPENDIX A – Toolbars and Keyboard Shortcuts Memory Card Component Toolbars Keyboard Shortcuts Ctrl+X….. Cut Ctrl+C….. Copy Ctrl+V….. Paste Copy Ctrl+A….. Select All Paste F5….Refresh device Delete Rename Properties Large Icons Small Icons…
-
Page 413: Import/Export Tool
PART 2: CX-Server PLC Tools APPENDIX A – Toolbars and Keyboard Shortcuts OMRON Import/Export Tool Toolbars Keyboard shortcuts Ctrl+N….. New Ctrl+O …. Open Open Ctrl+E….. Edit Project Edit Project Ctrl+C….. Import CVSS Ctrl+L ….. Import LSS Import CVSS Ctrl+T ….. Import Text Import LSS Ctrl+V…..
-
Page 414: Data Link Editor
PART 2: CX-Server PLC Tools OMRON APPENDIX A – Toolbars and Keyboard Shortcuts Data Link Editor Toolbars Keyboard Shortcuts Ctrl+N….. New Ctrl+O …. Open Show All Network Nodes Ctrl+S….. Save Open Ctrl+P….. Print Ctrl+<space..Change Window Save Toggle Network/Single Node operation…
-
Page 415: Routing Table Editor
PART 2: CX-Server PLC Tools APPENDIX A – Toolbars and Keyboard Shortcuts OMRON Routing Table Editor Toolbars Keyboard Shortcuts Ctrl+P …. Print Open Save Print Print Preview Always on top Transfer to PLC Transfer from PLC Check routing table Activate C-Series Control Link…
-
Page 416: Glossary Of Terms
0 and 1. A digit used in binary notation which can take the value 0 or 1. The value of a bit, or combination of bits, can represent the status of a device or can be used in programming.
-
Page 417
Data Link Editor The data Link Editor allows a PLC to be configured so that it can participate in one, or more automatic data sharing schemes, over Sysmac Link and Controller Link networks, without the need for special programming. -
Page 418
Refer to Transfer to PLC. Drag The act of moving an item on the screen by selecting it with the mouse, and keeping the mouse button depressed, moving the mouse until the item has reached the required location. The mouse button is then released. -
Page 419
Hardware or software employed to link the elements within a system, including networks, programs and computers. Internal data type The format of the data held at an address in PLC memory; for example, bit or signed character binary. Internode test An echo test performed to check the condition of a PLC on a network node. -
Page 420
A unique name for a data item within a topic. Local Area Network. Link Relay Area A common data area allowing the transfer of data between PLCs connected by a Data Link; the information held in this area in the memory of each PLC is identical. Link system A system that links PLCs together. -
Page 421
The number of 1s in a data transmission is odd. Offline The status of a device when it is not being controlled by a computer (although it may be physically connected to it). Object Linking and Embedding. Used to transfer and share information between Microsoft Windows based applications and accessories. -
Page 422
A table identifying the words in a Data Link to be refreshed for an individual PLC. Registered IO Table The internal PLC table: this is the one used by the PLC when running, regardless of the state of the actual hardware. It can be read and, for CV-series PLCs, written to by the CX-Server software. -
Page 423
An area of PLC memory containing a flag indicating the status of steps used within a program. Stop bits Bits indicating the end of transmission of each set of data bits; normally one or two bits, they indicate the delay time between sending successive characters down the line. Symbol An address that has been given a name to make the address information more flexible. -
Page 424
OMRON GLOSSARY OF TERMS – CX-Server PLC Tools Transfer to PLC The transfer of a program or data from a host (either a computer or a programming device) to a lower-level (or slave) device. Transition Area Contains flags indicating when a transition is ON or OFF Transmitter A device which sends out signals. -
Page 425: Index
Access · 2 Access Change PLC dialog · 81 Access Edit Project dialog · 81 Adding a device to a CX-Server project · 81 About CX-Server · 1, 3, 174 Adding a PLC to a CX-Server project · 81 access Broadcast nodes test ·…
-
Page 426
Creating a SYSMAC NET data link table · 87 Data Link Editor · 87 Deleting a table · 87 Deleting an item from a SYSMAC NET data link table · 88 Editing a SYSMAC NET data link table · 87 Editing a table · 86 Editing a Device List ·… -
Page 427
Viewing a file from the memory card · 75 Counter unit settings · 28 Memory Card Component · 75 Creating an IO table · 19, 20, 21, 22, 23, 27, 83 Memory Card Display · 76 CX-Server IO Table · 19 Memory Card Operation ·… -
Page 428
PLC Clock Tool · 89 Status bar · 7 PLC Error component Transfer from PLC · 8 Activating the error log following error detection · 74 Transfer to PLC · 9 Clearing errors · 71, 83 Updating forced status · 14 Clearing messages ·… -
Page 429
Retrieving Data Trace/Time Settings · 68 Data link tables setup · 86 Routing Table · 85 Deleting an item from a data link table · 88 routing tables Editing a data link table · 87 access Routing Table Editor · 135, 136 Logical error checking ·… -
Page 431
PART 3: CX-Server Runtime… -
Page 433
OMRON Product References All OMRON products are capitalised in this manual. The word “Unit” is also capitalised when it refers to an OMRON product, regardless of whether or not it appears in the proper name of the product. -
Page 434
An application project is defined by the software application invoking CX-Server. OMRON, 2005 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission of OMRON. -
Page 435
Chapter 4 — Import/Export Tool. This chapter describes the Import/Export Tool and its ability to add data from CVSS and LSS files to a CX-Server project. • Chapter 5 — DDE Manager Tool. This chapter describes the DDE Manager and its ability to read and update point data via CX-Server. •… -
Page 436
Communications Requirements ……………………..2 Installation …………………………..3 Starting CX-Server …………………………3 Help and How to Access it ……………………….3 Technical Support…………………………4 CHAPTER 2 Introduction to CX-Server Projects ……… 7 CX-Server Projects …………………………7 CX-Server Project Concepts ……………………..7 Editing a CX-Server Project PLC List……………………8 Editing CX-Server Project ………………………10 CHAPTER 3 Communications…………… -
Page 437
CQM1 Device Group……………………….57 CQM1H Device Group……………………….58 CS1G/CS1G-H Device Group ……………………..58 CS1H/CS1H-H Device Group ……………………..58 IDSC Device Group………………………..58 SRM1 – SRM1 V2 Device Group ……………………58 CV1000 Device Group ……………………….59 CV2000 Device Group ……………………….59 CV500 Device Group ……………………….59 CVM1 Device Group……………………….59 CVM1-V2 Device Group………………………..59 APPENDIX B PLC Memory Areas………….. -
Page 438
OMRON PART 3: CX-Server Runtime APPENDIX C Toolbars and Keyboard Shortcuts ……..85 Project Editor ………………………….85 GLOSSARY OF TERMS…………….87 INDEX………………….. 93 Revision 2.0 CX-Server Runtime_Page (vi) -
Page 439: Chapter 1 Technical Specification
CX-Server comes with a context-sensitive online help system which is designed to complement this manual and to provide a quick reference at any point while using CX-Server when the manual is not to hand. This general help system uses a fast hypertext system, which allows progressively detailed information about any topic to be obtained by selecting keywords within the descriptive text.
-
Page 440: Features
Communications Requirements In order to use serial communication types SYSMAC WAY and Toolbus the following is required: ♦ RS232 connection via a standard serial port on the PC (COM1 etc.) or RS422 connection to a 422 serial board. ♦ In order to use SYSMAC LINK directly from the PC a SYSMAC LINK Network Service Board and FinsGateway Version 3 or higher is required.
-
Page 441: Installation
CX-Server comes with a detailed context-sensitive help system. At any time while using the software, it is possible to get help on the particular point that is currently being worked on, or on general aspects of CX- Server. This system is intended to complement the manual, by providing online reference to specific functions of the software and how to use them.
-
Page 442: Technical Support
CX-Server supports the use of context-sensitive help. The relevant online help topic is provided automatically by selecting the current area of the display responsible for carrying out those actions. Select the F1 function key to retrieve context-sensitive help. Some dialogs include a Help pushbutton when F1 cannot be accessed.
-
Page 443
CHAPTER 1 – Technical Specification When Customer Services need to be contacted, keep the details shown in the following table to hand. A clear and concise description of the problem is required, together with the exact text of any error messages. -
Page 444
PART 3: CX-Server Runtime CHAPTER 1 – Technical Specification OMRON Customer Services Required Information Table Version number of CX-Server component or tool: Serial number of the software: Operating system and version number: Language of operating system: PLC type, model and CPU… -
Page 445: Chapter 2 Introduction To Cx-Server Projects
CX-Server project files at a time, although often only one CX-Server project is used by the client software at any time. A number of steps are involved in the setting up of a CX-Server project. At a high-level, these can be regarded ♦ Identifying the PLCs which the PC is to communicate with;…
-
Page 446: Editing A Cx-Server Project Plc List
The CX-Server project file also contains a list of addresses which may be accessed in the defined PLCs, each address being contained inside a point. Each point has the following attributes: ♦ Name. A unique label within its group so that the point can be easily referenced, similar to folders in Microsoft Windows Explorer (for example, ‘Conveyor Position’).
-
Page 447
CX-Server project file; it must not contain any of the following characters: : / : ; , ? * & ! “ but can contain spaces and international characters. The PLC Name field is case sensitive, i.e. if a name is entered in upper case which already exists in lower case (and vice versa), a new PLC is created. -
Page 448: Editing Cx-Server Project
Comments (name and address comments) relating to a point are displayed when the appropriate element is highlighted. A point represents an input or output data area within a PLC; it can refer to a single bit of data (representing for example, “Hopper empty”, “Activate Reject Solenoid”), or to a multiple bit word (representing for example, “Process Temperature”).
-
Page 449
The Toolbar and status bar can both be turned on or off. Select Status Bar from the View menu to control the display of the status bar. Select Toolbar from the View menu to control the display of the Project Editor toolbar. -
Page 450
The new group name has a maximum length of 32 characters and must be unique within the group that it is being created. It must not contain any of the following characters: / : ; , ? * &… -
Page 451
If several points are to be added at a time, the Leave Box setting should be checked, this allows the dialog to stay active after the Add pushbutton is pressed. The fields remain populated with the previous point’s settings allowing further modification. -
Page 452
Points group. Moving is achieved by clicking on an item and then dragging the mouse to the item’s new position. A confirmation dialog is displayed. Copying is similar except that the Ctrl key must be kept depressed. -
Page 453: Chapter 3 Communications
Device Setup PLC Settings Each CX-Server project can contain a list of devices. A device can be a PLC which can be configured to map on to a physical connection (either directly or via an existing gateway connection). A correctly configured connection allows connections to the PLC.
-
Page 454
Toolbus on the CS/CJ/CP-series PLCs supports full n clients and n destinations. ♦ When the PLC model is set as a CP1H CPU Unit equipped with a USB port, a computer’s USB port can be connected directly to the PLC’s built-in USB port with a standard USB cable. -
Page 455
PLC depends upon details such as CPU type (e.g. the network options available to a C200HS require CPU31 or CPU33 setting to be specified). Device type settings cannot be adjusted for an open PLC or a gateway PLC. -
Page 456: Defining Connections And Gateway Plcs
PLCs. Generally, a directly connected PLC or the network NSB as a gateway is used to route to the required PLC by use of its routing table and networking capability. In order to specify the link information, a network type (e.g. SYSMAC LINK) and PLC addressing information is needed (i.e.
-
Page 457
DIP switches on the front of the CPU. The default protocol settings are 9,600 baud, 7 data bits, even parity and 2 stop bits. Older PLCs have a default baud rate of 2,400. For PLCs not supporting this feature, settings are configured via the PLC Setup component. -
Page 458
— — — Serial Networks When connecting a computer to a serial network of PLCs, each PLC needs to be configured so that it has a different Unit number. The Unit number for C-series PLCs should be configured as follows:… -
Page 459
1. Register the PLC to be connected serially (using Host Link FINS) in the project gateway (e.g., PLC2). 2. In the Change PLC Dialog Box of the target PLC (e.g., PLC1), select the relay PLC (gateway PLC) in the Network Type pull-down menu (e.g., [PLC2] (See note.)) and click the Settings Button to the right of the Network Type pulldown menu. -
Page 460
The serial port number address is automatically calculated in the Calculated Address field on the right. 5. Select the Use SYSWAY with the port option in the Hostlink SYSWAY Setting field, and enter the actual Host Link unit number for the target (communications partner) PLC in the Host Link Unit Number field. -
Page 461
CHAPTER 3 – Communications Connecting Directly to a CJ2 CPU Unit Using a USB Cable Connecting the CX-Programmer to a CJ2 CPU Unit using a USB Cable makes it possible to perform communications faster than when using the conventional Toolbus connection. -
Page 462: Network Communications (End Connection)
They also allow the connections to be defined for PLCs which are to act as gateways. Refer to the PLC Tools User Manual Chapter 8 — CX-Net Network Configuration Tool for further information.
-
Page 463: Devicenet
Two types of communications are supported: 1. – Remote I/O master communications that automatically transfer I/O between Slaves and the CPU Unit without any special programming in the CPU Unit and 2. – Message communications that read/write messages, control operations, or perform other functions for Master Units, CPU Units to which a Master Unit is mounted.
-
Page 464
PART 3: CX-Server Runtime CHAPTER 3 – Communications OMRON The following diagram illustrates the connection options available to the CV-series PLC. Possible Network Combinations — CV-series PLC Note: For Ethernet, multiple destination access is possible. CX-Server Runtime_Page 26 Revision 2.0… -
Page 465
PART 3: CX-Server Runtime OMRON CHAPTER 3 – Communications The following diagram illustrates the connection options available to the CS1-series PLC. Possible Network Combinations – CS1-series PLC Note: For Toolbus (Modem) and Ethernet, multiple destination access is possible. Revision 2.0… -
Page 466
Connections between the various PLCs and computers is achieved by fibre optics in a ring or loop configuration allowing the exchange of data between the attached devices. The link is achieved by an NSB and employment of Microsoft Windows device drivers. Refer to the SYSMAC NET Network Support Board manual for details on installation. -
Page 467: Connecting Using Ethernet/Ip
PLCs through Ethernet cables. This section describes the two methods that can be used to connect a PLC on a EtherNet/IP network. ♦ Directly connect to the gateway PLC using a USB cable, and connect to the PLC on the network through the gateway PLC.
-
Page 468
CPU6@-EIP or CJ2M-CPU3@ that is connected to the gateway PLC side that is connected by USB and the IP address of the PLC that is on the network and is to be connected to and then click the OK Button. -
Page 469
[EtherNet/IP] Dialog Box and System Configuration Image will be displayed. 4. Input the IP address of the PLC on the network to be connected, and then click the OK Button. 5. Click the OK Button in the Change PLC Dialog Box. -
Page 470
Controller is connected to an Expansion Unit or serial port on the Controller Section. Note 2: If you connect the PT to PLC 1 using a serial connection, you will not be able to connect online to PLC 2 or PLC 3 across the network layers. -
Page 471
Serial Communications Unit CS1W-SCU21-V1 CS1W-SCU31-V1 Note 1: Connection via an NS-series PT is not possible to the CP1L-L10D@-@ because an Option Board cannot be mounted. Note 2: A CP1W-EXT01 CJ Unit Adapter is required to use a CJ-series CPU Bus Unit. -
Page 472
2. Set the network type in the Change PLC Dialog Box to Ethernet and click the Set Button. 3. Input the IP address of the PT to connect to on the Driver Tab Page of the Network Settings Dialog Box. -
Page 473
Serial 1. Start the CX-Programmer. 2. Set the network type in the Change PLC Dialog Box to NS-Thru (USB) port and click the Set Button. 3. Click the Network Tab in the Network Setting Dialog Box and set the following items. -
Page 474
CHAPTER 3 – Communications OMRON Connecting Online Automatically You can connect the computer and NS-series PT online automatically without making the above settings in the Change PLC Dialog Box. 1. Start the CX-Programmer. Select Auto Online – Direct Online from the PLC Menu. -
Page 475: Connecting Through An Nv-Series Pt
The CX-Programmer can be connected through an NV-series PT to a PLC that is connected to that PT. System Configuration This function can be used when the NV-series PT is connected to both the computer and the PLC. For details on this connection method, refer to the NV Series PT Setup Manual (Cat. No. V103).
-
Page 477: Chapter 4 Import/Export Tool
Once these definitions of the PLCs and points (addresses) have been imported for use with CX-Server, they may be used by a CX-Server client. For example, the addresses used in a CVSS program could be used by the supervisory program SYSMAC-SCS.
-
Page 478: Supported Import/Export Data
The only information stored about the program which is useful in CX-Server is a table of address comments. Both LSS v3 and LSS v6 files can be imported. Text files are similar to Microsoft Windows ‘.INI’ files in structure. Headers within this file identify a chapter of addresses and a chapter of PLC information.
-
Page 479: Import
PLC details can be edited via the Edit pushbutton. A PLC can be added if none are suitable for the import operation. Refer to Chapter 2 — Introduction to CX-Server Projects for further information.
-
Page 480: Export
♦ Points: 200 per PLC. Export PLC data can be exported to either text or FinsServer files, for example symbol definitions can be exported as a FinsServer (‘.MDB’) file which can be read by Microsoft Excel (text files can also be imported into Microsoft Excel).
-
Page 481
Once the OK pushbutton has been selected, the Export Data File dialog is displayed. This is a standard Microsoft Windows File Open dialog. 5. Insert a filename to export in the File name field and click on OK or select the Cancel pushbutton to abort the operation. -
Page 483: Chapter 5 Dde Manager Tool
(usually) the client and CX-Server is the server. The dialogs available via the DDE Manager tool are the same as those illustrated in Chapter 2 — Introduction to CX-Server Projects; this chapter should be referred to for further information.
-
Page 484
Copying a Point Although it is possible to enter details of a link in a client manually, it may be quicker to use the DDE Manager tool facility to format the link details automatically. The Project Editor (DDE Manager) allows a point to be linked to an application so that the contents of the point can be displayed within that application;… -
Page 485
Note that attempting to paste a copied point into the same location will warn you that a point of the same description already exists. Details about a point can be displayed by right clicking on the point and selecting the Properties option from the menu. -
Page 486: Defining Update Intervals
Calculate Now from the Options menu to update the displayed contents of the cell. Defining Update Intervals The Update Interval dialog allows a default update rate (in seconds) to be assigned to new data requests. Use the following procedure to define an update interval: 1, 2, 3……
-
Page 487: Chapter 6 Performance Monitor Tool
Particularly, it allows monitoring of communications. For example, a SYSMAC WAY connection configured at 9,600 baud, 7 data bits, even parity and 2 stop bits, transmits 10 bits per byte at 9,600 bits per second; this means that the absolute maximum throughput of the cable is 960 bytes per second. Requesting or transmitting data at this rate results in slow response times.
-
Page 488
To refresh the Performance Monitor tool details, select the Refresh Now option from the View menu. The performance Monitor tool can be hidden from the desktop by minimising the window, and can be hidden from the taskbar in its minimised state by selecting Hide on Minimise option from the Options menu. Once hidden, the Performance Monitor tool can be restored by clicking the taskbar pushbutton or click the right- mouse button and from the menu select restore. -
Page 489: Chapter 7 Driver Management Tool
To close the Driver Management Tool, select the Close button in the title bar. A list of available drivers will be shown on the left pane of the main window. The list is generated when the Driver Management Tool is first opened, and obtained by performing a scan of your computer. When drivers are found, they are shown on the left pane, and once selected, the information about the selected driver is shown in the right pane.
-
Page 490
The Driver Management Tool will now automatically update the computer, making it possible to use a larger range of devices via CX-Server. In the future, as device families are extended, existing drivers may require updating, however the process for this modification remains the same as for adding anew. -
Page 491: Appendix A Network Availability
APPENDIX A – Network Availability APPENDIX A Network Availability The following tables indicate the network available to each PLC device group. FinsGateway has no network availability and is not described. Note: Modem connection is also available by Toolbus or SYSMAC WAY if a Modem device has been configured in Microsoft Windows.
-
Page 492: C2000H Device Group
PART 3: CX-Server Runtime APPENDIX A – Network Availability OMRON C2000H Device Group Device SYSMAC Toolbus SYSMAC SYSMAC Controller Ethernet Device Type LINK Link CPU01 C2000 C200H Device Group Device SYSMAC Toolbus SYSMAC SYSMAC Controller Ethernet Device Type LINK Link…
-
Page 493: C200Hg-Z Device Group
PART 3: CX-Server Runtime OMRON APPENDIX A – Network Availability C200HG-Z Device Group Device Type SYSMAC Toolbus SYSMAC SYSMAC Controller Ethernet Device LINK Link CPU33 CPU43 CPU53 CPU63 C200HS Device Group Device Type SYSMAC Toolbus SYSMAC SYSMAC Controller Ethernet Device…
-
Page 494: Cj2H Device Group
PART 3: CX-Server Runtime APPENDIX A – Network Availability OMRON CJ2H Device Group Device Type SYSMAC Tool SYSMAC SYSMAC Controller Ethernet Ether Device FinsGate LINK Link Net/IP CPU68 CPU67 CPU66 CPU65 CPU64 CPU68-EIP CPU67-EIP CPU66-EIP CPU65-EIP CPU64-EIP CJ2M Device Group…
-
Page 495: Cj1M Device Group
Device Type SYSMAC Tool SYSMAC SYSMAC Controller Ethernet Ether Device FinsGate LINK Link Net/IP *1: Only with a CP1E-N30/40/60 or CP1E-NA CPU Unit. CPM1 (CPM1A/CPM2*) Device Group SYSMAC SYSMAC SYSMAC Controller Device Device Type Toolbus Ethernet LINK Link CPU10 CPU20…
-
Page 496: Cqm1H Device Group
CPU66 CPU65 CPU64 CPU63 IDSC Device Group Device Type SYSMAC Toolbus SYSMAC SYSMAC Controller Ethernet Device LINK Link SRM1 – SRM1 V2 Device Group Device Type SYSMAC Toolbus SYSMAC SYSMAC Controller Ethernet Device LINK Link CX-Server Runtime_Page 58 Revision 2.0…
-
Page 497: Cv1000 Device Group
PART 3: CX-Server Runtime OMRON APPENDIX A – Network Availability CV1000 Device Group Device Type SYSMAC Toolbus SYSMAC SYSMAC Controller Ethernet Device LINK Link CPU01 CV2000 Device Group Device Type SYSMAC Toolbus SYSMAC SYSMAC Controller Ethernet Device LINK Link CPU01…
-
Page 499: Appendix Bplc Memory Areas
Some tables indicate special addresses. These can be as follows: ♦ CLOCK. This allows reading/writing of a PLC’s real-time clock. ♦ BANKNO. This allows reading/writing of a PLC’s extended memory bank number. ♦ MODE. This allows reading/writing of a PLC’s run-mode.
-
Page 500: C1000H Device Group
PART 3: CX-Server Runtime APPENDIX B – PLC Memory Areas OMRON C1000H Device Group Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write Present Value Status 4095 IR (opt) SR (opt) SR (opt) 255 (bit 7) 0 (bit 7) Special addresses: MODE.
-
Page 501: C200H Device Group
IR (opt) SR (opt) SR (opt) 255 (bit 7) SR (opt) 0 (bit 7) SR (opt) Present Value Status CPU 32/42 Memory Areas Memory Areas in addition to general memory areas. Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing…
-
Page 502: C200He-Z Device Group
IR (opt) SR (opt) SR (opt) 255 (bit 7) SR (opt) 0 (bit 7) SR (opt) Present Value Status CPU 32/42 Device Group Memory Areas in addition to general memory areas. Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing…
-
Page 503: C200Hg-Z Device Group
PART 3: CX-Server Runtime OMRON APPENDIX B – PLC Memory Areas C200HG-Z Device Group Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write 6655 IR (opt) IR (opt) SR (opt) SR (opt) 255 (bit 7) SR (opt) 0 (bit 7)
-
Page 504: C200Hx Device Group
SR (opt) SR (opt) 255 (bit 7) SR (opt) 0 (bit 7) Present Value Status 6143 * 3 CPU 65 Memory Areas Memory Areas in addition to general memory areas. Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing…
-
Page 505: C500 Device Group
63 (bit 7) 0 (bit 7) CJ2H/CJ2M Device Group General Memory Areas General Memory Areas for all CJ2H (CPU64, 65, 66, 67 and 68) and CJ2M (CPU35, 34, 33, 32, 31, 15, 14, 13, 12 and 11) CPU Units. Prefix Start…
-
Page 506: Cj1G Device Group
Read Channel Addressing Addressing Write 32767*15 Note: Bits in EM banks 7 to E can be force-set and force-reset (Enable Forced Set/Forced Clear). CJ2H-CPU68(-EIP) Memory Areas Memory Areas in addition to General Memory Areas. Prefix Start End Channel Word Read…
-
Page 507: Cj1G-H Device Group
Write 32767 * 3 Special addresses: (all CPUs): CLOCK, MODE. (CPU 44/45): BANKNO. CJ1G-H Device Group General Memory Areas General Memory Areas for all CPUs 42, 43, 44 and 45. Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing…
-
Page 508: Cj1H-H Device Group
PART 3: CX-Server Runtime APPENDIX B – PLC Memory Areas OMRON CPU 44 Memory Areas Memory Areas in addition to General Memory Areas. Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write 32767 * 1 CPU 45 Memory Areas Memory Areas in addition to General Memory Areas.
-
Page 509: Cj1M Device Group
PART 3: CX-Server Runtime OMRON APPENDIX B – PLC Memory Areas CJ1M Device Group General Memory Areas General Memory Areas for all CPUs 12, 13, 22 and 23. Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write Yes (double)
-
Page 510: Cpm2*/Cpm2*-S* Device Group
6144 6655 IR (opt) SR (opt) SR (opt) 255 (bit 7) 0 (bit 7) Present Value Status CPU 41/42/43/44/45 Memory Areas Memory Areas in addition to general memory areas. Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write…
-
Page 511: Cqm1H Device Group
Addressing Write IR (opt) SR (opt) SR (opt) 255 (bit 7) 0 (bit 7) Present Value Status CPU 11/21 Memory Areas Memory Areas in addition to general memory areas. Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write…
-
Page 512: Cs1G Device Group
PART 3: CX-Server Runtime APPENDIX B – PLC Memory Areas OMRON CS1G Device Group General Memory Areas General Memory Areas for all CPUs 42, 43, 44 and 45. Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write Yes (double)
-
Page 513: Cs1G-H Device Group
PART 3: CX-Server Runtime OMRON APPENDIX B – PLC Memory Areas CS1G-H Device Group General Memory Areas General Memory Areas for all CPU 42, 42, 44 and 45 Start Word Read Prefix End Channel Modifiers Channel Addressing Addressing Write CIO (opt)
-
Page 514: Cs1D-H Device Group
Start End Channel Word Read Modifiers Channel Addressing Addressing Write 32767*3 CS1D-H Device Group General Memory Areas General Memory Areas for all CPU 65 and 67 Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write CIO (opt) 6143…
-
Page 515: Cs1D-S Device Group
PART 3: CX-Server Runtime OMRON APPENDIX B – PLC Memory Areas CS1D-S Device Group General Memory Areas General Memory Areas for all CPU 42, 44, 65 and 67 Start Word Read Prefix End Channel Modifiers Channel Addressing Addressing Write CIO (opt)
-
Page 516: Cs1H Device Group
PART 3: CX-Server Runtime APPENDIX B – PLC Memory Areas OMRON CS1H Device Group General Memory Areas General Memory Areas for all CPUs 63, 64, 65, 66 and 67. Start Word Read Prefix End Channel Modifiers Channel Addressing Addressing Write…
-
Page 517: Cs1H-H Device Group
PART 3: CX-Server Runtime OMRON APPENDIX B – PLC Memory Areas CS1H-H Device Group General Memory Areas General Memory Areas for all CPU 63, 64, 65, 66 and 67 Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write…
-
Page 518: Idsc Device Group
PART 3: CX-Server Runtime APPENDIX B – PLC Memory Areas OMRON CPU 67 Memory Areas Memory Areas in addition to General Memory Areas Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write 32767*13 IDSC Device Group Prefix Start…
-
Page 519: Srm1 V2 Device Group
PART 3: CX-Server Runtime OMRON APPENDIX B – PLC Memory Areas SRM1 V2 Device Group Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write 2047 6144 6655 0 (bit 7) Present Value Status Special addresses: MODE. CV1000 Device Group…
-
Page 520: Cv2000 Device Group
PART 3: CX-Server Runtime APPENDIX B – PLC Memory Areas OMRON CV2000 Device Group Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write 2047 1023 Present Value Status CIO (opt) 2555 24575 1023 1023 Present Value Status 1023…
-
Page 521: Cvm1 Device Group
Read Prefix End Channel Modifiers Channel Addressing Addressing Write CIO (opt) 2555 0 (bit 7) CPU 01 Memory Areas Memory Areas in addition to General Memory Areas. Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write Present Value…
-
Page 522: Finsgateway Cpu Unit
PART 3: CX-Server Runtime APPENDIX B – PLC Memory Areas OMRON CPU 01 Memory Areas Memory Areas in addition to General Memory Areas. Prefix Start End Channel Word Read Modifiers Channel Addressing Addressing Write Present Value Status 8191 Present Value…
-
Page 523
APPENDIX C – Toolbars and Keyboard Shortcuts APPENDIX C Toolbars and Keyboard Shortcuts The following tables summarise the toolbars and keyboard shortcuts available from each component and tool. The F1 function key is common across all components and tools and provides context help. Project Editor… -
Page 525
0 and 1. A digit used in binary notation which can take the value 0 or 1. The value of a bit, or combination of bits, can represent the status of a device or can be used in programming. -
Page 526
GLOSSARY OF TERMS – CX-Server Runtime OMRON Default A value automatically set by a program in the absence of user input or on initial entry to an application; such values can be overwritten. Device group A class of devices which share similar properties, each group can be sub-divided into device types. -
Page 527
Hardware or software employed to link the elements within a system, including networks, programs and computers. Internal data type The format of the data held at an address in PLC memory; for example, bit or signed character binary. Invoking application An application such as CX-Programmer and CX-Protocol that utilises components and tools belonging to CX-Server. -
Page 528
Programmable Logic Controller. Point A point is used to hold a value of a predefined type — Boolean, Integer, Text, etc. The contents of a point may be controlled by an object or I/O mechanism such as DDE. The contents of a point may control the action or appearance of an object, or be used for output via an I/O mechanism. -
Page 529
Serial Connection A direct connection between computer and PLC. Server 1. Server is used in DDE functions to contain a link to an outside application. Using DDE functions, CX-Server allows the manipulation of an outside application as specified as the Server. -
Page 530
PART 3: CX-Server Runtime GLOSSARY OF TERMS – CX-Server Runtime OMRON User Datagram Protocol Protocol which directs information across a network to port numbers rather than to IP addresses. Word A 16 bit unit of data memory. CX-Server Runtime_Page 92… -
Page 531
CX-Server Software · 1 CS1-Series connection options · 27 C-Series connection options · 25 CV-series connection options · 26 Data link tables · See Data Link tables DIP switches · 19 DDE · 45, 87, 88 Direct connection · 18 Automatic updates ·… -
Page 532
Performance Monitor tool Access · 3, 49, 51 Close · 49, 51 Help · See Online help Introduction · 49 Help and how to access it · 3 Taskbar setting · 49 Help topics · 3 User interface · 49 Help topics Performance Monitor Tool ·… -
Page 533
Access PLC · 37 Connect to PLC · 37 Projects · See CX-Server project. For non-CX-Server projects, Technical Specification · 1 refer to the user manual for the invoking application. Toolbars and Keyboard Shortcuts · 85 PROM Writer Toolbus Communications · 31 Communications ·…
Программирование контроллера производится
на ПЭВМ с помощью пакета программирования
CX-Programmer.
Его запуск осуществляется через
соответствующий ярлык на рабочем столе
или по пути меню «ПускПрограммыOmronСX-Programmer».
Для того чтобы создать новый файл
объекта, необходимо выбрать в главном
окне программы пункт New в меню File. При
этом должно появиться окно (рис.3а), в
котором необходимо задать нужное имя
контроллера (поле «Device Name»), тип контроллера
СРМ2* (поле «Device Type»), а также тип связи
с контроллеромSYSMACWAY(поле «NetworkType»).
В закладке «Driver» меню «Network Setting» (рис.3б)
(полеNetworkType»
кнопка «Settings») необходимо
выбрать номер порта, через который
осуществляется связь с контроллером
(в нашем случае СОМ1). УстановитьBandRate9600,DataBits7,PantyEven,StopBits2.
Выбрав нужные параметры, следует нажать
кнопку «OK» для подтверждения выбора
или «Cancel» – для отмены. После этого вид
программы должен измениться – появилось
окно проекта и окно редактирования
программы (рис.4), представляющее чистое
поле. В последующем можно изменить
параметры проекта, нажав дважды правой
кнопкой мыши в окне проекта (левое поле
на экране) на имя контроллера.
а)б)
Рис.3. Окна выборов
параметров контроллера
Рис.4. Главное окно
программы
Выше главного окна программы расположены
панели инструментов (рис.5).
а)
б)
Рис.5. Панели
инструментов CX-Programmer
В табл.1 приведено краткое описание
элементов панелей инструментов.
Таблица 1. Описание элементов панелей
инструментов
Номер |
Описание |
1 |
Выбор |
2 |
Показать |
3 |
Показать |
4 |
Показать |
5 |
Наблюдение |
6 |
Показать |
7 |
Указатель |
8 |
Нормально |
9 |
Нормально |
10 |
Нормально |
11 |
Нормально |
12 |
Вертикальная |
13 |
Горизонтальная |
14 |
Выход |
15 |
Выход |
16 |
Инструкция |
17 |
Компиляция |
18 |
Компиляция |
19 |
Создать |
20 |
Открыть |
21 |
Сохранить |
22 |
Печать |
23 |
Предварительный |
24 |
Вырезать |
25 |
Копировать |
26 |
Вставить |
27 |
Отменить |
28 |
Повторно |
29 |
Поиск |
30 |
Изменить |
31 |
Изменить |
32 |
Справка |
33 |
Справка |
34 |
Связь |
В рабочей области программы находится
окно проекта (рис.6). В нем показано
иерархическое дерево проекта.
Рис.6. Окно проекта
Оно содержит следующие ветви:
Symbols– таблица глобальных
переменных контроллера. Здесь хранится
список глобальных переменных используемых
ПЛК, их тип, адрес в памяти и описание.
IOTable–
таблица доступных входов выходов ПЛК.
Отображается информация о модулях
ввода-вывода, подключенных к базовой
панели ПЛК.
Settings– здесь отображаются
настройки ПЛК такие, как режим работы
контроллера, время циклов контроллера,
настройка работы с удаленными модулями
по сети и т.п.
Memory– таблица распределения
памяти ПЛК.
Далее следуют ветви относящиеся к
конкретной программе проекта:
Symbols– переменные
используемые в программе, их тип, адрес,
описание.
Section1.. – перечень секций
составляющих программу.
END– обязательная секция
означающая конец программы.
Для того чтобы начать программирование
в дереве проекта необходимо выбрать
пункт «Section1», при этом активизируется
окно редактирования программы
представляющее собой поле, ограниченное
левой и правой шинами, а также панель
инструментов.
При вводе команд «Нормально замкнутый
контакт», «Нормально разомкнутый
контакт», «Нормально замкнутый контакт
ИЛИ», «Нормально разомкнутый контакт
ИЛИ», «Выход» или «Выход с инверсией»
появляется окно (например, как на рис.7),
в котором необходимо ввести адрес новой
переменной и задать соответствующие
параметры. Далее нужно нажать «OK» для
подтверждения или «Cancel» – для отмены.
Далее появляется окно, в котором можно
ввести комментарий к выбранному контакту
или выходу. После этого необходимо опять
нажать «OK» для подтверждения своих
действий или «Cancel» – для их отмены.
Рис.7. Окно выбора
параметров элементов РКС
Для перехода на следующую строку
программы необходимо курсором перейти
на неё. В случае неправильного составления
строки программы, слева появляется
красная линия напротив неправильной
строки. В конце любой программы должна
обязательно присутствовать инструкция
«END(01)»
При редактировании программы можно
производить следующие операции:
а) можно выделять необходимые области
программы и производить с ними действия
(через контекстное меню, появляющейся
при нажатии правой кнопки мыши или через
панель инструментов)
б) при перемещении объекта с нажатой
левой клавишей мыши происходит его
перемещение (не копирование) на новое
место;
в) есть возможность отменять предыдущие
действия.
При необходимости можно изменить любые
параметры ранее установленных элементов
программы, нажав на него два раза левой
кнопкой мыши. Выделение части программы
производится курсором мыши при нажатой
её левой кнопке. Для удаления какого-либо
элемента необходимо выделить его, нажав
на него один раз левой кнопкой мыши и
нажать клавишу Delete». Для удаления строки
программы целиком нужно увести курсор
до предела влево и нажать клавишу
«Delete».
Для сохранения проекта служат кнопки
Save и Save as… в меню File.
Перед записью программы в контроллер
её необходимо откомпилировать (рис.8).
Для этого надо нажать кнопку «Compile
program» (номер 17 на рис.6).
Если в программе обнаружены ошибки или
предупреждения, то внизу окна проекта
появится сообщение с их перечислением.
В описании ошибок указывается расположение
объекта (строка и столбец), который и
вызвал ошибку.
Рис.8. Вид окна
проекта после компиляции программы
Для подключения к контроллеру необходимо,
чтобы питание лабораторного стенда и
питание контроллера было включено,
затем нажать на кнопку «Work Online» (номер
34 на рис.6). При этом появляется окно
(рис.9), в котором предлагается связаться
с ПЛК. Нажав «Да», мы переходим в режим
связи с контроллером. При этом фон
программы меняется на серый и активизируются
панели инструментов. Автоматически
активизируется новые панели инструментов
(рис.10). В табл.2 приведено описание
функций кнопок на этих панелях.
Рис.9. Окно запроса
связи с ПЛК
Рис.10. Панели
инструментов для работы с ПЛК
Таблица 2. Описание функций кнопок
Номер |
Описание |
1 |
Загрузка |
2 |
Выгрузка |
3 |
Сравнение |
4 |
Выбор |
5 |
Выбор |
6 |
Выбор |
7 |
Выбор |
8 |
Начать |
9 |
Окончить |
10 |
Утвердить |
11 |
Начать |
Для записи программы и установок в
контроллер необходимо нажать кнопку 1
«Transfer to PLC». При этом появится окно, в
котором будет предложено сменить режим
работы ПЛК (рис.11а). Здесь также надо
выбрать «Да». Далее появится окно
(рис.11б), в котором нужно выбрать, что
необходимо отправить, и нажать кнопку
«ОК».
а)
б)
Рис.11. Окна смены
режима работы ПЛК и выбора загружаемой
информации.
После этого появится окно, показывающее
степень загрузки проекта в ПЛК (рис.12а).
Когда загрузка завершится, окно сменит
вид (рис.12б).
а)
б)
Рис.12. Окно состояния
загрузки
Далее будет предложено вернуться в
режим работы, который был до соединения
с ПЭВМ. В случае установки неправильных
параметров связи или параметров ПЭВМ
и ПЛК или неправильных действий
пользователя связь с контроллером не
будет установлена и появится окно
предупреждения (рис.13). В нём предложено
повторить операцию связи, а также
перечислены возможные причины ошибки
связи (нет питания у ПЛК, не совпадает
тип ПЛК с типом, выбранным в проекте,
нет связи между ПЭВМ и ПЛК).
При появлении окна как на рис.14 загрузка
функций в контроллер произошла, не
смотря на ошибку, и для проверки можно
сравнить данные в ПК с данными в ПЭВМ
(кнопка 3 на рис.10).
Рис. 13. Окно ошибки
связи с ПЛК
Рис.14. Окно ошибки
Для переключения обратно в режим
редактирования, нужно опять нажать
кнопку «Work Online». Чтобы получить данные
из контроллера, необходимо нажать кнопку
2 «Transfer from PLC». При этом в окне редактирования
должна появиться программа, которая
была записана в контроллер.
Для редактирования программы без
останова контроллера необходимо нажать
кнопку 8 «On-LineEditRungs». При
этом осуществляется переход в режим
редактирования On-Line. Далее можно внести
какие-то изменения в программу, а потом
отправить эти изменения в контроллер,
нажав кнопку 10 «Send On-Line Edit Changes», а также
отменить сделанные ранее изменения. В
конце редактирования необходимо нажать
кнопку 9 «Cancel On-Line Edit», чтобы выйти из
режима редактирования.
ВНИМАНИЕ! Для того чтобы программа,
записанная в контроллер, корректно
работала, после ее записи в контроллер
необходимо выполнить следующее:
— если выбран режим «Online», перейти в
режим наблюдения, нажав на кнопку 6
«Monitormode»
(рис.10), затем выполнить пункты 4 – 10
инструкции по правильному порядку
включения лабораторного стенда;
— или, отключить режим «Online» и выключить
питание контроллера, после этого
следовать инструкции по правильному
порядку включения лабораторного стенда.
Порядок выполнения работы:
Основной целью лабораторной работы
является подготовка программы для ПК
для заданного варианта задачи.
Логические функции, описывающие работу
системы автоматизации, предлагается
записывать на основе содержательного
описания работы системы автоматизации.
Последовательность подготовки программ
для ПЛК будет такая:
а) Изучить объект автоматизации заданного
варианта. Здесь необходимо:
-
уточнить последовательность работы
оборудования; -
уточнить назначение датчиков, число и
назначение исполнительных устройств.
б) Для каждой выходной и для каждой
промежуточной переменной составляется
содержательное описание, по которому
затем непосредственно записывается
логическая функция (уравнение).
Содержательное описание – это словесный
портрет включения переменной, условий
ее сохранения и условий ее отключения.
Логические функции составляются
непосредственно по содержательному
описанию, основываясь на том, что союзам
разговорной речи И, ИЛИ, НЕ соответствуют
логические операции соответственно
конъюнкция, дизъюнкция и инверсия.
Полученные логические функции необходимо
переписать в адресах программируемого
контроллера и составить программу для
контроллера.
в) Подготовленную программу необходимо
ввести в ПЭВМ, провести ее компиляцию,
и затем записать в программируемый
контроллер СРМ2А.
г) Убедиться в правильности работы
составленной программы.
Пример выполнения задания:
Cat.No. W438-E1-01
SYSMAC
WS02-CXPC1-E-V50
CS1-H, CJ1-H, CJ1M CPU Units
CX-Programmer Ver.5.0
OPERATION MANUAL
Function Blocks
CX-Programmer
Ver. 5.0
WS02-CXPC1-E-V50
CS1-H, CJ1-H, CJ1M CPU Units
Operation Manual
Function Blocks
Produced July 2004
iv
Notice:
OMRON products are manufactured for use according to proper procedures by a qualified operator and only for the purposes described in this manual.
The following conventions are used to indicate and classify precautions in this manual. Always heed the information provided with them. Failure to heed precautions can result in injury to people or damage to property.
!DANGER Indicates an imminently hazardous situation which, if not avoided, will result in death or serious injury.
!WARNING Indicates a potentially hazardous situation which, if not avoided, could result in death or serious injury.
!Caution Indicates a potentially hazardous situation which, if not avoided, may result in minor or moderate injury, or property damage.
OMRON Product References
All OMRON products are capitalized in this manual. The word “Unit” is also capitalized when it refers to an OMRON product, regardless of whether or not it appears in the proper name of the product.
The abbreviation “Ch,” which appears in some displays and on some OMRON products, often means “word” and is abbreviated “Wd” in documentation in this sense.
The abbreviation “PLC” means Programmable Controller. “PC” is used, however, in some Programming Device displays to mean Programmable Controller.
Visual Aids
The following headings appear in the left column of the manual to help you locate different types of information.
Note Indicates information of particular interest for efficient and convenient operation of the product.
1,2,3… 1. Indicates lists of one sort or another, such as procedures, checklists, etc.
OMRON, 2004
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission of OMRON.
No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is constantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice. Every precaution has been taken in the preparation of this manual. Nevertheless, OMRON assumes no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained in this publication.
v
vi
TABLE OF CONTENTS
PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
xi |
|
1 |
Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
xii |
2 |
General Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
xii |
3 |
Safety Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
xii |
4 |
Application Precautions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
xiii |
SECTION 1 |
||
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
1 |
|
1-1 |
Introducing the Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
2 |
1-2 |
Function Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
7 |
1-3 |
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
13 |
1-4 |
Converting Function Block Definitions to Library Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . |
16 |
1-5 |
Usage Procedures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
17 |
SECTION 2 |
||
Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
19 |
|
2-1 |
Function Block Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
21 |
2-2 |
Instance Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
30 |
2-3 |
Restrictions on Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
37 |
2-4 |
Function Block Applications Guidelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
42 |
2-5 |
Precautions for Instructions with Operands Specifying the First or Last of Multiple Words |
49 |
2-6 |
Instruction Support and Operand Restrictions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
52 |
2-7 |
CPU Unit Function Block Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
104 |
2-8 |
Number of Function Block Program Steps and Instance Execution Time . . . . . . . . . . . . . . |
108 |
SECTION 3 |
||
Creating Function Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . |
111 |
|
3-1 |
Procedural Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
112 |
3-2 |
Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
114 |
Appendices |
||
A |
Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
137 |
B Structured Text (ST Language) Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
139 |
|
C |
External Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
161 |
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
163 |
|
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
165 |
vii
About this Manual:
This manual describes the function blocks and related functionality of the CX-Programmer Ver. 5.0 used together with CS1-H, CJ1-H, and CJ1M CPU Units with unit version 3.0 or later, and includes the sections described on the next page. The CX-Programmer Ver. 5.0 is software that enables the personal computer to be used as a function block programming device, and can be used only for SYSMAC CS-series and CJ-series CPU Units that support function blocks.
The CX-Programmer Ver. 5.0 function block functions have been enhanced. This manual describes only CX-Programmer Ver. 5.0 operations that are related to functions blocks. For operations not related to function blocks, refer to the CX-Programmer Operation Manual (enclosed, Cat. No. W437). This manual also provides only information related to function blocks for the CS1-H, CJ1-H, and CJ1M CPU Units. For other information, refer to the CS/CJ-series manuals.
Please read this manual and related manuals carefully and be sure you understand the information provided before attempting to install or operate the CX-Programmer Ver. 5.0 or the CS1-H, CJ1-H, or CJ1M CPU Units. Be sure to read the precautions provided in the following section.
Manuals Related to the CX-Programmer Ver. 5.0
Name |
Cat. No. |
Contents |
SYSMAC WS02-CXPC1-E-V50 |
W438 |
Describes the functionality unique to the CX-Programmer Ver. |
CX-Programmer Ver. 5.0 Operation Manual |
5.0 and CS/CJ-series CPU Units with unit version 3.0 or later |
|
Function Blocks |
based on function blocks. Functionality that is the same as |
|
(CS1G-CPU@@H, CS1H-CPU@@H, |
that of the CX-Programmer is described in W437 (enclosed). |
|
CJ1G-CPU@@H, CJ1H-CPU@@H, |
||
CJ1M-CPU@@ CPU Units) |
||
SYSMAC WS02-CXPC1-E-V50 |
W437 |
Provides information on how to use the CX-Programmer for |
CX-Programmer Operation Manual |
all functionality except for function blocks. |
|
Manuals Related to the CS1-H, CJ1-H, CJ1M CPU Units
Name |
Cat. No. |
Contents |
SYSMAC CS Series |
W339 |
Provides an outline of and describes the design, installation, |
CS1G/H-CPU@@-EV1, CS1G/H-CPU@@H |
maintenance, and other basic operations for the CS-series |
|
Programmable Controllers |
PLCs. |
|
Operation Manual |
The following information is included: |
|
An overview and features |
||
The system configuration |
||
Installation and wiring |
||
I/O memory allocation |
||
Troubleshooting |
||
Use this manual together with the W394. |
||
SYSMAC CJ Series |
W393 |
Provides an outline of and describes the design, installation, |
CJ1G-CPU@@, CJ1G/H-CPU@@H, CJ1G- |
maintenance, and other basic operations for the CJ-series |
|
CPU@@P, CJ1M-CPU@@ |
PLCs. |
|
Programmable Controllers |
The following information is included: |
|
Operation Manual |
An overview and features |
|
The system configuration |
||
Installation and wiring |
||
I/O memory allocation |
||
Troubleshooting |
||
Use this manual together with the W394. |
||
ix
Name |
Cat. No. |
Contents |
SYSMAC CS/CJ Series |
W394 |
Describes programming and other methods to use the func- |
CS1G/H-CPU@@-EV1, CS1G/H-CPU@@H, |
tions of the CS/CJ-series PLCs. |
|
CJ1G-CPU@@, CJ1G/H-CPU@@H, CJ1G- |
The following information is included: |
|
CPU@@P, CJ1M-CPU@@ |
Programming |
|
Programmable Controllers |
Tasks |
|
Programming Manual |
File memory |
|
Other functions |
||
Use this manual together with the W339 or W393. |
||
SYSMAC CS/CJ Series |
W340 |
Describes the ladder diagram programming instructions sup- |
CS1G/H-CPU@@-EV1, CS1G/H-CPU@@H, |
ported by CS/CJ-series PLCs. |
|
CJ1G-CPU@@, CJ1G/H-CPU@@H, CJ1G- |
When programming, use this manual together with the Oper- |
|
CPU@@P, CJ1M-CPU@@ |
ation Manual (CS1: W339 or CJ1: W393) and Programming |
|
Programmable Controllers |
Manual (W394). |
|
Instructions Reference Manual |
||
SYSMAC CS/CJ Series |
W342 |
Describes the communications commands that can be |
CS1G/H-CPU@@-EV1, CS1G/H-CPU@@H, |
addressed to CS/CJ-series CPU Units. |
|
CS1W-SCB21-V1/41-V1, CS1W-SCU21/41, |
The following information is included: |
|
CJ1G-CPU@@, CJ1G/H-CPU@@H, CJ1G- |
C-series (Host Link) commands |
|
CPU@@P, CJ1M-CPU@@, CJ1W-SCU21-V1/ |
FINS commands |
|
41-V1 |
Note: This manual describes commands that can be sent to |
|
Communications Commands |
||
the CPU Unit without regard for the communications path, |
||
Reference Manual |
||
which can be through a serial communications port on the |
||
CPU Unit, a communications port on a Serial Communica- |
||
tions Unit/Board, or a port on any other Communications |
||
Unit. |
||
Overview of Contents
Precautions provides general precautions for using the CX-Programmer Ver. 5.0.
Section 1 introduces the function block functionality of the CX-Programmer and explains the features that are not contained in the non-function block version of CX-Programmer.
Section 2 provides specifications for reference when using function blocks, including specifications on function blocks, instances, and compatible PLCs, as well as usage precautions and guidelines.
Section 3 describes the procedures for creating function blocks on the CX-Programmer.
The Appendices provide information on data types, structure text specifications, and external variables.
!WARNING Failure to read and understand the information provided in this manual may result in personal injury or death, damage to the product, or product failure. Please read each section in its entirety and be sure you understand the information provided in the section and related sections before attempting any of the procedures or operations given.
x
PRECAUTIONS
This section provides general precautions for using the CX-Programmer Ver. 5.0 and the Programmable Logic Controller.
The information contained in this section is important for the safe and reliable application of the CX-Programmer Ver. 5.0 and Programmable Controller. You must read this section and understand the information contained before attempting to set up or operate the CX-Programmer Ver. 5.0 and Programmable Controller.
1 |
Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
xii |
2 |
General Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
xii |
3 |
Safety Precautions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
xii |
4 |
Application Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
xiii |
xi
1 Intended Audience
This manual is intended for the following personnel, who must also have knowledge of electrical systems (an electrical engineer or the equivalent).
•Personnel in charge of installing FA systems.
•Personnel in charge of designing FA systems.
•Personnel in charge of managing FA systems and facilities.
2 General Precautions
The user must operate the product according to the performance specifications described in the operation manuals.
Before using the product under conditions which are not described in the manual or applying the product to nuclear control systems, railroad systems, aviation systems, vehicles, combustion systems, medical equipment, amusement machines, safety equipment, and other systems, machines, and equipment that may have a serious influence on lives and property if used improperly, consult your OMRON representative.
Make sure that the ratings and performance characteristics of the product are sufficient for the systems, machines, and equipment, and be sure to provide the systems, machines, and equipment with double safety mechanisms.
This manual provides information for programming and operating the product. Be sure to read this manual before attempting to use the product and keep this manual close at hand for reference during operation.
!WARNING It is extremely important that a PLC and all PLC Units be used for the specified purpose and under the specified conditions, especially in applications that can directly or indirectly affect human life. You must consult with your OMRON representative before applying a PLC System to the above-men- tioned applications.
3 Safety Precautions
!WARNING Confirm safety sufficiently before transferring I/O memory area status from the CX-Programmer Ver. 5.0 to the actual CPU Unit. The devices connected to Output Units may malfunction, regardless of the operating mode of the CPU Unit. Caution is required in respect to the following functions.
•Transferring from the CX-Programmer to real I/O (CIO Area) in the CPU Unit using the PLC Memory Window.
•Transferring from file memory to real I/O (CIO Area) in the CPU Unit using the Memory Card Window.
!Caution Variables must be specified either with AT settings (or external variables), or the variables must be the same size as the data size to be processed by the instruction when specifying the first or last address of multiple words in the instruction operand.
1.If a non-array variable with a different data size and without an AT setting is specified, the CX-Programmer will output an error when compiling.
2.Array Variable Specifications
xii
Application Precautions |
4 |
•When the size to be processed by the instruction operand is fixed:
The number of array elements must be the same as the number of elements to be processed by the instruction. Otherwise, the CX-Programmer will output an error when compiling.
•When the size to be processed by the instruction operand is not fixed: The number of array elements must be greater than or the same as the size specified in the other operands.
•If the other operand specifying a size is a constant, the CX-Program- mer Ver. 5.0 will output an error when compiling.
•If the other operand specifying a size is a variable, the CX-Programmer Ver. 5.0 will not output an error when compiling, even if the size of the array variable is not the same as that specified by the other operand (variable). A warning message, however, will be displayed. In particular, if the number of array elements is less than the size specified by the other operand (e.g., the size of the instruction operand is 16, and the number of elements registered in the actual variable table is 10), the instruction will execute read/write processing for the area that exceeds the number of elements. For example, read/write processing will be executed for the 6 words following those for the number of elements registered in the actual variable table. If these words are used for other instructions (including internal variable allocations), unexpected operation will occur, which may result in serious accidents.
Check that the system will not be adversely affected if the size of the variable specified in the operand is less than the size in the operand definition before starting PLC operations.
!Caution Confirm safety at the destination node before transferring a program to another node or changing contents of the I/O memory area. Doing either of these without confirming safety may result in injury.
!Caution Execute online editing only after confirming that no adverse effects will be caused by extending the cycle time. Otherwise, the input signals may not be readable.
!Caution Confirm safety sufficiently before monitoring power flow and present value status in the Ladder Section Window or when monitoring present values in the Watch Window. If force-set/reset or set/reset operations are inadvertently performed by pressing short-cut keys, the devices connected to Output Units may malfunction, regardless of the operating mode of the CPU Unit.
4 Application Precautions
Observe the following precautions when using the CX-Programmer.
•User programs cannot be uploaded to the CX-Programmer.
•Observe the following precautions before starting the CX-Programmer.
•Exit all applications not directly related to the CX-Programmer. Particularly exit any software such as screen savers, virus checkers, E-mail or other communications software, and schedulers or other applications that start up periodically or automatically.
•Disable sharing hard disks, printers, or other devices with other computers on any network.
xiii
Application Precautions |
4 |
•With some notebook computers, the RS-232C port is allocated to a modem or an infrared line by default. Following the instructions in documentation for your computer and enable using the RS-232C port as a normal serial port.
•With some notebook computers, the default settings for saving energy do not supply the rated power to the RS-232C port. There may be both Windows settings for saving energy, as well as setting for specific computer utilities and the BIOS. Following the instructions in documentation for your computer, disable all energy saving settings.
•Do not turn OFF the power supply to the PLC or disconnect the connecting cable while the CX-Programmer is online with the PLC. The computer may malfunction.
•Confirm that no adverse effects will occur in the system before attempting any of the following. Not doing so may result in an unexpected operation.
•Changing the operating mode of the PLC.
•Force-setting/force-resetting any bit in memory.
•Changing the present value of any word or any set value in memory.
•Check the user program for proper execution before actually running it on the Unit. Not checking the program may result in an unexpected operation.
•When online editing is performed, the user program and parameter area data in CS1-H, CJ1-H, and CJ1M CPU Units is backed up in the built-in flash memory. The BKUP indicator will light on the front of the CPU Unit when the backup operation is in progress. Do not turn OFF the power supply to the CPU Unit when the BKUP indicator is lit. The data will not be backed up if power is turned OFF. To display the status of writing to flash memory on the CX-Programmer, select Display dialog to show PLC Memory Backup Status in the PLC properties and then select Windows — PLC Memory Backup Status from the View Menu.
•Programs including function blocks (ladder programming language or structured text (ST) language) can be downloaded or uploaded in the same way as standard programs that do not contain function blocks. Tasks including function blocks, however, cannot be downloaded in task units (uploading is possible).
•If a user program containing function blocks created on the CX-Program- mer Ver. 5.0 or later is downloaded to a CPU Unit that does not support function blocks (CS/CJ-series CPU Units with unit version 2.0 or earlier), all instances will be treated as illegal commands and it will not be possible to edit or execute the user program.
•If the input variable data is not in boolean format, and numerical values only (e.g., 20) are input in the parameters, the actual value in the CIO Area address (e.g., 0020) will be passed. Therefore, be sure to include an &, #, or +, — prefix before inputting the numerical value.
•Addresses can be set in input parameters, but the address itself cannot be passed as an input variable. (Even if an address is set as an input parameter, the value passed to the function block will be that for the size of data in the input variable.) Therefore, an input variable cannot be used as the operand of the instruction in the function block when the operand specifies the first or last of multiple words. Use an internal variable with an AT setting. Alternatively, specify the first or last element in an internal array variable.
xiv
Application Precautions |
4 |
•Values are passed in a batch from the input parameters to the input variables before algorithm execution (not at the same time as the instructions in the algorithm are executed). Therefore, to pass the value from a parameter to an input variable when an instruction in the function block algorithm is executed, use an internal variable or external variable instead of an input variable. The same applies to the timing for writing values to the parameters from output variables.
•Always use internal variables with AT settings in the following cases.
•The addresses allocated to Basic I/O Units, Special I/O Units, and CPU Bus Units cannot be registered to global symbols, and these variables cannot be specified as external variables (e.g., the data set for global variables may not be stable).
•Use internal variables when Auxiliary Area bits other than those preregistered to external variables are registered to global symbols and these variables are not specified as external variables.
•Use internal variables when specifying PLC addresses for another node on the network: For example, the first destination word at the remote node for SEND(090) and the first source word at the remote node for RECV(098).
•Use internal variables when the first or last of multiple words is specified by an instruction operand and the operand cannot be specified as an internal array variable (e.g., the number of array elements cannot be specified).
xv
Application Precautions |
4 |
xvi
SECTION 1
Introduction
This section introduces the function block functionality of the CX-Programmer and explains the features that are not contained in the non-function block version of CX-Programmer.
1-1 Introducing the Function Blocks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
2 |
||
1-1-1 |
Overview and Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
2 |
|
1-1-2 |
Function Block Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
3 |
|
1-1-3 Files Created with CX-Programmer Ver. 5.0 . . . . . . . . . . . . . . . . . . |
4 |
||
1-1-4 CX-Programmer Ver. 5.0 Function Block Menus . . . . . . . . . . . . . . |
5 |
||
1-2 |
Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
7 |
|
1-2-1 |
Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
7 |
|
1-2-2 Advantages of Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
7 |
||
1-2-3 |
Function Block Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
8 |
|
1-3 |
Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
13 |
|
1-3-1 |
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
13 |
|
1-3-2 Variable Usage and Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
13 |
||
1-3-3 |
Variable Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
14 |
|
1-3-4 Variable Properties and Variable Usage . . . . . . . . . . . . . . . . . . . . . . |
15 |
||
1-3-5 Internal Allocation of Variable Addresses . . . . . . . . . . . . . . . . . . . . |
15 |
||
1-4 |
Converting Function Block Definitions to Library Files . . . . . . . . . . . . . . . . |
16 |
|
1-5 |
Usage Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
17 |
|
1-5-1 Creating Function Blocks and Executing Instances . . . . . . . . . . . . . |
17 |
||
1-5-2 |
Reusing Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
18 |
1
Introducing the Function Blocks |
Section 1-1 |
1-1 Introducing the Function Blocks
1-1-1 Overview and Features
The CX-Programmer Ver. 5.0 is a Programming Device that can use standard IEC 61131-3 function blocks. The CX-Programmer Ver. 5.0 function block function is supported for CS/CJ-series CPU Units with unit version 3.0 or later and has the following features.
•User-defined processes can be converted to block format by using function blocks.
•Function block algorithms can be written in the ladder programming language or in the structured text (ST) language. (See note.)
•When ladder programming is used, ladder programs created with non- CX-Programmer Ver. 4.0 or earlier can be reused by copying and pasting.
•When ST language is used, it is easy to program mathematical processes that would be difficult to enter with ladder programming.
Note The ST language is an advanced language for industrial control (primarily Programmable Logic Controllers) that is described in IEC 61131-3. The ST language supported by CX-Programmer conforms to the IEC 61131-3 standard.
•Function blocks can be created easily because variables do not have to be declared in text. They are registered in variable tables.
A variable can be registered automatically when it is entered in a ladder or ST program. Registered variables can also be entered in ladder programs after they have been registered in the variable table.
•A single function block can be converted to a library function as a single file, making it easy to reuse function blocks for standard processing.
•A program check can be performed on a single function block to easily confirm the function block’s reliability as a library function.
•Programs containing function blocks (ladder programming language or structured text (ST) language) can be downloaded or uploaded in the same way as standard programs that do not contain function blocks. Tasks containing function blocks, however, cannot be downloaded in task units (uploading is possible).
•One-dimensional array variables are supported, so data handling is easier for many applications.
Note The IEC 61131 standard was defined by the International Electrotechnical Commission (IEC) as an international programmable logic controller (PLC) standard. The standard is divided into 7 parts. Specifications related to PLC programming are defined in Part 3 Textual Languages (IEC 61131-3).
2
Introducing the Function Blocks Section 1-1
1-1-2 |
Function Block Specifications |
||||
For specifications that are not listed in the following table, refer to the CX-Pro- |
|||||
grammer Ver. 5.0 Operation Manual (W437). |
|||||
Item |
Specifications |
||||
Model number |
WS02-CXPC1-E-V50 |
||||
Setup disk |
CD-ROM |
||||
Compatible CPU Units |
CS/CJ-series CS1-H, CJ1-H, and CJ1M CPU Units with unit version 3.0 or |
||||
later are compatible. |
|||||
Device Type |
CPU Type |
||||
• CS1G-H |
CS1G-CPU42H/43H/44H/45H |
||||
• CS1H-H |
CS1H-CPU63H/64H/65H/66H/67H |
||||
• CJ1G-H |
CJ1G-CPU42H/43H/44H/45H |
||||
• CJ1H-H |
CJ1H-CPU65H/66H/67H |
||||
• CJ1M |
CJ1M-CPU11/12/13/21/22/23 |
||||
Note If a user program containing function blocks created on the CX-Pro- |
|||||
grammer Ver. 5.0 or later is downloaded to a CPU Unit that does not |
|||||
support function blocks (CS/CJ-series CPU Units with unit version 2.0 |
|||||
or earlier), all instances will be treated as illegal commands and it will |
|||||
not be possible to edit or execute the user program. |
|||||
CS/CJ Series Function Restrictions |
|||||
• Instructions Not Supported in Function Block Definitions |
|||||
Block Program Instructions (BPRG and BEND), Subroutine Instructions |
|||||
(SBS, GSBS, RET, MCRO, and SBN), Jump Instructions (JMP, CJP, and |
|||||
CJPN), Step Ladder Instructions (STEP and SNXT), Immediate Refresh |
|||||
Instructions (!), I/O REFRESH (IORF), ONE-MS TIMER (TMHH) |
|||||
For details, refer to 2-3 Restrictions on Function Blocks. |
|||||
Compatible |
Computer |
IBM PC/AT or compatible |
|||
computers |
|||||
CPU |
133 MHz Pentium or faster with Windows 98, SE, or NT 4.0 (with service pack |
||||
6 or higher) |
|||||
OS |
Microsoft Windows 95, 98, SE, Me, 2000, XP, or NT 4.0 (with service pack 6 |
||||
or higher) |
|||||
Memory |
64 Mbytes min. with Windows 98, SE, or NT 4.0 (with service pack 6 or |
||||
higher) |
|||||
Refer to Computer System Requirements below for details. |
|||||
Hard disk space |
100 Mbytes min. available disk space |
||||
Monitor |
SVGA (800 × 600 pixels) min. |
||||
Note Use “small font” for the font size. |
|||||
CD-ROM drive |
One CD-ROM drive min. |
||||
COM port |
One RS-232C port min. |
3
Introducing the Function Blocks |
Section 1-1 |
|||
Item |
Specifications |
|||
Functions not |
Defining |
Number of |
CS1-H/CJ1-H CPU Units: |
|
supported by |
and creat- |
function block |
• Suffix -CPU44H/45H/64H/65H/66H/67H: 1,024 max. per CPU Unit |
|
CX-Program- |
ing func- |
definitions |
• Suffix -CPU42H/43H/63H: 128 max. per CPU Unit |
|
mer Ver. 4.0 |
tion blocks |
|||
CJ1M CPU Units: |
||||
or earlier. |
||||
• CJ1M-CPU11/12/13/21/22/23: 128 max. per CPU Unit |
||||
Function |
64 characters max. |
|||
block names |
||||
Variables |
Variable names |
30,000 characters max. |
||
Variable types |
Inputs, Outputs, Internals, and Externals |
|||
Number of I/O variables in |
64 max. (not including EN and ENO) |
|||
function block definitions |
||||
Allocation of addresses |
Automatic allocation (The allocation range can |
|||
used by variables |
be set by the user.) |
|||
Actual address specifica- |
Supported |
|||
tion |
||||
Array specifications |
Supported (one-dimensional arrays only) |
|||
Language |
Function blocks can be created in ladder programming language or structured |
|||
text (ST, see note). |
||||
Creating |
Number of |
CS1-H/CJ1-H CPU Units: |
||
instances |
instances |
• Suffix -CPU44H/45H/64H/65H/66H/67H: 2,048 max. per CPU Unit |
||
• Suffix -CPU42H/43H/63H: 256 max. per CPU Unit |
||||
CJ1M CPU Units: |
||||
CJ1M-CPU11/12/13/21/22/23: 256 max. per CPU Unit |
||||
Instance |
30,000 characters max. |
|||
names |
||||
Storing |
Project files |
The project file (.cxp/cxt) Includes function block definitions and instances. |
||
function |
||||
Program files |
The file memory program file (*.obj) includes function block definitions and |
|||
blocks as |
||||
instances. |
||||
files |
||||
Function |
Each function block definition can be stored as a single file (.cxf) for reuse in |
|||
block library |
other projects. |
|||
files |
||||
Note The structured text (ST language) conforms to the IEC 61131-3 standard, but CX-Programmer Ver. 5.0 supports only assignment statements, selection statements (CASE and IF statements), iteration statements (FOR, WHILE, REPEAT, and EXIT statements), RETURN statements, arithmetic operators, logical operators, comparison functions, numeric functions, and comments. For details, refer to Appendix B Structured Text (ST Language) Specifications.
1-1-3 Files Created with CX-Programmer Ver. 5.0
Project Files (*.cxp) and
File Memory Program
Files (*.obj)
Projects created using CX-Programmer that contain function block definitions and projects with instances are saved in the same standard project files (*.cxp) and file memory program files (*.obj).
The following diagram shows the contents of a project. The function block definitions are created at the same directory level as the program within the relevant PLC directory.
4
Introducing the Function Blocks |
Section 1-1 |
Project file (.cxp)
PLC1
PLC2
Global symbol table
I/O table
PLC Setup
PLC memory table
Program (with rung comments)
Local symbol table
Section 1 (with instances)
Section 2 (with instances)
END section (with instances)
Function block definitions
FunctionBlock1
FunctionBlock2
Instances created in program sections.
Each function block can be stored in a separate definition file (.cxf).
Function Block Library
Files (*.cxf)
Project Text Files
Containing Function
Blocks (*.cxt)
A function block definition created in a project with CX-Programmer Ver. 5.0 can be saved as a file (1 definition = 1 file), enabling definitions to be loaded into other programs and reused.
Data equivalent to that in project files created with CX-Programmer Ver. 5.0 (*.cxp) can be saved as CXT text files (*.cxt).
1-1-4 CX-Programmer Ver. 5.0 Function Block Menus
The following tables list CX-Programmer Ver. 5.0 menus related to function blocks. For details on all menus, refer to the CX-Programmer Ver. 5.0 Operation Manual (W437).
Main Menu
Main menu |
Submenu |
Shortcut |
Function |
|
File |
Func- |
Load Function |
— |
Reads the saved function block library files (*.cxf). |
tion |
Block from File |
|||
Block |
||||
Save Function |
— |
Saves the created function block definitions to a file ([function block |
||
Block to File |
library file]*.cxf). |
|||
Edit |
Update Function Block |
— |
When a function block definition’s I/O variables have been changed |
|
after the instance was created, an error will be indicated by display- |
||||
ing the instance’s left bus bar in red. This command updates the |
||||
instance with the new information and clears the error. |
||||
Insert |
Function Block Invocation |
F |
Creates an instance in the program (section) at the present cursor |
|
location. |
||||
Function Block Parameter |
P |
When the cursor is located to the left of an input variable or the right |
||
of an output variable, sets the variable’s input or output parameter. |
||||
PLC |
Func- |
Function Block |
— |
Sets the range of addresses (function block instance areas) inter- |
tion |
Memory Allocation |
nally allocated to the selected instance’s variables. |
||
Block |
||||
Function Block |
— |
Checks the status of the addresses internally allocated to the |
||
Mem- |
||||
Memory Statistics |
selected instance’s variables. |
|||
ory |
||||
Function Block |
— |
Checks the addresses internally allocated to each variable in the |
||
Instance Address |
selected instance. |
|||
Optimize Function |
— |
Optimizes the allocation of addresses internally allocated to vari- |
||
Memory |
ables. |
|||
5
Introducing the Function Blocks Section 1-1
Main Popup Menus
Popup Menu for Function Block Definitions
Popup menu |
Function |
||
Insert Function Block |
Ladder |
Creates a function block definition with a ladder programming language algo- |
|
rithm. |
|||
Structured Text |
Creates a function block definition with an ST language algorithm. |
||
From file |
Reads a function block definition from a function block library file (*.cxf). |
||
Popup Menu for Inserted Function Blocks
Popup menu |
Function |
Open |
Displays the contents of the selected function block definition on the right side of the window. |
Save Function Block File |
Saves the selected function block definition in a file. |
Compile |
Compiles the selected function block definition. |
Popup Menu for Function Block Variable Tables
Popup menu |
Function |
|
Edit |
Edits the variable. |
|
Insert Variable |
Adds a variable to the last line. |
|
Insert Variable |
Above |
Inserts the variable above the current cursor position. |
Below |
Inserts the variable below the current cursor position. |
|
Cut |
Cuts the variable. |
|
Copy |
Copies the variable. |
|
Paste |
Pastes the variable. |
|
Find |
Searches for the variable. Variable names, variable comments, or all (text strings) can |
|
be searched. |
||
Replace |
Replaces the variable. |
|
Delete |
Deletes the variable. |
|
Rename |
Changes only the name of the variable. |
|
Popup Menu for Instances
Popup menu |
Function |
|
Edit |
Changes the instance name. |
|
Update Invocation |
When a function block definition’s I/O variables have been changed after the instance |
|
was created, an error will be indicated by displaying the instance’s left bus bar in red. |
||
This command updates the instance with the new information and clears the error. |
||
Go To |
Function Block Definition |
Displays the selected instance’s function block definition on the right side of the window. |
Shortcut Keys
F Key: Pasting Function
Block Definitions in
Program
P Key: Inputting
Parameters
Move the cursor to the position at which to create the copied function block instance in the Ladder Section Window, and click the F Key. This operation is the same as selecting Insert — Function Block Invocation.
Position the cursor at the left of the input variable, or at the right of the output variable and click the P Key. This operation is the same as selecting Insert — Function Block Parameter.
6
Function Blocks |
Section 1-2 |
1-2 Function Blocks
1-2-1 Outline
A function block is a basic program element containing a standard processing function that has been defined in advance. Once the function block has been defined, the user just has to insert the function block in the program and set the I/O in order to use the function.
As a standard processing function, a function block does not contain actual addresses, but variables. The user sets addresses or constants in those variables. These address or constants are called parameters. The addresses used by the variables themselves are allocated automatically by the CX-Pro- grammer for each program.
With the CX-Programmer, a single function block can be saved as a single file and reused in other PLC programs, so standard processing functions can be made into libraries.
Program 2 |
|||||||
Copy of function block A |
|||||||
Function block A |
Program 1 |
||||||
Standard |
Copy of function block A |
Variable |
Output |
||||
program section |
|||||||
written with |
|||||||
variables |
Input |
Variable |
Variable |
Output |
|||
Define in advance. |
|||||||
Insert in |
Set |
Set |
|||||
program. |
|||||||
Copy of function block A |
|||||||
Save function |
|||||||
block as a file. |
|||||||
Convert to |
Input |
Variable |
Variable |
Output |
|||
library function. |
|||||||
Function |
|||||||
block A |
To another PLC program |
||||||
Reuse. |
|||||||
1-2-2 Advantages of Function Blocks
Structured
Programming
Easy-to-read “Black Box”
Design
Use One Function Block for Multiple Processes
Function blocks allow complex programming units to be reused easily. Once standard programming is created in a function block and saved in a file, it can be reused just by placing the function block in a program and setting the parameters for the function block’s I/O. The ability to reuse existing function blocks will save significant time when creating/debugging programs, reduce coding errors, and make the program easier to understand.
Structured programs created with function blocks have better design quality and require less development time.
The I/O operands are displayed as variable names in the program, so the program is like a “black box” when entering or reading the program and no extra time is wasted trying to understand the internal algorithm.
Many different processes can be created easily from a single function block by using the parameters in the standard process as input variables (such as timer SVs, control constants, speed settings, and travel distances).
7
Function Blocks |
Section 1-2 |
Reduce Coding Errors |
Coding mistakes can be reduced because blocks that have already been |
debugged can be reused. |
|
Data Protection |
The variables in the function block cannot be accessed directly from the out- |
side, so the data can be protected. (Data cannot be changed unintentionally.) |
|
Improved Reusability with |
The function block’s I/O is entered as variables, so it isn’t necessary to change |
Variable Programming |
data addresses in a block when reusing it. |
Creating Libraries |
Processes that are independent and reusable (such as processes for individ- |
ual steps, machinery, equipment, or control systems) can be saved as func- |
|
tion block definitions and converted to library functions. |
|
The function blocks are created with variable names that are not tied to actual |
|
addresses, so new programs can be developed easily just by reading the def- |
|
initions from the file and placing them in a new program. |
|
Compatible with |
Mathematical expressions can be entered in structured text (ST) language. |
Multiple Languages |
1-2-3 Function Block Structure
Function Block
Definitions
Function blocks consist of function block definitions that are created in advance and function block instances that are inserted in the program.
Function block definitions are the programs contained in function blocks. Each function block definition contains the algorithm and variable definitions, as shown in the following diagram.
Example: CLOCK PULSE |
||||||||||
Function Block Definition |
||||||||||
1. Algorithm |
||||||||||
Example: CLOCK PULSE |
||||||||||
tim_b |
||||||||||
Algorithm |
TIMX tim_a OFF_TIME |
|||||||||
tim_a |
||||||||||
Variable definitions |
TIMX tim_b ON_TIME |
|||||||||
ENO |
||||||||||
2. Variable Definitions
Usage |
Name |
Type |
Internal |
tim_a |
TIMER |
Internal |
tim_b |
TIMER |
Input |
ON_TIME |
INT |
Input |
OFF_TIME |
INT |
1. Algorithm
Standardized programming is written with variable names rather than real I/O memory addresses. In the CX-Programmer, algorithms can be written in either ladder programming or structured text.
8
Function Blocks |
Section 1-2 |
Number of Function Block
Definitions
Instances
2. Variable Definitions
The variable table lists each variable’s usage (input, output, or internal) and properties (data type, etc.). For details, refer to 1-3 Variables.
The maximum number of function block definitions that can be created for one CPU Unit is either 128 or 1,024 depending on the CPU Unit model.
To use an actual function block definition in a program, create a copy of the function block diagram and insert it in the program. Each function block definition that is inserted in the program is called an “instance” or “function block instance.” Each instance is assigned an identifier called an “instance name.”
By generating instances, a single function block definition can be used to process different I/O data with the same function.
Not yet in program |
|||||||||||||||||||
and memory not yet |
Block instance in program with memory |
||||||||||||||||||
allocated |
allocated. (object) |
||||||||||||||||||
(abstract). |
|||||||||||||||||||
Function Block Definition FB1 |
Program |
Instance |
Memory |
||||||||||||||||
1. Algorithm |
Insert in |
Instance FB1 |
_1 of function block definition FB1 |
used |
|||||||||||||||
Standard |
program. |
Automatic |
|||||||||||||||||
allocation |
Memory |
||||||||||||||||||
program unit |
|||||||||||||||||||
with variable |
Input |
a |
b |
Output data |
for FB1_1 |
||||||||||||||
names a, b, c, |
data |
||||||||||||||||||
etc. |
c |
Output data |
Automatic |
Memory |
|||||||||||||||
2. Parameters |
|||||||||||||||||||
Insert in |
allocation |
for FB1_2 |
|||||||||||||||||
Table defining usage |
|||||||||||||||||||
and properties of |
program. |
||||||||||||||||||
variables a, b, c, etc. |
|||||||||||||||||||
Instance FB1_2 of function block definition FB1 |
Different I/O data |
||||||||||||||||||
can be processed |
|||||||||||||||||||
with the same |
|||||||||||||||||||
Input |
a |
b |
Output data |
function. |
|||||||||||||||
data |
|||||||||||||||||||
c |
Output data |
||||||||||||||||||
Note Instances are managed by names. More than one instance with the same name can also be inserted in the program. If two or more instances have the same name, they will use the same internal variables. Instances with different names will have different internal variables.
For example, consider multiple function blocks that use a timer as an internal variable. In this case all instances will have to be given different names. If more than one instance uses the same name, the same timer would be used in multiple locations, resulting in duplicated use of the timer.
If, however, internal variables are not used or they are used only temporarily and initialized the next time an instance is executed, the same instance name can be used to save memory.
9
Function Blocks |
Section 1-2 |
instance_A
TIMER_FB
Function Block Definition
TIMER_FB
Variable Definitions |
|
Internal variable: WORK_NUM |
Use same internal variables. |
instance_A
TIMER_FB
Use different internal variables.
instance_B TIMER_FB
Number of Instances |
Multiple instances can be created from a single function block definition. Up to |
||||||||
either 256 or 2,048 instances can be created for a single CPU Unit depending |
|||||||||
on the CPU Unit model. The allowed number of instances is not related to the |
|||||||||
number of function block definitions and the number of tasks in which the |
|||||||||
instances are inserted. |
|||||||||
Parameters |
Each time an instance is created, set the real I/O memory addresses or con- |
||||||||
stants for I/O variables used to pass input data values to instances and obtain |
|||||||||
output data values from instances. These addresses and constants are called |
|||||||||
parameters. |
|||||||||
Instance of Function Block Definition A |
|||||||||
Input 0.00 |
a |
b |
Output 2.00 |
||||||
Input 3.00 |
c |
||||||||
Set the constants or input source addresses from which to pass data.
Set the constant or output destination address to which to pass data.
Here, it is not the input source address itself, but the contents at the input address in the form and size specified by the variable data type that is passed to the function block. In a similar fashion, it is not the output destination address itself, but the contents for the output address in the form and size specified by the variable data type that is passed from the function block.
10
Function Blocks |
Section 1-2 |
Even if an input source address (i.e., an input parameter) or an output destination address (i.e., an output parameter) is a word address, the data that is passed will be the data in the form and size specified by the variable data type starting from the specified word address.
Program
Instance of Function Block Definition A
Input D100 |
m |
k |
Output D300 |
Input D200 |
n |
Examples:
If m is type WORD, one word of data from D100 will be passed to the variable.
If n is type DWORD, two words of data from D200 and D201 will be passed to the variable.
If k is type LWORD, four words of data from the variable will be passed to the D300 to D303.
Note (1) Only addresses in the following areas can be used as parameters: CIO Area, Auxiliary Area, DM Area, EM Area (banks 0 to C), Holding Area, and Work Area.
The following cannot be used: Index and Data Registers (both direct and indirect specifications) and indirect addresses to the DM Area and EM Area (both in binary and BCD mode).
(2)Local and global symbols in the user program can also be specified as parameters. To do so, however, the data size of the local or global symbol must be the same as the data size of the function block variable.
(3)When an instance is executed, input values are passed from parameters to input variables before the algorithm is processed. Output values are passed from output variables to parameters just after processing the algorithm. If it is necessary to read or write a value within the execution cycle of the algorithm, do not pass the value to or from a parameter. Assign the value to an internal variable and use an AT setting (specified addresses).
!Caution If an address is specified in an input parameter, the values in the address are passed to the input variable. The actual address data itself cannot be passed.
!Caution Parameters cannot be used to read or write values within the execution cycle of the algorithm. Use an internal variable with an AT setting (specified addresses). Alternatively, reference a global symbol as an external variable.
■ Reference Information
A variety of processes can be created easily from a single function block by using parameter-like elements (such as fixed values) as input variables and changing the values passed to the input variables for each instance.
Example: Creating 3 Instances from 1 Function Block Definition
11
Function Blocks |
Section 1-2 |
Function Block Definition
Example: CONTROL
Algorithm
Variables
Example: There are 3 FB
instances and each has its own I/O and internal variables.
Cyclic task 0 |
|||||||||
Instance |
CASCADE_01 |
||||||||
CASCADE_01 |
P_On |
CONTROL |
1.0 |
||||||
Algorithm |
EN |
ENO |
|||||||
&20 |
|||||||||
Internal and I/O |
&10 |
ON_TIME |
|||||||
variables |
OFF_TIME |
||||||||
Instance |
CASCADE_02 |
1.1 |
|||||||
CASCADE_02 |
P_On |
CONTROL |
|||||||
Algorithm |
EN |
ENO |
|||||||
&15 |
|||||||||
Internal and I/O |
ON_TIME |
||||||||
variables |
&10 |
OFF_TIME |
|||||||
Cyclic task 1 |
||||||||
Instance |
CASCADE_03 |
|||||||
CASCADE_03 |
P_On |
CONTROL |
1.2 |
|||||
Algorithm |
EN ENO |
|||||||
&7 |
||||||||
Internal and I/O |
ON_TIME |
|||||||
variables |
&8 |
OFF_TIME |
||||||
If internal variables are not used, if processing will not be affected, or if the internal variables are used in other locations, the same instance name can be used at multiple locations in the program.
Function block definition
Example: CONTROL
Algorithm
Variables
The same instance can be used at multiple locations.
Instance
CASCADE
Algorithm
Internal and I/O variables
Cyclic task 0
CASCADE
P_On |
CONTROL |
1.0 |
|||||
EN |
ENO |
||||||
&100 |
PARA_1 |
||||||
&130 |
PARA_2 |
||||||
P_On |
CASCADE |
1.1 |
|||||
CONTROL |
|||||||
EN |
ENO |
||||||
&50 |
PARA_1 |
||||||
&150 |
PARA_2 |
||||||
Cyclic task 1
CASCADE
P_On |
CONTROL |
1.2 |
|
&100 |
EN |
ENO |
|
PARA_1 |
|||
&200 |
PARA_2 |
Some precautions are required when using the same memory area. For example, if the same instance containing a timer instruction is used in more than one program location, the same timer number will be used causing coil duplication, and the timer will not function properly if both instructions are executed.
Registration of Instances Each instance name is registered in the global symbol table as a file name.
Program
Instance (sample) of function block definition A
ab
c
The instance is registered in the global symbol table with the instance name as the symbol name.
Name |
Data type |
Address/ |
||||
value |
||||||
sample |
FB [FunctionBlock1] |
N/A[Auto] |
||||
The function block definition |
||||||
name is registered after FB in |
||||||
Instance name |
square parentheses [ ]. |
12
1-3 Variables
1-3-1 Introduction
In a function block, the addresses (see note) are not entered as real I/O memory addresses, they are all entered as variable names. Each time an instance is created, the actual addresses used by the variable are allocated automatically in the specified I/O memory areas by the CX-Programmer. Consequently, it isn’t necessary for the user to know the real I/O memory addresses used in the function block, just as it isn’t necessary to know the actual memory allocations in a computer. A function block differs from a subroutine in this respect, i.e., the function block uses variables and the addresses are like “black boxes.”
Example: |
|||||||||||
Program |
|||||||||||
Function block definition A |
Instance of function block definition A |
||||||||||
Standard program section with |
|||||||||||
variable names a, b, c, etc. |
|||||||||||
Insert in |
|||||||||||
a |
b |
program. |
Input 0.00 |
a |
b |
Output 2.00 |
|||||
Input 3.00 |
c |
||||||||||
c |
Specify inputs and outputs |
||||||||||
MOV |
at the same time. |
||||||||||
Status of 0.00 (1 or 0) is |
Status of b (1 or 0) is |
||||||||||
Table indicating usage and |
passed to a. |
passed to 2.00. |
|||||||||
prpperties of variables a, b, c, etc. |
0.00 1 |
a |
1 |
b |
1 |
2.00 |
1 |
||||
Usage: Inputs |
|||||||||||
Status of 3.00 (1 or 0) is |
|||||||||||
Prpperties: |
|||||||||||
passed to c. |
|||||||||||
Name |
Type |
AT |
Initial Value Retained |
3.00 0 |
c |
0 |
|||||
a |
BOOL |
||||||||||
c |
BOOL |
||||||||||
Usage: Outputs |
The system automatically allocates the |
||||||||||
Prpperties: |
addresses used by variables a, b, and c. For |
||||||||||
Name Type |
AT |
Initial Value Retained |
example, when W100 to W120 is set as the |
||||||||
b |
BOOL |
||||||||||
system’s non-retained memory area, bit |
|||||||||||
addresses such as a = W10000, b = W10001, |
|||||||||||
and c = W10002 will be allocated. |
Note Constants are not registered as variables. Enter constants directly in instruction operands.
•Ladder programming language: Enter hexadecimal numerical values after the # and decimal values after the &.
•Structured text (ST language): Enter hexadecimal numerical values after 16# and enter decimal numerical values as is.
Exception: Enter directly or indirectly specified addresses for Index Registers IR0 to IR15 and Data Registers DR0 to DR15 directly into the instruction operand.
1-3-2 Variable Usage and Properties
Variable Usage |
The following variable types (usages) are supported. |
|
Internals: |
Internal variables are used only within an instance. They cannot |
|
be used pass data directly to or from I/O parameters. |
||
Inputs: |
Input variables can input data from input parameters outside of |
|
the instance. The default input variable is an EN (Enable) vari- |
||
able, which passes input condition data. |
13
Outputs: Output variables can output data to output parameters outside of the instance. The default output variable is an ENO (Enable Out) variable, which passes the instance’s execution status.
Externals: External variables are either system-defined variables registered in advance with the CX-Programmer, such as the Condition Flags and some Auxiliary Area bits, or user-defined global symbols for use within instances.
For details on variable usage, refer to the section on Variable Type (Usage) under Variable Definitions in 2-1-2 Function Block Elements.
The following table shows the number of variables that can be used and the kind of variable that is created by default for each of the variable usages.
1-3-3 Variable Properties
Variables have the following properties. |
|
Variable Name |
The variable name is used to identify the variable in the function block. It |
doesn’t matter if the same name is used in other function blocks. |
|
Note |
The variable name can be up to 30,000 characters long, but must not begin |
with a number. Also, the name cannot contain two underscore characters in a |
|
row. The character string cannot be the same as that of a an index register |
|
such as in IR0 to IR15. For details on other restrictions, refer to Variable Defi- |
|
nitions in 2-1-2 Function Block Elements. |
|
Data Type |
Select one of the following data types for the variable: |
BOOL, INT, UINT, DINT, UDINT, LINT, ULINT, WORD, DWORD, LWORD, |
|
REAL, LREAL, TIMER, COUNTER |
|
For details on variable data types, refer to Variable Definitions in 2-1-2 Func- |
|
tion Block Elements. |
|
AT Settings (Allocation to |
It is possible to set a variable to a particular I/O memory address rather than |
an Actual Addresses) |
having it allocated automatically by the system. To specify a particular |
address, the user can input the desired I/O memory address in this property. |
|
This property can be set for internal variables only. Even if a specific address |
|
is set, the variable name must still be used in the algorithm. |
|
Refer to Variable Definitions in 2-1-2 Function Block Elements for details on |
|
AT settings and 2-4-3 AT Settings for Internal Variables for details on using AT |
|
settings. |
|
Array Settings |
A variable can be treated as a single array of data with the same properties. |
To convert a variable to an array, specify that it is an array and specify the |
|
maximum number of elements. |
|
This property can be set for internal variables only. Only one-dimensional |
|
arrays are supported by the CX-Programmer Ver. 5.0. |
|
• Setting Procedure |
|
Click the Advanced Button, select the Array Variable option, and input the |
|
maximum number of elements. |
|
• When entering an array variable name in the algorithm in a function block |
|
definition, enter the array index number in square brackets after the vari- |
|
able number. |
|
For details on array settings, refer to Variable Definitions in 2-1-2 Function Block |
|
Elements. |
|
Initial Value |
This is the initial value set in a variable before the instance is executed for the |
first time. Afterwards, the value may be changed as the instance is executed. |
14
Variables |
Section 1-3 |
|
For example, set a boolean (BOOL) variable (bit) to either 1 (TRUE) or 0 |
||
(FALSE). Set a WORD variable to a value between 0 and 65,535 (between |
||
0000 and FFFF hex). |
||
If an initial value is not set, the variable will be set to 0. For example, a bool- |
||
ean variable would be 0 (FALSE) and a WORD variable would be 0000 hex. |
||
Retain |
Select the Retain Option if you want a variable’s data to be retained when the |
|
PLC is turned ON again and when the PLC starts operating. |
||
• Setting Procedure |
||
Select the Retain Option. |
1-3-4 Variable Properties and Variable Usage
The following table shows which properties must be set, can be set, and cannot be set, based on the variable usage.
Property |
Variable usage |
||
Internals |
Inputs |
Outputs |
|
Name |
Must be set. |
Must be set. |
Must be set. |
Data Type |
Must be set. |
Must be set. |
Must be set. |
AT (specified address) |
Can be set. |
Cannot be set. |
Cannot be set. |
Initial Value |
Can be set. |
Can be set. |
Can be set. |
(See note.) |
|||
Retained |
Can be set. |
Can be set. |
Can be set. |
(See note.) |
|||
Note Inputs can be set as initial values, but the value of the actual input parameter will be given priority.
1-3-5 Internal Allocation of Variable Addresses
When an instance is created from a function block definition, the CX-Program- mer internally allocates addresses to the variables. Addresses are allocated to all of the variables registered in the function block definition except for variables that have been assigned actual addresses with the AT Settings property.
Program
Instance of function block definition A
a |
b |
Output 2.00 |
||
Input 0.00 |
||||
t |
Output 5.00 |
|||
Note: Variable c is an internal variable, so it is not displayed.
Usage: Inputs
Properties:
Name |
Type |
AT |
Initial Value |
Retained |
|
a |
BOOL |
Usage: Outputs
Properties:
Name |
Type |
AT |
Initial Value |
Retained |
|
b |
BOOL |
YES |
|||
t |
TIMER |
Usage: Internals
Properties:
Name Type AT InitialValue Retained
c BOOL 2000.00
FB instance areas
Non-retained area |
||||||
Starting address 15 |
0 |
|||||
CIO, H, W, |
Size (words) |
|||||
D, or E Area |
||||||
Retained area |
||||||
Starting address |
15 |
0 |
||||
H, D, or E |
Size (words) |
|||||
Timer area |
Area |
|||||
Starting address |
Size (Completion |
|||||
T Area |
||||||
Flags) |
||||||
Counter area |
||||||
Starting |
Size (Completion |
|||||
Automatic allocation of |
C Area |
|||||
address |
Flags) |
|||||
addresses by system |
||||||
Example |
||||||
2000.00 |
Manual allocation of address to variable in FB by AT Settings option.
Setting Internal Allocation The user sets the function block instance areas in which addresses are allo- Areas for Variables cated internally by the system. The variables are allocated automatically by
the system to the appropriate instance area set by the user.
15
Converting Function Block Definitions to Library Files |
Section 1-4 |
Function Block Holding Area Words (H512 to H1535)
Setting Procedure
Select Function Block Memory — Function Block Memory Allocation from the PLC Menu. Set the areas in the Function Block Memory Allocation Dialog Box.
Function Block Instance Areas
FB Instance |
Default value |
Applicable memory |
|||
Area |
areas |
||||
Start Address |
End Address |
Size |
|||
Non Retain |
H512 |
H1407 |
896 |
CIO, WR, HR, DM, EM |
|
Retain |
H1408 |
H1535 |
128 |
HR, DM, EM |
|
Timers |
T3072 |
T4095 |
1024 |
TIM |
|
Counters |
C3072 |
C4095 |
1024 |
CNT |
|
The Function Block Holding Area words are allocated from H512 to H1535. These words are different to the standard Holding Area used for programs (H000 to H511) and are used only for the function block instance area (internally allocated variable area). These words cannot be specified as instruction operands. They are displayed in red if input when a function block is not being created. Although the words can be input when creating a function block, an error will occur when the program is checked. If this area is specified not to be retained in the Function Block Memory Allocation Dialog Box, turn the power ON/OFF or clear the area without retaining the values when starting operation.
1-4 Converting Function Block Definitions to Library Files
A function block definition created using the CX-Programmer can be stored as a single file known as a function block definition file with filename extension *.cxf. These files can be reused in other projects (PLCs).
Project |
Project |
|||||
Function block definition |
Function block definition |
|||||
Example: CLOCK_PULSE |
Example: CLOCK_PULSE |
|||||
1. Algorithm |
1. Algorithm |
|||||
Save |
tim_b |
|||||
tim_b |
Read |
TIMX tim_a OFF_TIME |
||||
TIMX tim_a OFF_TIME |
||||||
tim_a |
tim_a |
|||||
TIMX tim_b ON_TIME |
TIMX tim_b ON_TIME |
|||||
ENO |
ENO |
|||||
2. Variable Definitions |
2. Variable Definitions |
|||||
Usage |
Name |
Type |
||||
Usage |
Name |
Type |
||||
Internal |
tim_a |
TIMER |
||||
Internal |
tim_a |
TIMER |
Internal |
tim_b |
TIMER |
|
Internal |
tim_b |
TIMER |
||||
Input |
ON_TIME |
INT |
||||
Input |
ON_TIME |
INT |
Input |
OFF_TIME |
INT |
|
Input |
OFF_TIME |
INT |
Function block |
|||
definition file (.cxf) |
16
Usage Procedures |
Section 1-5 |
1-5 Usage Procedures
Once a function block definition has been created and an instance of the algorithm has been created, the instance is used by calling it when it is time to execute it. Also, the function block definition that was created can be saved in a file so that it can be reused in other projects (PLCs).
1-5-1 Creating Function Blocks and Executing Instances
The following procedure outlines the steps required to create and execute a function block.
1,2,3… 1. First, create the function block definition including the algorithm and variable definitions in ladder program or ST language. Alternatively, insert a function block library file that has been prepared in advance.
Note (a) Create the algorithm entirely with variable names.
(b)When entering the algorithm in ladder programming language, project files created with versions of CX-Programmer earlier than Ver. 5.0 can be reused by reading the project file into the CX-Pro- grammer Ver. 5.0 and copying and pasting useful parts.
2.When creating the program, insert copies of the completed function block definition. This step creates instances of the function block.
3.Enter an instance name for each instance.
4.Set the variables’ input source addresses and/or constants and output destination addresses and/or constants as the parameters to pass data for each instance.
5.Select the created instance, select Function Block Memory — Function Block Memory Allocation from the PLC Menu, and set the internal data area for each type of variable.
6.Transfer the program to the CPU Unit.
7.Start program execution in the CPU Unit and the instance will be called and executed if their input conditions are ON.
Function block definition A
1. Algorithm
Standard program section with variable names a, b, c, etc.
2. Variables
Table defining usage and properties of variables a, b, c, etc.
The instance is |
|
executed if the input |
3. Input instance name |
condition is established. |
Program
Input
Instance of function block definition A
condition 5. The system automatically allocates the addresses used by these
variables. Set the data area area in which these addresses are allocated.
Insert in |
Input 0.00 |
a |
b |
Output 2.00 |
program. |
cOutput 3.00
4.Specify the input source and output destination addresses.
17
Usage Procedures |
Section 1-5 |
1-5-2 Reusing Function Blocks
Use the following procedure to save a function block definition as a file and use it in a program for another PLCs.
1,2,3… 1. Select the function block that you want to save and save it as a function block definition file (*.cxf).
2.Open the other PLC’s project and open/read the function block definition file (*.cxf) that was saved.
3.Insert the function block definition in the program when creating the new program.
Function block definition A
1. Algorithm
Standard program section with variable names a, b, c, etc.
2. Variables
Table defining usage and properties of variables a, b, c, etc.
Read and insert.
Save
Function block definition A
Function block definition file (*.cxf)
Program
Input |
Instance of function block definition A |
|||||||
condition |
||||||||
a |
b |
Output 5.00 |
||||||
Input 1.00 |
||||||||
c |
Output 6.00 |
|||||||
Note In the CX-Programmer Ver. 5.0, each function block definition can be compiled and checked as a program. We recommend compiling to perform a program check on each function block definition file before saving or reusing the file.
18
SECTION 2
Specifications
This section provides specifications for reference when using function blocks, including specifications on function blocks, instances, and compatible PLCs, as well as usage precautions and guidelines.
2-1 |
Function Block Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
21 |
|
2-1-1 |
Function Block Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
21 |
|
2-1-2 |
Function Block Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
21 |
|
2-2 |
Instance Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
30 |
|
2-2-1 |
Composition of an Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
30 |
|
2-2-2 |
Parameter Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
34 |
|
2-2-3 |
Operating Specifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
35 |
|
2-3 Restrictions on Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
37 |
||
2-4 Function Block Applications Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
42 |
||
2-4-1 |
Deciding on Variable Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . |
42 |
|
2-4-2 |
Determining Variable Types (Inputs, Outputs, Externals, and Internals) |
42 |
|
2-4-3 |
AT Settings for Internal Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . |
43 |
|
2-4-4 |
Array Settings for Internal Variables . . . . . . . . . . . . . . . . . . . . . . . . |
44 |
|
2-4-5 |
Specifying Addresses Allocated to Special I/O Units . . . . . . . . . . . |
45 |
|
2-4-6 |
Using Index Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
46 |
|
2-5 Precautions for Instructions with Operands Specifying the First or Last |
|||
of Multiple Words . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
49 |
||
2-6 Instruction Support and Operand Restrictions . . . . . . . . . . . . . . . . . . . . . . . . |
52 |
||
2-6-1 |
Sequence Input Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
53 |
|
2-6-2 |
Sequence Output Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
55 |
|
2-6-3 |
Sequence Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
56 |
|
2-6-4 |
Timer and Counter Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
57 |
|
2-6-5 |
Comparison Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
60 |
|
2-6-6 |
Data Movement Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
62 |
|
2-6-7 |
Data Shift Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
64 |
|
2-6-8 |
Increment/Decrement Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . |
67 |
|
2-6-9 |
Symbol Math Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
67 |
|
2-6-10 |
Conversion Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
72 |
|
2-6-11 |
Logic Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
74 |
|
2-6-12 |
Special Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
76 |
|
2-6-13 |
Floating-point Math Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . |
76 |
|
2-6-14 |
Double-precision Floating-point Instructions. . . . . . . . . . . . . . . . . . |
80 |
|
2-6-15 |
Table Data Processing Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . |
82 |
|
2-6-16 |
Data Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
85 |
|
2-6-17 |
Subroutine Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
86 |
|
2-6-18 |
Interrupt Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
87 |
|
2-6-19 High-speed Counter and Pulse Output Instructions |
|||
(CJ1M-CPU21/22/23 Only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
88 |
19
2-6-20 |
Step Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
89 |
2-6-21 |
Basic I/O Unit Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
89 |
2-6-22 |
Serial Communications Instructions . . . . . . . . . . . . . . . . . . . . . . . . . |
91 |
2-6-23 |
Network Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
93 |
2-6-24 |
File Memory Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
95 |
2-6-25 |
Display Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
95 |
2-6-26 |
Clock Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
96 |
2-6-27 |
Debugging Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
97 |
2-6-28 |
Failure Diagnosis Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
98 |
2-6-29 |
Other Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
98 |
2-6-30 |
Block Programming Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . |
99 |
2-6-31 |
Text String Processing Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . |
101 |
2-6-32 |
Task Control Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
103 |
2-6-33 |
Model Conversion Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
103 |
2-6-34 |
Special Instructions for Function Blocks . . . . . . . . . . . . . . . . . . . . . |
104 |
2-7 CPU Unit Function Block Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
104 |
|
2-7-1 |
Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
104 |
2-7-2 |
Operation of Timer Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . |
107 |
2-8 Number of Function Block Program Steps and Instance Execution Time . . . |
108 |
|
2-8-1 Number of Function Block Program Steps |
||
(CPU Units with Unit Version 3.0 or Later) . . . . . . . . . . . . . . . . . . . |
108 |
|
2-8-2 |
Function Block Instance Execution Time |
|
(CPU Units with Unit Version 3.0 or Later) . . . . . . . . . . . . . . . . . . . |
109 |
20
Function Block Specifications Section 2-1
2-1 Function Block Specifications
2-1-1 |
Function Block Specifications |
||
Item |
Description |
||
Number of function block definitions |
CS1-H/CJ1-H CPU Units: |
||
• Suffix -CPU44H/45H/64H/65H/66H/67H: |
|||
1,024 max. per CPU Unit |
|||
• Suffix -CPU42H/43H/63H: 128 max. per CPU |
|||
Unit |
|||
CJ1M CPU Units: |
|||
• CJ1M-CPU11/12/13/21/22/23: 128 max. per |
|||
CPU Unit |
|||
Number of instances |
CS1-H/CJ1-H CPU Units: |
||
• Suffix -CPU44H/45H/64H/65H/66H/67H: |
|||
2,048 max. per CPU Unit |
|||
• Suffix -CPU42H/43H/63H: 256 max. per CPU |
|||
Unit |
|||
CJ1M CPU Units: |
|||
CJ1M-CPU11/12/13/21/22/23: 256 max. per |
|||
CPU Unit |
|||
Number of instance nesting levels |
Nesting is not supported. |
||
Number of I/O variables |
64 variables max. per function block definition |
||
2-1-2 |
Function Block Elements |
Function Block
Definition Name
The following table shows the items that must be entered by the user when defining function blocks.
Item |
Description |
Function block |
The name of the function block definition |
definition name |
|
Language |
The programming language used in the function block defini- |
tion. Select ladder programming or structured text |
|
Variable definitions |
Variable settings, such as operands and return values, |
required when the function block is executed |
|
• Type (usage) of the variable |
|
• Name of the variable |
|
• Data type of the variable |
|
• Initial value of the variable |
|
Algorithm |
Enter the programming logic in ladder or structured text. |
• Enter the programming logic using variables. |
|
• Input constants directly without registering in variables. |
|
Comment |
Function blocks can have comments. |
Each function block definition has a name. The names can be up to 64 characters long and there are no prohibited characters. The default function block name is FunctionBlock@, where @ is a serial number.
Function block definition name
CLOCK PULSE EN ENO (BOOL) (BOOL) ON_TIME
(INT)
OFF_TIME (INT)
21
Function Block Specifications |
Section 2-1 |
|||||||||||||||||
Language |
Select either ladder programming language or structured text (ST language). |
|||||||||||||||||
For details refer to Appendix B Structured Text (ST Language) Specifications. |
||||||||||||||||||
Variable Definitions |
Define the operands and variables used in the function block definition. |
|||||||||||||||||
Variable Names |
• Variable names can be up to 30,000 characters long. |
|||||||||||||||||
• Variables name cannot contain spaces or any of the following characters: |
||||||||||||||||||
! “ # $ % & ‘ ( ) = — ~ ^ | ‘ @ { [ + ; * : } ] < , > . ? / |
||||||||||||||||||
• Variable names cannot start with a number (0 to 9). |
||||||||||||||||||
• Variable names cannot contain two underscore characters in a row. |
||||||||||||||||||
• The following characters cannot be used to indicate addresses in I/O |
||||||||||||||||||
memory. |
||||||||||||||||||
A, W, H (or HR), D (or DM), E (or EM), T (or TIM), C (or CNT) followed |
||||||||||||||||||
by the numeric value (word address) |
||||||||||||||||||
Variable Notation |
||||||||||||||||||
CLOCK PULSE |
Variable table |
|||||||||||||||||
EN |
||||||||||||||||||
ENO |
Usage |
Name |
Type |
|||||||||||||||
(BOOL) (BOOL) |
Internal |
tim_a |
TIMER |
|||||||||||||||
ON_TIME |
Internal |
tim_b |
TIMER |
|||||||||||||||
(INT) |
Input |
ON_TIME |
INT |
|||||||||||||||
OFF_TIME |
Input |
OFF_TIME |
INT |
|||||||||||||||
(INT) |
||||||||||||||||||
Output variables |
||||||||||||||||||
Input variables |
||||||||||||||||||
tim_b |
||||||||||||||||||
TIMX tim_a OFF_TIME |
||||||||||||||||||
tim_a |
||||||||||||||||||
TIMX tim_b OFF_TIME |
||||||||||||||||||
ENO |
||||||||||||||||||
Internal |
||||||||||||||||||
variables |
||||||||||||||||||
Variable Type (Usage) |
||||||||||||||||||
Item |
Variable type |
|||||||||||||||||
Inputs |
Outputs |
Internals |
Externals |
|||||||||||||||
Definition |
Operands to the |
Return values from the |
Variables used only |
Global symbols regis- |
||||||||||||||
instance |
instance |
within instance |
tered as variables |
|||||||||||||||
beforehand with the |
||||||||||||||||||
CX-Programmer or |
||||||||||||||||||
user-defined global |
||||||||||||||||||
symbols. |
||||||||||||||||||
Status of value at next |
The value is not |
The value is passed on |
The value is passed on |
The value is not |
||||||||||||||
execution |
passed on to the next |
to the next execution. |
to the next execution. |
passed on to the next |
||||||||||||||
execution. |
execution. |
|||||||||||||||||
Display |
Displayed on the left |
Displayed on the right |
Not displayed. |
Not displayed. |
||||||||||||||
side of the instance. |
side of the instance. |
|||||||||||||||||
Number allowed |
64 max. per function |
64 max. per function |
Unlimited |
Unlimited |
||||||||||||||
block (excluding EN) |
block (excluding ENO) |
|||||||||||||||||
AT setting |
No |
No |
Supported |
No |
||||||||||||||
Array setting |
No |
No |
Supported |
No |
||||||||||||||
22
Function Block Specifications |
Section 2-1 |
|||
Item |
Variable type |
|||
Inputs |
Outputs |
Internals |
Externals |
|
Retain setting |
No |
Supported |
Supported |
No |
Variables created by |
EN (Enable): |
ENO (Enable Output): |
None |
Pre-defined symbols |
default |
Receives an input con- |
Outputs the function |
registered in advance |
|
dition. |
block’s execution sta- |
as variables in the CX- |
||
tus. |
Programmer, such as |
|||
Condition Flags and |
||||
some Auxiliary Area |
||||
bits. |
||||
Note For details on Externals, refer to Appendix C External Variables.
■ Input Variables
Input variables pass external operands to the instance. The input variables are displayed on the left side of the instance.
The value of the input source (data contained in the specified parameter just before the instance was called) will be passed to the input variable.
P_On |
FB |
1.0 |
EN |
||
ENO |
D100 |
|
D0 |
||
PV |
CV |
The value of the parameter specified as the input (value of D0) is passed to the instance’s input variable (PV).
Example |
|||||||
0.0 |
ADD_INT_DINT |
10.0 |
Algorithm (Body) |
||||
P_On |
|||||||
EN |
ENO |
||||||
SIGN IN16 |
tmp |
||||||
D100 |
IN16 |
OUT32 |
D1000 |
||||
+L IN32 |
tmp OUT32 |
||||||
D200 |
IN32 |
||||||
IN16 is an INT variable, so the content of D100 is used. |
Variable table |
||||||
Usage |
Name |
Type |
|||||
IN32 is a DINT variable, so the content of D200 and |
|||||||
Internal |
tmp |
DINT |
|||||
D201 is used. |
|||||||
Input |
EN |
BOOL |
|||||
Input |
IN16 |
INT |
|||||
Input |
IN32 |
DINT |
|||||
Output |
ENO |
BOOL |
|||||
Output |
OUT32 |
DINT |
Note 1. The same name cannot be assigned to an input variable and output variable. If it is necessary to have the same variable as an input variable and output variable, register the variables with different names and transfer the value of the input variable to the output variable in the function block with an instruction such as MOV.
2.When the instance is executed, input values are passed from parameters to input variables before the algorithm is processed. Consequently, values cannot be read from parameters to input variables within the algorithm. If it is necessary to read a value within the execution cycle of the algorithm, do not pass the value from a parameter. Assign the value to an internal variable and use an AT setting (specified addresses). Alternatively, reference the global symbol as external variables.
23
Function Block Specifications |
Section 2-1 |
Initial Value
Initial values can be set for input variables, but the value of the input parameter will be enabled (the input parameter value will be set when the parameter for input variable EN goes ON and the instance is executed).
Note The input parameter setting cannot be omitted when using the CX-
Programmer.
EN (Enable) Variable
When an input variable is created, the default input variable is the EN variable.
The instance will be executed when the parameter for input variable EN is ON.
■ Output Variables
Output variables pass return values from the instance to external applications.
The output variables are displayed on the right side of the instance.
After the instance is executed, the value of the output variable is passed to the specified parameter.
1.0
P_On FB EN ENO
The value of the output variable (CV) is passed to the parameter specified as the output destination, which is D100 in this case.
Example
0.0 |
ADD_INT_DINT |
10.0 |
|
EN |
ENO |
||
D100 |
IN16 |
OUT32 |
D1000 |
D200 |
IN32 |
OUT32 is a DINT variable, so the variable’s value is passed to D1000 and D1001.
Algorithm (Body)
EN
SIGN IN16 tmp
+L IN32 |
tmp OUT32 |
||||
Variable table |
|||||
Usage |
Name |
Data type |
|||
Internal |
tmp |
DINT |
|||
Input |
EN |
BOOL |
|||
Input |
IN16 |
INT |
|||
Input |
IN32 |
DINT |
|||
Output |
ENO |
BOOL |
|||
Output |
OUT32 |
DINT |
Like internal variables, the values of output variables are retained until the next time the instance is executed (i.e., when EN turns OFF, the value of the output variable is retained).
Example:
In the following example, the value of output variable CV will be retained until the next time the instance is executed.
Product A counter
CTD |
||||
CD |
Q |
|||
LD |
||||
PV |
CV |
D150 |
||
Note 1. The same name cannot be assigned to an input variable and output variable. If it is necessary to have the same variable as an input variable and output variable, register the variables with different names and transfer the value of the input variable to the output variable in the function block with an instruction such as MOV.
24
Function Block Specifications |
Section 2-1 |
2.When the instance is executed, output variables are passed to the corresponding parameters after the algorithm is processed. Consequently, values cannot be written from output variables to parameters within the algorithm. If it is necessary to write a value within the execution cycle of the algorithm, do not write the value to a parameter. Assign the value to an internal variable and use an AT setting (specified addresses).
Initial Value
An initial value can be set for an output variable that is not being retained, i.e., when the Retain Option is not selected. An initial value cannot be set for an output variable if the Retain Option is selected.
The initial value will not be written to the output variable if the IOM Hold Bit (A50012) is ON.
Auxiliary Area control bit |
Initial value |
|
IOM Hold Bit (A50012) |
ON |
The initial value will not be set. |
ENO (Enable Output) Variable
The ENO variable is created as the default output variable. The ENO output variable will be turned ON when the instance is called. The user can change this value. The ENO output variable can be used as a flag to check whether or not instance execution has been completed normally.
■ Internal Variables
Internal variables are used within an instance. These variables are internal to each instance. They cannot be referenced from outside of the instance and are not displayed in the instance.
The values of internal variables are retained until the next time the instance is executed (i.e., when EN turns OFF, the value of the internal variable is retained). Consequently, even if instances of the same function block definition are executed with the same I/O parameters, the result will not necessarily be the same.
Example:
The internal variable tim_a in instance Pulse_2sON_1sOFF is different from internal variable tim_a in instance Pulse_4sON_1sOFF, so the instances cannot reference and will not affect each other’s tim_a value.
Pulse_2sON_1sOFF
CLOCK PULSE
EN ENO
ON_TIME
OFF_TIME
Variable table |
||||
1.0 |
Usage |
Name |
Data type |
|
Internal |
tim_a |
TIMER |
||
Internal |
tim_b |
TIMER |
||
Input |
ON_TIME |
INT |
||
Input |
OFF_TIME |
INT |
Pulse_4sON_1sOFF |
|||||||
P_On |
1.1 |
||||||
CLOCK PULSE |
|||||||
EN |
ENO |
||||||
&40 |
|||||||
ON_TIME |
|||||||
&10 |
OFF_TIME |
||||||
25
Function Block Specifications |
Section 2-1 |
||||||||||||||
0.0 |
10.0 |
Algorithm (Body) |
|||||||||||||
ADD_INT_DINT |
|||||||||||||||
EN |
|||||||||||||||
EN |
ENO |
||||||||||||||
D100 |
IN16 |
OUT32 |
D1000 |
SIGN IN16 tmp |
|||||||||||
D200 |
IN32 |
+L IN32 tmp OUT32 |
|||||||||||||
Variable table |
|||||||||||||||
Internal variable tmp |
Name |
Type |
|||||||||||||
is not displayed. |
Internal |
tmp |
DINT |
||||||||||||
Input |
EN |
BOOL |
|||||||||||||
Input |
IN16 |
INT |
|||||||||||||
Input |
IN32 |
DINT |
|||||||||||||
Output |
ENO |
BOOL |
|||||||||||||
Output |
OUT32 |
DINT |
Retain Data through Power Interruptions and Start of Operation
Internal variables retain the value from the last time that the instance was called. In addition, the Retain Option can be selected so that an internal variable will also retains its value when the power is interrupted or operation starts (the mode is switched from PROGRAM to RUN or MONITOR mode).
When the Retain Option is selected, the value of the variable is retained when the power is interrupted or operation starts unless the CPU Unit does not have a backup battery. If the CPU Unit does not have a good battery, the value will be unstable.
Variables |
Condition |
Status |
Variables set to Retain |
Start of operation |
Retained |
Power ON |
Retained |
|
When the Retain Option is not selected, the value of the variable will not be held when the power is interrupted or operation starts. Even variables not set to be retained, however, can be held at the start of operation by turning ON the IOM Hold Bit (A50012) and can be held during power interruptions by setting the PLC Setup, as shown in the following table.
Variables |
Condition |
IOM Hold Bit (A50012) setting |
||||||||
OFF |
ON |
|||||||||
IOM Hold Bit Status at Startup |
IOM Hold Bit Status at Startup |
|||||||||
(PLC Setup) selected |
(PLC Setup) not selected |
|||||||||
Variables not |
Start of operation |
Not retained |
Retained |
Retained |
||||||
set to Retain |
||||||||||
Power ON |
Not retained |
Retained |
Not retained |
|||||||
Note |
The IOM Hold Bit (A50012) is supported for compatibility with previous mod- |
|||||||||
els. To hold the values of variables in function blocks, however, use the Retain |
||||||||||
Option and not the IOM Hold Bit. |
||||||||||
Initial Value |
||||||||||
An initial value can be set for an internal variable that is not being retained |
||||||||||
(i.e., when the Retain Option not selected). An initial value cannot be set for |
||||||||||
an internal variable if the Retain Option is selected. |
||||||||||
Internal variables that are not being retained will be initialized to 0. |
||||||||||
The initial value will not be written to the internal variable if the IOM Hold Bit |
||||||||||
(A50012) is ON. |
||||||||||
Auxiliary Area control bit |
Initial value |
|||||||||
IOM Hold Bit (A50012) |
ON |
The initial value will not be set. |
||||||||
OFF |
The initial value will be set. |
|||||||||
■ External Variables
External variables are either system-defined variables that have been registered in CX-Programmer before hand, or variables that externally reference user-defined variables in the global symbol table.
26
Function Block Specifications |
Section 2-1 |
•For details on system-defined variables, refer to Appendix C External Variables.
•To reference user-defined variables in the global symbol table, the variables must be registered in the global symbol table using the same variable name and data type as the external variable.
Variable Properties |
Variable Name |
|||||
The variable name is used to identify the variable in the function block. The |
||||||
name can be up to 30,000 characters long. The same name can be used in |
||||||
other function blocks. |
||||||
Note A variable name must be input for variables, even ones with AT settings (spec- |
||||||
ified address). |
||||||
Data Type |
||||||
Any of the following types may be used. |
||||||
Data type |
Content |
Size |
Inputs |
Outputs |
Internals |
|
BOOL |
Bit data |
1 bit |
OK |
OK |
OK |
|
INT |
Integer |
16 bits |
OK |
OK |
OK |
|
UNIT |
Unsigned integer |
16 bits |
OK |
OK |
OK |
|
DINT |
Double integer |
32 bits |
OK |
OK |
OK |
|
UDINT |
Unsigned double integer |
32 bits |
OK |
OK |
OK |
|
LINT |
Long (4-word) integer |
64 bits |
OK |
OK |
OK |
|
ULINT |
Unsigned long (4-word) integer |
64 bits |
OK |
OK |
OK |
|
WORD |
16-bit data |
16 bits |
OK |
OK |
OK |
|
DWORD |
32-bit data |
32 bits |
OK |
OK |
OK |
|
LWORD |
64-bit data |
64 bits |
OK |
OK |
OK |
|
REAL |
Real number |
32 bits |
OK |
OK |
OK |
|
LREAL |
Long real number |
64 bits |
OK |
OK |
OK |
|
TIMER |
Timer (See note 1.) |
Flag: 1 bit |
Not supported |
Not supported |
OK |
|
PV: 16 bits |
||||||
COUNTER |
Counter (See note 2.) |
Flag: 1 bit |
Not supported |
Not supported |
OK |
|
PV: 16 bits |
||||||
Note (1) The TIMER data type is used to enter variables for timer numbers (0 to 4095) in the operands for TIMER instructions (TIM, TIMH, etc.). When this variable is used in another instruction, the Timer Completion Flag (1 bit) or the timer present value (16 bits) is specified (depending on the instruction operand). The TIMER data type cannot be used in structured text function blocks.
(2)The COUNTER data type is used to enter variables for counter numbers (0 to 4095) in the operands for COUNTER instructions (CNT, CNTR, etc.). When this variable is used in another instruction, the Counter Completion Flag (1 bit) or the counter present value (16 bits) is specified (depending on the instruction operand). The COUNTER data type cannot be used in structured text function blocks.
AT Settings (Allocation to Actual Addresses)
With internal variables, it is possible to set the variable to a particular I/O memory address rather than having it allocated automatically by the system. To specify a particular address, the user can input the desired I/O memory address in this property. It is still necessary to use variable name in programming even if a particular address is specified.
Note (1) The AT property can be set for internal variables only.
27
Function Block Specifications |
Section 2-1 |
(2)AT settings can be used only with the CIO (Core I/O Area), A (Auxiliary Area), D (Data Memory Area), E (Extended Memory Area, H (Holding Relay Area), W (Internal Relay Area).
The AT property cannot be set in the following memory areas:
•Index Register and Data Register Areas (directly/indirectly specified)
•Indirectly specified DM/EM (: binary mode, *:BCD mode)
(3)AT settings can be used for the following allocations.
•Addresses for Basic I/O Units, CPU Bus Units, or Special I/O Units
•Auxiliary Area bits not registered as external variables in advance
•PLC addresses for other nodes in the network
•Instruction operands specifying the beginning word (or end word) of multiple words.
Example:
If the READ DATA FILE instruction (FREAD) is being used in the function block definition and it is necessary to check the File Memory Operation Flag (A34313), use an internal variable and specify the flag’s address in the AT setting.
Register an internal variable, select the AT setting option, and specify A34313 as the address. The status of the File Memory Operation Flag can be checked through this internal variable.
Address A34313 is allocated to a boolean internal variable named NOW_CARD_ACCESS.
When the AT setting is used, the function block loses its flexibility. This function should thus be used only when necessary.
Array Setting
With internal variables, a variable can be defined as an array.
Note Only one-dimensional arrays are supported by the CX-Programmer.
With the array setting, a large number of variables with the same properties can be used by registering just one variable.
•An array can have from 1 to 32,000 array elements.
•The array setting can be set for internal variables only.
•Any data type can be specified for an array variable, as long as it is an internal variable.
•When entering an array variable name in the algorithm of a function block definition, enter the array index number in square brackets after the variable name. The following three methods can be used to specify the index. (In this case the array variable is a[].)
•Directly with numbers (for ladder or ST language programming) Example: a[2]
•With a variable (for ladder or ST language programming) Example: a[n], where n is a variable
28
Function Block Specifications |
Section 2-1 |
Note INT, DINT, LINT, UINT, UDINT, or ULINT can be used as the variable data type.
•With an equation (for ST language programming only) Example: a[b+c], where b and c are variables
Note Equations can contain only arithmetic operators (+, −, *, and /).
An array is a collection of data elements that are the same type of data. Each array element is specified with the same variable name and a unique index. (The index indicates the location of the element in the array.)
A one-dimensional array is an array with just one index number.
Example: When an internal variable named SCL is set as an array variable with 10 elements, the following 10 variables can be used:
SCL[0], SCL[1], SCL[2], SCL[3], SCL[4], SCL[5], SCL[6], SCL[7], SCL[8], and SCL[9]
SCL
0WORD variable
1WORD variable
2WORD variable
3 |
WORD variable |
Specify SCL[3] to access this data element. |
||
4WORD variable
5WORD variable
6WORD variable
7WORD variable
8WORD variable
9WORD variable
Settings for variable SCL as an array variable with element numbers 0 to 9.
Note Use an internal array variable when specifying the first or last of multiple words in an instruction operand to enable reusing the function block if an internal variable with a AT property cannot be set for the operand and an external variable cannot be set. Prepare an internal array variable with the number of elements for the required size, and after setting the data in each array element, specify the first or last element in the array variable for the operand.
Example:
Function block definition
Variable
SCL WORD[10]
Algorithm
SCLBODY
LD P_On
MOV #0000 SCL[0] MOV &0SCL[1] MOV #0300 SCL[2] MOV &4000 SCL[3]
SCL S SCL[0] D
Instance |
|||||||||||
SCL |
|||||||||||
EN |
ENO |
100 |
|||||||||
S |
D |
||||||||||
SCL |
|||||||||||
0 |
#0000 |
Specifying this array element |
|||||||||
1 |
&0 |
in the SCL instruction is the |
|||||||||
same as specifying the first |
|||||||||||
2 |
#0300 |
address. |
|||||||||
3 |
&4000 |
Write the operand data to the array variables.
Specify the beginning of the array in the SCL instruction.
29
Instance Specifications |
Section 2-2 |
Note For details, refer to 2-5 Precautions for Instructions with Operands Specifying the First or Last of Multiple Words.
Initial Values
When an instance is executed the first time, initial values can be set for input variables, internal variables, and output variables. For details, refer to Initial Value under the preceding descriptions of input variables, internal variables, and output variables.
Retaining Data through Power Interruptions and Start of Operation |
|
The values of internal variables can be retained through power interruptions |
|
and the start of operation. When the Retain Option is selected, the variable |
|
will be allocated to a region of memory that is retained when the power is |
|
interrupted and PLC operation starts. |
|
Algorithm |
Enter the logic programming using the registered variables. |
Operand Input |
Addresses cannot be directly input into instruction operands within function |
Restrictions |
blocks. Addresses that are directly input will be treated as variable names. |
Note |
Exception: Input directly or indirectly specified addresses for Index Registers |
IR0 to IR15 and Data Registers DR0 to DR15 directly into the instruction |
|
operand. Do not input variables. |
Input constants directly into instruction operands.
•Ladder programming language: Enter hexadecimal numerical values after the # and decimal values after the &.
•Structured text (ST language): Enter hexadecimal numerical values after 16# and enter decimal numerical values as is.
Comment |
A comment of up to 30,000 characters long can be entered. |
2-2 Instance Specifications
2-2-1 Composition of an Instance
The following table lists the items that the user must set when registering an instance.
Item |
Description |
Instance name |
Name of the instance |
Language |
The programming and variables are the same as in |
Variable definitions |
the function block definition. |
Function block instance areas |
The ranges of addresses used by the variables |
Comments |
A comment can be entered for each instance. |
30
Instance Specifications |
Section 2-2 |
Instance Name
This is the name of the instance.
•Instance names can be up to 30,000 characters long.
•Instance names cannot contain spaces or any of the following characters:
! “ # $ % & ‘ ( ) = — ~ ^ | ‘ @ { [ + ; * : } ] < , > . ? /
• Instance names cannot start with a number (0 to 9).
There are no other restrictions.
The instance name is displayed above the instance in the diagram.
Instance name
Pulse_2sON_2sOFF
CLOCK PULSE EN
ENO
&20
ON_TIME
&10
OFF_TIME
Function Block
Instance Areas
To use a function block, the system requires memory to store the instance’s internal variables and I/O variables. These areas are known as the function block instance areas and the user must specify the first addresses and sizes of these areas. The first addresses and area sizes can be specified in 1-word units.
When the CX-Programmer compiles the function, it will output an error if there are any instructions in the user program that access words in these areas.
FB Instance |
Default value |
Applicable memory |
|||
Area |
areas |
||||
Start Address |
End Address |
Size |
|||
Non Retain |
H512 |
H1407 |
896 |
CIO, WR, HR, DM, EM |
|
Retain |
H1408 |
H1535 |
128 |
HR, DM, EM |
|
Timers |
T3072 |
T4095 |
1024 |
TIM |
|
Counters |
C3072 |
C4095 |
1024 |
CNT |
|
Function Block Instance The following settings are made in the function block instance area:
Area Types
Non-retained Areas
Item |
Contents |
Allocated variables |
Variables for which the retain property for power OFF and |
operation start is set as non-retained (See note 1.) |
|
Applicable areas |
H (Function block Special Holding Area), I/O (CIO Area), H |
(Holding Area), W (Internal Relay Area), D (Data Memory |
|
Area) (see note 2), E (Extended Data Memory Area) (See |
|
notes 2 and 3.) |
|
Setting unit |
Set in words |
Allocated words |
H512 to H140 |
(default) |
|
Note (1) Except when the data type is set to TIMER or COUNTER.
31
Instance Specifications |
Section 2-2 |
(2)Bit data can be accessed even if the DM or EM Area is specified for the non-retained area or retained area.
(3)The same bank number cannot be specified as the current bank in the user program if the EM Area is specified for the non-retained area or retained area.
Retained Area
Item |
Contents |
Allocated variables |
Variables for which the retain property for power OFF and |
operation start is set as retained (See note 1.) |
|
Applicable areas |
H (Function block Special Holding Area), H (Holding Area), D |
(Data Memory Area) (see note 1), E (Extended Data Memory |
|
Area) (See notes 2 and 3.) |
|
Setting unit |
Set in words |
Allocated words |
H1408 to H1535 |
(default) |
|
Note (1) Except when the data type is set to TIMER or COUNTER.
(2)Bit data can be accessed even if the DM or EM Area is specified for the non-retained area or retained area.
(3)The same bank number cannot be specified as the current bank in the user program if the EM Area is specified for the non-retained area or retained area.
Function Block Holding Area (H512 to H1535)
Note
Timer Area
Item |
Contents |
Allocated variables |
Variables with TIMER set as the data type. |
Applicable areas |
T (Timer Area) Timer Flag (1 bit) or timer PVs (16 bits) |
Allocated words |
T3072 to T4095 Timer Flag (1 bit) or timer PVs (16 bits) |
(default) |
|
Counter Area
Item |
Contents |
Allocated variables |
Variables with COUNTER set as the data type. |
Applicable areas |
C (Counter Area) Counter Flag (1 bit) or counter PVs (16 bits) |
Allocated words |
C3072 to C4095 Counter Flag (1 bit) or counter PVs (16 bits) |
(default) |
|
The default allocation of Function Block Holding Area words set as retained and non-retained words is H512 to H1535. These words are different to the standard Holding Area used for programs (H000 to H511), and are used only for the function block instance area (internally allocated variable area).
•These words cannot be specified in AT settings for internal variables.
•These words cannot be specified as instruction operands.
•These words are displayed in red if they are input when a function block is not being created.
•Although the words can be input when creating a function block, an error will occur when the program is checked.
•If this area is specified as non-retained, turn the power ON/OFF or clear the area without retaining the values when starting operation.
To prevent overlapping of instance area addresses with addresses used in the program, set H512 to H1535 (Function Block Holding Area words) for the nonretained area and retained area.
32
Instance Specifications |
Section 2-2 |
Accessing Function Block Instance Area from the User Program
Note
Comments
Creating Multiple
Instances
Calling the Same Instance
Making Multiple Instances
If the user program contains an instruction to access the function block instance area, an error will be displayed in the Compile Tab of the Output Window of CX-Programmer if the following operations are attempted.
•Attempting to write during online editing (writing not possible)
•Executing program check (Selecting Compile from the Program Menu or
Compile All PLC Programs from the PLC Menu)
Example: If W0 to W511 is specified as the non-retained area of the function block instance area and W0.00 is used in the ladder program, an error will occur when compiling and be displayed as “ERROR: [omitted]…- Address — W0.00 is reserved for Function Block use].
Program |
|||||||||
P_Off |
10. |
||||||||
FB |
|||||||||
EN |
ENO |
Instance data area |
Start |
Size |
|||||
address |
|||||||||
Non Retain |
W0 |
512 |
|||||||
Retain |
|||||||||
W0.00 |
3.0 |
Timers |
|||||||
Counters |
|||||||||
Compile error
The allocations in the function block instance area for variables are automatically reallocated when a variable is added or deleted. A single instance requires addresses in sequence, however, so if addresses in sequence cannot be obtained, all variables will be allocated different addresses. As a result, unused areas will be created. If this occurs, execute the optimization operation to effectively use the allocated areas and remove the unused areas.
A comment of up to 30,000 characters long can be entered.
A single instance can be called from multiple locations. In this case, the internal variables will be shared.
Multiple instances can be created from a single function block definition. In this case, the values of internal variables will be different in each instance.
Example: Counting Product A and Product B
Prepare a function block definition called Down Counter (CTD) and set up counters for product A and product B. There are two types of programs, one for automatic operation and another for manual operation. The user can switch to the appropriate mode of operation.
In this case, multiple instances will be created from a single function block. The same instance must be called from multiple locations.
33
Instance Specifications |
Section 2-2 |
Program 1 (automatic operation)
Product A counter
CTD |
||||
CD |
Q |
|||
LD |
||||
PV |
CV |
D100 |
||
Product B counter
CTD |
||||
CD |
Q |
|||
LD |
||||
PV |
CV |
D200 |
||
Program 1
Instance A
FB
Instance B
FB
Program 2
Instance A
FB
Program 2 (manual operation)
Product B counter
CTD |
||||
CD |
Q |
|||
LD |
||||
PV |
CV |
D150 |
||
Reading the same product’s counter value at different locations
Reading different products’ counter values (Algorithm calculating counter value is the same.)
Instance A
I/O variables, Internal variables
Body
Instance B
I/O variables, Internal variables
FB definition
Variable definitions
Body
Body
Use the same internal variables
Use different internal variables
2-2-2 |
Parameter Specifications |
||||||||
The data that can be set by the user in the input parameters and output |
|||||||||
parameters is as follows: |
|||||||||
Item |
Applicable data |
||||||||
Input parameters |
Values (See note 1.), addresses, and program symbols (glo- |
||||||||
bal symbols and local symbols) (See note 2.) |
|||||||||
Note The data that is passed to the input variable from the |
|||||||||
parameter is the actual value of the size of the input |
|||||||||
variable data. (An address itself will not be passed even |
|||||||||
if an address is set in the parameter.) |
|||||||||
Note Input parameters must be set. If even one input param- |
|||||||||
eter has not been set, a fatal error will occur and the |
|||||||||
input parameters will not be transferred to the actual |
|||||||||
PLC. |
|||||||||
Output parameters |
Addresses, program symbols (global symbols, local symbols) |
||||||||
(See note 2.) |
|||||||||
Note |
|||||||||
(1) The following table shows the methods for inputting values in parameters. |
|||||||||
Input |
Contents |
Size |
Parameter value input |
Setting range |
|||||
variable |
method |
||||||||
data type |
|||||||||
BOOL |
Bit data |
1 bit |
P_Off, P_On |
0 (FALSE), 1 (TRUE) |
|||||
INT |
Integer |
16 bits |
Positive value: & or + followed |
−32,768 to 32,767 |
|||||
by integer |
|||||||||
DINT |
Double integer |
32 bits |
−2,147,483,648 to 2,147,483,647 |
||||||
Negative value: − followed by |
|||||||||
LINT |
Long (8-byte) integer |
64 bits |
−9,223,372,036,854,775,808 to |
||||||
integer |
9,223,372,036,854,775,807 |
||||||||
34
Instance Specifications |
Section 2-2 |
|||||
Input |
Contents |
Size |
Parameter value input |
Setting range |
||
variable |
method |
|||||
data type |
||||||
UINT |
Unsigned integer |
16 bits |
Positive value: & or + followed |
&0 to 65,535 |
||
by integer |
||||||
UDINT |
Unsigned double integer |
32 bits |
&0 to 4,294,967,295 |
|||
ULINT |
Unsigned long (8-byte) |
64 bits |
&0 to 18,446,744,073,709,551,615 |
|||
integer |
||||||
REAL |
Real number |
32 bits |
Positive value: & or + followed |
−3.402823 × 1038 to −1.175494 × |
||
by real number (with decimal |
10−38, 0, 1.175494 × 10−38 to |
|||||
point) |
||||||
3.402823 × 1038 |
||||||
Negative value: − followed by |
||||||
LREAL |
Long real number |
64 bits |
308 |
to |
||
real number (with decimal |
||||||
−1.79769313486232 × 10 |
||||||
point) |
−2.22507385850720 × 10−308, 0, |
|||||
2.22507385850720 × 10−308, |
||||||
1.79769313486232 × 10308 |
||||||
WORD |
16-bit data |
16 bits |
# followed by hexadecimal |
#0000 to FFFF or &0 to 65,535 |
||
number (4 digits max.) |
||||||
& or + followed by decimal |
||||||
number |
||||||
DWORD |
32-bit data |
32 bits |
# followed by hexadecimal |
#00000000 to FFFFFFFF or &0 to |
||
number (8 digits max.) |
4,294,967,295 |
|||||
& or + followed by decimal |
||||||
number |
||||||
LWORD |
64-bit data |
64 bits |
# followed by hexadecimal |
#0000000000000000 to |
||
number (16 digits max.) |
FFFFFFFFFFFFFFFF or &0 to |
|||||
& or + followed by decimal |
18,446,744,073,709,551,615 |
|||||
number |
||||||
(2)The size of function block input variables and output variables must match the size of program symbols (global and local), as shown in the following table.
Size |
Function block variable data |
Program symbol (global, local) |
||
type |
data type |
|||
1 bit |
BOOL |
BOOL |
||
16 bits |
INT, UINT, WORD |
INT, UINT, UINT BCD, WORD |
||
32 bits |
DINT, UDINT, REAL, DWORD |
DINT, UDINT, UDINT BCD, REAL, |
||
DWORD |
||||
64 bits |
LINT, ULINT, LREAL, LWORD |
LINT, ULINT, ULINT BCD, LREAL, |
||
LWORD |
||||
More than 1 |
Non-boolean |
CHANNEL, NUMBER (see note) |
||
bit |
||||
Note The program symbol NUMBER can be set only in the input param- |
||||
eters. The value that is input must be within the size range for the |
||||
function block variable data type. |
||||
2-2-3 Operating Specifications |
||||
Calling Instances |
The user can call an instance from any location. The instance will be executed |
|||
when the input to EN is ON. |
Instance
0.0 |
1.0 |
|||
EN |
ENO |
|||
D0 |
A |
B |
D10 |
|
In this case, the input to EN is bit 0.0 at the left of the diagram.
•When the input to EN is ON, the instance is executed and the execution results are reflected in bit 1.0 and word D10.
•When the input to EN is OFF, the instance is not executed, bit 1.0 is turned OFF, and the content of D10 is not changed.
35
Loading…