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.
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.
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: - The current program triggers sensor calibration for 7 seconds each time the "assistance level" (AL) setting is adjusted on the HMI.
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.
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.
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.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.