Hi. Your image is not great quality. Can you post the logs as text?
Additionally, you pasted the function code without putting it inside of a code block (see canned info below). I've tried editing your post but your function code is pretty much messed up due to not having it in a code block in the first place. Can you correct that?
Next, can you tell us what type of PLC make & model?
Other information that may be useful would be the node.js version you're running on?
canned info
In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote ```)
```
code goes here
```
You can edit and correct your post by clicking the pencil
icon.
See this post for more details - How to share code or flow json