# system.serial.readUntil() args error

**URL:** <https://forum.inductiveautomation.com/t/system-serial-readuntil-args-error/37763>\
**Category:** Ignition\
**Tags:** ignition79, scripting\
**Created:** [August 15, 2020, 6:29pm UTC](https://forum.inductiveautomation.com/t/system-serial-readuntil-args-error/37763 "2020-08-15T18:29:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sathianandan.dharmas](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sathianandan.dharmas](https://forum.inductiveautomation.com/u/sathianandan.dharmas)\
**Post date:** [August 15, 2020, 6:29pm UTC](https://forum.inductiveautomation.com/t/system-serial-readuntil-args-error/37763/1 "2020-08-15T18:29:22Z")

</div>

Hi All  
I’m trying to read from a virtual serial port and parse that data for my application. This is my first time using the system.serial functions and I’m having a hard time having the correct syntax. I can configure and open serial port without any issue. I want to extract the data from the data packet which looks similar to this:  
&&  
data  
!!

This is the code that I’m using:

system.serial.openSerialPort(“COM9”)  
port = ‘COM9’  
char = ‘!!’  
delimiter = chr(char)  
timeout = 10000  
includeDelimiter = 0

event.source.parent.getComponent(‘Text Field’).text = system.serial.readUntil(port, delimiter, includeDelimiter, timeout)

I wan to keep the port open and read from it continuously so I chose .readUntil() over .readLine(). I get this ‘can’t coerce to int’ and ‘can’t coerce to char’ from the delimiter line.
