Sign in to follow this  
Followers 0
ngo4life

what is the shortest logic

9 posts in this topic

What is the shorted logic to move input bits to HR bits as below: 1.0 TO H1.1 1.1 TO H2.1 1.2 TO H3.1 1.3 TO H4.1 1.4 TO H5.1 1.5 TO H6.1 1.6 TO H1.2 1.7 TO H2.2 1.8 TO H3.2 1.9 TO H4.2 1.10 TO H5.2 1.11 TO H6.2 And 2.0 TO H1.10 2.1 TO H2.10 2.2 TO H3.10 2.3 TO H4.10 2.4 TO H5.10 2.5 TO H6.10 2.6 TO H1.11 2.7 TO H2.11 2.8 TO H3.11 2.9 TO H4.11 2.10 TO H5.11 2.11 TO H6.11 Please help sending me a code sample. Thanks Edited by ngo4life

Share this post


Link to post
Share on other sites
Have you read any of the replies to your original post, there were some interesting opinions / comments / examples that couold be useful.

Share this post


Link to post
Share on other sites
To be honest though, if that is all you are wanting to do, as gtsupport suggests, just do it rung for rung. much easier to follow, and is only 32 rungs, not many really, unless you want to do this over and over as someone else mentioned, 1024 rungs I think it was. What PLC are you using, do you need to save step memory? The example I posted could do what you ask, with maybe 1 or 2 extra instructions, but you have to ask why not do it conventionally? I think that normally, this sort of bit manipulation is done for a device that requires this type of format, it doesn't look like you are doing that though?

Share this post


Link to post
Share on other sites
Begining to wonder if this is a homework assignment. Still have not answered the question of which processor is being used. That will make a difference as to what instructions can be used. You will need to provide more information.

Share this post


Link to post
Share on other sites
Does seem like that a bit, there must be a reason ngo4life wants that particular pattern?

Share this post


Link to post
Share on other sites
' A total of 8 input words? If so, 8x16 = 128, so you need to allocate the first bit of 128 HR area words also? The CQM1H only has 99 HR area words, so the allocation is going to fall over....... The problem with programming a 'differnent' way, is that when someone else comes to debug your code, it will not be clear to them what it is doing. There have been some ample replies to get you on your way, but you will need to put in some effort yourself, the Manuals have descriptions on how the intructions work, you will need to adapt them to suit your application.

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