Ask our Experts
Didn't find what you are looking for? Ask our experts!
Dear Community Members, We are currently experiencing a technical issue that is affecting the ability to create new posts. Our team is actively investigating the root cause and working to resolve it as quickly as possible. We apologize for the inconvenience and appreciate your patience. SE Community Team!
This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.
Search in
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-03-04 11:02 PM . Last Modified: 2024-03-04 11:05 PM
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)
3 - Download and install ModRsSim2 https://sourceforge.net/projects/modrssim2/
4 - Under "Communication Fault Simulation" enable all options.
5 - Let it run for 10 min
6 - Monitor the errors on each READ_VAR
After getting "stuck" every new read attempt on any READ_VAR (EXECUTE to 1) fails (ERROR to 1) with the following error codes:
CommError: 255
OperError: 6
Is there any limitation or known issue on the serial port SL (READ_VAR communication block)?
Link copied. Please paste this link to share this article on your social media post.
You’ve reached the end of your document
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.