Walkerok Posted June 28, 2011 Report Share Posted June 28, 2011 I have been using a comparison block to allow users to set a series of conditions. In this case the user base wants to have PLC inputs changable as to wheather a normally closed input or a normally open input is acted apon. That is easy enough for me to write ladder that allows this to hapen by looking at a series of bits. My problem comes in that I have just exceeded the number of comparisons that a program is allowed. Since I have not been able to determine a way to set bits directly from the kepad, I have been puting MIs on the screens and if the user sets MI? = 0 then the normally closed state of the ladder will be used or if MI? = 1 then the normally open ladder section will be used. To do this I have to have a comparison on the MI? value. I am also doing the normal comparisons that just come along with moving between screens and deciding action points for analog signals (and so on and so forth). If I can set the Bit directly I would be able to remove 17 comparisons and be able to finish this version of the program no problem. Any ideas? Keith Link to comment Share on other sites More sharing options...
External Moderators Nacho Posted June 28, 2011 External Moderators Report Share Posted June 28, 2011 Every key of the keypad has a SB, for example SB40 for key 0, SB41 for key 1,... Every display has a link to a bit when the display is ON, you can see it in links&jumps of Display This way you don't need compare function, just direct contacts. I have been using a comparison block to allow users to set a series of conditions. In this case the user base wants to have PLC inputs changable as to wheather a normally closed input or a normally open input is acted apon. That is easy enough for me to write ladder that allows this to hapen by looking at a series of bits. My problem comes in that I have just exceeded the number of comparisons that a program is allowed. Since I have not been able to determine a way to set bits directly from the kepad, I have been puting MIs on the screens and if the user sets MI? = 0 then the normally closed state of the ladder will be used or if MI? = 1 then the normally open ladder section will be used. To do this I have to have a comparison on the MI? value. I am also doing the normal comparisons that just come along with moving between screens and deciding action points for analog signals (and so on and so forth). If I can set the Bit directly I would be able to remove 17 comparisons and be able to finish this version of the program no problem. Any ideas? Keith Link to comment Share on other sites More sharing options...
Walkerok Posted June 28, 2011 Author Report Share Posted June 28, 2011 Im sorry if I am missing the understanding needed here. I can use the key SBs to know when a key is pressed and I can know what screen is active by looking at SI2 (I am not finding a reference to a bit that has a unique association to each screen number being active or inactive if there is one then all of the following discussion is not needed:) ), but If I am going to make a user programmable decision for I0 - I17 as to wheather or not each individual one will be looking for a normally closed or normally open contact, I am not seing how I can allow the user set a bit directly without doing a compare block. An example may be in order to make sure I am not asking the question incorrectly. What I need to do 17 times (I0-I17) is: I------------------If I0 is true (closed) ---------------------- MB0 is false -----------I------------------( activate Coil) I I I I I------------------I0 is false (open)--------------------------MB0 is true________I Where MB0 is the bit I need to set to allow the same net to be activated by either a normally closed switch or a normally open switch depending on what the customer has available. I can figure out no way to allow the user to change the state of MB0 directly to allow my program to reduce the number of compare function blocks to get me away from the maximum limitation the U90 program says I have exceeded. I Can reduce the compares from 17 to 5 by putting 4 normally closed/normally open enterable MIs on one screen and then only comparing the SI2 to a particular screen and then assigning 2 keys to set or reset a MB, but I would like to do better than that so I have maximum lattitude to free up compares to activate Analog action points for multiple control processes. I-------------If SI2 = 5--------I-----------SB40 positive transition---------------------(set MB0) I I I--------SB41 positive transition-----------------------(reset MB0) I know Im asking alot from a little JAZZ unit, but I prefer not going up to a Vision model, since this is a product that is sold over and over again by my company. Thank You everyone for your help Keith Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now