RSLOGIX5000 FAL instruction

Chris Taylor

Lifetime Supporting Member
Join Date
Feb 2011
Location
Canterbury
Posts
257
Morning all

I couple of questions if I may, I'm new to AB but up to speed with Mitsubishi and Schneider etc, I have training booked but trying to get a head start.

I have two a small arrays called "pty" and "ptyC" each with 16 dims

I simply want to place zeros in all 16 dims in one array and I want to copy the contents of pty to ptyC,

the instruction FAL seems to do the job

to insert zeros

and to copy contents

only it dosn't seem to work, do they require diffrent controls tags?

many thanks

Chris

powerplan008.jpg powerplan009.jpg
 
Last edited:
Yes, you should use different control tags. You can use the ".DN" (done) bit of the control tag to trigger the next FAL instruction, that way you can guarantee that you copy the array over first before clearing it.
 
the FAL (while a truly noble instruction) is probably overkill for what you're trying to do here ...

suggestion:

look up FLL (Fill File) ...

and CPS (Synchronous Copy File) or COP (Copy File) ...

and I've just GOT to ask: what do you mean by the word "dims" ? ... did you mean to say "DINTS" instead? ...
 
as for your FAL approach ... see if the figure below helps ...

basic ideas:

you need the ".POS" (position) part of the CONTROL structure to make the FAL "march" through the array ...

also ... the FAL is a "transitional" type of instruction ... specifically, its rung needs a FALSE to TRUE transition in order to work ... you might already have that - but your pictures didn't show it ... the "test" instructions are included in mine just for "testing" purposes ...

.

fal_pty.JPG
 
Last edited:
Ron

Thanks for the suggestions,

FLL for the zeros and COP for to copy array to array, easy when you know, works just the way I want.

I'll keep FAL for later when I have made a few more mistakes too learn from.

Many thanks

Chris
 
... when I have made a few more mistakes to learn from.

a very sound philosophical approach ...

in my little corner of the world we don't "make mistakes" ... instead we "generate Opportunities for Educational Advancement" ... (OEA is one of our handiest acronyms) ...

glad we were able to help ...
 
Ron

I used the word "dims" as when I configured the tag, under data type it shows array dimensions as Dim 0, Dim 1 and Dim 2, whats the correct name for the parts of an array in the AB world?

Chris
 
I think "elements" is the official word that you're shooting for ...

each individual "element" (the actual memory location) within an array would be identified by a number punctuated within a set of square brackets ...

the number within the square brackets is called a "subscript" ...

example:

in the address

My_Tag_Array[8]

[8] is a "subscript" which refers to "element" number 8 within the "array" named My_Tag_Array ...

note that element number 8 would be the NINTH element in the array - since the first element would be number 0 ...

are we having fun yet? ...

my advice is to just keeping poking around with this stuff ... you'll eventually get used to it ...
 
Last edited:

Similar Topics

Folks, Having a silly problem. Trying to package a routine up that needs to be repeated ~~50 times into a nice Tidy AOI. I need to do some...
Replies
6
Views
2,304
Hi! So my problem is a little funky, I had Studio 5000 v 24 and 30 installed, but forgot to install RSLogix (which I cannot go without). Is there...
Replies
2
Views
112
So I had an odd request from a customer for the above. I have written the logic and tested it all in one PLC with only using 7 outputs and 7...
Replies
15
Views
427
Hello everyone, I have an RSLogix5000 project which is running live in the factory but I need to make some changes to the logic. I want to test...
Replies
0
Views
1,120
Good Morning Everyone, I'm looking to use the GSV instruction to get I/O fault codes for my project so I know if there's a comms issue in my E/IP...
Replies
5
Views
866
Back
Top Bottom