# Error Writing to KepWare Tags for a CTI2500 PLC

**URL:** <https://forum.inductiveautomation.com/t/error-writing-to-kepware-tags-for-a-cti2500-plc/80998>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [October 25, 2023, 9:39pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-kepware-tags-for-a-cti2500-plc/80998 "2023-10-25T21:39:47Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sean\_Galbraith](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@Sean\_Galbraith](https://forum.inductiveautomation.com/u/Sean_Galbraith)\
**Post date:** [October 25, 2023, 9:39pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-kepware-tags-for-a-cti2500-plc/80998/1 "2023-10-25T21:39:47Z")

</div>

Hello,

I am getting a writing error when trying to write to tags. The error indicates it is a type mismatch, but they are both set to be strings in Perspective so I am not sure where the issue is. KepWare is converting the string to and from a 16-bit Word for the PLC, and all the KepWare tags were ported into the Tag Browser automatically through the gateway. I have thousands of these tags to recreate and limited ability to modify the PLCs so figuring out a batch solution in either KepWare or Ignition is preferable.

![Error Message](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/1/e1876770707b36b5e6a04ebb02611b105a7ec57f.jpeg)

 ![Tag](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/a/ba01a134f6e482e5d16c9f0c078a27a975a950e6.jpeg)  
 ![RawTag](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/5/e58ad31bff3a8ace2f303c05ff83cf27deeaf3e6.jpeg)

---

<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:** [October 25, 2023, 9:43pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-kepware-tags-for-a-cti2500-plc/80998/2 "2023-10-25T21:43:42Z")

</div>

Can you get a Wireshark capture while attempting one of these writes? The connection would need to be configured without security during the capture.

---

<div class="post-metadata">

**Author:** ![Sean\_Galbraith](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@Sean\_Galbraith](https://forum.inductiveautomation.com/u/Sean_Galbraith)\
**Post date:** [October 25, 2023, 10:04pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-kepware-tags-for-a-cti2500-plc/80998/3 "2023-10-25T22:04:53Z")

</div>

We can look into doing a capture, but may take a few days to organize.

I tried to make the same change from a session on the gateway using the loopback address and got the same error. I will attach some images of the KepWare side if that helps any.

 ![KepServer](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/7/8736a86988d1a98d485534e83fda1978b2e09135.jpeg)  
 ![KepServerTag](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/d/1dfaa7aaf928a5b1b4441cbed91c0cafbdc29f84.jpeg)  
 ![KepServerPLC](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/c/dcc898a56640eebfd11ba5385a291e992e9d973a.jpeg)

---

<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:** [October 25, 2023, 10:18pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-kepware-tags-for-a-cti2500-plc/80998/4 "2023-10-25T22:18:32Z")

</div>

What about this configuration makes you think configuring it as a String in Ignition is okay? The Kepware tag type is set to WORD.

---

<div class="post-metadata">

**Author:** ![Sean\_Galbraith](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@Sean\_Galbraith](https://forum.inductiveautomation.com/u/Sean_Galbraith)\
**Post date:** [October 25, 2023, 10:31pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-kepware-tags-for-a-cti2500-plc/80998/5 "2023-10-25T22:31:58Z")

</div>

I did not change anything on the OPC tags, that is how they were imported in when I connected the KepWare OPC to the Gateway. It set the type to string for all the analog tags, timer words, and even the variables and doubleword variable automatically.

---

<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:** [October 25, 2023, 10:34pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-kepware-tags-for-a-cti2500-plc/80998/6 "2023-10-25T22:34:34Z")

</div>

Hmm, something may be wrong with Kepware. If you drag them into Ignition and it gets assigned a String datatype then either Kepware is reporting the datatype as String, or as some other unrecognized type. But it seems when we write a String it gets rejected by Kepware with Bad\_TypeMismatch.

Wireshark capture would show what's happening for sure.

---

<div class="post-metadata">

**Author:** ![Sean\_Galbraith](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@Sean\_Galbraith](https://forum.inductiveautomation.com/u/Sean_Galbraith)\
**Post date:** [November 9, 2023, 6:09pm UTC](https://forum.inductiveautomation.com/t/error-writing-to-kepware-tags-for-a-cti2500-plc/80998/7 "2023-11-09T18:09:53Z")

</div>

So it took us forever to get IT to help set up the Wireshark. But while we were working on that we discovered that IT had changed the system names of the Gateway and KepWare servers on the network and that the new names had broken our connection to KepWare.  
Oddly the system was able to pull the data from KepWare so we did not see the connection issue in the clients until they were being used to write back to the PLC. Once we repaired the connection between the Gateway and KepWare and reloaded the tags from the OPC they started working again and had the proper data types.  
Thank you for all your help!
