# Ignition - system.opc - CODESYS vs TwinCAT

**URL:** <https://forum.inductiveautomation.com/t/ignition-system-opc-codesys-vs-twincat/88840>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [April 15, 2024, 5:35pm UTC](https://forum.inductiveautomation.com/t/ignition-system-opc-codesys-vs-twincat/88840 "2024-04-15T17:35:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [April 15, 2024, 5:35pm UTC](https://forum.inductiveautomation.com/t/ignition-system-opc-codesys-vs-twincat/88840/1 "2024-04-15T17:35:10Z")

</div>

I'm on 8.1.37

I read an array via system.opc.readValue and I got 2 differents results between CODESYS PLC and TwinCAt OPC-UA Server.

On CODESYS on got what I expect  
[[Ljava.lang.Object;@19287bb0, Good, Mon Apr 15 13:24:52 EDT 2024 (1713201892197)]

And with TwinCAT I got for the same array  
[null, Bad("Bad\_AttributeIdInvalid: The attribute is not supported for the specified Node."), Mon Apr 15 13:20:30 EDT 2024 (1713201630173)]

It's an array of objects that contains 3 tags.

Do I have to configure somethings to get same results on TwinCAT ??

Value result on CODESYS

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/a/9a64ecd695f73383b54344567877e87e2a283d7a.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:** [April 15, 2024, 5:38pm UTC](https://forum.inductiveautomation.com/t/ignition-system-opc-codesys-vs-twincat/88840/2 "2024-04-15T17:38:26Z")

</div>

The most likely cause of the Twincat result is that the NodeId you are pointing at is not a VariableNode.

Some servers model arrays as a VariableNode containing an array value and then, optionally, a child VariableNode per element of the array (each with a scalar value).

Other servers may model arrays as an Object (that has no Value) and a child VariableNode per element of the array.

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [April 15, 2024, 5:41pm UTC](https://forum.inductiveautomation.com/t/ignition-system-opc-codesys-vs-twincat/88840/3 "2024-04-15T17:41:27Z")

</div>

> [@Kevin.Herron](#):
>
> NodeId

I thinked that OPC-UA was universal, for same project I got different result between CODESY and TwinCAT, is it normal ?

---

<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:** [April 15, 2024, 5:44pm UTC](https://forum.inductiveautomation.com/t/ignition-system-opc-codesys-vs-twincat/88840/4 "2024-04-15T17:44:28Z")

</div>

I don't have nearly enough information to tell you the answer to that. I don't know what, if any, relationship exists between Codesys and TwinCAT, or what projects you're even talking about.

Use UaExpert to browse to these Nodes in each server and see if they're actually the same or not.

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [April 15, 2024, 5:56pm UTC](https://forum.inductiveautomation.com/t/ignition-system-opc-codesys-vs-twincat/88840/5 "2024-04-15T17:56:05Z")

</div>

**CODESYS**  
 ![2024-04-15_13h51_44](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/b/5b47c0b12806e565fb0d3ae469da376424d4ceb7.jpeg)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/2/8214c49c4c5b8d13b025e79c45b4925ee07fd742.jpeg)

So TwinCAT give Object and CODESYS Variable ???

**TwinCAT**  
 ![2024-04-15_13h47_13](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9bbe27f308d98a29aa3cfacbd57e2df85769b717.jpeg)

 ![2024-04-15_13h47_58](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/7/07ede33cd204130dc9b5b566b793b33a8dbac400.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:** [April 15, 2024, 5:58pm UTC](https://forum.inductiveautomation.com/t/ignition-system-opc-codesys-vs-twincat/88840/6 "2024-04-15T17:58:08Z")

</div>

Looks that way. Couldn't tell you why.
