发表于:2004/11/11 13:19:00
#0楼
我是S7300-PLC的一个初学者现在有一段程序,关于模拟值的转换问题(将0-10V电压值信号转换成0~-8.2V电压信号)程序看懂就不明白为何要用这种算法,现将程序附上,还望不吝赐教:
scale singal
L #Singnal
L #Multiplier
*I
L #Divisor
/D
T #Scaled
LIMIT CHECK
L #Scaled
L #Maximum
<I
JC Min
L #Maximum
JU END
Min: TAK
CLR
L #Minimun
>I
JCN END
TAK
END: T #Output
SET
SAVE
“scale”
EN ENO
Multiplier OUTPUT
Divisor
Maximum
Minimun
Singnal
Symbol information
FC21 SCALE FUNCTION FOR ANALOGE SCALING AND MIN/MAX DETECTION
MW20 MULT 10000=100%(为什么要用这个值?)
MW22 DIV 27648=10V
MD24 MAX 10000=100%
MW22 MIN 0=0%
PIW272 MP1 SPEED(0~10V电压信号)
MW62 OUTPUT 10000=100%
“scale”
EN ENO
Multiplier OUTPUT
Divisor
Maximum
Minimun
Singnal
Symbol information
FC21 SCALE FUNCTION FOR ANALOGE SCALING AND MIN/MAX DETECTION
MW56 GLOBAL SPEED SCALE MULT -22671= -8。2V
MW20 DIV 10000=100%
MD48 MAX 0=0V
MD52 MIN -22671= -8。2V
MW62 MP1 SPEED SCALED OUTPUT 10000=100%
MW80 MP1 SPEED SCALED OUTPUT -22671=100%
scale singal
L #Singnal
L #Multiplier
*I
L #Divisor
/D
T #Scaled
LIMIT CHECK
L #Scaled
L #Maximum
<I
JC Min
L #Maximum
JU END
Min: TAK
CLR
L #Minimun
>I
JCN END
TAK
END: T #Output
SET
SAVE
“scale”
EN ENO
Multiplier OUTPUT
Divisor
Maximum
Minimun
Singnal
Symbol information
FC21 SCALE FUNCTION FOR ANALOGE SCALING AND MIN/MAX DETECTION
MW20 MULT 10000=100%(为什么要用这个值?)
MW22 DIV 27648=10V
MD24 MAX 10000=100%
MW22 MIN 0=0%
PIW272 MP1 SPEED(0~10V电压信号)
MW62 OUTPUT 10000=100%
“scale”
EN ENO
Multiplier OUTPUT
Divisor
Maximum
Minimun
Singnal
Symbol information
FC21 SCALE FUNCTION FOR ANALOGE SCALING AND MIN/MAX DETECTION
MW56 GLOBAL SPEED SCALE MULT -22671= -8。2V
MW20 DIV 10000=100%
MD48 MAX 0=0V
MD52 MIN -22671= -8。2V
MW62 MP1 SPEED SCALED OUTPUT 10000=100%
MW80 MP1 SPEED SCALED OUTPUT -22671=100%