program after plc shut off

Yes and No!

It is possible to compare two different time.

When the PLC shuts off you can move the RTC(Real Time Clock) value to an holding register array and later compare the new actual value of this RTC to the on you memorized earlyer...

Hence you will have a time duration value which will still take into account the time when the PLC was OFF...

Besides that, OFFF really means OFF
 
programm after off

wow! that was quick. The (Off) i mentioned is really off. THe power supply to the plc is off. THere's no supply to the plc. You see, the plc is located inside the machine, and our customers tend to shut down the supply to the machine, and well everything restarts when the machine is powered on again.
Omron CPM1A (AC).
 
If your using a CPM1A, try using counters as timers. Counters are retentive and retain their current value on power down.

Example:
If you were using Timer 000:


Timer Input 0.1 sec clock
00.00 255.00
|---| |-----| |--------------[ CNT ]--|
| [ 000 ] |
| Reset [#0100] |
|--| |-----------------------[ ] |




Use contact of CNT 000 instead of TIM 000 as output of timer.

This makes an accumulating timer rather than one that loses its current value on power down. It will pick up where it left off when the power down came.

It will not continue to time with the power off, but maybe you could do math like Pierre suggests to move the differnce to the current value.
 
Last edited:
programm after off

thanx alot guys, the cnt worked! But the cnt value seemed to be interfeered by one of the (ADD Function). I placed a 0.02sec pulse infront of the (add) which i use to represent an encoder. THe value disturbs the CNT VALUE.
 
Did you leading edge condition (one shot) the Add function? If not your counter value is going to go wild. Use an @ in front of the ADD (like @ADD) to differentiate the ADD function.
 
program

I guess i'm too weak. Well, yes i have all the math fuction already set in LEADING EDGE from the beginning. But perhaps something else is wrong, I cant find the cause. The CNT value isn't counting. perhaps you should look at the diagram.???if it's no trouble to you. How to save as jpg?
 
Reading on this older stuff I remembered that when you pick a counter or timer number in those OMRONs PLC, you have to be carefull...

Timer # 1 ... T001 has the same memory allocation as counter # 1 CNT001.

If you have a T001 ...AND... a CNT001, they will interfere with each other.:cool:

One trick is to pick your counter number before you write the program... say you'll be using 001 to 030 for copuntersand the rest for timers... it prevents those funny things like changing values...
 
Last edited:
Pierre makes a good point. Another way of avoiding this conflict would be to always start with timer #000 and counter #127 (or whatever the highest number is). Then, as you need more timers, use 001, 002, 003, on up. As you need more counters, use 126, 125, 124, on down. This avoids having to allocate a specific number of timers or counters beforehand.

Back when I last used Omron stuff, we were limited to only 48 timers and counters (C20s era), so you had to use them sparingly!

-Eric
 
Yes! Yes!

Many thanks! The apllication worked just the way I wanted it to. It's the first batch of our machines using PLC. We were using HARDWIRES previously! You should've looked at the reaction on my superiors face when the machine came to life.
 
it depends r u refering to retentive memory a timer will retain its values when power to processor is lost but if the counter or timer is a progammed function meaning executed solely by the cpu then when power is lost all counting or timing will stop.
 

Similar Topics

Hi, I am new to ladder logic. I have completed a code in the Xinje PLC XC3-32RT-E for one of the machines I am developing. Currently the program...
Replies
10
Views
131
Hi everyone i have a customer, who wants to show an alarm on the machine, if the I/O forces are enabled and set, on at ControlLogix L81E with...
Replies
3
Views
138
Hello all, I have an ABB PLC (PM573) and it has without MC card. I need to take backup from PLC to PC (in automation builder v2.7 ). My...
Replies
8
Views
178
Hi everyone, I want to upload the program from my CPU317TF-2 DP to my PC via connecting to CP 343-1 Advanced since it has LAN ports and the CPU...
Replies
1
Views
121
Hi there! This is something so old and having machine with it....... Last time unit was powered around 3yr ago and it did not work since than...
Replies
5
Views
186
Back
Top Bottom