Hi, I'm new here and horribly inept in working with Step7 and i have a problem.
I am trying to use PID control on two analog valves in order to achive steady force on a random surface. My main problem is that I can't get it to work.
My sensor measures from 0-50N and the valves take 0 to 6 bar.
I hve a main OB35 and call a FC which contains the following:
This only for one valve. I can't get the control to work for it at all. I imagine i have some pretty horrbile errors.
Thnx in advance I am getting desperate here!!
I am trying to use PID control on two analog valves in order to achive steady force on a random surface. My main problem is that I can't get it to work.
My sensor measures from 0-50N and the valves take 0 to 6 bar.
I hve a main OB35 and call a FC which contains the following:
Code:
L 4.000000e-001 // an example of desired value 0.4kg
T MD 50
L 1.000000e+002
L 0
-R
L MD 50
*R
L 5.000000e+000 //5 kg maximum
/R
T MD 54 //set point
L "sensor"
T MW 100 //pv_per
L 1.000000e+002
L 0.000000e+000
-R
L 1.000000e-005 // Dead Bandwidth
*R
L 5.000000e+000
/R
T MD 58
L 1.000000e+002
L 0.000000e+000
-R
L 5.000000e+000
*R
L 6.000000e+000
/R
T MD 62 // LMN_HLM
L 1.000000e+002
L 0.000000e+000
-R
L 0.000000e+000
*R
L 6.000000e+000
T MD 66 // LMN_LLM
v1: CALL "CONT_C" , DB41
COM_RST :=FALSE
MAN_ON :=FALSE
PVPER_ON:=TRUE
P_SEL :=TRUE
I_SEL :=TRUE
INT_HOLD:=FALSE
I_ITL_ON:=FALSE
D_SEL :=FALSE
CYCLE :=T#100MS
SP_INT :=MD54
PV_IN :=0.000000e+000
PV_PER :=MW100
MAN :=0.000000e+000
GAIN :=6.000000e+002
TI :=T#500MS
TD :=T#500MS
TM_LAG :=T#1S
DEADB_W :=MD58
LMN_HLM :=MD62
LMN_LLM :=MD66
PV_FAC :=1.000000e+000
PV_OFF :=0.000000e+000
LMN_FAC :=1.000000e+000
LMN_OFF :=0.000000e+000
I_ITLVAL:=0.000000e+000
DISV :=0.000000e+000
LMN :=MD70
LMN_PER :=MW110
QLMN_HLM:=
QLMN_LLM:=
LMN_P :=
LMN_I :=
LMN_D :=
PV :=
ER :=MD74
L MW 110
T "V1"
BE
This only for one valve. I can't get the control to work for it at all. I imagine i have some pretty horrbile errors.
Thnx in advance I am getting desperate here!!