Control Logix sequnce masking question.

icehube

Member
Join Date
Nov 2005
Location
ohio
Posts
86
Hey guys, i am a little confused on this and was looking for some help. I was trying to configure a sequence output. Everytime i try and enter a tag for the mask part is says not a valid array element....what am i missing? I put a value of 65535 in there and it seemed to work but dont know if this is correct or not. I put in a an array of DINT[15] for the element. Thanks for your help here guys.
 
The SQO instruction only accepts a tag address for the Mask element if it is a SINT. Since the Destination element can only be a DINT tag, the most common usage is to make the Mask a DINT value, so you will need to enter a DINT literal value for the mask.

Don't forget that you can enter this in any data format you wish, it helps to see the bit alignment:-

e.g.

decimal 65535
binary 2#0000_0000_0000_0000_1111_1111_1111_1111
hex 16#0000_FFFF
octal 8#00_000_177_777

You don't have to enter the leading zeroes, or the underscores.

All of this info is in the "Instruction Help" - just click on the instruction name (SQO) on the ladder, and hit F1...
 
Last edited:
Ok, that makes sense...but iw as just wondering where they get the mask number from. Might sound dumb to ask though....i am using a DINT of 15 as i stated above of 15 as i entered DINT[15]. My output is 6:O.Data.
 
The Mask specifies which bits of the destination will be written to by the SQO.

For instance, you may have Traffic Lights at an intersection:-

Bit 0 : Red North/South
Bit 1 : Amber North/South
Bit 2 : Green North/South
Bit 3 : Red East/West
Bit 4 : Amber East/West
Bit 5 : Green East/West

Bits 6 to 31 of that output card would want to be used for something else, so you don't want the data from the SQO source modifying those bits - the mask would therefore include only bits 0 thru 5....

e.g 16#0000_0000_0000_0000_0000_0000_0011_1111

HTH
 
i guess that is the part that i kinda confusing....not to sound like a newbie here...lol Is how i know what to enter into the mask part..i knew that 65535 would probably work but was not sure. although your method of explanation is easy to understand.
 
i guess that is the part that i kinda confusing....not to sound like a newbie here...lol Is how i know what to enter into the mask part..i knew that 65535 would probably work but was not sure. although your method of explanation is easy to understand.

Even easier to understand -
Mask bit 1 allows the SQO source data to appear in the destination...
Mask bit 0 leaves the destination bit unchanged, allowing it to be used for another function...
 
ok cool...final question...can i put any value into the mask field then, i just picked 65535. not sure how to calulate it but i am sure its easier than what i am making it.
 
You can put any value into the mask field, but it depends which part you want to mask.

If you use the scientific calculator in windoze and put in the bits you want to mask ie 0111000001111110 and then change it to decimal, hex or whatever you want.

Basically the mask number is a the decimal equivalant of a binary number.

Mark
 
You can enter the mask into the instruction field in binary (2#...), or hex (16#...) , or decimal (no prefix) - as I showed you in my earlier post - binary is easiest, and there's no need to use a calculator.

eg. you want bits 0 to 7, and bits 16 to 23 "controlled" by the SQO data, the other bits "left alone"....

Mask = 2#0000_0000_1111_1111_0000_0000_1111_1111

Any bit pattern is allowed
 
Even better, when dealing with Bit Patterns, you can use the Edit Tags tab in the tag database to change the default view of any DINT, INT, or SINT tag data to Binary, using the "Style" selection. Then you can see relationship of bit positions much easier. (I always find it helpfull to enter all 32-bits, even if they have leading zeroes, it keeps everything "in-line").

I say default view, because the "Style" selection on the "Monitor Tags" view of the database is only temporary - try it out.
 
Last edited:
If you have access to RSlogix 500 and emulate 500. Setup a program with a SQO instruction then run it in emulate and go to your SQO instruction, right click it and I think its view special but it will open another window that will allow you to see whats happening in the background. This may help you understand how the mask works.
 
Except that in RS500 you can only enter the mask value in hex

eg H007F
 

Similar Topics

I am having trouble with getting no control of my analog output signal. I am using the SCL function block to control my analog output. The logic...
Replies
11
Views
243
hi all, i have a plc i need to get info from for a site im working on: I have a 1764 Micro Logix 1500 LSP Series C (See Attached Image) im...
Replies
2
Views
373
I currently have a weird issue involving Ethernet IP communication between a ABB CI873 (EthernetIP Module) and a 1756-L83ES. The Layout is as...
Replies
8
Views
749
Possible for two processors in same rack to have separate motion groups across a single Kinetix Rack using a single EN3TR? One 6500/5700 rack, 8...
Replies
1
Views
422
Hi all! I am hoping to find some help understanding the ABB VFD Connection to my Rockwell PLC. I have set up the VFD parameters based on...
Replies
4
Views
660
Back
Top Bottom