因为模拟量模块的输入信号有电压与电流两种 需要通过模块上的开关来选择合适的模拟量输入信号,这样才能保证输入的准确性。
应用模拟量模块时,需要根据输入信号的规格设置右下角的DIP开关(Configuration开关)。DIP开关只对输入信号有效,并且对所有的输入通道都是相同的。
EM231、EM235带模拟量输入通道的模块,还分别有电位器用于对输入信号进行校正。EM231和EM235上的Gain(增益)电位器用于调整输入信号和转换数值的放大关系;EM235上的Offset(偏置)用于对输入信号调零。如果没有精确的信号源,请不要调整。详细调整方法请参照《S7-200系统手册》。
Gain(增益)和Offset(偏置)电位器不能用于调整0 - 20mA和4 - 20mA输入转换!
S7-200模拟量模块没有0 - 20mA与4 - 20mA电流型输入的选择开关,0/4 - 20mA模拟量信号的DIP开关设置一样,但相应的变换必须用程序实现。
表1. EM231
单极性 | 满量程输入 | 分辨率 | ||
---|---|---|---|---|
SW1 | SW2 | SW3 | ||
ON | OFF | ON | 0 - 10V | 2.5mV |
ON | OFF | 0 - 5V | 1.25mV | |
0 - 20mA | 5μA | |||
双极性 | 满量程输入 | 分辨率 | ||
SW1 | SW2 | SW3 | ||
OFF | OFF | ON | ±5V | 2.5mV |
ON | OFF | ±2.5V | 1.25mV |
表2. EM235
单极性 | 满量程输入 | 分辨率 | |||||
---|---|---|---|---|---|---|---|
SW1 |
SW2 |
SW3 |
SW4 |
SW5 |
SW6 | ||
ON | OFF | OFF | ON | OFF | ON | 0 - 50 mV | 12.5μV |
OFF | ON | OFF | ON | OFF | ON | 0 - 100 mV | 25μV |
ON | OFF | OFF | OFF | ON | ON | 0 - 500 mV | 125μV |
OFF | ON | OFF | OFF | ON | ON | 0 - 1 V | 250μV |
ON | OFF | OFF | OFF | OFF | ON | 0 - 5 V | 1.25mV |
0 - 20 mA | 5μA | ||||||
OFF | ON | OFF | OFF | OFF | ON | 0 - 10 V | 2.5mV |
双极性 | 满量程输入 | 分辨率 | |||||
SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | ||
ON | OFF | OFF | ON | OFF | OFF | ±25 mV | 12.5μV |
OFF | ON | OFF | ON | OFF | OFF | ±50 mV | 25μV |
OFF | OFF | ON | ON | OFF | OFF | ±100 mV | 50μV |
ON | OFF | OFF | OFF | ON | OFF | ±250 mV | 125μV |
OFF | ON | OFF | OFF | ON | OFF | ±500 mV | 250μV |
OFF | OFF | ON | OFF | ON | OFF | ±1 V | 500μV |
ON | OFF | OFF | OFF | OFF | OFF | ±2.5 V | 1.25mV |
OFF | ON | OFF | OFF | OFF | OFF | ±5 V | 2.5 mV |
OFF | OFF | ON | OFF | OFF | OFF | ±10 V | 5 mV |
表2. EM235
单极性 | 满量程输入 | 分辨率 | |||||
---|---|---|---|---|---|---|---|
SW1 |
SW2 |
SW3 |
SW4 |
SW5 |
SW6 | ||
ON | OFF | OFF | ON | OFF | ON | 0 - 50 mV | 12.5μV |
OFF | ON | OFF | ON | OFF | ON | 0 - 100 mV | 25μV |
ON | OFF | OFF | OFF | ON | ON | 0 - 500 mV | 125μV |
OFF | ON | OFF | OFF | ON | ON | 0 - 1 V | 250μV |
ON | OFF | OFF | OFF | OFF | ON | 0 - 5 V | 1.25mV |
0 - 20 mA | 5μA | ||||||
OFF | ON | OFF | OFF | OFF | ON | 0 - 10 V | 2.5mV |
双极性 | 满量程输入 | 分辨率 | |||||
SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | ||
ON | OFF | OFF | ON | OFF | OFF | ±25 mV | 12.5μV |
OFF | ON | OFF | ON | OFF | OFF | ±50 mV | 25μV |
OFF | OFF | ON | ON | OFF | OFF | ±100 mV | 50μV |
ON | OFF | OFF | OFF | ON | OFF | ±250 mV | 125μV |
OFF | ON | OFF | OFF | ON | OFF | ±500 mV | 250μV |
OFF | OFF | ON | OFF | ON | OFF | ±1 V | 500μV |
ON | OFF | OFF | OFF | OFF | OFF | ±2.5 V | 1.25mV |
OFF | ON | OFF | OFF | OFF | OFF | ±5 V | 2.5 mV |
OFF | OFF | ON | OFF | OFF | OFF | ±10 V | 5 mV |
表2. EM235
单极性 | 满量程输入 | 分辨率 | |||||
---|---|---|---|---|---|---|---|
SW1 |
SW2 |
SW3 |
SW4 |
SW5 |
SW6 | ||
ON | OFF | OFF | ON | OFF | ON | 0 - 50 mV | 12.5μV |
OFF | ON | OFF | ON | OFF | ON | 0 - 100 mV | 25μV |
ON | OFF | OFF | OFF | ON | ON | 0 - 500 mV | 125μV |
OFF | ON | OFF | OFF | ON | ON | 0 - 1 V | 250μV |
ON | OFF | OFF | OFF | OFF | ON | 0 - 5 V | 1.25mV |
0 - 20 mA | 5μA | ||||||
OFF | ON | OFF | OFF | OFF | ON | 0 - 10 V | 2.5mV |
双极性 | 满量程输入 | 分辨率 | |||||
SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | ||
ON | OFF | OFF | ON | OFF | OFF | ±25 mV | 12.5μV |
OFF | ON | OFF | ON | OFF | OFF | ±50 mV | 25μV |
OFF | OFF | ON | ON | OFF | OFF | ±100 mV | 50μV |
ON | OFF | OFF | OFF | ON | OFF | ±250 mV | 125μV |
OFF | ON | OFF | OFF | ON | OFF | ±500 mV | 250μV |
OFF | OFF | ON | OFF | ON | OFF | ±1 V | 500μV |
ON | OFF | OFF | OFF | OFF | OFF | ±2.5 V | 1.25mV |
OFF | ON | OFF | OFF | OFF | OFF | ±5 V | 2.5 mV |
OFF | OFF | ON | OFF | OFF | OFF | ±10 V | 5 mV |
仿西门子模块计算公式
西门子PLC模拟量用PLC自带的PID算当然好了 但也可以用公式计算。举个仿西门子PLC的例子,如果是4-20mA输入的话,西门子模块中对应读出的数值是6400-32000,如果是0-10V的话,对应的数值时0-32000。在将这些数值转换成对应的压力值就需要加减乘除了。西门子模块有个公式:Ov = [(Osh - Osl)*(Iv - Isl)/(Ish - Isl)] + Osl,其中:Ov: 换算结果Iv: 换算对象Osh: 换算结果的高限Osl: 换算结果的低限Ish: 换算对象的高限Isl: