10.4 High-speed Counter Cam Control Instruction
10-19
Upper limit control
With the F165 (CAM0) instruction, the control with a specified upper limit can be performed.
The settings for enabling/disabling the upper limit control and the upper limit are specified in
the data table.
Upper limit control: Enable Upper limit control: Disable
Counting range 0 to Upper limit
Negative min. value to Positive max.
value
Operation
when
exceeding
the counting
range
When
added
When the elapsed value exceeds the
upper limit, it returns to 0.
When the elapsed value exceeds the
positive maximum value, it returns to
the negative minimum value.
When
subtracted
When the elapsed value falls below 0,
it returns to the upper limit.
When the elapsed value falls below
the negative minimum value, it returns
to the positive maximum value.
Data table settings
S, S+1
High-speed counter channel
Upper and lower limit control
Specify the high-speed counter channel where the cam
control is performed and whether or not to execute the
upper and lower limit control as a hexadecimal constant.
H
Channel specification
0 0 0 0 0 0
H0 to H3: CH0 to CH3
H00: Fixed
Upper limit control
0: Disable , 1: Enable
H0000: Fixed
S+2, S+3 Output device type (Note 1)
Specify the device type set for the cam output.
H0: Link relay (L), H1: Internal relay (R), H2: Output relay
(Y)
S+4, S+5
Starting word no. of output
device
Specify the starting word number of the device set for the
cam output. (Note 2)
Settable range: K1 to K32 (Note 2)
Target value 1: ON set value
Set the ON set value and OFF set value according to the
number of target values.
(Note 3)
Settable range:
K-2147483647 to K2147483646 (H80000001 to
H7FFFFFFE)
The cam output described in the next page is acquired
according to the magnitude of the ON set values and
elapsed value.
S+10, S+11 Target value 1: OFF set value
S+12, S+13 Target value 2: ON set value
Target value 2: OFF set value
S+(m-1)x4+9
Target value m: ON set value
S+(m-1)x4+10
S+(m-1)x4+11
Target value m: OFF set value
S+(m-1)x4+12
S+(m-1)x4+13
Upper limit (Note 4)
Settable range:
K1 to K2147483646 (H1 to H7FFFFFFE)
(Note 1): When specifying the output relay (Y), values are also output to the CPU output as well as operation
memories.
(Note 2): When the number of target values [S+6, S+7] is set to 1-16, the cam output is allocated to one word of
output device. When set to 17-32, it is allocated to two words of output device. Refer to the next page for
details.
(Note 3): The number of target values specified after [S+8, S+9] varies according to the number of target values
specified in [S+6, S+7].
(Note 4): The upper limit of the data table end is valid only when the upper limit control is set to "Yes" in [S, S+1]. This
setting can be omitted when the upper limit control is set to "No".
(Note 5): The data table varies in the range of 12 to 138 words according to the number of target values and the
specified upper limit setting.