How to Create a Custom Retentive Timer Function Block in ISaGRAF6

Question:

Hello, I am currently using ISaGRAF6 with a customized PLC that we manufacture. While ISaGRAF6 does feature a Retentive Timer, I've encountered a glitch with the function block that is preventing it from functioning properly and retaining the required values. I am exploring the option of creating my own function block to replace this, but I am facing challenges in understanding how to retain the value when the input command transitions from FALSE to TRUE again. Are there any samples available for creating the required logic for a Retentive Timer? I typically utilize FBD as my programming language.

Top Replies

The Allen Bradley Logix instruction set manual (1756-rm001...) includes a flowchart for the TON timer. By resetting the .EN bit before the TON instruction on each scan cycle when the timer should not be running, and ensuring the input rung to the TON is always true, the TON logic transforms into a retentive timer. This transformation is depicted in the flowchart provided in the manual.

Hey there, it's a bit tricky, isn't it? I've run into similar problems with ISaGRAF6 in the past. You could try using a rising edge detector in conjunction with your own timer function block. When you detect a transition from FALSE to TRUE, you know you've just started your timer and you can store the current time into a variable. That variable will retain the value even if it transitions back to FALSE. So, the next time the transition happens again, you would compare the current time with the stored time. This would allow your timer to continue from where it left off rather than resetting. Try googling for some FBD samples of rising edge detectors or retentive timers, I'm sure you'll find some useful examples. Best of luck!

That certainly sounds like a tricky issue you're grappling with. Dealing with the transition of a Retentive Timer from FALSE to TRUE can definitely be challenging. In my experience, to retain the value during this transition, you might consider introducing a latch logic element in your custom function block. This latch could monitor the main command's state and prevent the timer from resetting when the input command transitions back to TRUE. As for sample codes, I would recommend checking online PLC forums and perhaps even ISaGRAF's own documentation as they often provide specific coding examples. Furthermore, don't forget to perform thorough testing once your code is ready since there can always be unexpected failures. Wish you luck with your project!

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: FAQs:

Answer: 1. What is the issue with the Retentive Timer function block in ISaGRAF6 that is causing it to malfunction? - The glitch with the Retentive Timer function block in ISaGRAF6 is preventing it from properly retaining the required values.

FAQ: 2. How can I create a custom Retentive Timer function block in ISaGRAF6?

Answer: - To create a custom Retentive Timer function block in ISaGRAF6, you need to understand the logic required for retaining the value when the input command transitions from FALSE to TRUE again.

FAQ: 3. Are there any samples or examples available for creating a custom Retentive Timer function block in ISaGRAF6?

Answer: - It may be helpful to look for samples or examples that demonstrate the required logic for a Retentive Timer in ISaGRAF6, especially if you typically use FBD as your programming language.

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  â†’