Comparing Converted Values on an Expansion Base
Configuration :
5-slot local base : On Slot 0, mount an YR16A.
5-slot expansion : On Slot 0, mount a RD04A.
5-slot expansion : On Slot 0, mount a RD04A.
Initial Setup :
Used Channel | Channel 1 |
Type of RTD | PT100 |
Type of Digital Output | -192~16191 |
Max. Temp. Input Value | 400oC |
Min. Temp. Input Value | -100oC |
Explanation for Program(Scan Program) :
The value set up to buffer memory is inputted as TO command.
Flag requesting to set up an operation condition is on.
After making sure that flag indicating operation condition set up of the RTD module is 0, flag requesting operation condition is off.
After being initialized, the RTD module starts to be converted according to the set values.
If the value of Buffer Memory 1 where converted temperature value is stored is
more than -100oC and less than or equal to 0oC, Y0000 is on.
more than 0oC and less than or equal to 300oC, Y0001 is on.
more than 300oC and less than 400oC, Y0002 is on.
In case that the wire is cut-off after reading the information about the operation channel, Y0003 is on and Operation Outputs(Y0000~Y0002) are off.
Select the menu to register Scan program in the CICON.
Point
If flag requesting to set up an operation condition is set and reset, a RTD module is operated with the set values inputted to buffer memory by TO command. Otherwise, it is continuously operated with previously set values.
The initialization of an analog module can be set up in the optional card setup.
Scan Program :
Row 0 : Expansion 1-Slot 0-Channel 1: Enable to convert
Row 1 : Channel 1: PT100
Row 2 : Channel 1: -192~16192 is set up as digital input.
Row 3 : Channel 1: Maximum temperature input value is 400oC.
Row 4 : Minimum temperature input value: -100oC
Row 5 : Data for setting up temperature
Row 6 : Requesting to set up operation condition(Y52) is set.
Row 7 : When Indicating operation condition set up(X5A) is on falling edge, requesting to set up operation condition(Y5A) is reset-> The set values of the RTD module has been changed.
Row 8 : To start the comparison program after the set values of RTD have been revised, M0000 is set.
Row 9 : The converted temperature value of Channel 1 is read and stored in D0000.
Row 10 : The information about operating channel is read and stored in D0001.
Row 11 : Through the information about the operating channel, it is checked whether the wire for Channel 1 is cut-off.
Row 12 : If the converted temperature value of Channel 1 is more than -100oC and less than 100oC, Y0000 is output.
Row 13 : If the converted temperature value of Channel 1 is more than 100oC and less than or equal to 300oC, Y0001 is output.
Row 14 : If the converted temperature value of Channel 1 is more than 300oC and less than or equal to 400oC, Y0002 is output.
Row 15 : In case the wire is cut-off, Y0003 is output.
Row 16 : END
Explanation for Program(Scan Program) :
Comparing Temperature Values
The value actually stored in buffer memory is "Actual Temperature * 10" and is indicated up to the first decimal place.
Accordingly, to compare with the temperature value in the buffer memory, you multiply the temperature value compared by 10 and compare the result with the read value.
If the value read from a buffer memory and stored in the D0000 is 3304, it is actually 330.4oC.
To compare with 330oC, compare 3304 with 3300(330*10).
Comparing Digital Values
The RD04A module converts the temperatures from –200 to 600oC to the digital values from 0 to16000.
If a max. and a min. temperature value are set up, the input max. and min. temperature value are converted to 0 and 16000.
As the max. and min. temperature value are –100 and 500oC, -100oC is converted to 0 and 500oC to 16000.
600(oC) : 16000(Digital Value) = 1(oC) : X(Digital Value)
X = 26.66 The digital value per one oC is about 26.666.
Accordingly,
when –100oC, the digital value is 0
when 300oC, the digital value is 26.666*(100+300) = 10666.
when 400oC, the digital value is 26.666*(100+400) = 13333.