(0)| 6/9/2023 11:33 AM | |
|
Joined: 3/17/2020 Last visit: 1/23/2025 Posts: 7 Rating:
|
Hi I am developing an application on the S7-1214, it serves as a gateway between a packaging machine sending data over RS232 and a continuous inkjet printer (CIJ) with LAN interface, the PLC essentially reads from serial, replies with checksum, format the useful data into a TCP frame, and send it to the printer. The purpose is to replace the old printer with old interface with a newer one with LAN interface. I am using for that, for testing purposes, a CM1241, half duplex RS485, wired with an Arduino with RS485 interface. The Arduino is used to send equally timely spaced frames over RS485 (using a timer cyclic interrupt), and HERCULE software to read TCP packets from the S71214 CPU. The problem is that the PLC GRAFCET gets stuck with a non repeatable scenario, specifically the RCV_PTP instruction, which hangs with a 16#0095 at the STATUS output. In the Help, it says: 16#0095 => Receipt of messages was terminated as a result of a timeout. What reactions should I do to overcome this situation ? I think that a strongly reliable application should implement suitable reactions to every situation on the STATUS output. The only solution I see nowadays is to implement a "software watchdog", if the GRAFCET hangs for a timeout, the CPU resets itself, but this comes with the disadvantage of loosing some non printed goods in the line, which is non acceptable. Note: The packaging machine outputs bottles at a rate of 17400 bottles/min => 204ms between two consecutive bottles. => The reaction needs to be so fast to not loose any bottle. Any hints, tips ... I left attached my code and the GRAFCET so you can investigate if I have any error, Thanks.
AttachmentPLC RS232_TO_LAN_Gateway_With_GRAFCET.zip (576 Downloads) |
Follow us on