I am using pid for temperature control on s7 200, cpu224 i/o module 231 and 232,
1.i am using ac0(memory) for giving set point values to pid,i try different mov commands(word,dword,string,real) to move constant vales from 1-32000 but i got values on pid aco(set point)from 0-1.but i can give any value directly without using memory from 1.0-32000.0.
2.how it is possible i can divide set point vales on time so that i get sp values like analog(change w.r.t time)
please guide me regarding this issue
This from the S7 200 manual -
Both the setpoint and the process variable are real world values whose magnitude, range, and engineering units could be different.
Before these real world values can be operated upon by the PID instruction, the values must be converted to normalized, floating-point representations.
The first step is to convert the real world value from a 16-bit integer value to a floating-point or real number value.
The following instruction sequence is provided to show how to convert from an integer value to a real number.
ITD AIW0, AC0 //Convert an input value to a double word
DTR AC0, AC0 //Convert the 32-bit integer to a real number
The next step is to convert the real number value representation of the real world value to a normalized value between 0.0 and 1.0.
The following instruction sequence shows how to normalize the bipolar value in AC0 (whose span is 64,000) as a continuation of the previous instruction sequence:
/R 64000.0, AC0 //Normalize the value in the accumulator
+R 0.5, AC0 //Offset the value to the range from 0.0 to 1.0
MOVR AC0, VD100 //Store the normalized value in the loop TABLE
If this does not help then consider using the Wizard -
STEP 7-Micro/WIN offers the PID Wizard to guide you in defining a PID algorithm for a closed-loop control process.
Select the Tools > Instruction Wizard menu command and then select PID from the Instruction Wizard window.