Omron SYSMAC C200H-AD003 Operation Manual page 131

Analog i/o units
Hide thumbs Also See for SYSMAC C200H-AD003:
Table of Contents

Advertisement

Sample Programs
Program Example
The following program can be executed only with the C200HS, C200HX/HG/HE CPU Units.
• Data Flow (Unit Number 0): Word 101 (AD Conversion Value) → Word 200 (Calculation Result)
Execution condition
1, 2, 3...
DM Area Settings
Input signal range: 0 to 10 V / 1 to 5 V / 4 to 20 mA
DM0000: 00C8
DM0001: (Used for calculation)
DM0002: 0000
DM0003: 0000
DM0004: 4400
DM0005: 1130
DM0006: (Used for calculation)
If the result of the binary-to-BCD conversion is negative, an error will be generated by the ROOT(72) instruction.
With a signal range of –10 to 10 V, scaling is executed by augmenting the negative portion (–10 V–5%). In this
program example, the value of DM 0000 is converted to 0898. Refer to page 116.
Sample Program 8: Mean Value Processing
Data is taken for the set number of samplings and the mean value is calculated.
Unit Settings
Item
Unit
Unit number
Operation mode
Input 1 used
Input signal range
120
1. The negative number portion is added to the conversion value (word 101).
2. The binary data is scaled to a range of 0 to 4400.
3. The scaling results are multiplied by 4400.
4. The square root is calculated, and the result is output to word 200.
Digital value for -5%
Conversion value +C8 (-5% portion)
Lower limit: BCD
Lower limit +C8 (-5% portion): BIN
Upper limit: BCD
Upper limit +C8 (-5% portion): BIN
Setting contents
C200H-AD003
#0
Normal mode
---
Input number 1, 0 to 10 V
ADB(50)
Conversion value +
101
Negative number
DM0000
DM0001
SCL(––)
Scaling is executed using
DM0001
augmented value. Result is
DM0002
output to word DM 0006.
DM0006
MUL(32)
Result of step #2 (above)
DM0006
is multiplied by 4400.
#4400
DM0006
ROOT(72)
Square root is calculated, and
DM0006
result is output to word 200.
200
Used with SCL instruction
---
Unit number switch: 0
Back-panel DIP switch: All OFF
DM 1000 = 0001
DM 1001 = 0001
Appendix C
(1)
(2)
(3)
(4)
Actual settings

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac c200h-da003Sysmac c200h-da004Sysmac c200h-mad01

Table of Contents