# SmartComponent OPC UA with TIA

**URL:** <https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268>\
**Category:** RobotStudio\
**Created:** [June 27, 2021, 9:04am UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268 "2021-06-27T09:04:54Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![diegoteofilo](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@diegoteofilo](https://tech-community.robotics.abb.com/u/diegoteofilo)\
**Post date:** [June 27, 2021, 9:04am UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/1 "2021-06-27T09:04:54Z")

</div>

Anyone got connect TIA and PlcSim advanced with OPC UA smart component? My doubt is about the .csv file to connect signals.

---

<div class="post-metadata">

**Author:** ![AdamAfry](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@AdamAfry](https://tech-community.robotics.abb.com/u/AdamAfry)\
**Post date:** [June 29, 2021, 7:31am UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/2 "2021-06-29T07:31:29Z")

</div>

Got it running with plc input/output to smart component, though i cant communicate with the virtual controller with i/o signals, only to DB. Have to serialize it from DB to i/o.

---

<div class="post-metadata">

**Author:** ![Nils\_Olofsson](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@Nils\_Olofsson](https://tech-community.robotics.abb.com/u/Nils_Olofsson)\
**Post date:** [June 29, 2021, 2:21pm UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/3 "2021-06-29T14:21:08Z")

</div>

Hello @diegoteofilo  
Can you elaborate on the issues you are facing?  
Also see this post, maybe it can give you some assistance:

> **[ABB Robotics Community - Maintenance](https://forums.robotstudio.com/discussion/12972/opc-smart-component#latest)**

---

<div class="post-metadata">

**Author:** ![AdamAfry](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@AdamAfry](https://tech-community.robotics.abb.com/u/AdamAfry)\
**Post date:** [June 29, 2021, 4:37pm UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/4 "2021-06-29T16:37:16Z")

</div>

You can also export the opc server as an xml-file to read how the TIA server is presented to the opc client in robotstudio

---

<div class="post-metadata">

**Author:** ![diegoteofilo](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@diegoteofilo](https://tech-community.robotics.abb.com/u/diegoteofilo)\
**Post date:** [July 2, 2021, 2:55pm UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/5 "2021-07-02T14:55:48Z")

</div>

> [@](#):
>
> Hello @diegoteofilo  
> Can you elaborate on the issues you are facing?  
> Also see this post, maybe it can give you some assistance:
> 
> [ABB Robotics Community - Maintenance](https://forums.robotstudio.com/discussion/12972/opc-smart-component#latest)

Thank you for your support! I will try a better explain, please see below:

Server node address:

 ![image.png](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/2/2082d8df7fc6dbd32f4caac9dce77cb2f1d5ec5a.png)

myfile.csv

 ![image.png](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/c/c1f2bd82051078343abae1b8fa7cd597a5106c28.png)

Import Error:

 ![image.png](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/9/981f125e045311c51b917f4a1d8397464cad7809.png)

---

<div class="post-metadata">

**Author:** ![Nils\_Olofsson](https://avatars.discourse-cdn.com/v4/letter/n/e495f1/32.png) [@Nils\_Olofsson](https://tech-community.robotics.abb.com/u/Nils_Olofsson)\
**Post date:** [July 5, 2021, 8:01am UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/6 "2021-07-05T08:01:20Z")

</div>

Hello.  
If you download the latest version of Robotstudio (2021.2) there is now a UI which will help you to browse namespaces and connect signals! I think this will solve your issues.

---

<div class="post-metadata">

**Author:** ![ErikHagman](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@ErikHagman](https://tech-community.robotics.abb.com/u/ErikHagman)\
**Post date:** [July 5, 2021, 8:52am UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/7 "2021-07-05T08:52:30Z")

</div>

Hi!

I’m trying to connect PLCSIM adv and OPC UA Client (In RS2021.2), i have made it work with the signals i want to have as signal on the smart component, but i haven’t been able to connect signals to the device. The text in the configure windows says that it wants “bytearray”, but it doesn’t recognize my array of bytes? It do recognize my array of USint but the component cant write to them? “Bad result writing OPC UA data for node 5 (status: 2155085824).” I can write signal that i use in the smart component with out any issues

---

<div class="post-metadata">

**Author:** ![ErikHagman](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@ErikHagman](https://tech-community.robotics.abb.com/u/ErikHagman)\
**Post date:** [July 6, 2021, 6:46am UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/8 "2021-07-06T06:46:09Z")

</div>

Hi!

A little update! i can write to the array of USint from the robots controller, if it was moved in to the OPC UA Server not as part of a DB, maybe i just hade something wrong in the settings of the DB, but Array of bytes doesn’t work?

 ![image.jpg](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/1X/3b72dd259a8d4ccfb5825569b1bec5ac0222c1a5.jpeg)

 ![image.jpg](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/1/1d1ac00a4c04566ebd37d77b0c396a7a2715e71e.jpeg)

My question is also that we usually have the signals in the PLC for the robots as if it was a normal node on the profinetnetwork? But to get OPC UA component to work does signals needs to be as an array?

---

<div class="post-metadata">

**Author:** ![ErikHagman](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@ErikHagman](https://tech-community.robotics.abb.com/u/ErikHagman)\
**Post date:** [July 7, 2021, 8:25am UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/9 "2021-07-07T08:25:56Z")

</div>

New update from what i have found, the component can only handle 64 bytes setting in Profinet, and you cant use ProfiSafe at the same time

---

<div class="post-metadata">

**Author:** ![saitoevc](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saitoevc](https://tech-community.robotics.abb.com/u/saitoevc)\
**Post date:** [August 8, 2022, 2:58pm UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/10 "2022-08-08T14:58:29Z")

</div>

Hello @ErikHagman, have you succeeded to solve (status: 2155085824)?  
I can write Byte2USInt\>RobStudio, but not opposite (back to TIA Portal USInt2Byte)…

---

<div class="post-metadata">

**Author:** ![DenisFR](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@DenisFR](https://tech-community.robotics.abb.com/u/DenisFR)\
**Post date:** [August 9, 2022, 12:31pm UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/11 "2022-08-09T12:31:43Z")

</div>

Hello,  
In other way, did you test these smart components:  
[https://robotapps.robotstudio.com/#/viewApp/8f0eb633-db8c-4155-85f5-4910b894c520](https://robotapps.robotstudio.com/#/viewApp/8f0eb633-db8c-4155-85f5-4910b894c520)  
[https://robotapps.robotstudio.com/#/viewApp/2cab7b4f-754c-415b-a32c-cbe4da9353e9](https://robotapps.robotstudio.com/#/viewApp/2cab7b4f-754c-415b-a32c-cbe4da9353e9)

They don’t need PLCSim Adv (only normal). They use S7Online connections.

---

<div class="post-metadata">

**Author:** ![dragolollo](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@dragolollo](https://tech-community.robotics.abb.com/u/dragolollo)\
**Post date:** [December 19, 2022, 2:57pm UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/12 "2022-12-19T14:57:49Z")

</div>

Ciao @saitoevc!  
Did you find a solution to your issue? I have the same one

---

<div class="post-metadata">

**Author:** ![saitoevc](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saitoevc](https://tech-community.robotics.abb.com/u/saitoevc)\
**Post date:** [February 16, 2023, 10:37am UTC](https://tech-community.robotics.abb.com/t/smartcomponent-opc-ua-with-tia/10268/13 "2023-02-16T10:37:42Z")

</div>

Ciao @dragolollo sorry a late response\> yes, you need to implement a Read/Write FB in TIA:

1. Create a myDB e.g. with:  
. “IN\_FromPLC” Type Array of USINT [0…63]  
. “OUT\_ToPLC” Type Array of USINT [0…63]
2. Create a default tag range e.g.  
. OPC\_IN Type Array[0…63]of Byte \> %Q4000.0  
. OPC\_OUT Type Array[0…63]of Byte \> %I4000.0
3. Create a FB “myFB”:  
. FOR #i:=0 TO 63 DO

“myDB”.IN\_FromPLC[#i]:=Byte\_To\_Usint(“OPC\_IN”[#i]);  
“OPC\_OUT”[#i]):=USINT\_TO\_BYTE (“myDB”.OUT\_ToPLC[#i]);

. ENDFOR;  
4. Call from OB1 or somewhere in the loop  
. call “myFB”

1. Monitor your DB if active or not  
PS.: if you are trying from different OS / VM there will be some tricks =) let me know
