Daniel Alejandro Martinez Posted October 3, 2017 Report Posted October 3, 2017 (edited) Good day I need help to program this formula in a funtion Block y= (Rf + (X*w-n))/w where Y= avarege of of a analog signal Rf = My analag imput signal X = Previus Y value w = Constant n = Constant Trigger I need make this operation every 0.1s Please Help me. Edited October 3, 2017 by Daniel Alejandro Martinez
Michael Walsh Posted October 3, 2017 Report Posted October 3, 2017 What PLC? What does X equal on the first operation? 1
Daniel Alejandro Martinez Posted October 4, 2017 Author Report Posted October 4, 2017 The first Value is 0.
Michael Walsh Posted October 4, 2017 Report Posted October 4, 2017 This should do it. I made up initial values for your constants (see internal variables in the function block). I also made the Y variable retentive. It will be zero only for the very first time that the function block is ran. Then it will remember the last value each time that power is turned off. I still do not know what PLC, so I just chose the CJ2H. This should be a good sample for you so that you can create your own function block next time. Mr PLC Formula_FB.cxf MrPLC calculation FB.cxp 1
Daniel Alejandro Martinez Posted October 4, 2017 Author Report Posted October 4, 2017 Thank Michael, let me try it
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now