0403-12 LOGO 0BA8 Combined
Example Projects > 0403 Siemens PLC Communication > 0403-12 LOGO 0BA8 Combined
Integration of Siemens LOGO! in REXYGEN
This folder contains the source files for the demonstration project on data exchange between Siemens LOGO! 0BA8 and REXYGEN application.
There is a project for LOGO! which must run in the device. See the logo_integration.lsc project. The LOGO! acts as a server.
There is also a project for REXYGEN, which illustrates the access to Inputs (I, AI), Outputs (Q) and Variable Memory Table (V) from the algorithm. REXYGEN acts as a client and connects to the LOGO! base module via Ethernet.
The pulses on input I6 of the LOGO! device are counted. When 10 is reached, the counter is reset to 0 and the relays Q1 to Q3 are triggered for a specified period. The duration of the pulses can be altered from the REXYGEN control algorithm. While the Q1 and Q2 relays are activated by the algorithm in the LOGO! itself, the Q3 relay is activated from REXYGEN algorithm.
The Q4 relay is activated according to an external analog signal, which is generated by REXYGEN algorithm (sine wave).
Analog inputs of the LOGO! are read and stored in the TRND block in the REXYGEN control algorithm, which provides a time-plot of the measured data in real-time.
Moreover, a connection watchdog is implemented to monitor the connection with REXYGEN.
Prerequisites
- REXYGEN Runtime Core and S7Drv modules are installed on the target device
- The LOGO! device is in RUN mode (logo_integration.lsc attached)
- The IP address 192.168.1.111 is assumed in the LOGO! device. If the IP address differs, remember to change it in the configuration dialog of the IO driver file according to your LOGO! base module. As was already mentioned, LOGO! acts as a server the clients connect to.
Timing of the project
- The algorithm runs each 100 milliseconds (0.1 s). See the EXEC function block,
tick x ntick0 = 0.01 x 10 = 0.1 s - Communication with Siemens LOGO! is performed each 50 milliseconds (0.05 s). See the S7C function block, tick x factor = 0.01 x 5 = 0.05 s
Running the example
- The *exec.mdl file is the project main file
- Open it with REXYGEN Studio, compile and download it to the target device
User interface (HMI)
The example is accompanied by a graphical user interface generated from REXYGEN HMI Designer.
Documentation
- S7Drv - S7 communication driver
- Function blocks of REXYGEN
- REXYGEN HMI User Guide
- REXYGEN Studio User Guide
- Complete documentation of REXYGEN
Additional information
- Siemens and LOGO! are trademarks of Siemens AG.
- The S7Drv driver of REXYGEN uses the Snap7 communication suite.
- Visit the REXYGEN webpage for more information about the example projects and developing advanced automation and control solutions using REXYGEN.