What i would like to do is transpose some filter routine ladder logic to Structured Text. Not really sure how to attack this one because its not something I can put into if/else statements. I have three parameters to pass to the filter routine
a. value to filter
b. previous filtered value
c. time constant of the filter
once passed to the filter the filter exponent and coefficient is calculated and a output filter value is returned.
The rslogix5 ladder used SBR to pass the inputs. I figure all i need to do is define a UDT for the filter float inputs.
UDT = FilterFlt
Member Names = FilterValueActual
FilterValuePrevious
FilterTimeConstant
Am I on the right track?
a. value to filter
b. previous filtered value
c. time constant of the filter
once passed to the filter the filter exponent and coefficient is calculated and a output filter value is returned.
The rslogix5 ladder used SBR to pass the inputs. I figure all i need to do is define a UDT for the filter float inputs.
UDT = FilterFlt
Member Names = FilterValueActual
FilterValuePrevious
FilterTimeConstant
Am I on the right track?