PLC logic simulation practice platform – VMC-Lab: Virtual Indexing Station Manual V 0.1.1

A PLC Logic simulator is a software which allows testing PLC code minus the actual hardware. It saves the engineer the time used on commissioning, minimizing system critical errors and uncovering potential system deadlocks. Practicing the logic of a PLC might be a great challenge due to the highly priced simulating platforms currently existing in the market.
PLC simulation is key since it reduces their startup and test time. Watching machine movement in a simulated environment enables better PLC code due to the fact that more fail safes can be tested without risking machine crashes. This open-source platform will help you achieve this.
In this article, you are going to learn how to launch the executable file attached, import Tags, customize the Tags and configure the PLC.
Introduction
This Virtual Indexing station, which is going to be a free software, seeks to solve this problem. It is aimed at giving you an additional practice platform for PLC logic with a bit of convenience. The application is built by Unity and the logic by C#.
Bearing in mind the high cost of PLCs for individuals, this application tends to address this issue. You get a PLC experience with your computer alone.
Let’s now take a deep dive into it:
Instructions
The Compressed file contains an application of the indexing station in a simplified representation. The software can show you the processes undertaken by the station using the inbuilt logic controller within it or you can connect an external S7 Controller (PLC s7-300,400, 1200 & 1500) with ethernet capabilities to it.
Useful files on how the station works and is structured can be found here.
Rename PlayIndexingStation.exe to Prototypes.
Launch Protypes.exe.
Move the view using W, A, S, D for forward, left, backwards, right respectively. Q and E are for downward and upward movement respectively. You can also pan the view or change the direction of view by pressing on the Right Mouse Button and moving your mouse.
Facing the machine, you will see the text “Indexing Station. Press Tab Key”, after which some UI elements will appear on the screen as shown in the next bullet.

Pressing the Tab key will display the following UI:

- Manual Overrides for the Actuators in the station.
- Various actions that can be undertaken by the station when it's using the inbuilt controller in the software. They are sort of an extension of 1.
- The same as the Operator Panels as those you would find in the physical station. They are connected to the input addresses. NB: For the logic in the simulated controller there is no RESET functionality implemented but you can still use it. Auto and Reset work in the same way as the AMATROL station.
- A toggle switch that enables and disables the Simulated Controller for the connected PLC controller.
- Shows a configuration panel for PLC connection and addresses.
- The Red button quits the application. The blue one refreshes the whole application.
Clicking the settings icon (5) will display the following UI

- Enter the IP Address of the PLC. 2 &3. Rack and Slot and for S7-1200 and 1500 their values are 0 and 1 respectively. For S7-300s it is 0 and 2 respectively. 4.Allows you to import tags from a .json file that has been provided in the compressed file. See Section 3
- Clicking it tells you whether the PLC is reachable.
- Buttons that allow you to set the input and output addresses. They are filled out automatically when you import from the JSON file but you can set them manually yourself
- When checked, it connects to the PLC. It is a good idea to check those when the “PLC Ctrl” toggle switch is switched to the right.
Importing Tags
The IndexingTags.json in the compressed folder attached offers a quicker way to get your tags into the application since there is no saving feature within the app. The stations’ original IO List is shown below. The addresses of the original and the one in the JSON file are not similar.

Customizing the tags
When opening the .json file, everything may appear on a single line but it is more convenient when you have the contents of the files being displayed as shown below.

To do this:
- Highlight everything in the file and copy i.e., Ctrl + c
- Go to your web browser and visit the website: https://formatjson.com/
- You will see two window panels with the heading “JSON One” and “JSON Two”.
- In one of the panels, remove what is currently there and paste the text you had copied in step 1.
- The format should change and now you can copy it once again and paste it over what was originally in the IndexingTags.json file to overwrite it.
- Now you can edit the tag addresses.
The default address for the inputs has been set to start from M10.0 to M12.2 and the outputs from M4.0 to M5.3. For now, you may leave out IN1, IN2, OUT1 and OUT2 as they are supposed to allow for discrete communication for 2 stations. It is recommended to work with Memory tags for now, especially for the Inputs.
Configuring the PLC
1.1 Setting up the TIA project for PLCSim Advanced
When using a PLC s7-1500 series PLC, having already added the device and you are in Project view:
- Right-click on the Project Name which should be the first thing on the Project Tree which is a panel on the left in TIA Portals Project View.
- Click on Properties and select the Protection tab.
- Check the checkbox with the text “Support simulation during block compilation”.

1.2 Setting up the device configuration
- Right-click on the device under the Project Tree.
- Click on Properties.
- Go to the Protection & Security section and make sure the settings are as shown below i.e. Full access (no protection) for the access level of the PLC and the Permit access with PUT/GET communication from remote partner is checked.
- Compile and Download Hardware Configuration.

1.3 Configuring DataBlocks
Create the DataBlock and execute the following steps to have the data block working with the Virtual Indexing Station:
- Right-click on the Data Block under the device you added in the Project Tree.
- Uncheck “Optimized block access” in the Under the Attribute section.
- Press OK on the popup dialogue, then press ok on the Datablock Configuration Dialog Box.
- Compile the DataBlock or the whole device then Download.

Conclusion
In this tutorial, you have learnt how to simulate your PLC logic in a Virtual Indexing Station (VIS). This application is not perfect. The user experience is being improved to include features like being able to resize windows and change resolutions among other things. Furthermore, since it is in the developmental stages you might come across some bugs and if you do let me know.