Retentive (latched) Operation in Omron CPM1A PLC

riyajahamad

Member
Join Date
Jun 2002
Location
Pune-India
Posts
133
Dear PLC Experts,

I am doing modification in Omron CPM1A PLC program.

This is oil dispensing machine, used flow meter (High Speed Pulses)& used high speed counters.

We have problem of incomplete oil filling due to power failure during cycle.

I am trying to modify PLC program as, when power fails dispense quantity retentive (latched) and after power regain remaining quantity of oil will dispense.


Earlier DM1000 (High Speed Pulses) is compared with pre set value.

And DM1000 getting restart after power failure.


I assigned new DM1002 to retentive the value, but when I tried instead of remaining quantity it dispensing from start.


My question is how to set data register to start count where it was stopped.


Hope you expert people understand what I want to ask.


For better understanding I am attaching original program.


Thanks in advance.


Best regards,



Riyaz
 
Last edited:
DM is memory retentive through power failure.

Your problem is with the high speed counter reset 252.00 starting at step 313 (HCS section). When bit 252.00 turns on, it resets the value of the high speed counter.

I hope this will help.
 
Thanks gtsuport for reply.
You are right when 252.00 turns on it reset the value of high speed counter.
But when power fails high speed counter also reset, how to program for retening the value during power fails and start count where it was stopped?
Riyaz
 
I had this problem in the past.

I uesd interval timer to creat interrupts, in the subrutin I saved the HSC value to DM.
first scan I read the value to my HSC.
It sound simple but it is not.Use the book.You need INI(61)& STIM(69).I think I copyed this sample from the book.
Pay attendion to put the subrutin before the END (at the end of the code)
It might be better way,that worked for me.
You can change the present value by INT(89) and read the PV by PRV(82).
 
I would look at making your 'dispensing' condition [222.00] memory retentive.

You will also need to modify the latching condition on this rung that will help to hold through power failure.

You will also need to modify the auto-started bit to be memory retentive as well.

Note.
H0.00 -> H19.15 are all memory retentive, it looks like you are using these for NT2S comm status.

I have only scanned your code, based on where gtsupport said the HSC reset was, there may be other areas that you will need to modify as well.
 
The HSC is reset by default when power is off.Only move to DM will save the value.

if it will be done in regular scan you will loss data.
The only option is by interrupt.
 
The HSC is reset by default when power is off.Only move to DM will save the value.

if it will be done in regular scan you will loss data.
The only option is by interrupt.

Really? I can only reference to the manual for the CPM2A for the HSC, for this model, it does not state that the HSC is reset on power off.

What manual did you copy from arikb?
 
Hi PLC Experts,

Still not successed,

Same Machine but with Mitsubishi PLC successfully done, but in above Omron PLC still struglling.

Is in Omron have retentive counter??????

Thanks in advance.

Riyaz
 
Is in Omron have retentive counter??????
Basically no but if you use the INC (increment) function into a DM the DM will be retentive. Basically make your own counter. Cannot remember if the CPM1A has INC or not - check in CX-Programmer instruction help. Have not used them for some time.
 
Did you try the solution suggested in ArikBY's first post?
This should work.

Do you have the CPM1A programming manual?
There are examples in the manual detailing the process.
The information is in the section "CPM1/CPM1A Interrupt Functions"

Let us know if you need a link to the manual.
 
Thanks BobB, gtsuport and ArikBY for reply/support.

I think my High Speed Counter is below 1KHz, ArikBy have some simple retentive memory, please post solution.

Riyaz
 
Omron3.JPG


Omron2.JPG


Omron1.JPG
 

Similar Topics

Hi all, I have what is likely not a complex issue, but I am working in Automation Studio and want an accumulating/retentive timer when a...
Replies
17
Views
1,918
Having trouble with a Siemens S7 226 counter being retentive. I have specified in the System block C ranges offset 0, 6 elements. However, at...
Replies
0
Views
282
Been a long time since I've posted, but here we go. Started a new role in august and progressively learning about Codesys programming in...
Replies
2
Views
1,158
GE 90-30 using ME 6.0 - Newbie question... Let's say on rung 10 I set a coil (S) with a one-shot. Input to coil drops out, but coil stays...
Replies
30
Views
11,099
Need some insight into why this happened. After finally getting a VM to connect to a CPU 216 2 siemens processor, uploaded the program. made a...
Replies
5
Views
2,565
Back
Top Bottom