Sign in to follow this  
Followers 0
OdinPT

Need Holy Help... Plc Cpm1a

27 posts in this topic

Hi all, The problem is that i need to do a program with a PLC CPM1A Cpu 20, the problem is that im very noob on Omron PLC system, to be sincere im very noob on PLC's lol... i had some classes in Siemens PLC's but Omron, nothing. I have to do a program to control a simple machine and i would like some of you gave me some lights in programming :| As i said im using a CPM1A with CX Programmer 5.0. What i have to do is : Control a error that the machine gives (24v signal) and use it after 12 cycles (24v signal each cycle). My problem is that between the 12 cycles it can be others errors that have to be controled too after 12 cycles. For example: ------------------------ Error ------------------------------- Whashing ---------- Cleaning ------- Garbage --------- Box |--- A ---|--- B ---|--- C ---|--- D ---|--- F ---|------|------|------|------|------|------|------|------|------|------|------|------|------| --------------------------------------1-- - -2--- ----3---- 4- ---5- - -6-- --7--- -8- --9-- -10- --11-- -12--13- --14---15---- Imagin products called as A, B, C, D, etc etc, the products are in a roller carpet moving to the right, error position lights up and sends 24v to the PLC when any of the products has any problem when passing through Error position, what i want is that after those 12 cycles if the product is ok it continues to the box position if not it is removed to the garbage. My dificulty is the limited programming knowledge, after one product activates the error imagine that the next 3 have error too, how can i do the control to the Garbage ? My ideia is to use counters... 12 counters that are activated with the error and with the condition of the last counter beeing used. Have been reading some CPM1A and CX Programming Pdf's and informations, it seems CPM1A is very limited in programming... If someone can help me i would apreciate it very much. Thanks. Edited by OdinPT

Share this post


Link to post
Share on other sites
It sounds to me like you can use the shift register instruction (function 10). This instruction has 3 inputs, one that causes the data to shift one position, one input the sets the data to value 1 (instead of zero) and a reset input that clears all the data. This should work if you just want to know that the part is bad. It will not allow you to know why it is bad. Please take a look at the instruction in the manual. It will explain the instruction in more detail. Let us know if you need more information. Hope this will help.

Share this post


Link to post
Share on other sites
Shift Register is the key and all you need. This is very correct and the easiest way to accomplish what you want to do. You will need to establish an input, pulse, and reset. But as he stated its all in your man. or actually under instruction help in your software.

Share this post


Link to post
Share on other sites
Hi again, I have beem reading about Shift Register and i found here in the site an exelent and simple example to work with Shift Register. http://forums.mrplc.com/index.php?showtopic=656&hl= I have done an exact program from the example given in the Image, but it seems that doesn't activates the output... Does that program works on CPM1A ?

Share this post


Link to post
Share on other sites
You will need to "extract" the specific bit that you want to use. What "starting channel" and "ending channel" are you using in the SFT instruction? Example: If you are using starting channel HR0 and ending channel HR0 (you only need 12 positions, this would give you 16), you will need to look at bit HR0.11 (12th bit in channel), and use that bit to initiate the "put in garbage" sequence. Let us know if you have any other questions. Hope this will help.

Share this post


Link to post
Share on other sites
I want to thank all the help untill now, because your beeing very helpfull. Starting Chanel HR0 ending chanel HR0, im using a word and when i activate the output is with the HR0.12, like the example in the image... I'm not understanding why isn't working. In the image we have the input 0.03 for the signal and the 0.04 for the shifting, im using 2 inputs too from 2 Photocells, i can see the PLC changing state but after the 12 x 0.04 changes nothing arrives to the output. For example i do one input on the 0.03 and then other on the 0.04, after more 11 inputs on 0.04 the output should be activated right ? Is like this that it works ?

Share this post


Link to post
Share on other sites
Input 0.03 will need to be on at the same time input 0.04 is on to shift in an On condition. You should be able to monitor HR0 and see the value change when input 0.04 is turned on. Example: input 0.03 on, then turn on input 0.04. Value in HR0 should be 1 (bit 0 on). Turn off input 0.03, turn input 0.04 off, then back on. Value in HR0 should be 2 (bit 0 off, bit 1 on). Turn input 0.04 off, then back on. Value in HR0 should be 4 (bit 0 and 1 off, bit 2 on). Note that the shift input (in your case 0.04) must turn off then on to "shift" the data. Also note that it will shift every time the input turns on. If the input "bounces" the data could shift several positions. Hope this will help.

Share this post


Link to post
Share on other sites
This all seems very easy to me... but something is not right im doing like the examples like you said and like its logical and isn't working... may be from the CPM1A PLC ? the funcion works in this PLC but.. i don't know what to do more... When i put in run mode it shows &0 in the Shift register under The start and end bit, thats ok right ? Edited by OdinPT

Share this post


Link to post
Share on other sites
The function is supported by the CPM1A. Can you upload your CX-P file to this forum. I can try loading it into a CPM1A and see what happens.

Share this post


Link to post
Share on other sites
Here is the file, so if you can try it in a CPM1A ill be very thankfull. ShiftCPM1A.cxp

Share this post


Link to post
Share on other sites
Your program worked for me! I did not have inputs wired to the unit, so I forced the bits through CX-Programmer. You should be able to monitor your program. Make sure that input 0.02 is not turning on, this will clear all the bits. You do need to have the plc in Run or Monitor mode (Run led on unit must be On)? Not sure what else I can tell you. Please let us know any other questions.

Share this post


Link to post
Share on other sites
Yes it's on... This PLC has'nt been working since long time and it isn't in the best conditions, could it be that the problem is electronical ? Tomorrow ill try it in other PLC... Thanks for the Help

Share this post


Link to post
Share on other sites
It could be an electrical/electronic failure, I can not tell you for sure. Did you try to force the bits using CX-Programmer? This could help to determine if it is an input problem or something else.

Share this post


Link to post
Share on other sites
yes i forced the inputs the light corresponding to the input lights up. But the Output... nothing happens

Share this post


Link to post
Share on other sites
Ok, so the shift register is working? You can see the value of HR10 change? Just output 10.00 is not turning on? Does the "coil" so turning on in CX-Programmer? But no led on the cpu? Have you tried using a different output, like 10.02?

Share this post


Link to post
Share on other sites
No the shift register isn't working... and the Output i have changed and doesn't work too... but if i make a simple input / output connection it works fine... I simply don't understand... as i said i will try a diferent PLC.. lets see what can i use..

Share this post


Link to post
Share on other sites
Hi, PLC problem after all... i have other CPM1A and it works ok, now what to do with the damged one ? I have one more thing to ask about the program. I have a Photocel in the cleaning position that compares with the Shift position to see if there is any product to be clean, if the Photo is = 1 and the Shift Position is = 1 Ok or Error Sgnal, but... the problem is that i can only do this comparison when the Photocel is activated... now imagin that the Shift Position is 1 and somewhere before the Cleaning position the product got out, i don't have nothing to do the compare. Is the same problem if i try to do with the Shift function if i use to compare the shift function and the product isn't yet in position it gives the error signal. How can i garantee that the error signal is only activated when thers no product or when it should have a product ? This is a Programming issue i think, but if someone could help i would be gratefull. Thanks.

Share this post


Link to post
Share on other sites
OdinPT, I am not sure I am understanding your question. By "Shift Position" do you mean input 0.04 (from your program yesterday), or do you mean a specific bit in the shift register? I think you are correct in thinking it is a programming issue. I am sorry that I do not understand your question. It appears that you are referring to a "timing" issue about the signals, but I would need more information to be of any help. I know this can be difficult to explain to another person! Please hang in there!

Share this post


Link to post
Share on other sites
Ok ill try to be more precise, the english doesn't help either lol The same example as yesterdary, im using The Shift Register function and when it reaches a bit in the word lets say bit 9 (cleaning Position) i have a photocel in that place that i use to confirm with the value in that bit (1 or 0 ) if ther's any product or not in that position. The problem is if the product gets out from the roller carpet, i can't do the comparison because there isn't anything to trigger the photocel, is there any way to solve this ?

Share this post


Link to post
Share on other sites
You are right about the English (LOL). Thank you for trying this again. Could you use a timer, started by the shift bit (0.04). If you do not see the photoeye by the time the timer is complete, you would know that there is no product at that station. Another possibility. Set up a second shift register function. This time, instead of tracking an error (0.03) just track part is present/no part present. Then use these bits for comparison. Or maybe a combination of the two? Just some thoughts, hope this will help. Please let us know if you have any other questions.

Share this post


Link to post
Share on other sites
I'm the one who thank's for helping me out I can't use timers since the rolling carpet can have diferent speeds, you second ideia seems interesting i will try it as soon as possible. Thanks.

Share this post


Link to post
Share on other sites
Well, seems i have to work this out other way... I need to put my PLC in Runing Mode as soon as he gets the 240v is there a way to do this ?

Share this post


Link to post
Share on other sites
I am not sure I understand your question. Do you mean change the PLC mode to Run mode from either Program or Monitor? I am sure this requires a programming device. If you mean to enable your logic program to start functioning, you may be able to use the First Scan Flag (253.15 in the CPM1A), if the processor is set to Monitor or Run mode. Not sure if I answered your question. Hope this will help.

Share this post


Link to post
Share on other sites
Hi again :) Is like this: I want the PLC to control the same rolling carpet in the first example. But i want to turn off and on the PLC when i turn off and on the Carpet... that is.. i use the power suply from the carpet to supply the PLC, my problem is that when i turn on the carpet The PLC doesn't star in Run mode and it can't control the carpet, PWR led stays activated but not the RUN led. I want the PLC ready to work when i turn the carpet on. Once again sorry for the english

Share this post


Link to post
Share on other sites
Ok, I think I understand. When you turn on the carpet, you are powering up the plc. Normally the plc should start up in the same mode (Run, Monitor, Program) as when it powered down. But, if there is a "programming device" connected to the peripheral port, it may startup in Program mode (Run light off). With CX-Programmer, go into the Settings. The first dialog box should show a "Startup Mode" selection (toward the left of the box). If it is currently set for "Programming device", change the setting to Monitor. Now download to the plc, and make sure you check the Settings box. Then you will need to power the plc down, power back up and you should be set. The settings DO NOT change until you power down and back up. Hope this will help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0