Omron CX-SIMULATOR INTRODUCTION GUIDE

Chapter 1 Overview of CX-Simulator
CONTENTS
Overview of CX-Simulator Relationship between CX-Simulator and CX-Programmer Before Installation Major Characteristics of CX-Simulator
Chapter 2 Creation of Sample Program
– Car Entry by Opening/Closing a Shutter –
2-4 Saving Program
Chapter 3 Executing Program by CX-Simulator
3-1 Connection of CX-Simulator Virtual PLC and CX-Programmer 3-2 Program Transfer to Virtual PLC 3-3 Operating Mode Change of Virtual PLC 3-4 Cycle Time Check in Virtual PLC 3-5 Ladder Monitoring in Virtual PLC
Chapter 4 Program Debug by CX-Simulator
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 1-1
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 1-1
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 2-1
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 2-5
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 1-1
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 1-2
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 2-2
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 2-3
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 3-1
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 3-2
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 3-4 ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 3-5 ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 3-6
4-1 Debug with Sample Program 4-2 Debug by Virtual External Input
4-2-1 Settings of Virtual External Input [IO Condition Tool] 4-2-2 Starting I/O Condition Tool 4-2-3 Setting I/O Conditions 4-2-4 Saving and Ending I/O Condition Settings 4-2-5 Debug by Virtual External Input 4-2-6 Program Debug Operation Using Virtual External Input
4-3 Debug by IO Break Condition Settings
4-3-1 Setting Contents of IO Break Condition [IO Break Condition Settings] 4-3-2 Setting IO Break Conditions 4-3-3 Example of Program Debug Operation by Using IO Break Condition
4-4 Other Debug Functions
Running Program in the Unit of Step and Scan, Break Point Setting
Chapter 5 Startup from CX-Simulator Menu
5-1 Starting CX-Simulator 5-2 Creating Virtual PLC 5-3 Saving/Ending CX-Simulator
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 5-1
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 5-2
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 4-1
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 4-2
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 4-2
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 4-4
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 4-7
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 4-8
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 4-11
4-15
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 4-15
∙ ∙ 4-18
∙ ∙ 4-22
∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ ∙ 5-7
Chhaapptteerr 11
C
Ovveerrvviiee
O
w ooff
w
CXX--SSii
C
muullaattoorr
m
Overview of CX-Simulator
CX-Simulator enables you to realize SYSMAC CS/CJ series CPU Units in your computer as a virtual PLC and operate (simulate) it equally as actual CPU Units. Combination use of CX-Simulator and CX-Programmer enables you to verify ladder program operation and cycle time in advance on a PC without an actual PLC. Moreover, various debug functions of CX-Simulator make it possible to debug ladders, which used to be impossible by using an actual PLC only.
Relationship between CX-Simulator and CX-Programmer
CX-Simulator creates a virtual PLC on a virtual network in your PC. If you use the “Work Online Simulator“ function of CX-Programmer Ver.3.0 or greater versions, CX-Simulator automatically starts up a virtual PLC of the current project’s device type to open connection between CX-Programmer and the virtual PLC.
Before Installation
There are two setup types in CX-Simulator V1.3, but choose “1. For online with CX-Programmer” if CX-Programmer has already been installed in your computer. CX-Simulator is automatically installed in the directory where CX-Programmer is installed.
Choose “2. For online with FinsGateway Applications” if you want to use a virtual PLC for the debug of an application using the FinsGateway network.
Major Characteristics of CX-Simulator
Program execution, monitoring, debug without actual PLC
Monitoring of programs and IO memory present values is enabled. Moreover, normal debugs such as force on/off, differential monitoring, data trace and online edit are enabled from CX-Programmer. Also, any cyclic task can be started/stopped and interrupt tasks can be started in simulation.
Cycle time check without actual PLC
It is possible to check estimated cycle time (current, minimum, maximum, and mean values, servicing time *1) when the program is executed in an actual PLC in advance.
Program execution per step or scan, I/O brake condition settings
Debugs that cannot be realized in actual PLCs are provided.
Step Run: Executes a program per instruction Scan Run: Executes a program per scan (cycle) I/O Break Condition Settings: Aborts execution when the conditions set in I/O
memory are satisfied.
Designation of the start and break points
Debugs in connection with display devices and serial communications devices *1
Regarding the serial communications port of a PC as the communications port of a PLC, it is possible to debug a program in combination with display devices or serial communications devices (barcode reader, ID sensor, etc.).
Display of the send messages of serial communications and network communications *1
It is possible to check the send messages issued by TXD instruction (communications port output), SEND instruction (network send), and CMND instruction (command send). It is useful for the debugs of serial communications and network communications.
*1: Yo u need to start CX-Simulator from the Windows [Start] menu and set a virtual PLC. See Chapter 5 and the operation manual of CX-Simulator for the detailed operations.
Chhaapptteerr 22
f
C
Crreeaattiioonn ooff SSaa
C
mppllee PPrrooggrraa
m
m
m
This chapter explains basic functions such as programming and comment entry of a simple ladder by using CX-Programmer. Here, a sample program “a program of car entry control by opening/closing shutters” is created as an example. This program is used to explain how to use the debug functions o CX-Simulator, which are mentioned after Chapter 3.
p
prog
proj
Starting CX-
g
Pro
rammer
[Start]
|
[Programs]
|
[Omron]
|
[CX-Programmer]
|
[CX-Programmer]
Or double-click the CX-Programmer icon.
Opening a new
2-1 Starting CX-Programmer
Start up CX-Programmer from Windows.
ect
Creating a sam
le program
Saving a
ram
The initial screen of CX-Programmer shows up.
p
prog
proj
Starting CX-
r
Programme
Click the left mouse button.
Click the left mouse button.
Opening a new
ect
Creating a sam
le program
Saving a
ram
2-2 New Project Opening and Device Type Settings
Click the toolbar button [New] in CX-Programmer. Set the device type to “CS1H” and the CPU type to “CPU63” in this example.
Click the left mouse button on the “Settings” button to show the [Device Type Settings] dialog.
The PLC type is set. In this example, set “CS1H”.
The CPU type is set. In this example, se
t
“CPU63”.
Click the left mouse button on the spin control button and select a CPU type.
Here is the end of the setting.
Now CX-Programmer is ready for the connection with CX-Simulator.
Click OK to decide the selected device type.
prog
p
proj
Starting CX-
g
f
A
Pro
rammer
Opening a new
ect
Creating a sam
le program
Saving a
ram
2-3 Creating Sample Program
The following is coding of a simple ladder program by using CX-Programmer. This is a sample program of controlling car entry in a shed by opening/closing shutters. When a car approaches, the shutters automatically open; and in two seconds after the car passes the gate, the shutters close.
Upper limit SW (000001)
Lower limit SW (000002)
Normal rotation motor (000500) Reverse rotation motor (000501)
rrival detection sensor (000000)
Operation Flow
(1) When a car enters, the arrival detection sensor (000000) is turned on. (2) The normal rotation motor (000500) of the shutters is turned on. (3) The shutters reach the upper limit in three seconds, the upper limit SW (000001) is
turned on, and the shutters open. (4) When the car passes the gate, the arrival detection sensor (000000) is turned off. (5) In two seconds, the reverse rotation motor (000501) is turned on. (6) In three seconds, the shutters reach the lower limit, the lower limit SW (000002) is
turned on, and the shutters close.
See CX-Programmer Introduction Guide or the operation manual o CX-Programmer for the detailed entry method of a ladder program.
prog
p
proj
Starting CX-
g
Pro
rammer
Shutter elevating processing
Opening a new
ect
Creating a sam
le program
Saving a
ram
Completed Sample Program
The program is modularized in two sections “Shutter elevating processing” and “Entries count processing” by the section function of CX-Programmer V2 or grater versions. Since processing is simplified in the below program, it’s different from the actual program.
Entries count processing
prog
Starting CX­Programmer
Opening a new project
Creating a sample program
Saving a
ram
Or select [File] | [Save as] from the menu.
2-4 Saving Program
Save the created program. Here, save the program as “sample”.
The program is saved.
This sample program is used in the following operations to explain CX-Simulator. Keep CX-Programmer open.
gr
Chhaapptteerr 33
C
EExxeeccuuttiinngg PPrrooggrraam
m bbyy
CXX--SSii
C
muullaattoorr
m
This chapter explains how to operate CX-Programmer functions such as program transfer, PLC mode change, cycle time check, and ladder program monitoring, when CX-Programmer is connected to a CX-Simulator virtual PLC. In addition, you can use CX-Programmer when connecting to a virtual PLC by the exactly same operation as when connecting to an actual PLC. For detailed operations, see the operation manual of CX-Pro
ammer.
Connecting to a virtual PLC
Program transfer to a virtual PLC
Operation mode change of a
Cycle time check in a virtual PLC
Ladder monitoring in a
3-1 Connection of CX-Simulator Virtual PLC and CX-Programmer
Connect CX-Programmer with a CX-Simulator virtual PLC. The sample program created in Chapter 2 is used for the explanation here.
Select “Sample”.
Starting CX-Programmer
Click the [Open] button from the toolbar of CX-Programmer.
Select the sample program created in Chapter 2.
The sample program is loaded.
Connecting to
f
a virtual PLC
Or select [PLC] | [Work Online Simulator] from the menu.
Program transfer to a virtual PLC
Operation mode change of a
3-2 Program Transfer to Virtual PLC
Click the [Work Online Simulator] button.
Cycle time check in a virtual PLC
Ladder monitoring in a
The background color of Ladder Window changes to gray and online connection is established.
Now a CX-Simulator virtual PLC and CX-Programmer have been connected.
The Simulator Online function automatically shows the Transfer dialog after this and enables you to transfer the ladder program to the virtual PLC; however, you can change it to the setting of connection only in the option settings o CX-Programmer.
Connecting to a virtual PLC
The Transfer dialog is automatically displayed.
Program transfer to a virtual PLC
Operation mode change of a
Cycle time check in a virtual PLC
Ladder monitoring in a
Loading...
+ 34 hidden pages