Sign in to follow this  
Followers 0
Denideni

Begginer problem CP1L - Calculation of time

5 posts in this topic

Hello I am beginner and would appreciate some help for the part of the assignment.

3 contacts, 1 coil

I am trying to make a diagram in CX Programmer, using CP1L PLC, have some experience in usual programming but not much in Ladder diagrams,
 Exit (Coil) should be ON for a certain number of seconds ((T*2sec)+(P*1sec)) where T multiplier, could be 1,2,3 depends which input of those 3 is currently on, and P multiplier is value of the previous  usage of contact (1,2,3 or 0 for the first use).

Contacts does not have to be diff up, I know that part, I am actually having problem in using variables instead of direct values to calculate the number of seconds for the ON state of coil.

Thank's in advance,

Deni

 

 

 

Share this post


Link to post
Share on other sites

The standard Omron timer is 100ms per tick, 10 ticks per second. If you use a DM register as the timer preset (TIM, timer #, D register) then you can use some simple symbol math to calculate the preset and load that value into the D register. Multiply T by 2, add P, then multiply that result by 10 and store the resulting value in the timer's D register

Share this post


Link to post
Share on other sites

Thank you, Mendon,

I know how to set constant value to counter, what I don't know is the right notation, to set the value using content from another mem location, for instance  content from mem address 100. For example like I have a timer TM and want to set value which is from location 100

Share this post


Link to post
Share on other sites

Well.. 100 is a bad choice to use because that is where your outputs will be located in a CP1L. The DM register D100 would be perfectly acceptable. You would enter it as TIM n D100 where n is the timer number you want to use and D100 contains the calculated timer preset.

Edited by Mendon Systems

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