pic.programmer
Advanced Member level 3
- Joined
- Aug 19, 2015
- Messages
- 773
- Helped
- 141
- Reputation
- 284
- Reaction score
- 140
- Trophy points
- 43
- Activity points
- 7,531
I am posting the screenshot (Proteus simulation) of the project. Is the values it is showing correct ?
// --- calculate total ---
RetVal = ErrValue + Controller.PID_Integrated - DiffValue; // mind the minus sign!!!
Not actually non-zero, just -0.0, a zero with sign bit set. You can either consider it as an ambiguity brought up by the float format or a mikroE float library bug, whatever you prefer.RetVal shows a non zero value.
Init_PID()
Init_PID()
PID_Calculate()
It is not working, but why ?
Does that mean that if I have a similar ADC setupt and my MinOutput and MaxOutput values are -100 and 100 (-100 = TRIAC fully ON, 100 = TRIAC fully OFF)
This means that -100 should steer the triac fully OFF, while// Functionresult: PID function of (SetPoint, InputValue) of "Controller",
// a positive value means "InputValue" is too low (< SetPoint), the process should take action to increase it
// a negative value means "InputValue" is too high (> SetPoint), the process should take action to decrease it
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?