# PLC \<--\> robotstudio simulation

**URL:** <https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921>\
**Category:** RobotStudio\
**Created:** [December 9, 2015, 9:43am UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921 "2015-12-09T09:43:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![pwpeter](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/pwpeter/32/99_2.png) [@pwpeter](https://tech-community.robotics.abb.com/u/pwpeter)\
**Post date:** [December 9, 2015, 9:43am UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/1 "2015-12-09T09:43:24Z")

</div>

Hello,

As stated in a other discussion i’m a newbie in the world of ABB robotics and robotstudio.  
The concepts are very familiar to me, i only have to learn, how to work with the programs and infrastructure.

For a customers robotcell a combination of siemens PLC (master) and robotstudio (rapid)(slave) is used.  
I was wondering is it in some way possible to simulate both product virtually to indetify any problems in software and interface.  
This means simulating the PLC on the computer in combination with the robotstudio simulation.

if not already implemented the only way i could imagine is to create a addin module which connects both interfaces together?

any ideas regarding this challange ?

kind regards,  
Peter

---

<div class="post-metadata">

**Author:** ![Pavel\_Riabichev](https://avatars.discourse-cdn.com/v4/letter/p/8e7dd6/32.png) [@Pavel\_Riabichev](https://tech-community.robotics.abb.com/u/Pavel_Riabichev)\
**Post date:** [December 10, 2015, 9:01am UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/2 "2015-12-10T09:01:59Z")

</div>

Hello Peter

It is probably possible with OPC server  
[http://developercenter.blob.core.windows.net/devcenter/Downloads/IRC5\_OPC/AM-IRC5\_OPC\_Server.pdf](http://developercenter.blob.core.windows.net/devcenter/Downloads/IRC5_OPC/AM-IRC5_OPC_Server.pdf)

/Pavel

---

<div class="post-metadata">

**Author:** ![pwpeter](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/pwpeter/32/99_2.png) [@pwpeter](https://tech-community.robotics.abb.com/u/pwpeter)\
**Post date:** [December 11, 2015, 1:39pm UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/3 "2015-12-11T13:39:28Z")

</div>

thx i will look into it

---

<div class="post-metadata">

**Author:** ![DantasR](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@DantasR](https://tech-community.robotics.abb.com/u/DantasR)\
**Post date:** [January 12, 2016, 7:28am UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/4 "2016-01-12T07:28:45Z")

</div>

Hello Peter, I am also a new Robotstudio user, and I am trying to performe the same thing as you, simulate a Siemens PLC (I have the real PLC) together with robotstudio.  
So far I found out in previous discussions an OPC smart component that should help doing it, but so far I didn’t manage to make it work.  
If you find a solution, please share it in here and I will do the same.  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Pavel\_Riabichev](https://avatars.discourse-cdn.com/v4/letter/p/8e7dd6/32.png) [@Pavel\_Riabichev](https://tech-community.robotics.abb.com/u/Pavel_Riabichev)\
**Post date:** [January 12, 2016, 7:36am UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/5 "2016-01-12T07:36:14Z")

</div>

Hello DantasR

Your PLC can only communicate with the virtual controller through OPC, further you can connect I/Os from v.controller to SmartComponents. I don’t think you connect a PLC signal directly to a SmartComponents.

/Pavel

---

<div class="post-metadata">

**Author:** ![DantasR](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@DantasR](https://tech-community.robotics.abb.com/u/DantasR)\
**Post date:** [January 12, 2016, 1:17pm UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/6 "2016-01-12T13:17:23Z")

</div>

Hello Pavel,  
Yes, that’s right, I was not really clear before.  
I installed also the IRC5 OPC server you posted above, which I used to communicate with the OPC smart component, and now I got communication between both. I was facing a problem before because the OPC smart component I found here in the forum was actually developed for an older version of Robostudio.  
Thanks!

---

<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:** [December 8, 2016, 9:32am UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/7 "2016-12-08T09:32:11Z")

</div>

Hello,  
For information, I’ve developed a smart component able to connect RS to PLC (Real or PLCSim) by Profinet using Snap7 library.  
This code is open:

> **[GitHub - DenisFR/RSConnectDIOToSnap7: RobotStudio Smart Component to connect to SIEMENS...](https://github.com/DenisFR/RSConnectDIOToSnap7)**
>
> RobotStudio Smart Component to connect to SIEMENS PLC using Snap7 library.

> **[GitHub - DenisFR/RSConnectGIOToSnap7: RobotStudio Smart Component to connect GI/GO to...](https://github.com/DenisFR/RSConnectGIOToSnap7)**
>
> RobotStudio Smart Component to connect GI/GO to SIEMENS PLC using Snap7 library.

---

<div class="post-metadata">

**Author:** ![Pavel\_Riabichev](https://avatars.discourse-cdn.com/v4/letter/p/8e7dd6/32.png) [@Pavel\_Riabichev](https://tech-community.robotics.abb.com/u/Pavel_Riabichev)\
**Post date:** [December 8, 2016, 10:48am UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/8 "2016-12-08T10:48:35Z")

</div>

Hello Denis  
You should upload it to RobotApps  
[https://robotapps.robotstudio.com/](https://robotapps.robotstudio.com/)  
/Pavel

---

<div class="post-metadata">

**Author:** ![Dnnsdgrt](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Dnnsdgrt](https://tech-community.robotics.abb.com/u/Dnnsdgrt)\
**Post date:** [April 13, 2017, 1:54pm UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/9 "2017-04-13T13:54:28Z")

</div>

Hello,  
I am currently trying to create a system which consists of a virtual PLC(TIA Portal, PLCsim), a virtual robot controller and the 3D models(RobotStudio).  
I have used NetToPLCsim to create a connection between the smart component(RSConnectDIOToSnap7) and PLCsim. when i press connect, the smart componented says it’s connected and it stays connected during the simulation of my rapid program. but when i try to add a DI or a DO and then run the simulation i disconnects immediately saying:  
WW: RSConnectDIOToSnap7 error: ISO : Invalid PDU received

Perhaps i’m entering the wrong synstax for the address?

---

<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:** [April 13, 2018, 10:01am UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/10 "2018-04-13T10:01:42Z")

</div>

Hi!

We have tried to use the “RSConnectGIOToSnap7” as connection between Robotstudio and Siemens PLC Sim Advanced. The connection is working without problem but the simulation gets really slow. Is there a solution for the slow simulation?

/Erik

---

<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:** [May 22, 2018, 9:36am UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/11 "2018-05-22T09:36:02Z")

</div>

Hello,  
@@Dnnsdgrt: RSConnectXIOToSnap7 use Snap7 to connect PLC.  
You can search in internet for this error.  
I found this one:

> **[Snap7 / Discussion /
  General Discussion: Moka7 / Read DB](https://sourceforge.net/p/snap7/discussion/general/thread/6e232d36/)**

Where they wrote:

Particularly to access a DB in S71500 some additional setting plc-side are needed.

1. Only global DBs can be accessed.
2. The optimized block access must be turned off.
3. The access level must be “full” and the “connection mechanism” must allow GET/PUT.

Else, I know that I check address with german typo (A & E). I’ll change it when I’ve got time.

@@ErikHagman: At each OnSimulationStep the SmartComponent read data in same thread. This is not multi threaded. I don’t know how to do that.

---

<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:** [May 22, 2018, 10:12am UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/12 "2018-05-22T10:12:36Z")

</div>

it seems one of the reasons we had that the simulation run slow was that we communicated with the PLC over VPN. Without VPN the simulation runned smother.  
/Erik

---

<div class="post-metadata">

**Author:** ![MrRoboto84](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@MrRoboto84](https://tech-community.robotics.abb.com/u/MrRoboto84)\
**Post date:** [July 1, 2019, 8:36am UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/13 "2019-07-01T08:36:12Z")

</div>

Hey Everyone. I am using RSConnectGIOtoSnap7 to make a communication between Robotstudio and PLC. Is it possible so send numbers higher then a byte (higher then 256) to the PLC. I am not able to read a number higher then 256 or negative numbers. Otherwise if it is not possible, is there a function in Rapid to cut a number into bytes?  
Thanks in advanced.

---

<div class="post-metadata">

**Author:** ![Paba](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@Paba](https://tech-community.robotics.abb.com/u/Paba)\
**Post date:** [July 1, 2019, 12:31pm UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/14 "2019-07-01T12:31:41Z")

</div>

I think you have to convert your number into binary signals and then send an array of boolean? but idk if there’s a function in RAPID to get it easily done..

I’ve another question by the way, is it (now) possible to connect virtual irc5 and real plc (s7-1500) by PN without using OPC or smart components?  
seems like conifguring the ProfiNet with station name, ip and I/O’s isn’t enough..

---

<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:** [July 5, 2019, 2:22pm UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/15 "2019-07-05T14:22:09Z")

</div>

@MrRoboto84 : You have to split your GO to byte then connect them to smart component.  
Values are unsigned integers, so you can add positive values to data exchanged, like 32678 if 16bits values.

---

<div class="post-metadata">

**Author:** ![MrRoboto84](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@MrRoboto84](https://tech-community.robotics.abb.com/u/MrRoboto84)\
**Post date:** [July 9, 2019, 7:49am UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/16 "2019-07-09T07:49:08Z")

</div>

> [@DenisFR](#):
>
> @MrRoboto84 : You have to split your GO to byte then connect them to smart component.  
> Values are unsigned integers, so you can add positive values to data exchanged, like 32678 if 16bits values.

Ok thank you.

What I am doining now is to add a 32bit AO to the robot control for example to bit 0-31. Then I add 4 8bit GO that are only readable to the same 32bit array, GO1 (bit 0-7) GO2 (bit 8-15) etc. .Than I connect the bytes to the RSConnect SmartComponent. When I set the AO to a negative number it is also interpretet as a negative number by the PLC.  
So it is a bit of work, but it works fine.

---

<div class="post-metadata">

**Author:** ![MrRoboto84](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@MrRoboto84](https://tech-community.robotics.abb.com/u/MrRoboto84)\
**Post date:** [July 16, 2019, 2:03pm UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/17 "2019-07-16T14:03:48Z")

</div>

@DenisFR : I have a further question. Is there a fast way to do my mapping from the RSConnect Component to my Robot controller in Robotstudio? Right now I have 80 DI and 80 DO on my Robot controller. On my PLC these Outputs and Inputs are in diffrent adress sections. So I need to go to Signals and Bindings. Source Objekt: Robot Controller

, than search for the signal (signals are not in Order by name). Target object: RSConnect, and than compare the Input name with my PLC Adress (For example PLC Adress is I1.4 but in the RSConnect it is DO\_25 ).

Is it possible to do this mapping in a diffrent way like using a .cfg file or something else?  
Thank you for your help.

---

<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:** [July 16, 2019, 3:46pm UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/18 "2019-07-16T15:46:02Z")

</div>

Hello,  
For the moment, now.  
But this is a good improvement.  
I’ll see to add this when I’ve got time…  
Or you can make a pull request. 😉

---

<div class="post-metadata">

**Author:** ![MrRoboto84](https://avatars.discourse-cdn.com/v4/letter/m/bbe5ce/32.png) [@MrRoboto84](https://tech-community.robotics.abb.com/u/MrRoboto84)\
**Post date:** [July 17, 2019, 12:02pm UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/19 "2019-07-17T12:02:51Z")

</div>

> [@DenisFR](#):
>
> Hello,  
> For the moment, now.  
> But this is a good improvement.  
> I’ll see to add this when I’ve got time…  
> Or you can make a pull request. 😉

Thanks Denis.  
Another short question. I have problems using the RSConnectDIO with more than 20 DI Numbers (Number of DO doesent matter). I get the message “WW: RSConnectDIOToSnap7 error: CLI : invalid param(s) supplied”  
Is that right, that more than 20 DI is not possible? To do a work around is it possible to load more than one RSConnectDIO to my Station logic?  
Thank you

---

<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:** [July 17, 2019, 4:56pm UTC](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921/20 "2019-07-17T16:56:14Z")

</div>

Hello,  
Yes, because I use S7MultiVar from sharp7 and as said in this discussion:  
[https://sourceforge.net/p/snap7/discussion/general/thread/b03f3bf4/?limit=25](https://sourceforge.net/p/snap7/discussion/general/thread/b03f3bf4/?limit=25)

It is limited at 20 variables.  
I should add a limit at the Smart Component’s Property.  
You can add an other RSConnectDIO to make it works.

[Next page](https://tech-community.robotics.abb.com/t/plc-robotstudio-simulation/6921.md?page=2)
