# OPC UA with Kepware/Matrikon

**URL:** <https://community.factoryio.com/t/opc-ua-with-kepware-matrikon/1279>\
**Category:** Drivers\
**Created:** [January 27, 2022, 8:06pm UTC](https://community.factoryio.com/t/opc-ua-with-kepware-matrikon/1279 "2022-01-27T20:06:26Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![user122](https://avatars.discourse-cdn.com/v4/letter/u/5e9695/32.png) [@user122](https://community.factoryio.com/u/user122)\
**Post date:** [January 27, 2022, 8:06pm UTC](https://community.factoryio.com/t/opc-ua-with-kepware-matrikon/1279/1 "2022-01-27T20:06:26Z")

</div>

Hi all,

I’m developing an huge project where the control remains in some Siemens PLCs (S7-300, S7-1200, S7-1500).

So, to connect Factory IO to them all, I’m thinking on OPC UA.  
I’ve tried with Kepware but I have a problem: when I filter the nodes, Factory IO shows me all the “\_” nodes like \_address, \_timestamp… and I need only the .value ones. Problem here is that I will run out of tags (I’ll be using 200/300 IO variables in Factory IO, and each Kepware tag has 16 nodes, so I’m talking about more than 3000 OPC UA nodes)

So, my questions are:

- Can I filter in some way this “\_” nodes if I use kepserver?
- Will i have the same problem if I use Matrikon OPC server? (I’ve tried with kepserver trial, but i dont want to buy a matrikon license to have the same problem)

My last solution is to use a single PLC as a Master (for example, the S7-1500) connected to factory IO and exchanging variables with the other PLCs but… I prefer to communicate throught OPC UA

Thanks for your help

---

<div class="post-metadata">

**Author:** ![brunovgr](https://dub1.discourse-cdn.com/flex017/user_avatar/community.factoryio.com/brunovgr/32/12_2.png) [@brunovgr](https://community.factoryio.com/u/brunovgr)\
**Post date:** [January 28, 2022, 9:14am UTC](https://community.factoryio.com/t/opc-ua-with-kepware-matrikon/1279/2 "2022-01-28T09:14:22Z")

</div>

Hi @user122,

Take a look at the following page of the documentation, it includes instructions on how to get around this issue: [OPC Client DA/UA - FACTORY I/O](https://docs.factoryio.com/manual/drivers/opc/#configuration)

The idea is to use a prefix in the OPC UA server nodes (e.g. ‘fio\_’) and then use the **start with** filter in Factory IO in order to retrieve only these nodes from the server.

---

<div class="post-metadata">

**Author:** ![user122](https://avatars.discourse-cdn.com/v4/letter/u/5e9695/32.png) [@user122](https://community.factoryio.com/u/user122)\
**Post date:** [January 28, 2022, 11:45am UTC](https://community.factoryio.com/t/opc-ua-with-kepware-matrikon/1279/3 "2022-01-28T11:45:21Z")

</div>

Hi Bruno, thanks for your response.

The problem here with Kepware (at least, because i dont know if this problem exists with Matrikon too) is that a tag has a lot of parameters “added” to the value.  
Yesterday I did this filtering as you are suggesting, for example:  
If i have a sensor I named the variable  
lab\_sensor

The problem is, when I filter as you say, the tags that FactoryIO are reading are  
lab\_sensor (this is the “value”, the only tag that I really want here)  
lab\_sensor.\_address  
lab\_sensor.\_timestamp  
lab\_sensor.\_highlimit  
lab\_sensor.\_lowlimit  
lab\_sensor.\_description  
and so on (around 16 parameter each value)

For 9 variables, I have more than 100 tags in factoryIO

---

<div class="post-metadata">

**Author:** ![brunovgr](https://dub1.discourse-cdn.com/flex017/user_avatar/community.factoryio.com/brunovgr/32/12_2.png) [@brunovgr](https://community.factoryio.com/u/brunovgr)\
**Post date:** [February 2, 2022, 5:59pm UTC](https://community.factoryio.com/t/opc-ua-with-kepware-matrikon/1279/4 "2022-02-02T17:59:48Z")

</div>

It doesn’t look like an elementary data type (Boolean, SByte, Byte, …). Take a look at the data type of the item configured in the server. You should use Boolean, Int32 and Float data types with Factory I/O.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/factoryio/original/1X/584ade79fb2a11928a01052f4283e284fc6cf0a7.png)

---

<div class="post-metadata">

**Author:** ![user122](https://avatars.discourse-cdn.com/v4/letter/u/5e9695/32.png) [@user122](https://community.factoryio.com/u/user122)\
**Post date:** [February 2, 2022, 6:25pm UTC](https://community.factoryio.com/t/opc-ua-with-kepware-matrikon/1279/5 "2022-02-02T18:25:08Z")

</div>

Hi @brunovgr

Thanks again but, the datatype in Kepserver is Boolean

 ![Sin título](https://europe1.discourse-cdn.com/flex017/uploads/factoryio/original/1X/94bef72fc736486fcbe9862ddafe1837f87e6a2f.png)

---

<div class="post-metadata">

**Author:** ![user122](https://avatars.discourse-cdn.com/v4/letter/u/5e9695/32.png) [@user122](https://community.factoryio.com/u/user122)\
**Post date:** [February 2, 2022, 6:25pm UTC](https://community.factoryio.com/t/opc-ua-with-kepware-matrikon/1279/6 "2022-02-02T18:25:50Z")

</div>

The configuration in FIO-driver, with the filters:

 ![conf](https://europe1.discourse-cdn.com/flex017/uploads/factoryio/original/1X/783592c0be6fc6efa21b152b5424d5b1248ff64c.png)

---

<div class="post-metadata">

**Author:** ![user122](https://avatars.discourse-cdn.com/v4/letter/u/5e9695/32.png) [@user122](https://community.factoryio.com/u/user122)\
**Post date:** [February 2, 2022, 6:26pm UTC](https://community.factoryio.com/t/opc-ua-with-kepware-matrikon/1279/7 "2022-02-02T18:26:29Z")

</div>

But, as you can see, FIO explores the entire tags parameters  
 ![fio](https://europe1.discourse-cdn.com/flex017/uploads/factoryio/original/1X/0829c33cfdbaf71b76f5dddceecc1d1a8bbbde3f.png)

The selected item is “Siemens.SiemensLab.Lab\_EntryConveyor.\_Address”, the fisical address for the Lab\_EntryConveyor tag.  
I didnt create it, its created by kepserver, so i cant delete it.

And, because it has the same beginning as my desired tag, I cant avoid FIO to explore it

(I’m sorry, as a new user i cant post 3 images in a post, so i divided it in three different sendings)

---

<div class="post-metadata">

**Author:** ![brunovgr](https://dub1.discourse-cdn.com/flex017/user_avatar/community.factoryio.com/brunovgr/32/12_2.png) [@brunovgr](https://community.factoryio.com/u/brunovgr)\
**Post date:** [February 3, 2022, 12:03pm UTC](https://community.factoryio.com/t/opc-ua-with-kepware-matrikon/1279/8 "2022-02-03T12:03:21Z")

</div>

OK, I see. I believe there is no easy way to filter these items.

I would recommend that you create a new KEPServerEx6 project and configure your own channel, device, and items. This way you can add only the items you intend to use in Factory I/O.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/factoryio/original/1X/249af1dfc3b293514a89c69a2b9b794ff60bcbe1.png)

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/factoryio/original/1X/c1b1b48f37a851ac4950e759d66141f69761041e.jpeg)
