I named each %SBRi as a symbol block "SBR0" to "SBR6" and that seemed to work to move the bits into the shift registers. The thing I do not know is if a bit range will be pulled out of each block, so that all 16 bits of each SBR are loaded with a range from %M100 to %M200.They list BLK.x in OP2 (the 'from' register), but not OP1 (the 'to' register). Let's hope that's NOT the case.
Eric, you are correct, if you can get each bit into 60 words, and then rapidly compare each word to 0, that will do the job.
Hi Lancie, I am trying to understand your SBR program and its quite hard for me to wrap my head around.
My idea was to put the 100 bits into six cascaded 16-bit shift registers, then using internal clock bit %S4, shift for 100 times as measured by the Counter 0. The result for all 6 SBRs (in this case) should come out at SBR6.5. Because each SBR only handles 16 bits, for 100 bits you need to use 7 SBRs (SBR0 to SBR6). You tie them together by first shifting the last SBR6, then take the last bit of SBR5 and move it to the now-empty SBR6.0 You do that for every SBR after it has been shifted, so that no bit between %M100 and %M200 gets lost. Then every time that SBR6.5 is ON or a "1", you ADD 1 to word %MW1, and when the Counter is done (= 100), you move that result to %MW2. The count to 100 at 0.01 seconds requires 1 second, so you will get a new result every 1 second, which should be often enough to upgrade a fire alarm HMI page.
I did not do the comparison instructions that would be needed to select your HMI pages.
Because you did not state the actual bit range of your real program, then you will have to adjust the Operations in Rung 17 to move the correct bits into the SBRs. For 60 bits, you probably only need about 4 SBRs.