• No results found

The Type column now shows OPC Server for the process model

In document Ciros Mechatronics Manual 1 (Page 110-124)

The Program Name/OPC Server column now shows the server name FestoDidactic.EzOPC.2. This means that the process signals for the Distributing process model are exchanged via an OPC server with the name FestoDidactic.EzOPC.2.

29. Close the Switch external PLC <-> internal PLC window.

30. Check whether the process model is meant to be in the basic setting. If so, activate the Reset Workcell order in the Simulation menu.

31. Start the simulation of the process model. To do this, open the Simulation menu and select Start.

As the simulation starts, the EzOPC program is automatically opened. You can see this because EzOPC appears in the start bar.

When starting EzOPC, both communication users – CoDeSys SP PLCWinNT and the process model simulation – must already be active.

Only if this is the case will the communication links be correctly set up.

Note

32. Click on the EzOPC button in the Start bar. The EzOPC window opens. Here you can configure the communication between CIROS® Mechatronics and CoDeSys SP PLCWinNT.

The overview shows that CIROS® Mechatronics is connected to the CoDeSys control system via the EzOPC virtual control system. The table shows details of which components are installed whether EzOPC directly accesses these components.

Make sure that the communication links of your EzOPC are configured as shown below. You can create the desired communication link by clicking the corresponding button.

33. Next, click on the Virtual Controller tab. This displays the status of the virtual controller and its I/Os. 8 input bytes and 8 output bytes are preset for data exchange. You can use this preset without modifying it.

If logic 1 applies to any bit of the input/output byte, this bit is represented by a brighter colour.

34. Click on the CoDeSys tab and check the settings. This tab shows the status of the CoDeSys SP PLCWinNT simulation and its inputs/outputs. 8 input bytes and 8 output bytes are preset for data exchange. You can use this preset without modifying it.

However, only the first 4 bytes are required.

If logic 1 applies to any bit of the input/output byte, this bit is represented by a brighter colour.

35. Minimise the EzOPC window.

36. Make sure that the process model simulation is active in CIROS® Mechatronics.

37. Start running the PLC program in the Soft PLC. To do this, open the Online menu and click Run.

You can see the current status of the Soft PLC CoDeSys SP PLCWinNT in the CoDeSys SP PLCWinNT window.

38. Operate the process model as you specified and programmed in the PLC program.

If you are creating and testing your own PLC program, we recommend that you download the programs to an external PLC and have these executed from there.

You can use the Soft PLC S7-PLC SIM as external PLC, if you are programming in STEP 7, in which case you will not require any additional hardware components.

You can however also use any other control or programming system, in which case you download the PLC program to your hardware PLC. The exchange of the PLC input/output signals between the process model simulation and your external PLC is effected via the serial or the USB interface of the PC and via the EasyPort interface. Also included in the exchange of process signals is the EzOPC program.

The advantage of this configuration is that you can use the PLC and programming system of your choice. Also available for fault finding in the PLC program are the testing and diagnostic functions intended for this purpose in the programming system.

We recommend that you install the simulation software CIROS® Mechatronics and the PLC programming system on different computers.

5.10

Controlling a process model via an external PLC

Possible configuration with a hardware PLC and two PCs

However, you can also choose a different configuration and install the two software packages on one PC. Your PC will need to be equipped with two serial interfaces or with one serial and one USB interface if you intend to make use of the testing and diagnostic functions during the process model simulation .

The following can be used as EasyPort interface:

EasyPort D16 interface box for 16 digital I/O (Order No.. 167121)

The following data cables are required:

PC data cable RS232 for EasyPort with PC to RS232 (Order No. 162 305) or

USB adapter RS232 for EasyPort with PC on USB (Order No. 540699) For PLC EduTrainer of Festo Didactic: I/O data cable with SysLink plugs at both ends to IEEE 488, cross paired (Order No.. 167 106) For any PLC: I/O data cable with SysLink plug at one end to IEEE 488 and open cable end sleeves (Order No. 167 122)

The EzOPC program

The EzOPC program organises the exchange of PLC input/output signals between the process model simulation and the external PLC. EzOPC does not access the external PLC signals directly, but via the EasyPort interface.

The EzOPC program forms part of the CIROS® Automation Suite and has been installed on your PC in conjunction with the CIROS® Mechatronics application. EzOPC is invoked automatically by CIROS® Mechatronics as soon as you start the simulation of a process model and this process model is to be controlled via an external PLC.

The following requirements must be fulfilled in order for the PLC input/output signals to be correctly exchanged:

When starting EzOPC, both communication users ‟ EasyPort and the process model simulation - must be active. Only then can EzOPC set up the communication link to the two users.

In the case of EasyPort this means that EasyPort must be connected to the PC via the serial interface and voltage applied to EasyPort.

The EzOPC program must be correctly configured for the data exchange. Therefore check the configuration as soon as EzOPC is started.

Configuration of EzOPC for data exchange with an external PLC via EasyPort

This is how you control a process model via an external PLC

1. Connect the PC with CIROS® Mechatronics to the external PLC via the EasyPort interface.

‟ The data cable with Order No. 162 305 connects the serial interface of the PC to the serial interface RS232 of EasyPort.

If you are using the USB interface, then use the data cable of Order No. 540699.

‟ The PLC input/output signals for the process are applied at port 1 of EasyPort.

‟ The PLC input/output signals for the control console are transmitted via port 2.

‟ If you are using EasyPort without USB interface:

For the DIP switches under Mode at EasyPort, select the following setting: 1 ON, 2 OFF, 3 OFF.

‟ If you are using EasyPort with USB interface:

Make sure that address 1 is set for EasyPort.

The set address can be read or changed by pressing the two arrow buttons. Simultaneously pressing both buttons stores the address and exits address mode.

Configuration with PLC EduTrainer

2. Switch on the power supply for EasyPort.

3. Load the desired process model to CIROS® Mechatronics.

4. Effect the setting for the process model, i.e. that this is to be controlled via an external PLC. To do so, activate the command Switch external PLC <-> internal PLC in the Modeling menu.

5. The window Switch external PLC <-> internal PLC now opens which

In document Ciros Mechatronics Manual 1 (Page 110-124)

Related documents