Back
Featured image of post Simulation : PLC (Siemens) and HMI (Eaton/Moeller with Galileo)

Simulation : PLC (Siemens) and HMI (Eaton/Moeller with Galileo)

Find a way to work on Galileo and Siemens PLC in simulation

PlcSim

We need a running program on PlcSim. PlcSim has to use the PLCSIM(TCP/IP) interface and has to be listening on the same IP as the computer.

Here a DB with one bit that is toggled every second :

PLCSim running
PLCSim running

Your PLC side is ready !

NetToPlcSim Software

Install

To allow Galileo and PlcSim to communicate we need a third party software that will act as a gateway : NetToPlcSim (OpenSource).

Download from : http://sourceforge.net/projects/nettoplcsim/

Startup

At startup, it’ll ask to close the service using the port 102 :

NetToPlcSim
NetToPlcSim

If NetToPlcSim fail to close this service, you might do it manually (as administrator) :

Closing service
Closing service

Configuration

We need to “add” a new server:

New server
New server

The pamameters window :

Server parameters
Server parameters

We start by the “Network IP Address”, use the “…” and choose your computer IP :

IP configuration
IP configuration

Then do the same for the PlcSim IP (PlcSim has to be running) :

IP configuration
IP configuration

Your configuration should now looks like this :

Overall configuration
Overall configuration

Then we can click on “Start” to start the server:

Start server
Start server

Your gateway is ready !

Galileo Software (HMI)

Create a new project :

New projet
New projet

The panel has to support Ethernet as we’ll use this for the communication between the PLC and HMI :

Panel selection
Panel selection

Panel selection
Panel selection

For the PLC IP, use the same as for PlcSim :

IP configuration
IP configuration

IP configuration
IP configuration

Create a new mask :

New mask
New mask

Create a new byte and not a bit (see below)

New byte
New byte

Why a byte and not a bit ? Read and write 1 bit is not supported by Galileo via Ethernet. If you try to do so, you’ll have the following message when compiling : ERROR: bit ‘MyBit’:the size of 1 bits is not supported (increase to 8 bits) – PLC ‘Siemens - Industrial Ethernet’

Galileo Siemens interface
Galileo Siemens interface

Then we can map our byte to our bit in our DB :

Mapping
Mapping

Create a new value display/entry :

New value
New value

And map it to our byte :

Mapping
Mapping

Save and then compile :

Save and compile
Save and compile

And we can start the simulation :

Start simulation
Start simulation

Booting step :

Booting
Booting

And simulation running :

Simulation running
Simulation running

Simulation running
Simulation running

comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy