Best practices for create simulator mode in a project

I want to have a simulator mode for operator in my project which enabling it cause a script run and manipulate all tag and simulate a process behavior.
If I create all tag type to memory writing to tag is possible in script but in real project some tag value comes from PLC and I can’t find any way to disconnect tag from updating from PLC while the quality is remain good and able to write to it in script. For example I do this by driven scan class and set slow rate to 0 to disable scaning from OPC but this cause quality get bad and write on tag is impossible.

So I came to this idea that some how changing the tag type from memory and OPC and vice versa in script.
Or force to set quality to good for all time for OPC tag and force to write value to them. are these method possible in igniton?
If not what is the alternative solution for this? (make a simulate mode in project)

One option: Make every tag binding indirect and switch the tag path between OPC and memory tags based on whether simulation mode is active.

Others may have better suggestions. I haven’t played with simulating at HMI level (all done in PLC).

The problem with this option is all alarm history is set on OPC tag only the value on HMI will change. Even more doubling tag count may use more hardware resource.

I think of one solution. kepware comes with free simulator driver. I can create all of my tag in this driver.
when I set to simulator mode I read all tag opcitempath and change path to kepware simulator driver and then in script manipulate tag value and read them from OPC simulator kepware driver.
But I hope to find better solution.

Why do you need PLC’s connected and configured to Ignition for the simulator? Even the PLC’s logic and IO points can be simulated (memory) tags along with the simulation tags (process state variables and constants). This reduces the cost of the simulator, though increases the task of PLC logic simulation in addition to process simulation. Although this increases the computational burden on the Ignition server due to execution of scripts that simulate the process equations and PLC logic equations on the server in addition to performing the normal SCADA load, but it reduces the cost of simulator.

For that we have developed a simulation executive module called UNISEMS and see its demo which can be run outside of the Ignition server (even on a separate server) which does simulation of process and logic equations and drives simulated IO points on Ignition server. This can be modified to run as scripts in Ignition server as well.

I don’t know what is the objective of your simulator? Is it for training operators or configuration of green field SCADA project or a Migration project from other SCADA system to Ignition. If you can tell the objective then we can suggest a suitable configuration for you.

Also simulating a process system is not a trivial task! It needs a lot of process knowledge to build math models for the plant.It also depends on what type of plant you are simulating, a process plant or a discrete manufacturing plant.

Please specify your needs.

I need this for two reasons
1 - in development phase I don’t have plc or dcs system connect to ignition and I connect all of my tag to opc. This casue I see an error overlay on all my tags and can’t see animations so I can’t find if any error exist in my project. This is true specially for report that need some meaningful data to see result. If I definitely all my tag memory I can write some data to them and see result on trend, result HMI and check everything is ok. But changing manually all 50000 tag to memory and opc back is not possible. Even connect ting these tags to opc is taking time.
I want before I send my project to site see all possible error.

2 - sometimes there is faulty device in site and operator what to set it’s value to fix desire value to make it’s report meaningful.
I made a option for each device so admin can change input signal manually. In plc signal is remain faulty and logic may do some error handling but in HMI operator decide to show some valid value.
It seems odd what this is what client requirements.

What I need to check my project in offline mode with actual plc or rtu. I need to do that without so many modification in my project.

I think for both your requirements, the OPC Tag browser should have a new scan class as “override” or something like that, which always writes the overridden value to Ignition OPC data base corresponding to the PLC tags . This can only be done by Ignition people. Perhaps you can put a request for this feature to Ignition.

However I am wondering , when you don’t have PLC’s or DCS connected to Ignition during development phase, then how do you define the OPC tags? You have to use memory tags only in the beginning right? Or has someone written a module for simulating virtual PLCs supported by Ignition that allow you to connect the OPC browser to it?

My idea of simulator was different, to be able to calculate plant dynamic behavior by mathematical equations for changes in set points or equipment status. What you want to to be able to override the PLC I/O variables with fixed values or values periodically changing with time like sine, saw tooth, random etc.

1 Like

Here is my final solution:
After configuring kepware for your driver create same structure as driver in kepware for simulator driver(it’s free) like following image: The only different is first section PLC vs SIM. In igntion all tag should be set to read/write and limit write mode in kepware driver.

You can export your folder and tag list to csv and change the address and import it again in simulator driver. All tag in driver should be set to “Constants Type” so you can change value via igntion. Refer to kepware manual.

Create a button with following script to turn to simulator mode:

tags = system.tag.browseTags(’[default]’,recursive=1) #browse the directory and return a list of all tags

for tag in tags:
if tag.isFolder() == False:
OPC = + ‘.OPCItemPath’).value
OPC = OPC.replace(‘PLC.’,‘SIM.’)
system.tag.write(tag.fullPath + ‘.OPCItemPath’,OPC)

and this to turn back to PLC:

tags = system.tag.browseTags(’[default]’,recursive=1) #browse the directory and return a list of all tags

for tag in tags:
if tag.isFolder() == False:
OPC = + ‘.OPCItemPath’).value
OPC = OPC.replace(‘SIM.’,‘PLC.’)
system.tag.write(tag.fullPath + ‘.OPCItemPath’,OPC)

1 Like

Before starting development phase I take a site survey and in kepware I create my whole tag structureand when I come back to office I open my kepware project with all of my tag inside (but this time all of them has bad quality)
Now I design my igniton project with this valid link in kepware which should be ok in site.
What I mean from simulator is to be able to manipulate tags and see animation and report in development phase.
Even in site client want to see what animation happen when some thing happened like line break. I can’t re create line break unless I can force a value tag in PLC which is not possible or dangerous. That why i need a sim mode to do that.

1 Like

Got it! Makes sense, it would definitely speed up configuration of the system and testing end to end connectivity of tags and SCADA, However you need kepware server connected to Ignition for this (I guess the trial version will suffice which is free?).

absolutely, the simulator driver from kepware is totally free and if you plan to use ignition driver for PLC connection, in script you should change the whole path instead of replace.

1 Like

Remember that you can create a completely separate real-time tag provider which can be populated with memory tags in place of the live system’s OPC tags. By simply switching which tag provider the project uses you can quickly change between simulation or live modes.


This only works for HMI. what about history,alarm and report? I should have to set two alarm and history. For example I have tag1 and set alarm ans history in default provider and tag1 in simulator provider which should be configure alarm and history as well. one DB for each provider which increase cpu, RAM usage and hard space.
And in every object that access to tag I should change dynamically between these two provider in run-time which is hard and time consuming.

As far as I know you can’t do this in a script, you have to use the gateway web interface. I would normally expect to develop using the simulated tag provider and then change over to the live provider for the customer.

The only way I can think of switching between 2 providers at run-time would be to use indirect tag binding.

I know this should be an Ignition answer but, we actually do the sim in the plc.
The hmi tags never have to point to another source and it lets us test plc code and hmi code.


Yes, we’ve done it this way as well. A flag in the PLC determines whether a series of internal registers are populated from actual inputs or from an attached simulator box.

Imagine you should connect to existing running DCS system with 5K tags and 70 pages. you cant done all engineering at site and you should take the signal and setup protocol at site and after that done all drawing, reporting, alarming at office with simulator and come back to site and check it again. This is why you need a simulator mode in your development phase.
Not all the time you can use real PLC.

here a method that you can convert between opc tag and memory tag without losing opc item path. It’s usefull when you haven’t OPC and want to check your project. In this way I can change between simulation and operating mode.

1 Like

This right click is no longer there. Is there some other way to put tags in a Manual mode? so Alarms and HMI objects can be tested without the condition happening in the device.