Help - Search - Members - Calendar
Full Version: Converting from SLC to Control Logix
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
semilogical
I have talked about a first out annunciator that I have programmed, it is 8 rungs long and can actually track a large number of alarms in a system.

I need to convert it to a workable program on the Control Logix platform. I attempted to setup the ladder thinking as a PLC/SLC programmer. I'm sure you would all tell me that it doesn't work the same way. ( I found that out when the software gave me the rasberries when I tried to accept the rung.)

I found that before you can indirectly address data types you have to setup arrays and then you must refer to them correctly.

In the SLC we were indirectly addressing the bits in a binary file. our addressing looked something like thsi:

B10/[N7:0]. We moved 1-28 into N7:0 and immediately jumped to the First Out rungs, there were 8 total rungs. In doing this we scanned the First out program file 28 times per program scan. The maximum program scan was 70ms. We had the watchdog set at 100ms.

I'm having no luck in getting the array concept down. I know it had the capacity for a 3 dimensional model but I don't think I need anything more than several 1 dimensional models.

I need to:
1. Set Alarms - Change a range of bits from 1 to 0 (zero is alarm)
2. Set First Out from zero to 1, and setting the first out bit to a 1, multiple sets not allowed
3. Set First out Acknowledge from zero to 1 when the Acknowledge button is depressed
4. Set any subsequent alarm from zero to 1, multiple sets allowed
5. Set indexed display driver from zero to 1, multiple sets allowed
6. Index One shots (used to set First Outs)
7. Index One shots (used to set Subsequent Outs)


I've attached a copy of the First Out rungs and some alarm sets and some of the redirecting of scan for alarm transfer to the first out annunciator.

Just to update TW, I have made progress with Control Logix. I have been able to start programming and you were right, it is pretty simple once you get a grip on what you are doing, now if I can just get a grip on the arrays and how to implement them!
michael G
Boy are you starting in the deep end !!

Ok here we go
Arrays
I was going to RTFM but when I tried to find the correct manual I got lost for a while
Help->online books->common procedures->Chapter 2, address tag data
Some addressing examples for you

SLC => Controllogix

Integer Tables/Arrays
N7 in SLC length of 256
MyN7ArrayTag Defined in Clx as INT[256]
N7:1 => MyN7ArrayTag[1]
N7:[Index] => MyN7ArrayTag[Index]
Bits within the Table/Array
N7:[Index]/[BitIndex] => MyN7ArrayTag[Index].[BitIndex]

Note: Bitindex is 0 to 15 for both as CLX definition is INT (0 to 31 for DINT)

Binary Table
B10 in SLC length of 256
MyB10arrayTag Defined as as BOOL[256*16] (to match SLC maximum number of bits)
B10/0 => MyB10arrayTag[0]
B10:2/4 => MyB10arrayTag[2*16+4]
B10:[Index]/[BitIndex] => MyB10arrayTag[Index * 16 + BitIndex]


First On Alarm
What are you trying to do here? monitor all the alarms until one turns on then capture all alarms that are on that scan into a First on alarm array (as you can tell I have not read the ISA F3A standard)
I would have thought that a combination of FSC FAL and COP could be used to do the same with a faster scan time and less instructions

MG
semilogical
QUOTE(michael G @ Feb 19 2007, 09:06 PM) [snapback]50063[/snapback]

Boy are you starting in the deep end !!

Ok here we go
Arrays
I was going to RTFM but when I tried to find the correct manual I got lost for a while
Help->online books->common procedures->Chapter 2, address tag data
Some addressing examples for you

SLC => Controllogix

Integer Tables/Arrays
N7 in SLC length of 256
MyN7ArrayTag Defined in Clx as INT[256]
N7:1 => MyN7ArrayTag[1]
N7:[Index] => MyN7ArrayTag[Index]
Bits within the Table/Array
N7:[Index]/[BitIndex] => MyN7ArrayTag[Index].[BitIndex]

Note: Bitindex is 0 to 15 for both as CLX definition is INT (0 to 31 for DINT)

Binary Table
B10 in SLC length of 256
MyB10arrayTag Defined as as BOOL[256*16] (to match SLC maximum number of bits)
B10/0 => MyB10arrayTag[0]
B10:2/4 => MyB10arrayTag[2*16+4]
B10:[Index]/[BitIndex] => MyB10arrayTag[Index * 16 + BitIndex]


First On Alarm
What are you trying to do here? monitor all the alarms until one turns on then capture all alarms that are on that scan into a First on alarm array (as you can tell I have not read the ISA F3A standard)
I would have thought that a combination of FSC FAL and COP could be used to do the same with a faster scan time and less instructions

MG


The first out bit will be set by the very first alarm that is scanned. To trip two alarms at the exact moment is very unlikely. What the logic will do is scan one alarm at a time but very quickly. In testing the only time I was able to set more than one bit in the first out word (B11:X) was when I put several 1's in the word at the same time. When the alarms are set in a normal fashion the first one will set the B11:[pointer] to a one and then all other alarms will be subsequent alarms.

I probably didn't give you enough logic to show the whole process, but it has worked on several projects without fail.

I have to be honest, I did the trouble shooting and editing of the first out logic. I've used some of those instructions for displays only, but I hadn't thought about going the other direction.

I will attempt to take a shot at this in the morning.

The ISA standard can be confusing when read in the format they have it in, at least it is for me.
Ghettofreeryder
why not just keep using DINTs or INTs. Address like Bit_Array[index/32].[index and 31] for Dints or Bit_Array[index/16].[index AND 15] for INTs
semilogical
QUOTE(michael G @ Feb 19 2007, 10:06 PM) [snapback]50063[/snapback]

Boy are you starting in the deep end !!

Ok here we go
Arrays
I was going to RTFM but when I tried to find the correct manual I got lost for a while
Help->online books->common procedures->Chapter 2, address tag data
Some addressing examples for you

SLC => Controllogix

Integer Tables/Arrays
N7 in SLC length of 256
MyN7ArrayTag Defined in Clx as INT[256]
N7:1 => MyN7ArrayTag[1]
N7:[Index] => MyN7ArrayTag[Index]
Bits within the Table/Array
N7:[Index]/[BitIndex] => MyN7ArrayTag[Index].[BitIndex]

Note: Bitindex is 0 to 15 for both as CLX definition is INT (0 to 31 for DINT)

Binary Table
B10 in SLC length of 256
MyB10arrayTag Defined as as BOOL[256*16] (to match SLC maximum number of bits)
B10/0 => MyB10arrayTag[0]
B10:2/4 => MyB10arrayTag[2*16+4]
B10:[Index]/[BitIndex] => MyB10arrayTag[Index * 16 + BitIndex]


First On Alarm
What are you trying to do here? monitor all the alarms until one turns on then capture all alarms that are on that scan into a First on alarm array (as you can tell I have not read the ISA F3A standard)
I would have thought that a combination of FSC FAL and COP could be used to do the same with a faster scan time and less instructions

MG

If you are using less than 32 bits can you use one DINT and avoid having to use the "word" index? Should I limit myself to using the bits 0-15 and stay with the INT type numbering base?

B10:[Index].[BitIndex] where Index would equal 0-999 in the SLC and teh BitIndex would equal 0-15 in the SLC.

I currently don't see more than 16 alarms in this system, it is a simple BMS system with no extraneious controls associated on my end. My current count is 9. Can I use the format you have above and only use the bit index?

EDIT:

I tried entering some arrays. Failed again. I set bits for an array, initial alarm tracking using "A_Set_Array.0" through .8 Those seemed to like the format. When I tried to manipulate the ladder for scanning all 9 alarms I get the following messages:

Error: Rung 0, XIO, Operand 0: Invalid array subscript specifier.
Error: Rung 0, ONS, Operand 0: Invalid array subscript specifier.
Error: Rung 0, OTL, Operand 0: Invalid array subscript specifier.

This is how I have the information entered:

XIO A_Set_Array[A_Bit_Index] XIO First_Out_lockout ONS A_ONS_1[A_Bit_Index] OTL A_First_Out[A_Bit_Index]

I'm going to leave this as is. I tried placing a "." between the array and the bit index, it worked.

I'm moving ahead slowly, but moving ahead. Thanks for the help and standby for more questions!!


semilogical
Control Logix Guru's - Heads up - I have another question.

If I set bits in an array.
Alarm_Set.0
Alarm_Set.1
Alarm_Set.2
Alarm_Set.3

And that information is transferred to
First_Out.0
First_Out.1
First_Out.2
First_Out.3

And Then to
Display_Lights.0
Display_Lights.1
Display_Lights.2
Display_Lights.3

Have I applied the logic correctly if I write the following code:

XIC Display_Lights.0 OTE PL_High_Temperature
etc.

Or should it be

XIC Display_Lights.[0] OTE PL_High_Temperature


Gerry
QUOTE(semilogical @ Feb 23 2007, 06:39 AM) [snapback]50257[/snapback]
Control Logix Guru's - Heads up - I have another question.

If I set bits in an array.
Alarm_Set.0
Alarm_Set.1
Alarm_Set.2
Alarm_Set.3


If Alarm_Set is a DINT, INT, or SINT, then the above syntax is correct for referencing the contained bits.

If you have defined Alarm_Set as a BOOL array, then the syntax is Alarm_Set[0] - note no period.

Gerry
from PM:
QUOTE
If an array is written as a bool is there a limit on the number of bits addressed?


From Rockwell literature:
QUOTE
The maximum array size is 2 Mbytes. The software displays a warning if you try to create an array that is too large. The software also displays a warning if an array is 1.5-2 Mbytes in size, even though these sizes are valid.


Maximum array size is specified in bytes, so the maximum number of elements depends on the data type of the array.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.