RSlogix5000 FAL fail inside of an AOI

Rockmonton

Member
Join Date
Aug 2016
Location
Yarbo, Saskatchewan
Posts
3
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 array math, Summing and Averaging a few dimensions of a 1000 element x 7 array.

In the routine to develop the logic, which works, I have been using the following pseudocode to sum the array

Timer Done > Clear Sum > FAL (ALL) [Control_For_FAL, Output: Sum, Expression: (Sum + Array(Control_For_FAL.POS)]

This works just fine in RSLogix, but when wrapped into the AOI I can't get it to work. The rest of my FFU/FFL stuff works alright but struggling here.

Next step would be to write a few array sum/avg AOIs in structured text and package them in, but there's no reason this shouldn't work that I can find....

Put a couple of outputs to try and figure out what's going on, it appears that I can't get the control structure to cycle through, as the Position gets set to zero (Tried leaving it at an arbitrary middle number during testing) and the Dn bit does not come on.
 
How is the AOI being called? (Continuously or ??)
Post a screen shot of the rung with the FAL on it.
 
Digging in a bit further, It's as if the Enable and Done bits are being energized at the same time.

The routine is being called continuously.

The timer is a variable based on inputs, but typically is 200-1500ms.

It's gotta be something stupid, but i'm out of ideas for today.

endnbits.png aoi_rung.png ladder_rung.png calling_routing.png
 
I don't have time to look at what you've posted - but maybe this idea will help ...

an FAL - like several other types of instructions - is a TRANSITIONAL type instruction ... that means that once it has been executed with TRUE logic - then it needs to be executed with FALSE logic - basically in order to "reset" it for another operation ...

try this - put an RES (Reset) instruction just ahead of the FAL instruction (inside your AOI) and see if that helps ... set the RES address for the tagname for the FAL's CONTROL tag ...
 
^ What Ron said....I had this problem with an FAL inside a FOR-NEXT routine. It was because the FAL never saw false to true transitions on subsequent calls.
 
Also, you can often use a subroutine that accepts parameters instead of an AOI in many cases
 
Tried the reset, nada, tried alternating the enable on/off through alternating scans and nada.

Ended up whipping up a little structured text AOI for averaging and summing the arrays that work just fine, though I think I need to play with it a bit as far as the in/out because occasionally I return a zero, probably something to do with using an InOut instead of an Out // passed by value issue, will update when I get a chance to muck with it a bit more.
 

Similar Topics

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...
Replies
7
Views
9,374
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
121
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
428
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,121
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
869
Back
Top Bottom