# Serial communication

**URL:** <https://tech-community.robotics.abb.com/t/serial-communication/6381>\
**Category:** RobotStudio\
**Created:** [November 18, 2014, 8:07am UTC](https://tech-community.robotics.abb.com/t/serial-communication/6381 "2014-11-18T08:07:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonny1337](https://avatars.discourse-cdn.com/v4/letter/j/c4cdca/32.png) [@jonny1337](https://tech-community.robotics.abb.com/u/jonny1337)\
**Post date:** [November 18, 2014, 8:07am UTC](https://tech-community.robotics.abb.com/t/serial-communication/6381/1 "2014-11-18T08:07:21Z")

</div>

Hi!  
I´m having a problem when opening an com port in robotstudio and cant figure out what im doing wrong.  
What I´m trying to achive is to send information from a vision program and everything is working except the communication

I´m trying to open COM1 whit the following code:

VAR iodev channel;

VAR num out\_buffer{20};  
VAR num input;  
VAR robtarget target;  
Open “COM1:”, channel\Bin;

Close channel;

The error code I got is an file open error but i don’t want to open a file, i want to open COM1

Please help me with what I´m doing wrong.

---

<div class="post-metadata">

**Author:** ![PerSvensson](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/persvensson/32/1040_2.png) [@PerSvensson](https://tech-community.robotics.abb.com/u/PerSvensson)\
**Post date:** [November 18, 2014, 5:27pm UTC](https://tech-community.robotics.abb.com/t/serial-communication/6381/2 "2014-11-18T17:27:34Z")

</div>

The com port is the com port on the controller and not on the pc (never tried it but don’t think it’s possible if you aren’t on a real controller. And a better solution if possible would be using socket communication over ethernet. Have done that myself against a vision system
