Analog Value Treatment
Analog Value Treatment
Programming examples
Example 1
An input voltage of 0 ... +10V is to be deposited in the data register D 15.56 in terms of
the units 0 ... 255.
Example 2
The input voltage of 0 ... +10V is to appear in data register D 15.60 in volts.
Example 3
Switch-on delay with analog timing. The analog set value of 0 ... 255 is stored in data
register D 15.00.
Analog timers
It is possible to set various times through the use of the analog inputs. Instead of
utilising a data registers or a constant, the analog input can be used as an operand in
which the value present at the analog input is taken as the preset value for the timer.
Program example
A voltage of 0 ... +10V is to be produced at the output. Values in the range 0 ... 255 are
to be set at channel 0 of the analog input (data register D 15.00) using the potentiometer
block type ATP 20.
Analog modules
Analog inputs
The extension modules convert analog process-signals (0 ... +10V, 0 ... +20mA, Pt 100,
0 ... 0.5V) into digital values for the CPU. During the I/O-phase these digital values are
copied into the internal RAM-memory of the CPU (4 channels per I/O-phase).
Access for processing in the program is effected via the R-register (word).
The values in the R-register have to be written in binary form.
When the SELECONTROL® PMC is started, the old values are still in the R-register.
Correct measurement values are available only after the first conversion time has
elapsed.
This situation has to be taken into account in the program, e.g. by introducing delay
periods.
R-Register ( 16 bits ):
0 0 0 0 MSB X X X X X X X X X X LSB
The formulas for Pt 100 calculations are based on the linearisation of the Pt 100
characteristic curve over the temperature range between 0 and 100°C. Temperatures can
hence also be calculated that lie slightly outside this range.
Note: Take the possible measurement inaccuracies into account that might occur
through this linearisation. If the deviation is seen to be too great then the Pt
100 will have to be newly linearised on the basis of the information supplied
by the manufacturer concerned.
Programming example
The analog signal of channel 0, plug-in-board 04.00 is to be written as a decimal value
into data register D 00.00. Additionally, the output 01.00 should be activated if the
largest measurement value is reached.
The input parameters are adjusted using the code switcher which is described in the
section entitled "Hardware description".
Analog outputs
The extension modules convert digital values from the CPU into the analog signals
0 ... +10V, ±10V or 0 ... +20mA.
Access for processing in the program is effected via the R-register (word).
The values have to be written in binary form into the R-register.
When the SELECONTROL® PMC is started, the old values are still in R-register.
Correct measurement values are available only after the first conversion time has
elapsed. This situation has to be taken into account in the program, e.g. by introducing
delay periods.
Example
When the input 00.00 is not set, a value of +3V should be generated by channel 1 of the
analog output module in slot 3 and channel 2 of the same module should generate a
value of +4mA.
Ranges: Channel 1: 0 ... +10V
Channel 2: 0 ... +20mA
Channel 1: D = 409.5 x U = 122810
Channel 2: D = 204.75 x I = 204.75 x 4 = 81910
Program
Line No. Operation Operand Remark
0000 LN I 00.00 If not input
0001 FTW K 01228 Read constant
0002 DEB Conversion dec. > binary
0003 STW R 05.02 Write channel 1
0004 FTW K 00819 Read constant
0005 DEB Conversion dec. > binary
0006 STW R 05.04 Write channel 2
The input parameters are adjusted via code switchers which are described in the section
entitled "Hardware description".