DRAFT - Good Programming Practice Examples and Exception Handling

Modified on Sun, 11 May, 2025 at 10:34 PM

Introduction
This article highlights several recommended programming practices to increase the quality and reliablitiy of your machine operation. A collection of examples is provided that demonstrate error and alarm handling as well as other conditions that can be problematic during machine runtime. THE EXAMPLES PROVIDED..."DISCLAIMER"
 
Exception handling is the process of responding to abnormal or exceptional events that may occur during normal operation. This article provides examples and detail for some common exception handling conditions listed below.
- FINS command errors
- Auxiliary Relay Flags
- Abrupt Serial Cable Disconnection
- Divide by Zero
- Abrupt Power Loss
- Excessive Scan Time
 
 
Fatal and Non-Fatal Alarm Conditions
 
Detail here
 
 
Hard-Coding Values
 
Detail Here
 
 
 
 
 
Examples
 
FINS Command Errors
 
Detail here
 
 
Auxiliary Relay Flags
 
Detail here
 
 
Abrupt Serial Communication Disconnection and Other Communication Timeouts
 
Detail here
 
 
Divide by Zero
 
Detail here
 
 
Abrupt Power Loss
*When using power supply with low voltage detection
 
 
Excessive Scan Time
 
Detail here
 
 
 
 
 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article