isolating a bit

jimcav

Member
Join Date
Dec 2004
Location
new jersey
Posts
229
I am using rs logix 5000 with an l61 processor. i want to change the status of a single bit in a shift register without changing anything else.

thx jim cav
 
If you know exactly which bit you wish to change you can use the standard logic blocks with a mask.

For example, If you have an integer with bit pattern

1100 1100 1100 1111

and you just want to set bit #3,
Then just use an OR block with a mask of 0000 0000 0000 1000
 
Actually, I showed you the hard way.

All you really need to do is reference your tag at the bit level as a set or reset.

If you tag is a DINT named Cat

For example SET Cat.4
 
OTL DintTag.1


DintTat.1
--------(L)--




Another way to do it (works well if the bit number is variable) CPT DintTag (DintTag OR 2**VAR) will set and CPT DintTag (DintTag AND NOT(2**VAR)) will clear.
 
Last edited:

Similar Topics

Hey folks, Hardware: *=Must use these devices. Allen Bradley 1734-AENTR (Dual Ethernet Adapter)* Allen Bradley 1734-IE8C (8Ch Analog Input...
Replies
2
Views
726
When a new machine comes into our facility the PLCs and Variable Frequency drives typically come with their IP addresses in the 192.168.1.XX or...
Replies
13
Views
6,155
I am upgrading from device-net to Ethernet. We keep try to keep our distributed IO off of our business network by using an Ethernet bridge on our...
Replies
5
Views
3,988
Hi,I have a question about isolating a control network from the plant Vlan network. In a new project the control network would have a Compactlogix...
Replies
4
Views
3,325
Hey all, long time lurker for help, first time poster. We're getting ready to install an OPC data collection package on about 120 pieces of...
Replies
8
Views
2,262
Back
Top Bottom