Manipulate bits within INT array in Structured Text?

SirCumference

Member
Join Date
Aug 2014
Location
Milwaukee
Posts
24
Hi, I'm writing a program in Structured Text, and I'd like to create an array of INTs. However, I will sometimes need to operate on individual bits within those INTs. Is that possible? Thanks!
 
You can definitely address the Bits of an INT data element that is part of an Array Tag in the Logix 5000 Structured Text language.

Just address it like you would in relay ladder logic and use it where you would use a BOOL instruction.

MyArrayTag[5].1 for example is the second bit of the sixth element in the array MyArrayTag.
 
Okay, here's the deal. I'm attempting to translate an old Siemens PLC program written in Statement List into Structured Text to run on a Rockwell PLC. As much as possible I'm trying to exactly recreate the logic of the old STL code in the new ST code. The STL code has a data block containing a bunch of INTs. Looking through the STL function blocks, I see some places where bits from those INTs are used for boolean operations, and other places where real numbers are written to the INTs. Since I'm trying not to change the program logic, I'd like use a Structured Text INT array in place of that STL data block, but I'm trying to figure out if that's possible.
 

Similar Topics

I have an application with CIP motion drives Kinetix 5700 where I need to set the exceptions for "excessive position error" and "excessive...
Replies
0
Views
1,044
Is it possible to manipulate an object's properties from the PLC? FactoryTalk ME perhaps vary the length of a line or height of a panel or...
Replies
1
Views
1,335
Hi, Is it possible to manipulate the standard SFB4-TON timer from Siemens in a VAT table? I need to do some qualification tests on a system with...
Replies
5
Views
4,574
Hi I am being given several fault words (as a DINT) from a Drive that I am receiving into a Compactlogix L33ER controller. I have a small...
Replies
12
Views
1,140
Dear Fellows; I am working on a very old machine which is designed in GE 90-30 PLC system. I have some difficulties like 1. How a force to...
Replies
3
Views
346
Back
Top Bottom