# \[BUG-16490\] Problem in Programmable Device Simmulator

**URL:** <https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700>\
**Category:** Ignition\
**Created:** [May 13, 2020, 2:36pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700 "2020-05-13T14:36:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorgeibesi](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@Jorgeibesi](https://forum.inductiveautomation.com/u/Jorgeibesi)\
**Post date:** [May 13, 2020, 2:36pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/1 "2020-05-13T14:36:55Z")

</div>

Hi, I think there is a problem in Programmable Device Simulator, when I go to edit a program and I then save, float’s or double’s decimal part goes to the integer part and integer part are multiplied by 10 each time that I save. So if I edit or add one instruction and then save, all the others instructions are changed in this way.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 13, 2020, 3:47pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/2 "2020-05-13T15:47:24Z")

</div>

Wild guess: are you in a locale that uses `,` as the decimal separator, and `.` as the thousands separator?

---

<div class="post-metadata">

**Author:** ![Jorgeibesi](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@Jorgeibesi](https://forum.inductiveautomation.com/u/Jorgeibesi)\
**Post date:** [May 13, 2020, 5:35pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/3 "2020-05-13T17:35:42Z")

</div>

I’m not. I’m using “.” as the decimal separator. Are you tried what I said? I’m using Version: 8.0.11

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 13, 2020, 5:50pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/4 "2020-05-13T17:50:03Z")

</div>

I did - I can’t reproduce the issue. My guess was based on us doing some kind of number parsing on the backend; I’m not very familiar with how the programmable simulator works.

I made a new device simulator, edited the configuration, made a `readonly(123.45)` value source of type double. Then I saved the configuration, and went back to it - still 123.45. I added an integer `readonly(123)`, saved the program, went back to it - both values are still the same.

---

<div class="post-metadata">

**Author:** ![Jorgeibesi](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@Jorgeibesi](https://forum.inductiveautomation.com/u/Jorgeibesi)\
**Post date:** [May 13, 2020, 6:08pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/5 "2020-05-13T18:08:04Z")

</div>

I tried what you did.

 ![Captura de pantalla 2020-05-13 a las 20.05.08](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/58c02dd9f15792acbf8f7322040e9e9ad0757d96.png)  
I save and then try to edit. So, this is what I see. ![Captura de pantalla 2020-05-13 a las 20.05.26](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/0a90b2636978a30e3266d0271c31d02790fb0720.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 13, 2020, 6:57pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/6 "2020-05-13T18:57:43Z")

</div>

Do you have any browser extensions? Do you get the same behavior in a private/incognito window? Or a different browser? Or a different computer/mobile device connecting to the same gateway? Basically - try to isolate whether this is something about your particular computer, or your particular gateway, or your particular browser.

It’s pretty inexplicable; it’s acting as if the decimal separator just doesn’t exist. The only way I could see that happening is some kind of locale-related confusion.

---

<div class="post-metadata">

**Author:** ![Jorgeibesi](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@Jorgeibesi](https://forum.inductiveautomation.com/u/Jorgeibesi)\
**Post date:** [May 13, 2020, 9:10pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/7 "2020-05-13T21:10:20Z")

</div>

I tried all that you said. I’ve installed Ignition on other PC with the last version 8.0.12 and I keeping to have the same problem 🤦🏾‍♂️

---

<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:** [May 13, 2020, 10:31pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/8 "2020-05-13T22:31:23Z")

</div>

@Jorgeibesi,  
Paul reached out to see if others could replicate this issue, and so far we have been unable to. See the following screen recording:

![SimulatorRecording](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/5ec783d1f06e6704c6ed4ead6b9d87fb69358368.gif)

To try and narrow down what is happening, can you answer the following questions?

1. Does this happen when you make the change with the browser in Private mode?
2. Does the same issue happen in a different browser?
3. It looks like your browser is on a Mac, which version of MacOS are you using? What locale is set within the browser?
4. What browser and browser version are you using?
5. What OS is the Gateway on? What locale is set for the Gateway server?

Thanks,  
Garth

---

<div class="post-metadata">

**Author:** ![Jorgeibesi](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@Jorgeibesi](https://forum.inductiveautomation.com/u/Jorgeibesi)\
**Post date:** [May 13, 2020, 10:59pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/9 "2020-05-13T22:59:07Z")

</div>

Hi Garth, thanks for the answer.

1. Yes, it happen.
2. Yes, it happen.
3. macOS High Sierra, Version 10.13.6. The Language is set in Spanish.
4. I used chrome Version 81.0.4044.138 (Build oficial) (64 bits) and Safari Versión 12.1.2 (13607.3.10)
5. I use the the Gatewat in mac and another gateway in windows. And I don’t know what do you mean about ‘what locale is set for the gateway server’. My region is spain.

---

<div class="post-metadata">

**Author:** ![Jorgeibesi](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@Jorgeibesi](https://forum.inductiveautomation.com/u/Jorgeibesi)\
**Post date:** [May 13, 2020, 11:12pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/10 "2020-05-13T23:12:32Z")

</div>

I’ve tried to do the same in my iphone with both gateways and occurs the same.

---

<div class="post-metadata">

**Author:** ![Kevin.McClusky](https://avatars.discourse-cdn.com/v4/letter/k/47e85d/32.png) [@Kevin.McClusky](https://forum.inductiveautomation.com/u/Kevin.McClusky)\
**Post date:** [May 13, 2020, 11:50pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/11 "2020-05-13T23:50:29Z")

</div>

Hi Jorgeibesi, if your region / locale is Spain, the standard is that folks would be using a “,” as a decimal separator, and a “.” as a thousands separator. Ignition is trying to respect the rules for the area of the world that your system says it’s in.

If you set your Value Source to “readonly(123,45)”, it will probably give you what you are looking for.

> **[File:DecimalSeparator.svg](https://en.wikipedia.org/wiki/File:DecimalSeparator.svg)**
>
> Original file ‎(SVG file, nominally 940 × 477 pixels, file size: 1.63 MB)
>   
> https://creativecommons.org/licenses/by-sa/3.0
> CC BY-SA 3.0 
> Creative Commons Attribution-Share Alike 3.0 
> truetrue
> Quebec (against the norm of the other Canadian provinces) uses commas rather than a full stop.

---

<div class="post-metadata">

**Author:** ![Jorgeibesi](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@Jorgeibesi](https://forum.inductiveautomation.com/u/Jorgeibesi)\
**Post date:** [May 13, 2020, 11:56pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/12 "2020-05-13T23:56:48Z")

</div>

Hi Kevin, thank you very mutch for the answer. But what about if I want to use several parameters in a function like sine(min, max, period, repeat)?

---

<div class="post-metadata">

**Author:** ![Kevin.McClusky](https://avatars.discourse-cdn.com/v4/letter/k/47e85d/32.png) [@Kevin.McClusky](https://forum.inductiveautomation.com/u/Kevin.McClusky)\
**Post date:** [May 13, 2020, 11:58pm UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/13 "2020-05-13T23:58:49Z")

</div>

Good question! Back over to you @paul-griffith…

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 14, 2020, 12:02am UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/14 "2020-05-14T00:02:11Z")

</div>

I’m gonna log this is a bug. The locale shouldn’t be taken into account here.

---

<div class="post-metadata">

**Author:** ![Jorgeibesi](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@Jorgeibesi](https://forum.inductiveautomation.com/u/Jorgeibesi)\
**Post date:** [May 14, 2020, 12:10am UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/15 "2020-05-14T00:10:31Z")

</div>

I think that this is not the problem. I tried to do what @Kevin.McClusky said and doesn’t work.  
Here is the sequence when I only save the first configuration several times.

 ![Captura de pantalla 2020-05-14 a las 2.05.37](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/ea4d3bd20240e2ab7b928e5ba747239f03d96f21.png)

 ![Captura de pantalla 2020-05-14 a las 2.05.52](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/3605ee1b0c390bc3baae2af651c82957430f54c3.png)

 ![Captura de pantalla 2020-05-14 a las 2.06.12](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/07bd4f0f30e69bcfe865d3a2bbff8f82bf6a8cd4.png)

 ![Captura de pantalla 2020-05-14 a las 2.06.27](https://us1.discourse-cdn.com/inductiveautomation/original/2X/5/59fab6db4e316d8fb3b821ac7a411962bd000ccd.png)

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 14, 2020, 12:12am UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/16 "2020-05-14T00:12:55Z")

</div>

This seems to support what he said. The first save results in the “same” value, with a decimal separator instead, then the subsequent saves grow each time because the separator changed?

---

<div class="post-metadata">

**Author:** ![Jorgeibesi](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@Jorgeibesi](https://forum.inductiveautomation.com/u/Jorgeibesi)\
**Post date:** [May 14, 2020, 12:17am UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/17 "2020-05-14T00:17:28Z")

</div>

Perhaps, actually I don’t know. But then it is a bug because this don’t solved my problem.

---

<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:** [May 14, 2020, 12:45am UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/18 "2020-05-14T00:45:17Z")

</div>

We have it duplicated now. Any Gateway setup to use a region that uses anything other than a period for a decimal separator is going to have issues with the built in functions for the simulator unless you want to use integers. The bug Kevin H filed will ultimately address these issues, but I am not seeing a workaround at this point.

Garth

---

<div class="post-metadata">

**Author:** ![Jorgeibesi](https://avatars.discourse-cdn.com/v4/letter/j/ba9def/32.png) [@Jorgeibesi](https://forum.inductiveautomation.com/u/Jorgeibesi)\
**Post date:** [May 14, 2020, 1:05am UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/19 "2020-05-14T01:05:54Z")

</div>

If I execute “system.util.getLocale()” in the script console, it print me ‘en’.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 14, 2020, 11:13am UTC](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700/20 "2020-05-14T11:13:52Z")

</div>

That’s the locale of the designer. The issue is the locale of the gateway. Consider changing your gateways to ‘en’ until the bug is fixed.

[Next page](https://forum.inductiveautomation.com/t/bug-16490-problem-in-programmable-device-simmulator/34700.md?page=2)
