FranzPLC

When will I use CIO and Work bits?

5 posts in this topic

I just discovered work bits. Never used it, I just want to know when will I use it.

Share this post


Link to post
Share on other sites
9 hours ago, FranzPLC said:

I just discovered work bits. Never used it, I just want to know when will I use it.

Work bits are non-retentive memory. Use them for almost everything, except that which needs to be retained.

D20.00, if ON before power-off, will be ON when power comes back.

W20.00 if ON before power-off, will not come back to the ON state when power comes back.

Share this post


Link to post
Share on other sites

W or work bits are just non retentive internal bits - known as M bits in other PLCs.

CIO is common I/O bits and are used as inputs, outputs, and non retentive work bits as well.

I rarely use W bits but just use CIO for most of my programming.

You can also use the W area as non retentive words, as you can with the CIO area.

The ability to access the D area as bits is only fairly recent - CJ2M if my memory is correct.

D and H areas are both memory retentive.

Share this post


Link to post
Share on other sites
5 hours ago, BobB said:

The ability to access the D area as bits is only fairly recent - CJ2M if my memory is correct.

That is correct D area bits are accessible on the CJ2 CPU's. W area is good for all tasks that don't need to retain their values through a power outage. In that way it is really the same as CIO. I like using them for momentary touch switches(user input) on a touch screen.

 

Share this post


Link to post
Share on other sites

I recommend using Work bits when you need a non-retentive internal bit rather than using CIO.  If you run out of Work bits (unlikely), then you can come back to the CIO area and use some memory there.  The reason for this recommendation is that there are some areas of the CIO memory area that are reserved for specific functionality.  There are no such reservations in the Work area.  

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