This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send InviteCancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-03-0411:02 PM. Last Modified: 2024-03-0411:05 PM
M221 serial line stuck (stress test)
As part of the pre-commissioning testing, we validate ladder logic against different scenarios, one of them is related to testing the serial line adding noise, parity errors, drop of frames, insert/remove out extra characters to the frame, ignore requests, delay responses.
PLC/Ladder is properly able to handle the scenario when requests are ignored (sensor disconnected) and when the response is delayed. But when we test introducing parity errors (CRC) or any other simulation that actually corrupts the frame, after some time (5 min to 10 min) the READ_VAR blocks get stuck and the only way to properly get the communication back is to restart the PLC.
(Check attachments)
Image 1: Test using PLC connected to a Rs485 to USB adapter and using a simulator (ModRSim2 OpenSource)
Serial devices:
(Check attachments)
Image 2: List of READ_VARs
Comm port settings:
Image 3: (Check attachments)
How to replicate the issue:
1 - Setup the environment similarly to image 1.
2 - Configure the READ_VARs as in image 2.
3 - Add the READ_VARs on the ladder, sequentially after one finishes trigger the next. DONE or ERROR triggers EXECUTE of the next. (in our case we have a counter adding a small delay between each READ_VAR)