7 APPLICATION INSTRUCTION
7.13 Ramp signal instruction
503
7
7.13 Ramp signal instruction
Ramp signal
RAMPF
This instruction obtains the data which changes between the start value (initial value) and the end value (target value) over the
specified "n" times.
■Descriptions, ranges, and data types
■Applicable devices
• When the start value (s1) and the end value (s2) have been specified and the command input is set to ON, the value
obtained by adding a value divided equally by "n" times to (s1) in the next operation cycle is stored to (d). By combining this
instruction and an analog output, the cushion start/stop command can be output.
• The number of scans ("0" to "n") is stored in (d)+1.
• The time from start to the end value is the operation cycle multiplied by "n" times.
• If the command input is set to OFF in the middle of operation, execution is paused. (The current value stored in (d) is held,
and the number of scans stored in (d)+1 is cleared.) When the command input is set to ON again, (d) is cleared, and the
operation is started from (s1).
Ladder diagram Structured text
ENO:=RAMPF(EN,s1,s2,n,d);
Operand Description Range Data type Data type (label)
(s1) Initial value of ramp 16-bit signed binary ANY16
(s2) Target value of ramp 16-bit signed binary ANY16
(d) (d)+0: Current value 16-bit signed binary ANY16
(d)+1: Number of scans
(n) Ramp transfer time (scan) 1 to 32767 16-bit unsigned binary ANY16
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB
U\G T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U\G Z LC LZ K, H E $
(s1)
(s2)
(d)
(n)
(s1)
(s2)
(d)
(s2)
(d)
(s1)
(n) scans(n) scans
(s1) > (s2)
Number of scans (d)+1 Number of scans (d)+1
(s1) < (s2)