Chapter 8 High-speed counter, PWM / Pulse train output and Analogue I/O
8-22
8.8
Potentiometers
CPUs other than of the 10-point type are equipped with two potentiometers. Through the use of these potentiometers, it
becomes possible to change values in the special internal outputs from the outside using a tool that looks like a
screwdriver. The resolution is 10 bits, so it is possible to adjust the values from 0 to 3FFH (1 to 1,023).
The potentiometers are found under the cover on the left side of the main unit. The value becomes larger when the dial is
turned clockwise and smaller when turned counterclockwise. In addition, this value is always stored in the special
internal output, regardless of whether the CPU is operating or stopped.
H
L
VR1
H
L
VR2
Figure 8.39 Potentiometers
(1)
Values of the potentiometers
The values entered by means of the potentiometers are stored in the following special internal outputs.
WRF03E:
Potentiometer 1 input value
WRF03F:
Potentiometer 2 input value
Figure 8.40 Potentiometer input value storage special internal output
(2)
Setting a filter for the potentiometer
The input values of the potentiometers fluctuate depending on the operating environment of the main unit etc. If the ratio
of fluctuation is to be reduced, a sampling number can be set in the following special internal output. Once the sampling
number is set, the average of the data obtained in the time period determined by the sampling number calculated by
internal processing is set in WRF03E and WRF03F.
The sampling number can be set between 0 and 40 (0 to 28H). If 0 is set, the data without average is stored in WRF03E
and WRF03F. If a value greater than 41 is set, the sampling number is treated as 40.
WRF06C:
Potentiometer 1 data sampling number
WRF06D:
Potentiometer 2 data sampling number
Figure 8.41 Special internal output for setting input data sampling number
This special internal output is stored in the FLASH memory by turning on various setting write requests (R7F6). Once it
is stored in the memory, it is not necessary to set the value again when the power is turned on for the next time.
(3)
Example
The following shows a simple ladder program using the potentiometers:
By turning potentiometer 1, one of flags Y100 to Y102 turns on.
1] Always substitute the value of potentiometer 1 to
WR0.
2] Delete the lower four bits of WR0 (because lower
four bits are more prone to error due to changes in
resistance caused by temperature, etc.)
3] If WR0 is “0,” Y100 is turned on.
4] If WR0 is 1F, Y101 is turned on.
5] If WR0 is 3F, Y102 is turned on.
WR0 = WRF03E
LSR(WR0,4)
Y102
Y101
Y100
WR0
==
0
WR0
==
1F
WR0
==
3F
Summary of Contents for HIDIC MICRO-EH
Page 1: ...HITACHI PROGRAMMABLE CONTROLLER APPLICATION MANUAL NJI 350B X ...
Page 12: ...MEMO ...
Page 14: ...Chapter 1 Features 1 2 MEMO ...
Page 50: ...Chapter 4 Product lineup and wiring 4 18 MEMO ...
Page 196: ...Chapter 5 Instruction Specifications 5 146 ...
Page 263: ...Chapter 11 Communication Specifications 11 10 MEMO ...