DKahmer
Member
Hey guys, I'm doing some more PLC work and was hoping that you could help me out!
I've got a gear spinning that has a magnet attached to it, there is a prox sensor that picks up the magnet as it spins to measure rotations. Every rotation adds a 1 to a Data Memory storage. After 15,000 spins it adds a 1 to another and then resets the first (I'm trying to get to 3,000,000 so I had to cascade them.) At the start of my program I clear the two DMs so that everything is at 0. The issue is that if there is a power outage, or someone throw the breaker without realizing, I lose the value. Do you think there is a smarter way to do this so that it will reset only during an initial startup and not if there is power loss?
(Do PLCs store DM if there is a loss of power?)
There are a million ways I could fix this, like use an input to reset but I want to know if there is a better way to do this.
I've got a gear spinning that has a magnet attached to it, there is a prox sensor that picks up the magnet as it spins to measure rotations. Every rotation adds a 1 to a Data Memory storage. After 15,000 spins it adds a 1 to another and then resets the first (I'm trying to get to 3,000,000 so I had to cascade them.) At the start of my program I clear the two DMs so that everything is at 0. The issue is that if there is a power outage, or someone throw the breaker without realizing, I lose the value. Do you think there is a smarter way to do this so that it will reset only during an initial startup and not if there is power loss?
(Do PLCs store DM if there is a loss of power?)
There are a million ways I could fix this, like use an input to reset but I want to know if there is a better way to do this.