# \[Feedback\] New Programmable Device Simulator

**URL:** <https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779>\
**Category:** Ignition Early Access\
**Created:** [December 17, 2019, 9:00pm UTC](https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779 "2019-12-17T21:00:13Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ggross/32/12668_2.png) [@ggross](https://forum.inductiveautomation.com/u/ggross)\
**Post date:** [December 17, 2019, 9:00pm UTC](https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779/1 "2019-12-17T21:00:13Z")

</div>

We are excited to announce a change to Ignition’s built-in simulator devices. In the latest nightly build a new device is available named **Programmable Device Simulator** that provides the ability to create your own simulator program with outputs you define.

**Overview**  
Our thought when designing the new simulator functionality was users should be able to create tags that can be used in their own development process. Users need the flexibility to simulate devices with a tag structure they are building a project for.

We have included a number of built in functions that will result in tag outputs that hopefully meet your development needs. We have also provided the ability to set specific values at different points of the program should the functions not provide exactly what you need.

This functionality does replace the existing simulators that were included with Ignition. We have added the ability to quickly create the same simulators with this new functionality. If you happen to delete your existing simulator, adding a new Programmable Device Simulator and loading the same program will allow addresses within the device to map existing addresses.

**Quick Start**  
The following instructions will setup the Dairy Simulator within the new Programmable Device Simulator:

1. In your Gateway, navigate to **Config \> Device Connections**
2. Click **Create new Device…**
3. Select **Programmable Device Simulator**
4. Give the device a name of your choosing, note the properties that are available to modify
5. Click button to save the device
6. Open the **More \> edit device** screen
7. From the **Load Program** dropdown, select **Dairy Simulator**
8. Click **Load Simulator Program** button
9. Click **Save Program** button

Feel free to adjust the program before (or after) saving if you want to change some of the functionality.

**Terminology**

- **Instruction File** : A CSV with four columns:

- **Program** : A runnable series of path configurations. The program can be imported via an Instruction File or manually entered/edited via the GUI. The program “runs” through the rows in the Instruction File. Each Program Device Simulator contains only 1 program.

- **Meta Tags** : Each Programmable Device Simulator will have Meta Tags that allow users to interact with the program from the Designer/Session/Client. All tags will be listed under the parent folder **[Controls]** within the device. Altered Meta Tag values do not persist after restart. Meta tags provided:

- **Function** : Users are allowed to define a “function” for the value source. This is not a Python or Expression function. Rather, the value in the cell is a string that looks like a function definition; eg., foo(x,x,x). The driver will attempt to parse the string, and then derive a value based on the function. Valid functions are:

- **Function Parameters** : Values that are passed into a function. The following parameters may be available in functions:

**Functions**

| Function | Description |
| --- | --- |
| sine(min, max, period, repeat) | Sine wave |
| cosine(min, max, period, repeat) | Cosine wave |
| square(min, max, period, repeat) | Square wave |
| triangle(min, max, period, repeat) | Triangle wave |
| ramp(min, max, period, repeat) | Ramping value. Similar to the ramp values in the Generic Simulator |
| realistic(setPoint, proportion, integral, derivative, repeat) | PID-driven realistic number generator |
| random(min, max, repeat) | Random number, falling between the min and max values |
| list(val1, val2, etc…, repeat) | Accepts any number of parameters. While the program is running and on a step with this function, the function will walk through each value in this list. If list is boolean, the repeat value is a required parameter |
| qv(value, statusCode) | Sets a value and quality code. Allows users to simulate a value with bad quality. Valid values for statusCode are “good”, “bad”, and “uncertain”. |
| readonly(value) | Sets a static value that is read only. |

**Examples**

- **Simple Function**

- **Advanced Program**

**Note** : The above is how the simulator should behave. We have a couple open issues where the simulator isn’t behaving correctly during a repeating program.

---

<div class="post-metadata">

**Author:** ![ggross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ggross/32/12668_2.png) [@ggross](https://forum.inductiveautomation.com/u/ggross)\
**Post date:** [December 17, 2019, 9:00pm UTC](https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779/2 "2019-12-17T21:00:43Z")

</div>



---

<div class="post-metadata">

**Author:** ![ggross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ggross/32/12668_2.png) [@ggross](https://forum.inductiveautomation.com/u/ggross)\
**Post date:** [January 7, 2020, 9:39pm UTC](https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779/3 "2020-01-07T21:39:18Z")

</div>



---

<div class="post-metadata">

**Author:** ![dkylep](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@dkylep](https://forum.inductiveautomation.com/u/dkylep)\
**Post date:** [February 4, 2020, 2:29am UTC](https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779/4 "2020-02-04T02:29:24Z")

</div>

Running Version: **8.0.7 (b2019122014)**  
I was hoping to give it a try tonight but I don’t see “Programmable Device Simulator” when creating a new device.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/f/f5d5078cd091d4385e993e1a9964a9aeadcf645f.png)  
Am I missing something?

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [February 4, 2020, 1:13pm UTC](https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779/5 "2020-02-04T13:13:52Z")

</div>

It was released in an 8.0.8 Nightly unfortunately. You'll have to upgrade in order to get the feature. 8.0.8 RC is out. I haven't looked this week to see if a full release is out yet.

> [@Nightly Changelogs - 2019](http://forum.inductiveautomation.com/t/nightly-changelogs-2019/21716/182):
>
> Nightly Changelog: 8.0.8-b20191217 Allen-Bradley Drivers 9881: Create new configurable simulator driver and replace all 3 existing simulators with it. Combined the Dairy Demo, Generic, and SLC simulator device connections into a single driver. In addition, added the ability to create custom instructions in the driver, providing an opportunity to create a custom simulator device connection. Ignition Platform 11311: Add system functions that can manipulate rosters. Created a new system.roster …

---

<div class="post-metadata">

**Author:** ![dkylep](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@dkylep](https://forum.inductiveautomation.com/u/dkylep)\
**Post date:** [February 4, 2020, 2:09pm UTC](https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779/6 "2020-02-04T14:09:57Z")

</div>

Thanks, I’ll wait for the full release.

---

<div class="post-metadata">

**Author:** ![mcarritt1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mcarritt1/32/4262_2.png) [@mcarritt1](https://forum.inductiveautomation.com/u/mcarritt1)\
**Post date:** [February 11, 2020, 5:52pm UTC](https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779/7 "2020-02-11T17:52:51Z")

</div>

I’m trying to get the realistic function to work, and it keeps going negative. I’m probably just not understanding it, but how do I just simulate a value to hover around a certain setpoint?

---

<div class="post-metadata">

**Author:** ![ggross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ggross/32/12668_2.png) [@ggross](https://forum.inductiveautomation.com/u/ggross)\
**Post date:** [February 12, 2020, 1:57am UTC](https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779/8 "2020-02-12T01:57:05Z")

</div>

In looking at the Realistic function, I am seeing a couple things that we likely will want to tweak that is likely causing your problem.

The main issue I am seeing is the setPoint you are defining is getting overridden as the process runs without factoring in your defined setPoint. We need to change that as the target is moving all over the place.

The second issue looks to be our choice of default for the I value of the PID function. 0.06 is causing it to take upwards of 50 cycles to reverse the trend. Changing it to 0.01 has provided more accurate results until the setPoint gets changed out.

I will be creating a bug for the setPoint piece as that needs to get resolved and we will discuss internally if the defaults should be changed.

Garth

---

<div class="post-metadata">

**Author:** ![ggross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ggross/32/12668_2.png) [@ggross](https://forum.inductiveautomation.com/u/ggross)\
**Post date:** [February 13, 2020, 1:19am UTC](https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779/9 "2020-02-13T01:19:34Z")

</div>

@mcarritt,

In talking with the product owners about what the intention of the realistic function is, they feel it is behaving as intended. We will be updating the language of the parameter though as **setPoint** is confusing. The change will likely be to rename the parameter **startPoint** so that it provides a little more clarity. There will also be minor behavior changes to make sure that the **startPoint** is indeed a startPoint when the program starts running.

I have created a separate feature ticket around your request as we do feel it is valid. In the meantime, you may want to consider using the **random()** function instead with narrow min & max values. While the graph might not be as nice, the values can be kept in the range you are looking for.

Thanks,  
Garth

---

<div class="post-metadata">

**Author:** ![BillS](https://avatars.discourse-cdn.com/v4/letter/b/9fc348/32.png) [@BillS](https://forum.inductiveautomation.com/u/BillS)\
**Post date:** [March 16, 2020, 11:00pm UTC](https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779/10 "2020-03-16T23:00:03Z")

</div>

Could you add a feature to the OPC-UA Browse to be able to generate tags for the simulator to match a given device? This would really simplify things for us.

For the most part we aren’t using the simulator functionality, we just need the tags defined so we can maintain projects locally(On our Gateway) after all the hardware has been delivered to the customer. Without the possibility of impacting the customer while we are doing the maintenance.

Thank you,  
Bill

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [August 2, 2020, 6:20pm UTC](https://forum.inductiveautomation.com/t/feedback-new-programmable-device-simulator/30779/11 "2020-08-02T18:20:16Z")

</div>

It is nice if we can combine two formula in source value.  
For example sine()\*ramp()
