Hi folks,
First and foremost, credit where credit's due, thank you daba for the averaging sample provided in a separate post back in 2013.
I've used this sample to try and get an average for our Nox output every minute, hour, day and month. I'm not sure what frequency the averages need to be taken at just yet, it may only be every hour but for now I've been asked to do it by minute until we get more information.
This is my first bit of programming with RSLogix so I'm just looking for some advice relating to the FAL instruction and just a sanity check on what I've done so far. Is there anything glaringly obvious that I'm missing or does it look ok? I am a little confused with the FAL block, I have read the help file relating to it but because I haven't used it before I'm lacking in confidence.
In the sample provided by daba, which I have screenshotted below, the destination and expression are: LogData[Day,FAL_Control.POS] and Date[FAL_Control.POS] respectively. My understanding of this is that each element of array "Date" is copied to the array "Logdata". What purpose does the "Day" part in that string serve then?
The idea here is that we will log, store and print off in a report the averages for the Nox output. I have attached 4 pictures below of what has been done so far. If it all looks good then great, I would just like an experienced eye to have a look over it before I move on, if there is perhaps a better way of going about it etc.
Thanks in advance for your help.:site:
First and foremost, credit where credit's due, thank you daba for the averaging sample provided in a separate post back in 2013.
I've used this sample to try and get an average for our Nox output every minute, hour, day and month. I'm not sure what frequency the averages need to be taken at just yet, it may only be every hour but for now I've been asked to do it by minute until we get more information.
This is my first bit of programming with RSLogix so I'm just looking for some advice relating to the FAL instruction and just a sanity check on what I've done so far. Is there anything glaringly obvious that I'm missing or does it look ok? I am a little confused with the FAL block, I have read the help file relating to it but because I haven't used it before I'm lacking in confidence.
In the sample provided by daba, which I have screenshotted below, the destination and expression are: LogData[Day,FAL_Control.POS] and Date[FAL_Control.POS] respectively. My understanding of this is that each element of array "Date" is copied to the array "Logdata". What purpose does the "Day" part in that string serve then?
The idea here is that we will log, store and print off in a report the averages for the Nox output. I have attached 4 pictures below of what has been done so far. If it all looks good then great, I would just like an experienced eye to have a look over it before I move on, if there is perhaps a better way of going about it etc.
Thanks in advance for your help.:site: