Optimizing Sensor Calibration Triggering Based on Assistance Level Adjustments in PLC Program

Question:

I have developed a program that automatically calibrates the sensor for 7 seconds whenever a specific setting, known as the "assistance level" (AL), is adjusted on the HMI. At the moment, a scan is initiated each time the AL setpoint setting is modified by pressing the HMI buttons. However, I am looking to optimize the process and only trigger the scan when the AL is changed to either 5 or within the range of 6-10. This adjustment is necessary as the sensor remains stable between AL settings 6-10. For instance, transitioning from AL 5 to AL 10 should prompt a scan, whereas switching from AL 10 to 6 does not require a rescan. However, a rescan should be triggered if the change is from AL 6 to AL 5. I have included my current code for reference. To achieve this, I need assistance in updating the "AssistLevelChange" variable to specifically prompt a rescan in the mentioned scenarios.

Top Replies

I believe I have finally solved the problem by identifying a simple variable mix-up as the root cause.

The additional method for initiating a scan is not currently displayed.

Thank you for your input. The AL setpoint ranges from 0 to 10, but for the sensor scans, I am focusing on when AL falls between 5 and 10. I could have used an "if AL GE 6-10" function block for brevity. I appreciate your method for tracking the rescan thresholds using memory bits. When AL changes, the MinTimer restarts, triggering my scan logic.

While your current setup is pretty efficient, I see what you are trying to achieve with the tweaks. Yes, there's no need to run the calibration process unnecessarily between AL settings 6-10. To implement this, you could update your "AssistLevelChange" variable to only trigger the scan when moving to or from the AL 5 threshold, regardless of direction. At the same time, you could include boolean logic to check if the new AL setting falls within the 6-10 range. This approach should optimize your system as required and I'd be happy to assist further or review any changes you've made to the code based on this suggestion.

Your approach to optimizing the sensor calibration sounds solid! You might consider adding a simple conditional statement in your `AssistLevelChange` function that checks the previous and current values of the AL setting. For instance, you can compare the new value against the defined thresholds (5 and the range of 6-10) to determine if the rescan should proceed. This way, you prevent unnecessary scans while ensuring the sensor is only calibrated when it truly matters. If you'd like, I can help you refine that piece of code!

It sounds like you're on the right track with your calibration logic! To implement the changes you described, you could add a conditional check in your existing code to compare the previous and current values of the assistance level. Something like: if the new AL is 5 or in the range of 6-10, and the previous AL was outside that range, trigger the rescan. This way, you're ensuring that the scan only runs when necessary, optimizing your sensor's performance while reducing unnecessary recalibrations. I’d love to see the code you’re working with to help refine your logic further!

More Replies β†’

Streamline Your Asset Management
See How Oxmaint Works!!

βœ…   Work Order Management

βœ…   Asset Tracking

βœ…   Preventive Maintenance

βœ…   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: 1. How does the current program trigger sensor calibration based on the assistance level adjustments?

Answer: - The current program triggers sensor calibration for 7 seconds each time the "assistance level" (AL) setting is adjusted on the HMI.

FAQ: 2. What optimization is the user seeking in the sensor calibration triggering process?

Answer: - The user is looking to optimize the process by triggering the sensor scan only when the AL is changed to either 5 or within the range of 6-10.

FAQ: 3. Why is it necessary to adjust the triggering of the sensor scan based on the assistance level settings?

Answer: - It is necessary because the sensor remains stable between AL settings 6-10, and a rescan is only required when transitioning from AL 5 to AL 10 or from AL 6 to AL 5.

FAQ: 4. How can the user update the program to prompt a rescan in the specified scenarios?

Answer: - The user needs to update the "AssistLevelChange" variable in the code to specifically prompt a rescan when transitioning between AL settings as mentioned in the scenarios.

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  β†’