Plc5 Allen Bradley

ganutenator said:
Important - if you multiply 16,384 (bit 14 on) by 2 you get 32,768 which is larger than the maximum value allowable in an AB PLC5. The AB uses bit 15 as the sign bit. I don't have a PLC handy right now to test this to see how it reacts. I know that it will set the overflow bit, but I don't know what the bit pattern would look like after 16,384 X 2. Anybody have any thoughts on this?

You may be better off using the Bit Shift Left instruction.

When you roll over from 32767 to 32768 in 2's compliment binary numbers you move from 0111111111111111 to 100000000000000. You are correct that the high order bit is the sign bit. The value 100000000000000 is -32768. 1000000000000001 is -32767. 111111111111111 is -1. Add 1 more to it and it rolls over again you loose the highest order bit as it shifts out, leaving you with 00000000000000, or -1 + 1 = 0.



ptine said:
If you choose you can rest the counter but I don't believe you have to because the overflow will be set when ACC>Preset but it doesn't affect the function of your pushbutton. The ACC value will just wrap around.

You are correct, it will roll around and preserve the binary sequence perfectly.
 
Last edited:
I'm not familiar with AB plc , but if this is solve using S7 200 PLC, my solution is to use SHIFT REGISTER BIT. Every time and enabling input is pressed with a data of logic '1' , the starting bit is ON up to the sixtenth bit if your (N) the no. of bit to be ****ed , is also equal to 16. By the way use set output instruction to switch on, and reset out to switch OFF.


CSG
 
cmcc60 said:
I am new to plc's and was wanting to know how I can program a pushbutton to turn on 16 lights one at a time and each one stay on after the pushbutton is released at present I have the stop, start with seal in contacts and an internal coil that operates each rung. By putting my pushbutton switch on each rung with a light when I activate the pushbutton all 16 lights come on.
You can use shift register bit to switch on the lamp one at a time. You need only one data to be shifted to the sixteen bits, every time the SHRB is enabled.

Or can use the counter / compare instruction as suggested by Terry Woods

SET-CSG
 

Similar Topics

Does anyone have the installation files only (not the license) for the Allen-Bradley 6200 software for the PLC 5/250 (also known as Pyramid...
Replies
3
Views
1,241
Today I was making an online edit to a 5/40 Series E Rev K.2 with about 14% free memory. I was removing one branch in a large rung. Accept...
Replies
4
Views
3,194
I am using a legacy Allen Bradley PLC5/40E Series F CPU Having issue with compute instruction syntax with the expression Doing a divide by...
Replies
7
Views
1,789
I have been working within a file for several days and this morning I am getting a "Access Violation to Current Processor" error? I was just in...
Replies
1
Views
1,929
Hello, We use 4 racks with 1785-L80B, 1785-BCM and 1785-BEM in them. I am looking to purchase secondhand a few spares as we have had some...
Replies
4
Views
2,230
Back
Top Bottom