# Not able to change value in Perspective numeric field control. Getting this error when change any value in HMI

**URL:** <https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784>\
**Category:** General Discussion\
**Tags:** perspective\
**Created:** [December 6, 2023, 2:19pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784 "2023-12-06T14:19:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swathi\_G](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Swathi\_G](https://forum.inductiveautomation.com/u/Swathi_G)\
**Post date:** [December 6, 2023, 2:19pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/1 "2023-12-06T14:19:26Z")

</div>

![33](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/f/affda836ee2a742e3c881aa26f4e28d0a691a82c.jpeg)  
What does this mean? Why values are not written?Connecting via OPC UA and add tag in tag browser i have added float array as a tag , but when i run perspective project then default value of CIT tha is came from OPC is 625 is showing but when i click on this numeric field box and change value (float array data type) then it giving this error .  
Error writing to TO\_LVF\_CIT\_N[0]: Error\_Exception • 5 minutes ago  
Error writing to tag '[Sample\_Tags]TO\_LVF\_CIT\_N': array element type mismatch

So where its type is mismatch , I dont have idea about this so if anyone have any idea , then let me know

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 6, 2023, 2:27pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/2 "2023-12-06T14:27:20Z")

</div>

How are you attempting to write to the tag? Is it a binding from a Numeric Entry Field? Is the binding set to "bidirectional".

Please show the binding.

---

<div class="post-metadata">

**Author:** ![Swathi\_G](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Swathi\_G](https://forum.inductiveautomation.com/u/Swathi_G)\
**Post date:** [December 6, 2023, 3:30pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/3 "2023-12-06T15:30:11Z")

</div>

Yes it is Bidirectional and I use numeric entry field for getting only first array element(0th value) so right now i used only one numeric entry field , I have attached photo here, what is missing here , I checked bidirection and try change numeric text field then giving error

![36](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/0/705e4d7d01e56b12e19ffd7dc0ef736e53b75127.jpeg)  
By default comming from default value is 625 when i change it from 625 to 635 then giving this error , other control works properly when i use one float value for one numeric entry field but this float array gives error, so anything is missing here in float array??

![34](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/b/5b9c2416e03201e542977398219647a34eb4dfe4.jpeg)  
 ![35](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/7/47dc7417f0f725aca6a6beccf0cbac13b13aa1a3.jpeg)

---

<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:** [December 6, 2023, 3:42pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/4 "2023-12-06T15:42:21Z")

</div>

That looks suspiciously like something you'd find in a PLC5, SLC5xx, or a Logix conversion from one of those. In which case an `N` file would be 16-bit signed integers, not float. Try fixing the value type.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 6, 2023, 3:45pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/5 "2023-12-06T15:45:39Z")

</div>

Also note,

> **Array Tag Write-Back**  
> OPC Array tags support writing back to the device. How this is done can vary, depending on the type of OPC Server in use. Some OPC Servers support writes to individual array elements, where a write would occur just like any other tag write. **However, some OPC Servers do not support individual element writes** , which means the whole array will need to be written back to the array tag, even if only a single element is changing.

[https://docs.inductiveautomation.com/display/DOC81/Tag+Data+Types](https://docs.inductiveautomation.com/display/DOC81/Tag+Data+Types)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 6, 2023, 3:48pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/7 "2023-12-06T15:48:24Z")

</div>

> [@Swathi\_G](#):
>
> Actually I have used float array ...

In what PLC?  
With what data type in the PLC?

---

<div class="post-metadata">

**Author:** ![Swathi\_G](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Swathi\_G](https://forum.inductiveautomation.com/u/Swathi_G)\
**Post date:** [December 6, 2023, 3:53pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/9 "2023-12-06T15:53:24Z")

</div>

Via OPC UA connectivity, and data type is float array

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 6, 2023, 3:57pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/10 "2023-12-06T15:57:01Z")

</div>

> [@Swathi\_G](#):
>
> **However, some OPC Servers do not support individual element writes**...,

It means that you might not be able to write to one element of the array. You would have to write the whole array if any one element changes.

> [@Swathi\_G](#):
>
> Via OPC UA connectivity ...

OPC UA connectivity to whose OPC server?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 6, 2023, 4:02pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/12 "2023-12-06T16:02:50Z")

</div>

I mean who made the OPC UA server? Inductive Automation, Kepware, Allen-Bradley, Matrikon, somebody else? What is the name of the OPC software?

---

<div class="post-metadata">

**Author:** ![Swathi\_G](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Swathi\_G](https://forum.inductiveautomation.com/u/Swathi_G)\
**Post date:** [December 6, 2023, 4:05pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/13 "2023-12-06T16:05:38Z")

</div>

Sorry that i don't have idea , but via this opc connectivity other controls like button numeric entry field for single value, and other are worked properly , expect this float array data type...

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 6, 2023, 4:17pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/14 "2023-12-06T16:17:28Z")

</div>

![Array tag edit](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/4/b4e96cfe4dd3483fd006339c2d86a9b932bc8713.png)

Try changing a tag value in the tag browser. If you can not do it there then you probably can't change it by a simple binding.

> [@Swathi\_G](#):
>
> Sorry that i don't have idea [about which OPC UA server is being used], ...

I think you need to find out. Then you can read the documentation for that server to see if it supports writing to one array element.

---

<div class="post-metadata">

**Author:** ![Swathi\_G](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Swathi\_G](https://forum.inductiveautomation.com/u/Swathi_G)\
**Post date:** [December 6, 2023, 4:32pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/15 "2023-12-06T16:32:27Z")

</div>

Ok , i tried to change value in Tag browser but same error occured as shown in above photos type mismatch..

---

<div class="post-metadata">

**Author:** ![Swathi\_G](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Swathi\_G](https://forum.inductiveautomation.com/u/Swathi_G)\
**Post date:** [December 6, 2023, 4:34pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/16 "2023-12-06T16:34:09Z")

</div>

When I changed its type (Double array) then this error shown  
Error writing to D1[0]: Bad • 4 minutes ago  
Bad\_WriteNotSupported: The server not does support writing the combination of value.

![37](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/f/7fa879c9cd97cd3698e0162ecb52d3641721ff25.jpeg)

---

<div class="post-metadata">

**Author:** ![Swathi\_G](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Swathi\_G](https://forum.inductiveautomation.com/u/Swathi_G)\
**Post date:** [December 6, 2023, 4:35pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/17 "2023-12-06T16:35:39Z")

</div>

Ok sure, i will check for this opc server, but what to do if this is not done using simple binding, What else is required?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 6, 2023, 4:39pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/18 "2023-12-06T16:39:20Z")

</div>

> [@Swathi\_G](#):
>
> ... but what to do if this is not done ...

I think you would,

- Create onChange event on your Numeric Entry Field.
- Read the whole array into a list.
- Change the list element that is to be updated.
- Write the updated list back to the array.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 11, 2023, 3:25pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/20 "2023-12-11T15:25:34Z")

</div>

I repeat ...  
Swathi, when you are pasting code you need to select the code block and press the \</\> button. Most of your code formatted correctly because there were leading spaces but the first two lines

> [@Swathi\_G](#):
>
> so can i use onactionperform

Use **onActionPerformed** (with correct spelling and capitalisation).

- `onActionPerformed` does nothing if the control is disabled.
- `onClick` will execute if the control is disabled. This causes much confusion to some users who are surprised when button `enabled : false` doesn't disable the event.

---

<div class="post-metadata">

**Author:** ![Swathi\_G](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Swathi\_G](https://forum.inductiveautomation.com/u/Swathi_G)\
**Post date:** [December 11, 2023, 3:49pm UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/21 "2023-12-11T15:49:59Z")

</div>

Ohh ...sorry, Yes sure I edited code ..

---

<div class="post-metadata">

**Author:** ![Swathi\_G](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Swathi\_G](https://forum.inductiveautomation.com/u/Swathi_G)\
**Post date:** [December 13, 2023, 10:27am UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/22 "2023-12-13T10:27:10Z")

</div>

Yes this is worked for me...  
Actualy I get datatype mismatch error in Float array while reading and writing tag  
But then I create new OPC tag which has Double Array data type and bind that tag in numeric entry field , then add script in onActionPerformed for reading and writing tags in tag browser as well as opc (using system.tag.writeBlocking and system.opc.writeValue ) so it is worked for me, values are changed while action is performed,

But I have one question regarding Bidirectional :  
When I am adding script in onActionPerformed  
(For this Double Array datatype individual elements read write in different numeric field)then there is no needed to check this Bidirectional checkbox right??

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 13, 2023, 10:40am UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/23 "2023-12-13T10:40:45Z")

</div>

> [@Swathi\_G](#):
>
> When I am adding script in onActionPerformed  
> then there is no needed to check this Bidirectional checkbox right?

Correct, and it might create a fight in the logic!

---

<div class="post-metadata">

**Author:** ![Swathi\_G](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Swathi\_G](https://forum.inductiveautomation.com/u/Swathi_G)\
**Post date:** [December 13, 2023, 10:43am UTC](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784/24 "2023-12-13T10:43:43Z")

</div>

Oh , Ok that means if I added script as well as check Bidirectional then both are trying to change value , so that it will create conflict, so when adding script(via Configure Event) then Bidirection checkbox must be unchecked right??

[Next page](https://forum.inductiveautomation.com/t/not-able-to-change-value-in-perspective-numeric-field-control-getting-this-error-when-change-any-value-in-hmi/82784.md?page=2)
