graemeian

Bits on Contactor

5 posts in this topic

I use ladder logic in its most simple form.

In ladder logic on the left, I have contacts(ANDs and ORs configuration). They are either switches, logic results of functions or switches, or canned strobing

On the right, I have all types of functions, timers, keeps, counters, etc.

As a simple example, I have a canned 1 second strobe feeding a counter.

I can use the counter as a contact to close when it reaches zero.

Does all of the" business" have to happen on the right?

For example, the left side of the IF/(contact) statement can I put something like a bit comparison on the left?

Something like...

Counter, Bit#

Or do I have to use a bit comparison on the right and its binary result as a contact and put it on the left?

 

 

Thanks

 

 

Share this post


Link to post
Share on other sites

Counters have a completion indicator which is a bit of the same name as the counter.  That is typically coded as a contact.

Share this post


Link to post
Share on other sites

I had mentioned in my initial question,

"I can use the counter as a contact to close when it reaches zero. "

I assume that one can only use a contact as follows:

[P_1s] ----------------------------------------------------------------------------------------------------------------------------------------------------(Counter7)

[Counter7]--------------------------------------------------------------------------------------------------------------------------------------------------(A switch would change when Counter7=0)

and not something like...

[Counter7, bit#3]---------------------------------------------------------------------------------------------(A switch would only follow the status of bit#3)

Is that correct?

 

 

 

 

Share this post


Link to post
Share on other sites

The CP series does not support addressing individual bits of data registers. The CJ series does, but only for D registers, not C or T present values.

If you need to monitor a bit in the counter present value, copy the value to W or CIO word, and use the bit from there.

Edited by Sergei Troizky

Share this post


Link to post
Share on other sites

Why would you want to look at one bit in the numeric value of the counter?

If you want to know the value, use a compare.

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