• 沒有找到結果。

Items To Be Observed in Programming

Setting example 2:

4.7 Items To Be Observed in Programming

This section describes various programming items that will not be affected by any pulse output destination devices (hardware).

For information on the pulse output destination devices (hardware) that are affected by programming items, refer to the following sections.

For use of the transistor output of the main unit, refer to Section 4.8.

For use of the high-speed output special adapter, refer to Section 4.9.

4.7.1 Positioning Instruction Activation Timing

The following positioning instructions can be programmed as many times as needed. However, observe the items shown in the following table to determine the instruction activation timing.

For details on the each instructions, refer to Chapter 6 to 11.

: If the pulse output destination device is now outputting pulses, the instruction cannot be activated. Refer to the "Note" below.

: For the absolute position detection system, activate the ABS (FNC155) instruction after turning the power ON for the servo amplifier. After executing this instruction, the current value will be read out from the servo amplifier only once.

Turning this instruction OFF will turn the servo amplifierOFF.

Caution:

If the "pulse output monitor" (BUSY/READY) flag is on, and if a positioning instruction (excluding the ABS instruction) or pulse output instruction (PLSR, PLSY) specifies the same pulse output destination device as the one being used, the instruction cannot be executed.

Even after turning the instruction activation contact OFF, if the "pulse output monitor" (BUSY/READY) flag is still on, do not execute a positioning instruction (including the PLSR and PLSY instructions) for an output with the same output number.

Before activating such an instruction, check that the "pulse output monitor" (BUSY/READY) flag is off, and then wait until 1 cycle or more of operation has been completed.

For examples of programs, refer to Chapter 12.

*1. Y002 is not available in FX3G PLC (14-point and 24-point type) and FX3S/FX3GC PLC.

*2. Y003 is available only when two high-speed output special adapters are connected to the FX3U PLC.

Description Instruction to be used

DSZR DVIT TBL ABS ZRN PLSV DRVI DRVA

Instruction to be used

DSZR(FNC150) Zero return instruction with

DOG search function        

DVIT(FNC151) Interrupt Positioning

(interruption fixed-feed)        

TBL(FNC152) Positioning by batch setting

method        

ABS(FNC155) Current ABS value read-out

from servo amplifier        

ZRN(FNC156) Zero return (without DOG

search function)        

PLSV(FNC157) Variable speed Pulse Output        

DRVI(FNC158) Drive to Increment        

DRVA(FNC159) Drive to Absolute        

Pulse output destination device "Pulse output monitor" flag

Y000 M8340

Y001 M8350

Y002*1 M8360

Y003*2 M8370

FX /FX /FX /FX /FX PLC User's Manual - Positioning Control Edition

Built-in Positioning Functions 4.7 Items To Be Observed in Programming

Use with PLSY (FNC 57) and PLSR (FNC 59) instructions:

Along with the positioning instructions (FNC150 - FNC159), the pulse output instructions (FNC 57 and FNC 59) require hardware for outputting pulses.

• Do not use the same output number for both a positioning instruction (FNC150 - FNC159) and a pulse output instruction (FNC 57 or FNC 59).

• The use of a positioning instruction together with a PLSY or PLSR instruction will complicate the operation of the register that controls the number of output pulses (see the following table). For this reason, it is recommended that a positioning instruction should be used in place of the PLSY or PLSR instruction.

 For details on the related devices, refer to Section 4.1 to Section 4.4.

*1. Y002 is not available in FX3G PLC (14-point and 24-point type) and FX3S/FX3GC PLC.

*2. Y003 is available only when two high-speed output special adapters are connected to the FX3U PLC.

• If it is necessary to use a positioning instruction (FNC150 to FNC159) together with a pulse output instruction (FNC 57 or FNC 59), use the following positioning instruction in place of the pulse output instruction:

- FNC 57(PLSY), FNC 59(PLSR)FNC158(DRVI) Pulse output

destination device

Current value register

For FNC150 - FNC159 instructions For FNC 57 and FNC 59 instructions

Y000 D8341,D8340 D8141,D8140

Y001 D8351,D8350 D8143,D8142

Y002*1 D8361,D8360

-Y003*2 D8371,D8370

-FX /FX /FX /FX /FX PLC User's Manual - Positioning Control Edition

Built-in Positioning Functions 4.7 Items To Be Observed in Programming

A

Comm

on Items

Functions Positioning

B

Built-in

Apx.

Connection Example

4.7.2 STOP instruction

For the normal stop of an operation (stop after speed reduction), use the "instruction OFF" function or

"forward/reverse limit relay".

If an immediate stop is absolutely needed to avoid danger, use the pulse output stop command relay.

During execution of a positioning instruction, however, if the pulse output stop command relay is turned on, the pulse outputting operation will be immediately stopped. This means that the motor will be stopped without deceleration, which may damage the system. For this reason, take caution when using the pulse output stop command relay.

*1. Y002 is not available in FX3G PLC (14-point and 24-point type) and FX3S/FX3GC PLC.

*2. Y003 is available only when two high-speed output special adapters are connected to the FX3U PLC.

4.7.3 Correction of Backlash

The built-in positioning function cannot correct the mechanical backlash (clearance/play). If it is necessary to correct the backlash, preliminarily set the number of output pulses considering the backlash that may be caused when reversing the transfer direction.

4.7.4 "Instruction execution complete" Flag of Positioning Instruction and Completion of Positioning

If the Instruction execution complete flag (M8029) or the Instruction execution abnormal end flag (M8329) is turned on, the execution of the instruction (pulse outputting operation, etc.) is completed. In this case, however, it is not certain whether the servo motor has stopped. Check the "positioning completion" signal of the servo amplifier (drive unit) to check whether the servo motor is stopped.

For details on the "Instruction execution complete" flag and "Instruction execution abnormal end"

flag, refer to Subsection 4.4.2.

Pulse output destination

device Pulse stop instruction Operation

Y000 M8349

During pulse outputting operation, if the pulse output stop command relay of the corresponding pulse output destination device is turned on, the pulse outputting operation will immediately stop.

Y001 M8359

Y002*1 M8369

Y003*2 M8379

Table

Feed screw

Backlash (clearance/play)

FX /FX /FX /FX /FX PLC User's Manual - Positioning Control Edition

Built-in Positioning Functions 4.7 Items To Be Observed in Programming

Programming using the "Instruction execution complete" flag and "Instruction execution abnormal end" flag:

1) If two or more positioning instructions are used in a program, the "Instruction execution complete" flag (M8029) or "Instruction execution abnormal end" flag (M8329) will be turned on or off after execution of each instruction. However, if the "Instruction execution complete" flag (M8029) and "Instruction execution abnormal end" flag are used together for a program, it is difficult to determine which instruction turns them ON/OFF and the "Instruction execution complete" flag will not be turned on for the intended instruction.

 To use a positioning instruction at a position other than just below the instruction, refer to the example shown on the next page.

Bad example:

The M8029 will function as the "instruction execution complete" flag of the lower DSW instruction.

The M8029 will function as the "instruction execution complete" flag of the upper DDRVI instruction.

The M8029 will function as the "instruction execution complete" flag of the lower DDRVA instruction.

RST M0

FNC 22

MUL D0 K10 D20

M8000

X10 Y10 D0

Completion of instruction execution

FNC 72

DSW K1

X000 SET M0

M0

M8029 M8029

Compl-etion of instruction execution M1

Program for upper DDRVI instruction

Program for DSW instruction

Upper DDRVI instruction

Lower DDRVA instruction

M0 FNC158

DDRVI K100000 K50000 Y000 Y004

M8029 M0 Completion of instruction

execution

M1 FNC159

DDRVA K10000 K30000 Y001

RST M1

M8029 M8329 The M8029 will function

as the "instruction execution complete"

flag of DDRVI instruction.

The M8029 will function as the "instruction execution complete"

flag of DDRVA instruction.

Good example:

Abnormal completion of instruction execution

M0

Y005 RST

RST

Completion of instruction

execution M8329

RST M1 Abnormal

completion of instruction execution

FNC158

DDRVI K100000 K50000 Y000 Y004

FNC159

DDRVA K10000 K30000 Y001 Y005

FX /FX /FX /FX /FX PLC User's Manual - Positioning Control Edition

Built-in Positioning Functions 4.7 Items To Be Observed in Programming

A

Comm

on Items

Functions Positioning

B

Built-in

Apx.

Connection Example

2) To use at a position other than just below the positioning instruction:

If two or more positioning instructions are used in a program, the "Instruction execution complete" flag (M8029) and "Instruction execution abnormal end" flag (M8329) will be turned on or off after execution of each instruction.

If it is necessary to use the "Instruction execution complete" flag or "Instruction execution abnormal end"

flag at a point other than just below the instruction, turn on or off another bit device just below the instruction, and use the contact as the command contact.

M8000 FNC 72

DSW X10 Y10 D0 K1

FNC 22

MUL D0 K10 D20

M8029 Completion of instruction

execution

M0 FNC158

DDRVI K10000 K10000 Y000 M8029

Completion of instruction

execution Switches "instruction

execution complete"

flag of the DSW instruction from M8029 to M100.

M100

M200 Switches the

"instruction execution complete" flag of the DDRVI instruction from M8029 to M200.

M100

Functions as the instruction execution complete flag of the DSW instruction.

RST M0

M200

Functions as the instruction execution complete flag of the DDRVI instruction.

Y030 Y004

FX /FX /FX /FX /FX PLC User's Manual - Positioning Control Edition

Built-in Positioning Functions 4.7 Items To Be Observed in Programming

4.7.5 Operation Error Flag

When there is an error in the applied instruction configuration, target device or target device number range and an error occurs while operation is executed, the following flag turns ON and the error information is stored.