# OPC Item Path takes decimal point on its own

**URL:** <https://forum.inductiveautomation.com/t/opc-item-path-takes-decimal-point-on-its-own/90437>\
**Category:** Ignition\
**Created:** [May 15, 2024, 2:33pm UTC](https://forum.inductiveautomation.com/t/opc-item-path-takes-decimal-point-on-its-own/90437 "2024-05-15T14:33:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anamay\_Belekar](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@Anamay\_Belekar](https://forum.inductiveautomation.com/u/Anamay_Belekar)\
**Post date:** [May 15, 2024, 2:33pm UTC](https://forum.inductiveautomation.com/t/opc-item-path-takes-decimal-point-on-its-own/90437/1 "2024-05-15T14:33:32Z")

</div>

Hi.. I have created one UDT and an OPC tag in it. I have used tag parameters for OPC Item Path  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/8/58951df0f370c2ffc81ed1b6cf3c45892f0f43fd.png)

where {Rack} and {IsSW} are the UDT parameters.  
But when I create an instance, it is adding decimal point on its own ( .0 ) to the OPC Item value.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/e/1eab7b76861154abaa83076051e75645536410ca.png)

HR62550.0  
That decimal point is not needed in my case.  
Can you please suggest to remove that '.0' part? i.e., only HR62550

Note - {Rack} is String and {IsSW} is Integer.

---

<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 15, 2024, 2:41pm UTC](https://forum.inductiveautomation.com/t/opc-item-path-takes-decimal-point-on-its-own/90437/2 "2024-05-15T14:41:27Z")

</div>

Hmm. Seems like a bug. You should report it.

---

<div class="post-metadata">

**Author:** ![MMaynard](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mmaynard/32/3366_2.png) [@MMaynard](https://forum.inductiveautomation.com/u/MMaynard)\
**Post date:** [May 15, 2024, 2:48pm UTC](https://forum.inductiveautomation.com/t/opc-item-path-takes-decimal-point-on-its-own/90437/3 "2024-05-15T14:48:29Z")

</div>

I just tested this on a test UDT, and it works as expected?  
Is that space after 700 there on purpose?

`[{Rack}]HR{62550 + IsSW*700}`  
With IsSW set to 2 I end up with

[WM2]HR63950

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [May 15, 2024, 3:22pm UTC](https://forum.inductiveautomation.com/t/opc-item-path-takes-decimal-point-on-its-own/90437/4 "2024-05-15T15:22:12Z")

</div>

Did a bit of testing. When IsSW is set to integer with a value of 1, I get `[MMS_A_01_R1]HR63250` no matter if the trailing space is there or not. If I change IsSW to a string, then I get the same value as you with the trailing decimal. Verify both in the template and in your instance that the type of IsSW is integer and not a string.

Edit: What stood out is that even with it being a 1, it should add 700 to 62250, but it wasn't, it was concatenating a string of "1" multiplied by 700 and probably adding that value to 62250 and treated it as a floating point as 62250.0

---

<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 15, 2024, 3:34pm UTC](https://forum.inductiveautomation.com/t/opc-item-path-takes-decimal-point-on-its-own/90437/5 "2024-05-15T15:34:39Z")

</div>

> [@michael.flagler](#):
>
> Verify both in the template and in your instance that the type of IsSW is integer and not a string.

If you use `system.tag.configure()` to instantiate UDTs, and provide parameters, those parameters are all forced to be strings, despite the UDT declaring them otherwise. (At least, in all the Ignition versions I've tested this with.) ☹

You must set UDT instance parameters **after** creation using `system.tag.writeBlocking()` to retain the parameter data types.

---

<div class="post-metadata">

**Author:** ![Anamay\_Belekar](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@Anamay\_Belekar](https://forum.inductiveautomation.com/u/Anamay_Belekar)\
**Post date:** [May 18, 2024, 11:51am UTC](https://forum.inductiveautomation.com/t/opc-item-path-takes-decimal-point-on-its-own/90437/6 "2024-05-18T11:51:11Z")

</div>

I did verify again, IsSW is an Integer only. But yeah.. that unwanted decimal poiont is still there even though I remove the spaces form the OPC item path.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/f/0f738111e2fe9a7a7d34b64488bf46ca95b7f80a.png)

This is what I checked  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/9/3958ecce270327b89884a526873c1e66ba7c0457.png)

And still the decimal point  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/3/c39dcd5ea40bb281a6c78eaa884e5b3e92cd296f.png)

---

<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 18, 2024, 1:50pm UTC](https://forum.inductiveautomation.com/t/opc-item-path-takes-decimal-point-on-its-own/90437/7 "2024-05-18T13:50:33Z")

</div>

Read the parameter **on the instance** and see if it is still an integer.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 25, 2024, 11:29pm UTC](https://forum.inductiveautomation.com/t/opc-item-path-takes-decimal-point-on-its-own/90437/8 "2024-05-25T23:29:45Z")

</div>

Good point, I know when I upgraded last from v7 to 8, it converted a lot of my, from memory, string params to integer params in the instances. That was early day conversions though
