Hello everyone, I am currently developing an AOI and I am encountering an issue where the ONS function within the logic is not behaving as expected. Despite the rung being false, the ONS remains stuck on. I have experimented with different variations and even tried using an OSR instruction, but to no avail. Are there any recommended best practices or considerations to keep in mind when utilizing the ONS function within an AOI? Thank you in advance for your assistance. - TJ
Want to capture a screenshot? Wondering if the data is being saved somewhere else?
TJMC inquired about the best practices and considerations when implementing Output Next Scan (ONS) within an Add-On Instruction (AOI). It's important to note that the storage bit should be dedicated solely for that specific one-shot operation. This bit is typically sourced from storage associated with each instance or instantiation of the AOI, such as in a User Defined Type (UDT).
If your Area of Interest (AOI) is conditionally executed, it may be necessary to reset it using an EnableInFalse routine. This strategy can help optimize the performance of your system and ensure that your AOI functions correctly when certain conditions are met.
When programming your AOI conditionally, don't forget to reset them using an EnableInFalse routine if needed. It's a common mistake for beginners to overlook the logic needed to handle AOIs when they are false. Many people incorrectly assume that bits will simply turn off and timers will reset automatically. Remember to include logic for both true and false conditions to ensure your AOIs function correctly.
If you are encountering issues with your ONS bit tag, it is important to consider whether it is declared locally within the AOI or in the global processor database. The location of the tag can impact its functionality. It is crucial to understand that the ONS functions as a subroutine, with the tag storing the function's status. When working with an AOI, remember to pass parameters in and out of the AOI. Each time the AOI is executed, the same code is run, using different parameter values. The parameters are buffered within the AOI, and this buffered data is utilized within the code. If the program executes with a false parameter controlling the ONS, the program will read it as false and clear the ONS status tag. However, in the next scan, the parameter may be set differently, causing the ONS output to toggle on and off during execution. To avoid issues, always link input parameters to defined tags in the tag database. By doing so, you can prevent strange problems that may arise from writing directly to an input parameter. If you encounter difficulties, seek assistance to resolve the issue efficiently.
Hey TJ, it sounds like you've got a bit of a puzzle there! From my experience, it's really important to ensure that your ONS function is in parallel with a rest condition within your logic. If it's not, the ONS will remain set causing it to be stuck in its ON position. Secondly, ONS is only designed to act once per PLC cycle; it's best to understand that the entire logic rung isn’t executed for every scan but only when the leading edge of the input goes from OFF to ON. Consequently, a change in the input still doesn’t automatically help if the rest of the rung isn’t ready to deal with it. If the issue persists, try tracing your ladder logic coding for any interferences. Best of luck with your AOI development!
Hey TJ, by the sounds of it, the issue could be with the latch that keeps the ONS enabled, even when the rung is not true. The ONS instruction will only execute once, and will not reset until the Enable in (EN) has made a transition from false to true. Try to ensure that the conditions for your ONS instruction are completely false before they turn true again. Also, remember to consider the scan cycle of your PLC, as the ONS will only detect on the first scan that the rung goes true. Hope this helps.
Hi TJ, make sure you're using a unique ONS for each "event" you want to track. The ONS instruction is designed to be used in a ladder rung that will be evaluated only once during each series of the event that you're tracking. It seals itself in and holds its condition until its input condition goes into a non-true state and back into a true state. If you're using the same ONS instruction in multiple places in your program, you might accidentally be resetting the ONS in a different part of the program. Also, remember an ONS requires a "falling edge" (false to true transition) to reset, so if the rung stays false, it won't reset. Consider your logic flows and see if an OTL/OTU might serve better.
Hi TJ! It could be that your ONS is not getting a chance to reset. Remember, the ONS instruction needs to see the input condition transition from a non-true to true state to become unlatched. Otherwise, it will continue to output true. If your ONS instruction is never seeing a false condition before it goes true again, it will just stay latched. Try resetting the enabling input condition of your ONS to false somewhere in your ladder logic and see if that helps. It might not be the most ideal solution, but it could potentially solve your issue until you find a more efficient method. Good luck with your AOI development!
✅ 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: Answer: This issue may be caused by a few factors such as incorrect logic conditions or conflicts with other instructions in the program. Double-check your logic and ensure there are no unintended paths keeping the ONS on.
Answer: Answer: When using the ONS function within an AOI, it is recommended to carefully review the logic structure to avoid conflicts and ensure proper functionality. Testing different variations and considering alternative methods like using an OSR instruction can help troubleshoot issues.
Answer: Answer: When troubleshooting the ONS function, make sure to verify the rung conditions, check for any conflicting instructions, and test different approaches to resolve the issue. Consulting the RSLogix 5000 documentation for specific guidelines on using the ONS function can also be helpful.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.