# Reading from serial port

**URL:** <https://forum.inductiveautomation.com/t/reading-from-serial-port/44861>\
**Category:** Ignition\
**Created:** [March 24, 2021, 3:30pm UTC](https://forum.inductiveautomation.com/t/reading-from-serial-port/44861 "2021-03-24T15:30:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anastasia.blinova](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@anastasia.blinova](https://forum.inductiveautomation.com/u/anastasia.blinova)\
**Post date:** [March 24, 2021, 3:30pm UTC](https://forum.inductiveautomation.com/t/reading-from-serial-port/44861/1 "2021-03-24T15:30:22Z")

</div>

I am currently reading from serial port. My code is still rough and in script console, but generally does:

```auto
with system.serial.port ("COM1", bitRate=system.serial.BIT_RATE_115200) as port:
	line = port.readLine(1000)
	print line
	print('-------------')
	line_bytes = port.readBytes(30, 1000)
	print line_bytes

```

However just to read and print twice, the code will take about 10 minutes to execute.  
Is this a typical time? Is there anything I could do to speed up reading from a port?
