Detecting and Retaining Absolute Encoder Data in ControlLogix During Shutdown

Question:

Hello, I am looking for a solution in ControlLogix to detect when the processor is shutting down. Is there a method to save a bit or value in a tag before the shutdown process? Is there a specific flag or fault code that can be utilized for this purpose? My goal is to retain the count values from an absolute encoder in a DINT tag, specifically in a Powerflex system where the encoder loses its position during power down. By saving this information, I can use it as a reference point during the next power-up cycle. Thank you.

Top Replies

I am curious if it is possible to implement an event task that activates when the processor experiences a power loss but remains operational. This could occur in situations like a minor controller malfunction or when the device briefly switches to battery power before completely powering off. While I am unsure of the specific circumstances, I believe this would be worth exploring.

Save the encoder value in a register during each scan. If the scan time is lengthy, establish a new routine with a 2ms execution time. By doing this, when the PLC loses power, the last encoder position is retained. Keep in mind that there may be slight discrepancies if the encoder has a high level of inertia. Upon restarting the PLC, utilize the first scan bit to transfer the register information to a designated location. One potential issue to consider is the possibility of maintenance moving the shaft connected to the encoder while the PLC is powered down. These are important considerations to keep in mind for optimal system performance and accuracy.

James Mcquade suggests regularly writing the encoder value to a register during each scan period. For longer scan times, consider implementing a new routine with a 2ms execution time. This approach ensures that the last encoder position is saved when the programmable logic controller (PLC) powers down, although there may be slight discrepancies if the encoder has significant inertia. Upon rebooting the PLC, utilize the first scan bit to transfer the register information to a designated location. One drawback to this method is the potential for misalignment if maintenance personnel move the connected shaft while the PLC is offline. In the event of manual adjustment, be sure to jog to a Home position and update the value accordingly to maintain accuracy. Fortunately, the machine automatically de-energizes when the motor stops, mitigating inertia issues. I will test the 2ms solution to address these concerns effectively.

VulcPAC discussed the importance of capturing count values from an absolute encoder in a DINT tag. It's crucial to determine whether the encoder is truly absolute or if it functions as an incremental encoder that needs to be homed after a power cycle. This distinction is key in accurately tracking and recording encoder values.

Joseph_e2 questioned the necessity of capturing the value of an absolute encoder. Could it actually be an incremental encoder that requires homing after a power cycle? The routine in the PLC handling the logic of the absolute encoder may be complex and challenging to modify, as it operates with specific values such as position, offset, home, and final position. Therefore, it needs to be referenced again after power up. It's not the encoder itself, but rather the auxiliary values linked to it that require referencing. Regards.

Hey there! You might want to consider using a non-volatile tag, it's designed primarily for the purpose of retaining values during power-down cycles. For the actual detection of shutdown, I would advise making use of the System Overhead Time Slice bit (S:2/14). If you see it set to 1, it's an indication that the processor is in the process of shutting down. Before this occurs, you could write a simple routine to save your encoder values into your non-volatile tag. When the power comes back on, you can then retrieve these saved values from the non-volatile tag. Remember to thoroughly test this setup before deploying it to ensure everything works as expected. Hope this helps!

Hey there, it sounds like what you need is to leverage the nonvolatile memory. You can structure your program such that the critical values (like the absolute encoder counts you mentioned) get written to tags stored in nonvolatile memory. This should ensure your counts are not lost during a power down. However, I want to point out that this process might introduce a slight delay in your shutdown process, depending on how much data you need to store. Alternatively, you may also explore options for a battery-backed encoder to retain counts. Stay safe with your power cycles!

Hey there! In ControlLogix, you can use the "OSR" (One Shot Rising) instruction in combination with a fault routine or a shutdown process to save the current value of your absolute encoder in a DINT tag right before the processor goes into a fault or shutdown. You might also consider monitoring the “Processor Fault” or “Unrecoverable Fault” bits in your controller status to trigger this save routine. A simple logic setup could help you capture and retain that counter value so you can reference it next time you power up. Make sure to test your logic during a controlled shutdown to ensure it captures the value accurately!

One effective approach to detect a ControlLogix processor shutdown is to use the "Shutdown" routine in your program. You can trigger this routine either through a proper "Program Stop" instruction or by monitoring specific bits in the status file (such as `STS` bits in the processor Status Words). To preserve your encoder count, consider implementing a "File Copy" instruction to save your count value to a non-volatile memory location, or utilize the built-in retain tags if your system allows it. Just remember that while this method might not catch an immediate power loss, it should work well during intentional shutdowns or processor transitions.

Hi there! In ControlLogix, there isn't a built-in flag specifically for detecting a processor shutdown, but you can implement a workaround using a "watchdog" style timer or a periodic routine that saves the count values to a non-volatile memory (like an SD card or a retained tag) before the shutdown occurs. You can also monitor specific fault conditions or communication losses with the Powerflex drives to predict an imminent power loss. Just ensure you're giving the processor enough time to execute the save operation before it loses power. This way, you'll have those encoder counts ready for when you power back up! Hope this helps!

Hey there! In ControlLogix, one way to handle this is to monitor the processor's status using the `.Status` system tags, specifically looking for the `Running` or `ProgramMode` states. You can use a "heat" or "shutdown" bit to trigger a routine that saves your encoder value to a persistent memory location—like your DINT tag—before the processor goes into a fault or shutdown mode. Additionally, while there's no specific fault code for processor shutdown, logging your values in the appropriate tags during the shutdown event can help with continuity. Just make sure the process runs quickly to allow for enough time before the power goes down!

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. Is there a way to detect when the ControlLogix processor is shutting down and save data before the shutdown process?

Answer: - Yes, there are methods available in ControlLogix to detect the processor shutdown and save data before the process. You can save a bit or value in a tag before shutdown.

FAQ: 2. Can a specific flag or fault code be used to retain encoder data during shutdown in ControlLogix?

Answer: - While there might not be a specific flag or fault code dedicated to this purpose, you can implement logic to save count values from an absolute encoder in a DINT tag before shutdown.

FAQ: 3. How can I retain the count values from an absolute encoder in a Powerflex system during power down in ControlLogix?

Answer: - You can save the encoder count values in a DINT tag before power down, allowing you to use this information as a reference point during the next power-up cycle. This can help maintain the encoder position data.

FAQ: 4. What is the benefit of saving absolute encoder data before shutdown in ControlLogix?

Answer: - By saving absolute encoder data before shutdown, you can retain position information and prevent the loss of count values during power down. This allows for a more seamless operation during the next power-up cycle.

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