Sign in to follow this  
Followers 0
sfunariu

Duplicated output

18 posts in this topic

Hello everyone and sorry to bother you that much, but I'm desperate. I'm trying to realize a process. I'll eyplain it quickly. Three Positions, one X-Axis with controller. Between position 1 and 2 and position 2 and 3 there is a timer (doesn't matter how long the interval is) When i start the aplication and timer 1 is done, I want the X-Axis to move from Position 1 to Position 2 and start the second timer. when the second timer is done, I want the Axis to move from position 2 to position 3. The positions are configuratet in advance within the axiscontroller, with the plc I just define when I want to move to which position. The communication between PLC and Axis-controller is as followed: (only the first part, from step 1 to step 8 is used, the second part is not used) Easy at first glance. I thought I'm clever and created 2 sections in the CX-Programmer. The first section is activated when the first timer runs out and contains the inputs and outputs for moving the axis from position 1 to position 2 (see attachment). The second section is exactly the same as the first section, only with other outputs (i.e. other positions on the X-axis) and is activated, when timer 2 is done. I tried it and of course it didn't work, because all the constant in- and outputs, so those which are unaltered for every positioning, (i.e. DRIVE, INP and BUSY) are used more than one time. I hope you see what I mean, it's a bit confusing. How can I manage this? As you may have noticed, I'm new in PLC programming and devices from Omron. Thanks in advance for your help! Greetings SF Edt. Almost forgott to add: I'm using a CP1L-M40DT1-D PLC Edited by sfunariu

Share this post


Link to post
Share on other sites
Sections are nothing but markers or remarks in your program. They are there for the convenience of the programmer and impose absolutely no rules on the logic. In all PLCs when you use duplicate coils, the logic obeys the last coil in the program. Therefore if you turn the coil ON in one rung and turn the coil OFF in a rung below the first coil, the state at the end of the program scan is OFF. This implies that you need to segregate portions of logic into logical steps or sequences. One way to do what you are trying to do is by using IL(Interlock) and ILE(Interlock End.) You could also use JMP(Jump) and JME(Jump End). Others will refer you to SBS(Subroutine Start), SUB(Subroutine) and RET(Return). My personal favorite is STEP and SNXT(Step Next). See example in the Omron Downloads. Template for STEP-SNXT @ MrPLC.com Your thought processes are good. You are a logical person. Use segmented logic.

Share this post


Link to post
Share on other sites
Thanks allot for your reply and the help. I downloaded the file and examined it. Do I get this right: For example, my output OUT is used mltiple times but has always the same adress. Whit STEP i start the new "step" and "erase" the previous use of OUT. With SNXT I execute the step. Is this assumption correct? Thanks again, Greetings SF

Share this post


Link to post
Share on other sites
If you are new to ladder logic, then get into the habit of only using a OUT address only once, otherwise confusion may arise...

Share this post


Link to post
Share on other sites
I'll try it with STEP and SNXT and also with SBS, SBN and RET. And if it doesn't work (or if I am not able to do it), I'll make a seperate OUT for each time I use these constant OUT's. We'll see. But anyhow, thanks allot for the help, I will certainly be back within a few hours with new questions:)

Share this post


Link to post
Share on other sites
Ok, now I experimented a bit with STEP and SNXT. Did an easy test for checking if it works. Followed some instructions and got a not very satisfying result. I posted the prog., so if someone has the time to qickly look at it I would be glad. As I said, the prog is just to see if it manages duplicated outputs and it doesn't do its job... Thanks in advance. SF STEPtest.cxp And here a second Problem: Error message:"WARNING: Unreachable code at rung 5 (0, 0) "................why? just because of this tiny thing it doesn't work the way it should. I dont use In- our Outputs in rung 5 from within a SBS, so why is it unreachable? SUB_Test.cxp Edited by sfunariu

Share this post


Link to post
Share on other sites
Your concept is right. Unfortunately all of the conditions are made to step to the next step when you enter each step. Therefore the logic falls straight through. Try putting a timer inside each step.

Share this post


Link to post
Share on other sites
Here's some help notes for STEP-SNXT. Step_Snxt_Do__s_and_Don__ts.pdf

Share this post


Link to post
Share on other sites
Thanks, important infos in this pdf. uhhh, I just saw the problem. I changed the condition for activating SNXT to input from the axis controller, so the next step i activated, if the axis is ready. And it seems to work. Thanks

Share this post


Link to post
Share on other sites
Working hard and looking good. But I have a question. I'd like to activate a timer when a contact gets closed, but I need the timer to continue timing even when its contact, which activated the timer, turns off. How is this possible? Can I do this with TIM or do I need some other way? Thanks in advance, SF Edited by sfunariu

Share this post


Link to post
Share on other sites
SET a Bit when the input condition happens. Use the bit contact to start the timer. RSET the bit when the timer times out.

Share this post


Link to post
Share on other sites
Sorry for my absence, vacations:) I tried now to set a bit with SETB and RSTB. My problem is the adressing. What exactly do I have to fill in? The explanation of CX istn't very helpfull. Thanks in advance, SF

Share this post


Link to post
Share on other sites
What exactly are you having trouble filling in? See attachment for how to fill in! "The explanation of CX istn't very helpful" How much more help do you need??? CP1H_CP1L_CPU_SETB_RSTB.pdf Edited by BITS N BYTES

Share this post


Link to post
Share on other sites
It seems that I need much more help. Thanks for the attachment. But, unfortunately, I still don't get it completely. I want SETB to activate "Contact" and when the timer times out, I want RSTB to reset "Contact". What adress (example) do I have to give to "Contact" and how do I have to link SETB respectively RSTB to "Contact". I would very much appreciate, if you could make an example. I have few knowledge about PLCs, and I'm learning by doing, but here I realy need to rely on help. Thanks SF

Share this post


Link to post
Share on other sites
SET and RSET are much more simple if using bits. When word areas like D or E is needed then use SETB and RSTB. Then use TST or TSTN to test the bits in the word. SET_RSET_or_SETB_RSTB.cxp

Share this post


Link to post
Share on other sites
Holy Moly!! This is great! thanks a lot!!! I will definitely use SET and RSET. Seems so obviously once you know how it works :) Thank you very much!

Share this post


Link to post
Share on other sites
Have you looked at the KEEP instruction also ? Grab a programming manual for the PLC model you are using, sit on the dunny and have a good read. Is this an actual project or class assignment ?

Share this post


Link to post
Share on other sites
This is an actual project, I'm doing an internship, which I have to do for my studies. I studied physics and now changed to Engineering in mikrotechnology and robotics, which will start in september, and an one year internship in an industrial environment is mandatory in a case like this. So here I am, the student with no knowledge about automation, trying to programm 2 Axes :) It's fun but hard. Thanks again for the help! Edited by sfunariu

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