The text of a manual · part 5 of 9
SYSMAC C200H-AD001/DA001 Analog I/O Units Operation Guide: SECTION 2 - C200H-AD001 Analog Input Unit, pages 22 to 28
Pages 22 to 28 of 61, from SYSMAC C200H-AD001/DA001 Analog I/O Units Operation Guide
The original document is the PDF (608 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
Filed in the catalog under the Omron C500-AD001
Page 22
Section 2-1
Before Operation Input Wiring Considerations
When wiring inputs, apply the following points to avoid noise interference and optimize Analog Input Unit performance. • Use shielded twisted-pair cable for external connections and power lines. • Route input cables separately from the AC cable, and do not run the Unit’s cables near a main circuit cable, high voltage cable, or a non-PC load cable. • Be sure to install surge-absorbing diodes or surge absorbers for inductive loads (relays, solenoids, electromagnetic valves, etc.) They should be installed right next to relays and solenoids. Use surge-absorbing diodes with a dielectric strength of at least five times the circuit voltage. DC Relay
AC Relay
Surge absorber Surge-absorbing diode (Example: ERB44-06, by Fuji Electric)
Solenoid, etc.
Surge absorber
• If there is noise interference from power lines (if, for example, the power supply is shared with electrical welding devices or electrical discharge machines, or if there is a high-frequency generation source nearby) install a noise filter at the power supply input area. • Use at least a class-3 ground (to 100 Ω or less), with as heavy a wire as possible (i.e., at least 1.25 mm2).
14
Page 23
Bit and DM Area Allocations
2-2
Section 2-2
Bit and DM Area Allocations
IR Area Allocation
C200H Analog Input Units are allocated ten words each from the portion of the IR area (IR 100 to IR 199) that is reserved for Special I/O Units. The words that are allocated a particular Analog Input Unit depend on the setting of the unit number on the front panel of the Unit. Those ten words are then reserved as an I/O refresh data area, and the bits that comprise that area are refreshed with every I/O refresh scan by the PC.
SYSMAC C200HS/C200H/C200HX/HG/HE PC
C200H-AD001 Analog Input Unit
(Work area) Unit #0
IR 100 to 109
Unit #1
IR 110 to 119
Unit #2
IR 120 to 129
Unit #3
IR 130 to 139
Unit #4
IR 140 to 149
Unit #5
IR 150 to 159
Unit #6
IR 160 to 169
Unit #7
IR 170 to 179
Unit #8
IR 180 to 189
Unit #9
IR 190 to 199
(I/O refresh data area)
At the I/O refresh by the PC, outputs (PC to Unit) and inputs (Unit to PC) are refreshed in order with every scan.
IR n
OUT refresh
IR n + 1 to IR n +5
IN refresh
(n = 100 + 10 x unit number)
The OUT and IN refreshes are as seen from the PC.
Note The unit number that is set for an Analog Input Unit must not be used for any other Special I/O Unit. If the same unit number is set more than once, an I/O UNIT OVER error will be generated and operation will be stopped. DM Area Allocation
SYSMAC C200HS/C200H/C200HX/HG/HE PC
C200H-AD001 Analog Input Unit
(DM area) Unit #0
DM 1000 to 1011
Unit #1
DM 1100 to 1111
Unit #2
DM 1200 to 1211
Unit #3
DM 1300 to 1311
Unit #4
DM 1400 to 1411
Unit #5
DM 1500 to 1511
Unit #6
DM 1600 to 1611
Unit #7
DM 1700 to 1711
Unit #8
DM 1800 to 1811
Unit #9
DM 1900 to 1911
(Fixed data area)
Automatically transferred to each unit at power up or when Special I/O Restart Flag is turned ON.
DM (m) to DM (m+ 7)
Scaling data
DM (m + 8) to DM (m +11)
Mean data
(m = 1000 + 100 x unit number)
(For more information regarding DM area allocation, refer to DM Allocations at the end of this section.)
15
Page 24
Bit and DM Area Allocations
Section 2-2
IR Allocations I/O
Wd (IR)
OUT n
IN n+1 n+2 n+3 n+4 n+5
Bit 15 0
14 0
13 0
12 SQ
11 PK
10 09 08 07 Mean value processing Input 4
0
0
0
0
0
Input 3
Input 2
06 05 04 03 0 Scaling execution
Input 1
Input 4
Input 3
Input 2
02
01 OA
Input 1
Input 1 A/D conversion data or processing data Input 2 A/D conversion data or processing data Input 3 A/D conversion data or processing data Input 4 A/D conversion data or processing data 0 0 OD Input pts. IR Disconnection detection 00: 4 pts. 01: 2 pts. Input 4 Input 3 Input 2 Input 1 10: 1 pt.
n+6 to n+9
00 CP
SE
Not used.
Note The following abbreviations are used in this table. SQ: square root calculation; PK: peak value; OA: offset adjustment; CP: A/D conversion prohibited; OD: outputs disabled; IR: input range; SE: setting error. A/D Conversion Data
Processing Data
Input range
Binary data
0 to 10 V, 1 to 5 V, 4 to 20 mA
0000 to 0FA0
When scaling, mean value processing, peak value, or square root calculation is executed, the resulting data is output. Note When scaling is executed, it is set in words n+1 through n+4 in BCD.
IR Area Contents: Outputs Address Word (IR)
n
16
Item
Contents
Bit 15 to 13 12
––– Square Root ON Bit
Not used. Set each bit to 0 (i.e., OFF). Turn this bit ON (i.e., set it to 1) to execute the square root calculation. It is used for all inputs.
11
Peak Value ON Bit
Turn this bit ON (i.e., set it to 1) to execute the peak value function. It is used for all inputs.
10 to 07
Mean Value ON Bit
Turn these bits ON (i.e., set them to 1) to calculate the mean values for the respective inputs. Bits 07 to 10 correspond to inputs 1 to 4.
06 05 to 02
––– Scaling ON Bit
Not used. Set to 0 (i.e., OFF). Turn these bits ON (i.e., set them to 1) to execute scaling for the respective inputs. Bits 02 to 05 correspond to inputs 1 to 4.
01
Offset adjustment
Turn this bit ON (i.e., set it to 1) to execute the offset adjustment. The adjustment is carried out automatically at power up, so this bit does not normally need to be used.
00
A/D conversion prohibition
Turn this bit ON (i.e., set it to 1) to prohibit A/D conversion. It is used for all inputs.
Page 25
Bit and DM Area Allocations
Section 2-2
IR Area Contents: Inputs Word (IR)
Bit
Item
Contents n+1
15 to 00
Input 1 A/D conversion data or processing data
The A/D conversion data (binary) is set here for each input. (The data is set in BCD for scaling.)
n+2
15 to 00
Input 2 A/D conversion data or processing data n+3
15 to 00
Input 3 A/D conversion data or processing data n+4
15 to 00
Input 4 A/D conversion data or processing data
15 to 09 08
––– Output disabled
Not used. Conversion data is unstable at power up, so this bit prohibits A/D conversion data from being output. It remains ON for approximately 100 ms after the power is turned on.
07 to 06
Number of inputs
05
Input range
The number of inputs (4, 2, or 1) is determined by the status of pin numbers 1 and 2 of the DIP switch on the rear panel of the Analog Input Unit. The status of pin 2 affects bit 07, and the status of pin 1 affects bit 06. The status of this bit reflects the setting of pin 3 of the rear-panel DIP switch.
04 to 01
Input Disconnect Flag
When an input is disconnected, the corresponding bit is turned ON (i.e., is set to 1). Bits 01 to 04 correspond to inputs 1 to 4 respectively. (See note 1.)
00
Setting Error Flag
This bit turns ON (i.e., is set to 1) if the data set in the DM area is wrong. (See note 2.)
n+5
Note
1. This bit turns ON under the following conditions: • An input is 0.5 V or less when set for 1 to 5V. • An input is 2 mA or less when set for 4 to 20 mA. • The input does not function when set for 0 to 10 V. 2. The Setting Error Flag turns ON when the scaling upper and lower limits are not in BCD or when the number of mean processing terms is 0000 or not in BCD. 3. Even if scaling or mean processing are not executed, and regardless of whether or not inputs are used, the data described in note 2 will cause the Setting Error Flag to turn ON. This will have no effect on operation, however. 4. n = 100 + 10 x unit number
DM Allocations Bit
Word DM (m)
15 14 13 12 11 Input 1, scaling lower limit data
10
09
08
DM (m+1)
Input 1, scaling upper limit data
DM (m+2)
Input 2, scaling lower limit data
DM (m+3)
Input 2, scaling upper limit data
DM (m+4)
Input 3, scaling lower limit data
DM (m+5)
Input 3, scaling upper limit data
DM (m+6)
Input 4, scaling lower limit data
DM (m+7)
Input 4, scaling upper limit data
DM (m+8)
Input 1, number of samples for mean processing
DM (m+9)
Input 2, number of samples for mean processing
DM (m+10)
Input 3, number of samples for mean processing
DM (m+11)
Input 4, number of samples for mean processing
07
06
05
04
03
02
01
00
17
Page 26
Functions and Programming Note
Section 2-3 1. The DM area that is used is a read-only area, so the data cannot be written from the program. Use the Programming Console to set data by changing the present value or changing three words together. 2. The range for setting scaling data is 0000 to 9999 (BCD). Make sure that the lower limit is smaller than the upper limit. 3. The range for setting the number of times that sampling is to be executed for mean value processing is 0002 to 9999 (BCD). 4. Data that is set in the DM area is transferred either at the time of power up or when the Special I/O Unit Restart Bit is turned ON. Any data that is set in the meantime will remain invalid until then.
DM Contents Words
Bits
Item
Data contents
DM (m) to DM (m+7)
15 to 00
Scaling data
The scaling data (upper and lower limits) is set in BCD (0000 to 9999), using two words for each input. Set the lower limit in the rightmost word and the upper limit in the leftmost word, and make sure that the lower limit is smaller than the upper limit.
DM (m+8) to DM (m+11)
15 to 00
Number of terms for calculating mean value
The number of samples to be taken for calculating the mean value is set in BCD (0002 to 9999) for each input. DM words m+8 through m+11 correspond to inputs 1 to 4.
2-3
Functions and Programming The C200H-AD001 Analog Input Unit provides six functions: • Input signal range setting • Square root • Scaling • Mean value • Peak value • Input disconnection detection These functions are set using Unit switches and Peripheral Devices, such as a Programming Console. The words allocated to the Unit in the DM Area (DM m to DM m+11) cannot be written from user program and all data set in these words must be written from a Peripheral Device. When inputting data from a Programming Console, use the operations to change present values. When inputting from the SSS (SYSMAC Support Software), use the DM editing operations. The data set in the DM area is transferred to the Analog Input Unit when either of the following steps is taken. Be sure to perform one or the other of these steps whenever new data has been set or data has been changed. • Turning ON the power to the C200H/C200HS/C200HX/HG/HE CPU. • Turning ON the Restart Bit allocated to the Unit as a Special I/O Unit (AR 0100 to 0109). Any or all of the six functions can be used at the same time. Data will be processed in the following sequence and the final results will be output to words n+1 to n+4: analog-to-digital conversion → square root → scaling → mean value → peak value.
18
Page 27
Functions and Programming
Section 2-3
2-3-1 Input Signal Range Setting The C200H-AD001 can convert analog input signals in three ranges: 0 to 10 V, 1 to 5 V, or 4 to 20 mA. The range is set on pin 3 of the DIP switch as shown below Pin 3 OFF
Input range 1 to 5 V 4 to 20 mA
ON
0 to 10 V
If the 0 to 10 V setting is used, it must be used for all four inputs. The 1 to 5 V and 4 to 20 mA ranges can be used at the same time for different inputs. The digital data is in 12-bit binary code (0000 to 0FA0), and resolution is 1/4000 full scale. Analog Input vs. Digital Output
Decimal equivalent of binary code
Decimal equivalent of binary code
4000 (0FA0)
4000 (0FA0)
0 0V
10 V
Analog input
0 1 V (4 mA)
5 V (20 mA)
Analog input
Note An offset error is likely to occur when power is turned on. The full scale of converted data is 4000, and the remaining 95 is used for offset/gain.
2-3-2 Square Root The square root function is used to convert quadratic data, such as thermocouple inputs, to linear data. The function is activated for all inputs when the Square Root ON Bit (IR 1n012, where n is the unit number) is turned ON. The square root function can be used at the same time as the scaling and mean value functions. If all three functions are used, the square root of the converted input value is taken first and then scaling and mean value calculations are performed. The square root function uses an 80-bit floating decimal system. Only the integer value is kept, the remainder is truncated. Square root value = √(converted input value (BCD) × 4000) Note If the Square Root ON Bit (IR 1n012, where n is the unit number) is turned ON, square root calculations will be performed for all inputs.
19
Page 28
Functions and Programming
Section 2-3
2-3-3 Scaling
04
03
02
Input 2
Input 1
Bit 05
Input 3
The scaling function automatically converts the analog input signal to a preset range for use in specific engineering applications. The scaling function is executed for an input when its Scaling Bit is ON, i.e., it can be set separately for each input. This function can be used at the same time as other functions. To set this function for an input, turn ON the Scaling Bit corresponding to that input in word n.
Input 4
Word n
The high and low limits of the output data range for each input are 4-digit BCD values preset in the DM area, as shown in the following table (n is the unit number set on the front panel.) A lower limit must be less than the corresponding upper limit. DM word
Range limit (BCD)
DM word
Range limit (BCD)
Bit of IR 1n0
Scaling bit
1n00
Input 1 lower limit
1n04
Input 3 lower limit
02
Input 1
1n01
Input 1 upper limit
1n05
Input 3 upper limit
03
Input 2
1n02
Input 2 lower limit
1n06
Input 4 lower limit
04
Input 3
1n03
Input 2 upper limit
1n07
Input 4 upper limit
05
Input 4
Set the scaling data with the Programming Console, this data cannot be changed from the user’s program. Data set in the DM area is transmitted when the Unit is turned on or initialized. If data is modified in the middle of a session, then the modified data becomes effective the next time the Unit is turned on, or by toggling the appropriate Special I/O Restart Bit in the AR area. Scaled data is calculated using the formula below. Only the integer value is kept, the remainder is truncated. Scaling data =
20
Input data × (upper limit – lower limit) 4000
+ lower limit