Posted 10 May 2004 HI I like to use FLL instruction and make zero all in the destination file but at the same time I do not want to change one or two bits within destination file but I like to make these selected bits zero somewhere else in the program using clear instruction for example in FLL instruction my source is zero and destination is #N12:0 and length is 4 words but I do not want to make bits 12 and bit 14 to zero at word N12;2 I wonder how can I achieve this Thanks Share this post Link to post Share on other sites
Posted 10 May 2004 Have a look at the masked move instruction. Ken Share this post Link to post Share on other sites
Posted 11 May 2004 Create a rung, double click it and paste the following into it. SOR XIC N12:2/12 OTE B3:0/0 EOR SOR XIC N12:2/14 OTE B3:0/1 EOR SOR FLL 0 #N12:0 4 EOR SOR XIC B3:0/0 OTE N12:2/12 EOR SOR XIC B3:0/1 OTE N12:2/14 EOR This uses B3:0/0 & B3:0/1 as temporary holding registers, then FLL zeros N12, then holding registers set the N12:2 bit back as they were. Change the B3 bits to something suitable. Share this post Link to post Share on other sites
Posted 13 May 2004 please explain what are the SOR and EOR Thanks Share this post Link to post Share on other sites
Posted 13 May 2004 Look to me like it means: SOR - Start Of Rung EOR - End Of Rung Share this post Link to post Share on other sites
Posted 13 May 2004 HI I think you right my friend . Many thanks mike31 Share this post Link to post Share on other sites
Posted 15 May 2004 loosewire is correct The text I posted can be pasted directly into RSlogix and it will create the rungs and instructions. When you get slick with RSlogix it gets easier/quicker to create some intructions by creating a rung then just typing in the instructions you require. See ASCII Editing in RSlogix help. Tip:- this format is the way you can auto generate ladder using for instance Excel Share this post Link to post Share on other sites
Posted 17 May 2004 HI SNERKEL When n12:2/12 is true then b3;0/0 is true but when FLL istruction becomes active surely all output and input become false . Am I right or missing the point Thanks MIKE31 Share this post Link to post Share on other sites
Posted 17 May 2004 (edited) Ladder logic is actioned from top to bottom, then your IO is read, then cycle starts again (simplified version ) remember this and you won't go far wrong. Rung 1 If N12:2/12 is ON then B3:0/0 gets turned ON Rung 2 If N12:2/14 is ON then B3:0/1 gets turned ON Rung 3 Clear N12 to zero (B3:0/0 & B3:0/1 haven't been told to change state so don't) Rung 4 If B3:0/0 is ON then N12:2/12 gets turned ON Rung 5 If B3:0/1 is ON then N12:2/14 gets turned ON The rung order is everything, any other order wouldn't work. Edited 17 May 2004 by Snerkel Share this post Link to post Share on other sites