Hi all, First post in this forum.
I am having trouble with a moving average (MAVE) instruction on an RSLogix 5000 controller.
I have very little experience in PLC programming so please excuse me if I seem a bit lost. I am programming in structured text only and haven't quite understood the function block methodology.
I have a task that excutes every 10 seconds and the idea is to calculate a moving 10 minute average for a sampled signal (windspeed).
I have configured a storage array (Mave10MinSamples, REAL(60)) to hold the samples and NumberOfSamples is set to 60
I am not using weights.
The problem is that WindSpeedMAVE.out is set = WindSpeedMAVE.in every 10 seconds and only a single sample is inserted/updated in the storage array (Mave10MinSamples[59]).
I have tried inititalizing the MAVE instruction, changing NumberOfSamples, toggling EnableIn, SampleEnable, EnableOut and a lot of other stuff but nothing seems to do the trick.
What am I missing here?
The status of the MAVE instruction can be seen in the attached screen shot.
I am having trouble with a moving average (MAVE) instruction on an RSLogix 5000 controller.
I have very little experience in PLC programming so please excuse me if I seem a bit lost. I am programming in structured text only and haven't quite understood the function block methodology.
I have a task that excutes every 10 seconds and the idea is to calculate a moving 10 minute average for a sampled signal (windspeed).
I have configured a storage array (Mave10MinSamples, REAL(60)) to hold the samples and NumberOfSamples is set to 60
I am not using weights.
The problem is that WindSpeedMAVE.out is set = WindSpeedMAVE.in every 10 seconds and only a single sample is inserted/updated in the storage array (Mave10MinSamples[59]).
I have tried inititalizing the MAVE instruction, changing NumberOfSamples, toggling EnableIn, SampleEnable, EnableOut and a lot of other stuff but nothing seems to do the trick.
What am I missing here?
The status of the MAVE instruction can be seen in the attached screen shot.