This is my first time on this forum and I'm new to the world of codesys.
I am currently working on a project which uses RS-422 protocol. The plan is to read the data off of the
RS-422 protocol and manipulate the live data.
I am having trouble with dealing with live data. There is data coming through and put into a buffer and it is observed on a STRING output.
I would like help/advice on whether it is possible to detect a start bit and an end bit? If this is possible, then how can I pick out certain packages and store them in different buffers?
Thank you for reading post, I hope I can get a solution soon.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Stop bit / Parity bit are only used by hardware and not read into the STRING.
You need to find a patern (for example, start byte is always x or has x bit set?) and create a counter that is reset on each match
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone,
This is my first time on this forum and I'm new to the world of codesys.
I am currently working on a project which uses RS-422 protocol. The plan is to read the data off of the
RS-422 protocol and manipulate the live data.
I am having trouble with dealing with live data. There is data coming through and put into a buffer and it is observed on a STRING output.
I would like help/advice on whether it is possible to detect a start bit and an end bit? If this is possible, then how can I pick out certain packages and store them in different buffers?
Thank you for reading post, I hope I can get a solution soon.
Which protocol do you use?
packages are usually separated by a pause or a special character.
Hello,
It is an RS-422 protocol which consists of
- 3 consecutive bytes in a sub-frame/package.
- baud 9600
- odd parity
- 1 stop bit
This data is coming in as Ascii characters.
The Stop bit / Parity bit are only used by hardware and not read into the STRING.
You need to find a patern (for example, start byte is always x or has x bit set?) and create a counter that is reset on each match