Gateway version 8.1.14
So I have a situation where I’ve tried a lot and gotten no where with any of it. We have a winder system that currently uses a “home brew” program that communicates to a Mitsubishi “A2AScpu” through a “A1sj71uc24-r2” (serial card documentation). Originally I thought it would be as simple as splitting the COM port, listening to the data, and interpreting it to build a replacement vision application. My first issue came with splitting the COM port using this splitter program I found online. Even after installing and going through the steps of virtually splitting the COM port, I kept getting a “unable to open COM port” error. So backing up from there, I closed the application bound to my COM port, and rewrote ignition to bind to it. Voila, I know longer got that error, however I started getting a timeout error for the COM port being able to read any data. It’s probably something simple like writing a AT command and listening for data to come back, but serial communications is something pretty far out of my wheel house. Most of my experience with RS232 has been converting it over to be ethernet in some form or another. My python code is as follows. I have went through different iterations on the “with” statement, even going so far as to define every setting to be identical with what the homebrew program is using, but I’d still get the timeout error.
with system.serial.port(port = "COM1") as port:
txt=port.readBytes(10)
event.source.parent.getComponent('Text Area').text=str(txt)