WinCC OA tutorial. Part 10. Connecting to a "live" S7-1200

Within the framework of the basic course, only the internal system variables are used in WinCC OA. No external connections are assumed. However, students in the basic course are always asked to demonstrate how to read a variable from a "real live PLC" before completing their studies. Since WinCC OA belongs to Siemens products, it would be logical to demonstrate how to connect to a Siemens controller and read several variables from it. In our case, we will connect to an S7-1200 series PLC.





The WinCC OA driver set includes two types of drivers for Simatic controllers - s7 and s7plus. The difference is as follows: s7 is intended for communication with PLCs of the classic S7-300 / S7-400 series, and s7plus is for the modern S7-1200 / S7-1500 series. The s7plus driver is specified separately during installation. It may not be present on your system if you have not installed it. Regardless of which driver is used (even iec104), the general principles are preserved. You need to add the appropriate driver in the console. Next, configure the connection with the device and set the number of the added driver to this connection, activate. It is also required to hang the Periphery Address config on the DPE and perform the settings by specifying the correct address of the variable.





First you need to register the driver in the console. Technically, adding a driver to the system is no different from adding a manager. Open the console, click Append a new manager in it





Let's select the S7plus driver from the list and set “-num 2” in the options. This is due to the fact that the system already has a driver with number 1, this is Simulation Driver, and the driver number in the system must be unique. By the way, according to the WinCC OA developers, the simulation driver is not used in real projects.





Now the new driver has been added to the system and launched





Now the added driver number 2 on the system needs to be configured. To do this (for example, through the gedi editor menu), open the System Management module.





Next, open Driver S7





Choosing S7 + Driver





. Create.





— , WinCC OA, . S7-1214 TCP/IP, , . , 2. , .





, — S7-1200, ip- . , , , Set PC/PG Interface. , , Step 7 WinCC 7, TIA Portal WinCC .. , , . ,





, ISO, TCPIP TCPIP.Auto. , , TCPIP.Auto.





Establish Connection Apply. WinCC OA . E ,





, — System Management. , . . para, . — ExampleDP_bit ExampleDP_float, . MyBlinker ExampleDP_bit





« ».





SIMATIC S7PLUS









2. « » — Input, . — Bool. — Polling ( ).





Poll groups, () . Create, . 100 . , 100 100 . .





Reference . , . Selection .





«» , . Clock_1Hz, .





Address active, Apply original , SCADA.





,





Emulation, Modes. «» (Direction), . (, , ) .





— FALSE, .





TRUE





para





FALSE TIA Portal. para . , , 10 , para , Original value FALSE, TRUE. - Ctrl+A . DPE . Main — Turn On Turn Off ,





dpSet("System1:Emulation.:_original.._value", 1);









dpSet("System1:Emulation.:_original.._value", 0);





«» .





para FALSE





.





, — . , , para. . 10 (poll time 100 ). , — event manager. EV , , , . 100 — , para , . , , , . DPE Smoothing. para .





, — «» «». Apply.





original , ( online, original) , . , para , .





, Robicon.SCADAmanSP. WinCC OA DP ExampleDP_float. , — , , . «» , /. , Reference. smoothing DP.





original. , , .





.





FLAPS ( ). Textfield .





Using a wizard on the Initialization event, create a script for displaying the DPE (Display value)





The value from the PLC is displayed





Let's add one more script using a wizard to be able to edit the value directly from the operator screen. To do this, we need to call the wizard for the Command event.





Change the value of the signal from the operator system





Changes have flown to the data block












All Articles