Omron CPM2A issue

Thanks gtsuport,
Did that and it seems that it will run one sequence, an then stops, it all happens very fast, so it is taking some watching!
I am guessing because I am doing a numeric compare, and it gets to state 5 then needs to reset the value to return to state 0 or summat?
Not really ever run simulations before either!
Hindsight being a wonderful thing, maybe I should not have taken this on.
However, I did, and I'm not going to let the client down no matter what, I hope I can get there somehow.
Hopefully I will with a little helpe...
 
When the simulation finishes, take a look a the value in the counter. Guessing it will not be reset to the preset value.

We will need to figure out the proper reset for the counter.

You may need to build a rung the will turn on when the last step / stage is complete. Using that to reset the counter should get you back to the initial stage.

Also, don't forget to remove the CF114 from the counter reset input.
 
I already had a flag that goes high when the machine is ready to reset to state 0, this is 210.15, which is the conveyor indexed to next position done flag and it is set from the only hardware switch on the assembly, thus the only kind of real feedback we have.
I have used this to reset the counter, and it is better, but it seems to hang in S_1.
It seems to skip S_0 and end up in S_1 then hang because it never gets to S_0!
Just getting even more confused now, I can't see why using the State_5 completed, return to State_0 bit to reset the counter does not work?
Or, is it a scan / scan time thing, I am overlooking?
 
Is it possible the State 0 conditions are present when the counter is being reset?

It appears that if input 1.11 is on when the counter is reset, it could decrement the counter and set up State 1.

Not completely sure about this, but take a look and see if that may be the case.
 
Will do, thanks, is this REALLY as difficult as I am making it or, am I overlooking a simple way, that an experienced bod would see?
For something so simple on the outset, I feel I am over complicating it, or am I?
 
Not the answer you are looking for, but there are many different way to write code and end up with the same results.

Typically where I run into problems is with resetting logic.
The state method that you are using is usually one of the most bullet proof. Easy and quick to see where you are in the sequence.

Based on your previous post of not having written much PLC code, I would say you are doing a great job. This is one of those things that the longer you do it, the easier it becomes, When at least most of the time.

Guessing BobB will weigh in on this post also.
 
Thanks gt, it's now 22:00 in the UK, so I'm going to call it a night, I'll be back in about 8-9 hours for another look, I've got to get this sorted.
So BobB, I'm sure you'll have some input, if you have time! ;)

Anything other help gratefully received.

Thanks all so far.

Oh, & gt, I REALLY have not written that much code, honestly!
Thanks for the vote of confidence.

Cheers,
 
Funny thing is I do not even think about a state machine. Been doing this a long time and just sit down and belt out code. I know that is not much help but I cannot explain it any other way - I just write it as I see it. Probably not the recommended way either.
Takes me longer to write the symbols and descriptions for the I/O than the code.
 
That's the thing BobB, because I don't "do" that much code I don't have that bank of experience to draw on! ;)

Back to it this morning now, need a soulution somehow.
 
Eureka!
Thanks to gtsupport, & BobB primarily in heaps.
I did get V1 of my code working, I found a typo elsewhere in the programme.
I now have the whole of the code simulating OK on a CS1D-H cpu, for my new functions, with one line of code deleted which is that to run a stepper motor pulse train via a SPED command, which was existing code anyway, so I am not too worried about that.
Off to site ASAP to try & placate the client!
Just wish the feeder had come as I originally understood it was going to be with cylinder switches!!!
 
Great stuff - good experience for you. How do you like the software? I find it extremely quick and easy.
You also made good use of the commenting features I see.
 
Software was OK to use, quite quick & easy, but only what I would have expected of a true native windows programming environment tbh.
Comments etc. very helpful.
Would I like to do this all the time, dunno, maybe, if my health starts failing & I can't do the sitework, then banging out code could be an option!

Oh & yes damn good experience.
 
I gave away almost all maintenance type work years ago - got sick and tired of getting called out in the middle of the night.

Basically just design, build, programme and commission new work these days but I do still have a few maintenance customers - very few. Have kept those basically because the systems are very complex and someone going in cold turkey would be in real strife trying to understand the systems. Most are multi PLC systems (between 5 an 32) spread all over the place with massive amounts of communications between them, Device Net, CompoNet, Ethernet/IP, Omron Controller Link - also plenty of Modbus RTU. Ethernet to fibre converters, SMS messaging, web access - just about every combination of comms systems you could imagine. It is fun - keeps me going. Most of these are generator and switching control systems. Some automated generator power stations amongst them too. Co-gen, soft transfer, even have one with 4 generators @ 480V 60 HZ and 4 generators @ 2300V 60HZ - transformer link, and a motor gen set 2300V 50 Hz to 2300V 60 HZ for NASA. Ongoing work for the next 3-5 years - site wide SCADA and they are replacing all the HV and transformers and most of the LV too. Keeps me thinking!

Have to get rid of the maintenance though - 70 this year and not really interested in maintenance any more - too busy with new stuff anyway.
Wet N Wild Sydney (water park with humungous slides from the US), wave pool, wild river, Latitube surfing machine - you name it. Designed and built all the control systems, now writing software on the fly and commissioning the whole job - and there is only me - work for myself.

Having fun!
 
Ahh see Bob, I don't do night time call outs!

I got fed up with the hassle of employing, so it's only me now also.

I hope to be retired & doing something easier by the time I hit your age! ;)

I've got just over 20 years yet...

You certainly get some interesting work, most of mine is standalone CNC machine breakdowns, conventional machine breakdowns along with some new electrical installations works, & some work for the local health board.

I do get the odd retrofit & mod, but my business changed very dramatically just over 3 years ago, & I had to start again basically, this time just me, so I changed direction, and only now am I getting back to the CNC/PLC/Servo type stuff I used to do.

Never, ever done anything on that scale! Would not even have a clue where to start pricing it up TBH...

Got this Omron mod off the back of doing some CNC repair work for the company that built the feeder for the machine.

Anyway, got to sort out some quotes, thanks for your help, I'm going there shortly to load the code & commission it, so I'll let you know later.
 
OK, had a few issues loading the new prog as I had custom functions and it was not obvious in the software how to load them!
Sorry gtsuport!!!
Sorted that "eventually".
Had a few bugs in the new code, easily sorted, a few lines in the old code I had forgotten about changing.
Could not get the old code working with my mods!
I hope I've traced that to a line that I deleted, thinking it was redundant and unsure of the memory capacity & overhead!
I THINK I have sorted this now, & changed the prog to get the function back, going back to site ASAP with the modded prog to try, but there are a few mechanical problems with their side, so panic off for a minute.

One thing I could not do.
I set the software to download all comments etc. to the CPU, when I dragged the programme up again, no comments!

Error about the comments was seen, now the comment memory was set to 1k, I have upped this to 5k which is the max, so I'll have to try again, as I was hoping to leave a commented prog in the CPU, if, I can't well hey ho.

Error messages attached.
Error 1 is if I don't select the tick box to transfer the IO table etc.
Error 2 is if I do select the tick box to transfer the IO table etc.

However, I would like to know what the errors could be anyway.

Anyone able to help please?

Error 1.gif Error 2.gif
 

Similar Topics

Hi all, My name is Firdaus. I am a teacher. And for the next semester I have to teach PLC to student. The problem is, I just move to this school...
Replies
6
Views
2,008
Hi Folks. I have a problem with an Omron CPM2A-60CDT1-D High Speed Counter. It had been working well, the problem arose when a very minor program...
Replies
3
Views
1,474
Hi Folks. I have a problem with an Omron CPM2A High Speed Counter. It had been working well, but the problem is that a program change was...
Replies
2
Views
1,385
Omron's CPM2A has a compact flash card slot. Can an Omron program simply be copied to a compact flash card using a Card Reader or must it be...
Replies
1
Views
1,525
Our company using OMRON sysmac CPM2A plc for small machine. presently we dont have the software to connect to PLC. Please anyone can send me the...
Replies
1
Views
1,557
Back
Top Bottom