# UART Rx scripting

**URL:** https://forum.qoitech.com/t/uart-rx-scripting/132
**Category:** Support
**Created:** [February 15, 2018, 1:50am UTC](https://forum.qoitech.com/t/uart-rx-scripting/132 "2018-02-15T01:50:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jaredfinch](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jaredfinch](https://forum.qoitech.com/u/jaredfinch)
#### Post date: [February 15, 2018, 1:50am UTC](https://forum.qoitech.com/t/uart-rx-scripting/132/1 "2018-02-15T01:50:47Z")

</div>

I got one of our firmware engineers to output some values from our product via the UART and these are coming through in the Arc UART window approximately every 30 seconds (but not exactly, or consistently)  
I’m running the unit at varying voltages and recording the waveforms for post-processing, however what I want to do is to also record the timestamp and log messages into a file for each of the test sequences.

My lua script is essentially:

setup device  
setup project  
setup variables and channels

set the supply voltage  
record 2min (via msleep function) \<- want to record the UART in here…  
export results to some files  
adjust setpoint  
repeat

How would I accomplish this?

Jared (HW guy attempting some software)

---

<div class="post-metadata">

### Author: ![bjorn.rosqvist](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.qoitech.com/bjorn.rosqvist/32/238_2.png) [@bjorn.rosqvist](https://forum.qoitech.com/u/bjorn.rosqvist)
#### Post date: [February 15, 2018, 10:07am UTC](https://forum.qoitech.com/t/uart-rx-scripting/132/2 "2018-02-15T10:07:13Z")

</div>

Hi Jared,

I am also a HW guy attempting software.  
When I wrote an example script for you, then we discovered a bug in UART logging.  
We will correct this and send you a private build as soon as it is ready.

Best regards,  
Björn

---

<div class="post-metadata">

### Author: ![chrfle](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.qoitech.com/chrfle/32/288_2.png) [@chrfle](https://forum.qoitech.com/u/chrfle)
#### Post date: [February 19, 2018, 8:00am UTC](https://forum.qoitech.com/t/uart-rx-scripting/132/3 "2018-02-19T08:00:33Z")

</div>

Hi Jared

We got the things prepared for you. Please create a [case](https://customer.qoitech.com/my/cases) where we can attach the binaries and scripts to you.

---

<div class="post-metadata">

### Author: ![jaredfinch](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jaredfinch](https://forum.qoitech.com/u/jaredfinch)
#### Post date: [February 19, 2018, 7:24pm UTC](https://forum.qoitech.com/t/uart-rx-scripting/132/4 "2018-02-19T19:24:25Z")

</div>

![](https://europe1.discourse-cdn.com/flex017/uploads/qoitech/original/1X/a7a8c956036fc98abc2f4c980b2329ff84744a80.png)

This didn’t work - please email these files through to jared.finch at vigilmonitoring dot com

---

<div class="post-metadata">

### Author: ![jaredfinch](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@jaredfinch](https://forum.qoitech.com/u/jaredfinch)
#### Post date: [February 27, 2018, 1:56am UTC](https://forum.qoitech.com/t/uart-rx-scripting/132/5 "2018-02-27T01:56:43Z")

</div>

The example code, and specific SW and FW builds work as needed, and the case-system is all fixed.  
Great support guys!
