Sie sind auf Seite 1von 5

_NCF025B_MoveRelative3_DINT (1/5)

NCF Move Relative with Interrupt Feeding (DINT)


025B
_NCF025B_MoveRelative3_DINT
Basic function Executes Interrupt Feeding with Move Relative command. (Acceleration/Deceleration time setting attachment)
Symbol
_NCF025B_MoveRelative3_DINT
Always ON (P_On)
(BOOL) (BOOL)
EN ENO
(INT) (BOOL)
Unit No. UnitNo Done Positioning completed

(INT) (BOOL)
Axis No. Axis CommandAborted Abort

(BOOL) (BOOL)
Start Execute Error Error flag

(DINT) (WORD)
Position command Distance ErrorID Error code

(DINT)
Speed command Velocity
(DINT)
Acceleration time Acceleration
(DINT)
Deceleration time Deceleration

File name Lib\FBL\omronlib\PositionController\NCF\_NCF025B_MoveRelative3_DINT10.cxf


Applicable Position Control Unit CJ1W-NCF71, CS1W-NCF71
models CPU Unit CS1*-CPU**H Unit Version 3.0 or later
CJ1*-CPU**H Unit Version 3.0 or later
CJ1M-CPU** Unit Version 3.0 or later
CP1H
CX-Programmer Version 5.0 or later
Languages in Ladder programming
function block
definitions
Conditions for The following conditions for usage should be the Position Control Unit version 1.2 or earlier.
usage (It will not be required in the Position Control Unit version 1.3 or later)
■CX-Programmer Setting
The function blocks related to the Position Control Units will not operate if the area H512 or higher (default
setting) is specified as the Non Retain Area through the Function block memory allocation. Make sure to
change the memory area to unused area (DM or EM, for example) from the CX-Programmer. To change this
value, click PLC/Function Block Memory/Function Block Memory Allocation from the Menu Bar.
Function Block Memory Allocation [NewPLC1]

FB Instance Area Start Address End Address Size


OK
No Retain H512 H1407 896
Retain H1408 H1535 128 Cancel
Timers T3072 T4095 1024
Edit
Counters C3072 C4095 1024
Default

Specify unused area. Advanced


The required size varies depending on the used FB and the number of FBs.
If an area being used in the ladder program is specified or sufficient free
space cannot be found, the CX-Programmer will display a compile error.
Function Block Memory Allocation [NewPLC1]

FB Instance Area Start Address End Address Size


OK
No Retain D32020 D32767 748
Retain H1408 H1535 128 Cancel
Timers T3072 T4095 1024
Edit
Counters C3072 C4095 1024
Default For example, to use the memory
area from D32020 to D32767
Advanced
(748 words), specify the
addresses as shown in the left.
_NCF025B_MoveRelative3_DINT (2/5)

Function The acceleration/deceleration time setting is added to the_NCF025_MoveRelative3_DINT in this FB.


description When the Start (Execute) turns ON, the Interrupt Feeding (Move Relative) for the axis of the specified Unit No.
(UnitNo) and Axis No. (Axis) is started using the specified Position command (Distance) and Speed command
(Velocity). (An Interrupt Feeding Designation Bit of the Axis Operating Output Memory Area is turned ON in the
FB, so it does not need to be turned ON at the external ladder program.)
When the Start (Execute) turns ON, the value set in Acceleration time (Acceleration) and Deceleration time
(Deceleration) is written to “Acceleration constant” and “Deceleration constant” using the Transferring Servo
Parameter function. Refer to the Restrictions Other for the details of Servo Parameter “Acceleration constant”
and “Deceleration constant”.
Changing the Speed command (Velocity) during positioning by this FB will change the actual operation speed.
Positioning is executed on the axis being positioned for an amount specified in the Servo Parameter, "Final
travel distance for external positioning", when the external interrupt input signal is input. When an interrupt
input signal is not input, an axis is moved to the position specified in “Position command (Distance)”.
Interrupt input signal
Final travel distance for external positioning
Servo parameter W-Series Pn814
G-Series Pn200 (814)

Interrupt feeding start Positioning without input of interrupt input signal


(=Position where interrupt feeding starts + Position command ( Distance ))

The Positioning completed (Done) is turned ON when the positioning operation for the FB has been
completed. This Flag is also turned ON when the positioning operation is completed without the interrupt
feeding signal input. This flag will not be turned ON if the positioning operation is canceled because another
operation has been started from a different instance, for a deceleration stop, or because an error has
occurred.
The Error flag (Error) will be turned ON and the Error code (ErrorID) will be output if an error occurs for the FB.
This will not occur for error in other FBs or other instances of the FB.
These statuses (Done/CommandAborted/Error/ErrorID) will be reset when the Start (Execute) turns OFF. If the
Start (Execute) turns OFF before the positioning operation has been completed, the status will be set for at
least one cycle when corresponding conditions have occurred.
ON
EN OFF

ON
ENO OFF

ON
Execute OFF

Command
speed

Parameter ON Interrupt Interrupt


transfer OFF feeding feeding

Interrupt
input ON
signal OFF
ON
Done OFF

ON
Error OFF

Servo Parameter
Acceleration constant
Servo Parameter
Deceleration constant
Kind of FB Always execution type.
definition Connect the EN input to the Always ON Flag (P_On).
The same instance cannot be used in two or more places.
FB ・Executing this FB during the positioning operation will cause a multistart error.
precautions ・Positioning operation will be performed to the relative position specified in Position command (Distance)
from the point at which the last execution was started when executing this FB during the Speed Control or
Torque Control. Refer to the Related Manuals for details.
・The setting of Axis Parameters and Servo Parameters is required for executing the Interrupt Feeding
operation. Refer to 9-5 Interrupt Feeding of the Operation Manual, W426-E1, in the Related Manuals for
details.
EN input ・Connect the EN input to the Always ON Flag (P_On).
condition If another bit is connected to EN, the FB outputs will be held when the connected bit turns OFF.
_NCF025B_MoveRelative3_DINT (3/5)

Restrictions ・The Acceleration/deceleration constants are calculated based on “Speed command (Velocity)”
Other “Acceleration time (Acceleration)” and “Deceleration time (Deceleration)” in this FB. If the calculated value
is out of Servo Parameter range, it will be adjusted to be within the range (1 to 65535). In this case, the
specified acceleration/deceleration time may be altered.
(Reference) Acceleration/Deceleration constant setting range of Servo Drive
Drive PRM No. Parameter name Size Unit Setting range
Second-step linear ×10000 command
W-Series Pn80B 2 2 1 to 65535
acceleration constant units/s
Second-step linear ×10000 command
Pn80E 2 2 1 to 65535
deceleration constant units/s
Linear Acceleration ×10000 command
G-Series Pn107 (80B) 2 2 0 to 65535 (Note)
constant units/s
Linear deceleration ×10000 command
Pn10A (80E) 2 2 0 to 65535 (Note)
constant units/s
(Note) Setting 0 automatically changes to 1.
・The following cannot be specified for this FB: “Acceleration/deceleration curve designation”, “Forward
rotation current limit designation” and “Reverse rotation current limit designation”. If these functions are
required, specify them in advance outside the FB.
・This FB may act differently according to unit versions of the Position Control Units when executing this FB
during the Origin Search operation.
A Multistart error occurs right after parameters are transferred. Do not execute this
Earlier than 2.0
FB during the Origin search operation.
The parameter transferring status is hold until the Origin search is completed. After
2.0 or later
the completion, the Move Relative command is executed.
Earlier than Version 2.0 Version 2.0 or later
ON ON
Origin search OFF Origin search OFF

ON ON
Execute OFF Execute OFF

Servo Parameter ON Servo Parameter ON


Transfer OFF Transfer OFF
Relative Relative
Movement with ON Movement with ON
Interrupt Feeding OFF Interrupt Feeding OFF
ON ON
Done OFF Done OFF

ON ON
Error OFF Error OFF

Command speed Command speed

Multistart Error occurs Origin search ends

Relative Movement with Interrupt Feeding ends


・This FB uses Unit Error Reset, Write Data, Read Data and Save Data Bits of the Position Control Unit (see
Note). Therefore, do not turn these bits ON or OFF between the period from the rising edge of EN to the
rising edge of ENO. For the same reason, do not use these bits for coil outputs (OUT commands).
・The output variable of FB may not change even if EN is turned ON. In that case, check if any of Unit Error
Reset, Write Data, Read Data and Save Data Bit is left ON.
・This FB uses the Relative Movement/ Interrupt Feeding/ Write Servo Parameter Bit in the Axis Operating
Output Memory Areas. Therefore, do not turn these bits ON or OFF until the operation is completed. For
the same reason, do not use these bits for coil outputs (OUT commands).

Note:
For calculation of bit addresses, these bits are referenced in this FB in the first execution of each instance, and
when changing "Unit No. (UnitNo)", "Axis No. (Axis)" of the input variable and set "Start (Execute) ".
_NCF025B_MoveRelative3_DINT (4/5)

Application Turning the Start Trigger ON from OFF will operate the Servomotor (axis1) connected to the Position Control
example Unit with a unit number 0 using the Move Relative command with the Interrupt Feeding enabled.

Unit No.:0
CPU NCF
Servomotor
Axis 1 Interrupt input signal

Start Trigger Bit B Bit C Bit D Bit A

Bit A

Sample
_NCF025B_MoveRelative3_DINT
Always ON (P_On)
(BOOL) (BOOL)
EN ENO
Unit No. (INT) (BOOL) Positioning completed
&0 UnitNo Done Bit B
Axis No. (INT) (BOOL) Abort
&1 Axis CommandAborted Bit C
Start (BOOL) (BOOL) Error flag
Bit A Execute Error Bit D
Position command (DINT) (WORD) Error code
+2000 Distance ErrorID D0
Speed command (DINT)
+20000 Velocity
Acceleration time (DINT)
+200 Acceleration
Deceleration time (DINT)
+200 Deceleration

Related Position Control Units OPERATION MANUAL (W426-E1)


manuals 5-3 Transferring Servo Parameters
SECTION 9 Positioning
9-5 Interrupt Feeding
12-4 Error Codes
_NCF025B_MoveRelative3_DINT (5/5)

■Variable Tables
Input Variables
Name Variable name Data type Default Range Description
EN EN BOOL 1 (ON): FB started
0 (OFF): FB not started
Unit No. UnitNo INT &0 &0 to &15 Specify the unit number.
Axis No. Axis INT &1 &1 to &16 Specify the axis number.
Start Execute BOOL 0(OFF) : Starts the relative move.
Position command Distance DINT +0 -2,147,483,648 to Specify the target position.
+2,147,483,647 Unit: Command units/s
Speed command Velocity DINT +0 +0 to Specify the target speed.
+2,147,483,647 Unit: Command units/s
Changing the value while this FB is in
operation will change the actual operating
speed.
Acceleration time Acceleration DINT +0 +0 to +65,535 Specify the acceleration time for the speed
specified in “Speed command (Velocity)”.
Unit: ms
Deceleration time Deceleration DINT +0 +0 to +65,535 Specify the deceleration time for the speed
specified in “Speed command (Velocity)”.
Unit: ms

Output Variables
Name Variable name Data type Range Description
ENO ENO BOOL 1 (ON): FB operating normally
0 (OFF): FB not operating normally
・FB not started
・Input variable out of the range
・FB ended with error
・Common Parameters could not be read
Positioning completed Done BOOL Turns ON when the positioning operation has been
completed.
Abort CommandAborted BOOL 1 (ON): Aborted
It will be aborted when any of the following conditions is
met during operation
・Turns ON when the other Move command done
(Duplicate Move).
・Stopped with Decleration Stop or Emergency Stop.
・Executed Servo Unlock, Deviation Counter Reset on
an operating axis.
・Attempted to execute FB while Servo Unlock,
Deceleration Stop, Emergency Stop or Deviation
Counter Reset Bit is ON.
・Detected the Stop Execution Flag is ON.
・The Relative Movement Bit is changed by the other
FB during Relative Movement in operation.
Error flag Error BOOL Turns ON when an error has occurred in the FB.
Error code ErrorID WORD Returns the error code when an error has occurred in the
FB. Refer to the Related Manuals for details on errors.
A code of #0000 will be returned if any of the following
conditions is satisfied.
・Input variable is out of range.
・The common parameters of the Position Control Units
are out of range.
・Not established communications with a specified axis.
・The Write Servo Parameter Bit is changed by the
other FB during writing Servo parameters.

■Version History
Version Date Contents
1.00 2007.02. Original production

■Note
This document explains the function of the function block.
It does not provide information of restrictions on the use of Units and Components or combination of them. For actual
applications, make sure to read the operation manuals of the applicable products.

Das könnte Ihnen auch gefallen