Contents

Mitsubishi AP20-PAC002AA-MD Packaging Instruction Manual PDF

1 of 216
1 of 216

Summary of Content for Mitsubishi AP20-PAC002AA-MD Packaging Instruction Manual PDF

iQ Monozukuri PACKAGING

Instruction Manual (For MELSEC iQ-R)

- AP20-PAC002AA-MA - AP20-PAC002AA-MB - AP20-PAC002AA-MC - AP20-PAC002AA-MD - AP20-PAC002AA-ME - AP20-PAC002AA-ML

SAFETY PRECAUTIONS (Read these precautions before using this product.)

Before using this product, please read this manual and the relevant manuals carefully and pay full attention to safety to handle

the product correctly.

The precautions given in this manual are concerned with this product only. Refer to the user's manual of the CPU module to

use for a description of the PLC system safety precautions.

In this manual, the safety precautions are classified into two levels: " WARNING" and " CAUTION".

Under some circumstances, failure to observe the precautions given under " CAUTION" may lead to serious

consequences.

Observe the precautions of both levels because they are important for personal and system safety.

Make sure that the end users read this manual and then keep the manual in a safe place for future reference.

[Design Precautions]

WARNING Configure safety circuits external to the programmable controller to ensure that the entire system

operates safely even when a fault occurs in the external power supply or the programmable controller.

Failure to do so may result in an accident due to an incorrect output or malfunction.

(1) Configure external safety circuits, such as an emergency stop circuit, protection circuit, and

protective interlock circuit for forward/reverse operation or upper/lower limit positioning.

(2) The programmable controller stops its operation upon detection of the following status, and the

output status of the system will be as shown below.

Turned off if the overcurrent or overvoltage protection of the power supply module is activated.

Held or turned off according to the parameter setting if the self-diagnostic function of the CPU

module detects an error such as a watchdog timer error.

(3) Also, all outputs may be turned on if an error occurs in a part, such as an I/O control part, where

the CPU module cannot detect any error. To ensure safety operation in such a case, provide a

safety mechanism or a fail-safe circuit external to the programmable controller. For a fail-safe

circuit example, refer to the user's manual of the CPU module to use.

(4) Outputs may remain on or off due to a failure of a component such as a relay and transistor in an

output circuit. Configure an external circuit for monitoring output signals that could cause a

serious accident.

In an output circuit, when a load current exceeding the rated current or an overcurrent caused by a

load short-circuit flows for a long time, it may cause smoke and fire. To prevent this, configure an

external safety circuit, such as a fuse.

Configure a circuit so that the programmable controller is turned on first and then the external power

supply. If the external power supply is turned on first, an accident may occur due to an incorrect output

or malfunction.

For the operating status of each station after a communication failure, refer to manuals relevant to the

network. Incorrect output or malfunction due to a communication failure may result in an accident.

WARNING Indicates that incorrect handling may cause hazardous conditions, resulting in death or severe injury.

CAUTION Indicates that incorrect handling may cause hazardous conditions, resulting in minor or moderate injury or property damage.

1

2

When connecting an external device with a CPU module or intelligent function module to modify data

of a running programmable controller, configure an interlock circuit in the program to ensure that the

entire system will always operate safely. For other forms of control (such as program modification,

parameter change, forced output, or operating status change) of a running programmable controller,

read the relevant manuals carefully and ensure that the operation is safe before proceeding. Improper

operation may damage machines or cause accidents.

Especially, when a remote programmable controller is controlled by an external device, immediate

action cannot be taken if a problem occurs in the programmable controller due to a communication

failure. To prevent this, configure an interlock circuit in the program, and determine corrective actions

to be taken between the external device and CPU module in case of a communication failure.

Do not write any data to the "system area" and "write-protect area" of the buffer memory in the

module. Also, do not use any "use prohibited" signals as an output signal from the CPU module to

each module. Doing so may cause malfunction of the programmable controller system. For the

"system area", "write-protect area", and the "use prohibited" signals, refer to the user's manual for the

module used.

If a communication cable is disconnected, the network may be unstable, resulting in a communication

failure of multiple stations. Configure an interlock circuit in the program to ensure that the entire

system will always operate safely even if communications fail. Failure to do so may result in an

accident due to an incorrect output or malfunction.

To maintain the safety of the programmable controller system against unauthorized access from

external devices via the network, take appropriate measures. To maintain the safety against

unauthorized access via the Internet, take measures such as installing a firewall.

Configure safety circuits external to the programmable controller to ensure that the entire system

operates safely even when a fault occurs in the external power supply or the programmable controller.

Failure to do so may result in an accident due to an incorrect output or malfunction.

(1) Machine home position return is controlled by two kinds of data: a home position return direction

and a home position return speed. Deceleration starts when the near-point dog signal turns on. If

an incorrect home position return direction is set, motion control may continue without

deceleration. To prevent machine damage caused by this, configure an interlock circuit external to

the programmable controller.

(2) When the module detects an error, the motion slows down and stops or the motion suddenly

stops, depending on the stop group setting in parameter. Set the parameter to meet the

specifications of a positioning control system. In addition, set the home position return parameter

and positioning data within the specified setting range.

(3) Outputs may remain on or off, or become undefined due to a failure of a component such as an

insulation element and transistor in an output circuit, where the module cannot detect any error. In

a system that the incorrect output could cause a serious accident, configure an external circuit for

monitoring output signals.

If safety standards (ex., robot safety rules, etc.,) apply to the system using the module, servo amplifier

and servomotor, make sure that the safety standards are satisfied.

Construct a safety circuit externally of the module or servo amplifier if the abnormal operation of the

module or servo amplifier differs from the safety directive operation in the system.

Do not remove the SSCNET cable while turning on the control circuit power supply of Multiple CPU

system and servo amplifier. Do not see directly the light generated from SSCNET connector of the

module or servo amplifier and the end of SSCNET cable. When the light gets into eyes, you may

feel something wrong with eyes. (The light source of SSCNET complies with class1 defined in

JISC6802 or IEC60825-1.)

WARNING

[Design Precautions]

[Installation Precautions]

CAUTION Do not install the control lines or communication cables together with the main circuit lines or power

cables. Keep a distance of 100 mm or more between them. Failure to do so may result in malfunction

due to noise.

During control of an inductive load such as a lamp, heater, or solenoid valve, a large current

(approximately ten times greater than normal) may flow when the output is turned from off to on.

Therefore, use a module that has a sufficient current rating.

After the CPU module is powered on or is reset, the time taken to enter the RUN status varies

depending on the system configuration, parameter settings, and/or program size. Design circuits so

that the entire system will always operate safely, regardless of the time.

Do not power off the programmable controller or do not reset the CPU module during the setting

registration. Doing so will make the data in the flash ROM undefined. The data need to be set in the

buffer memory and to be written to the flash ROM again. Doing so may cause malfunction or failure of

the module.

Reset the CPU module after changing the parameters. Failure to do so may cause malfunction

because the previous parameter settings remain in the module.

When changing the operating status of the CPU module from external devices (such as remote RUN/

STOP), select "Do Not Open by Program" for "Opening Method" in the module parameters. If "Open

by Program" is selected, an execution of remote STOP causes the communication line to close.

Consequently, the CPU module cannot reopen the communication line, and external devices cannot

execute the remote RUN.

WARNING Shut off the external power supply (all phases) used in the system before mounting or removing the

module. Failure to do so may result in electric shock or cause the module to fail or malfunction.

3

4

[Installation Precautions]

[Wiring Precautions]

CAUTION Use the programmable controller in an environment that meets the general specifications in the

manual "Safety Guidelines" included in the base unit. Failure to do so may result in electric shock, fire,

malfunction, or damage to or deterioration of the product.

To mount a module, place the concave part(s) located at the bottom onto the guide(s) of the base unit,

and push in the module until the hook(s) located at the top snaps into place. Incorrect mounting may

cause malfunction, failure, or drop of the module.

When using the programmable controller in an environment of frequent vibrations, fix the module with

a screw.

Tighten the screws within the specified torque range. Undertightening can cause drop of the screw,

short circuit, or malfunction. Overtightening can damage the screw and/or module, resulting in drop,

short circuit, or malfunction.

When using an extension cable, connect it to the extension cable connector of the base unit securely.

Check the connection for looseness. Poor contact may cause incorrect input or output.

When using an SD memory card, fully insert it into the memory card slot. Check that it is inserted

completely. Poor contact may cause malfunction.

Securely insert an extended SRAM cassette into the cassette connector of a CPU module. After

insertion, close the cassette cover and check that the cassette is inserted completely. Poor contact

may cause malfunction.

Do not directly touch any conductive parts and electronic components of the module, SD memory

card, extended SRAM cassette, or connector. Doing so may cause malfunction or failure of the

module.

WARNING Shut off the external power supply (all phases) used in the system before installation and wiring.

Failure to do so may result in electric shock or damage to the product.

After installation and wiring, attach the included terminal cover to the module before turning it on for

operation. Failure to do so may result in electric shock.

[Wiring Precautions]

CAUTION Individually ground the FG and LG terminals of the programmable controller with a ground resistance

of 100 ohm or less. Failure to do so may result in electric shock or malfunction.

Use applicable solderless terminals and tighten them within the specified torque range. If any spade

solderless terminal is used, it may be disconnected when the terminal screw comes loose, resulting in

failure.

Check the rated voltage and signal layout before wiring to the module, and connect the cables

correctly. Connecting a power supply with a different voltage rating or incorrect wiring may cause fire

or failure.

Connectors for external devices or coaxial cables must be crimped or pressed with the tool specified

by the manufacturer, or must be correctly soldered. Incomplete connections may cause short circuit,

fire, or malfunction.

Securely connect the connector to the module. Poor contact may cause malfunction.

Do not install the control lines or communication cables together with the main circuit lines or power

cables. Keep a distance of 100 mm or more between them. Failure to do so may result in malfunction

due to noise.

Place the cables in a duct or clamp them. If not, dangling cable may swing or inadvertently be pulled,

resulting in damage to the module or cables or malfunction due to poor contact. Do not clamp the

extension cables with the jacket stripped.

Check the interface type and correctly connect the cable. Incorrect wiring (connecting the cable to an

incorrect interface) may cause failure of the module and external device.

Tighten the terminal screws or connector screws within the specified torque range. Undertightening

can cause drop of the screw, short circuit, fire, or malfunction. Overtightening can damage the screw

and/or module, resulting in drop, short circuit, fire, or malfunction.

When disconnecting the cable from the module, do not pull the cable by the cable part. For the cable

with connector, hold the connector part of the cable. For the cable connected to the terminal block,

loosen the terminal screw. Pulling the cable connected to the module may result in malfunction or

damage to the module or cable.

Prevent foreign matter such as dust or wire chips from entering the module. Such foreign matter can

cause a fire, failure, or malfunction.

A protective film is attached to the top of the module to prevent foreign matter, such as wire chips,

from entering the module during wiring. Do not remove the film during wiring. Remove it for heat

dissipation before system operation.

Mitsubishi programmable controllers must be installed in control panels. Connect the main power

supply to the power supply module in the control panel through a relay terminal block. Wiring and

replacement of a power supply module must be performed by qualified maintenance personnel with

knowledge of protection against electric shock. For wiring, refer to the MELSEC iQ-R Module

Configuration Manual.

For Ethernet cables to be used in the system, select the ones that meet the specifications in the

MELSEC iQ-R Ethernet/CC-Link IE User's Manual (Startup). If not, normal data transmission is not

guaranteed.

5

6

[Startup and Maintenance Precautions]

[Startup and Maintenance Precautions]

WARNING Do not touch any terminal while power is on. Doing so will cause electric shock or malfunction.

Correctly connect the battery connector. Do not charge, disassemble, heat, short-circuit, solder, or

throw the battery into the fire. Also, do not expose it to liquid or strong shock. Doing so may cause the

battery to generate heat, explode, ignite, or leak, resulting in injury or fire.

Shut off the external power supply (all phases) used in the system before cleaning the module or

retightening the terminal screws, connector screws, or module fixing screws. Failure to do so may

result in electric shock or cause the module to fail or malfunction.

CAUTION When connecting an external device with a CPU module or intelligent function module to modify data

of a running programmable controller, configure an interlock circuit in the program to ensure that the

entire system will always operate safely. For other forms of control (such as program modification,

parameter change, forced output, or operating status change) of a running programmable controller,

read the relevant manuals carefully and ensure that the operation is safe before proceeding. Improper

operation may damage machines or cause accidents.

Especially, when a remote programmable controller is controlled by an external device, immediate

action cannot be taken if a problem occurs in the programmable controller due to a communication

failure. To prevent this, configure an interlock circuit in the program, and determine corrective actions

to be taken between the external device and CPU module in case of a communication failure.

Do not disassemble or modify the modules. Doing so may cause failure, malfunction, injury, or a fire.

Use any radio communication device such as a cellular phone or PHS (Personal Handyphone

System) more than 25 cm away in all directions from the programmable controller. Failure to do so

may cause malfunction.

Shut off the external power supply (all phases) used in the system before mounting or removing the

module. Failure to do so can cause the module to fail or malfunction.

Tighten the screws within the specified torque range. Undertightening can cause drop of the

component or wire, short circuit, or malfunction. Overtightening can damage the screw and/or module,

resulting in drop, short circuit, or malfunction.

After the first use of the product, do not mount/remove the module to/from the base unit, and the

terminal block to/from the module, and do not insert/remove the extended SRAM cassette to/from the

CPU module more than 50 times (IEC 61131-2 compliant) respectively. Exceeding the limit of 50 times

may cause malfunction.

After the first use of the product, do not insert/remove the SD memory card to/from the CPU module

more than 500 times. Exceeding the limit may cause malfunction.

Do not touch the metal terminals on the back side of the SD memory card. Doing so may cause

malfunction or failure.

Do not touch the integrated circuits on the circuit board of an extended SRAM cassette. Doing so may

cause malfunction or failure.

Do not drop or apply shock to the battery to be installed in the module. Doing so may damage the

battery, causing the battery fluid to leak inside the battery. If the battery is dropped or any shock is

applied to it, dispose of it without using.

[Operating Precautions]

[Disposal Precautions]

Startup and maintenance of a control panel must be performed by qualified maintenance personnel

with knowledge of protection against electric shock. Lock the control panel so that only qualified

maintenance personnel can operate it.

Before handling the module, touch a conducting object such as a grounded metal to discharge the

static electricity from the human body. Failure to do so may cause the module to fail or malfunction.

Before testing the operation, set a low speed value for the speed limit parameter so that the operation

can be stopped immediately upon occurrence of a hazardous condition.

Confirm and adjust the program and each parameter before operation. Unpredictable movements

may occur depending on the machine.

When using the absolute position system function, on starting up, and when the module or absolute

value motor has been replaced, always perform a home position return.

Before starting the operation, confirm the brake function.

Do not perform a megger test (insulation resistance measurement) during inspection.

After maintenance and inspections are completed, confirm that the position detection of the absolute

position detection function is correct.

Lock the control panel and prevent access to those who are not certified to handle or install electric

equipment.

CAUTION When changing data and operating status, and modifying program of the running programmable

controller from an external device such as a personal computer connected to an intelligent function

module, read relevant manuals carefully and ensure the safety before operation. Incorrect change or

modification may cause system malfunction, damage to the machines, or accidents.

Do not power off the programmable controller or reset the CPU module while the setting values in the

buffer memory are being written to the flash ROM in the module. Doing so will make the data in the

flash ROM undefined. The data need to be set in the buffer memory and to be written to the flash

ROM again. Doing so may cause malfunction or failure of the module.

Note that when the reference axis speed is specified for interpolation operation, the speed of the

partner axis (2nd, 3rd, or 4th axis) may exceed the speed limit value.

Do not go near the machine during test operations or during operations such as teaching. Doing so

may lead to injuries.

CAUTION When disposing of this product, treat it as industrial waste.

When disposing of batteries, separate them from other wastes according to the local regulations. For

details on battery regulations in EU member states, refer to the MELSEC iQ-R Module Configuration

Manual.

CAUTION

7

8

[Transportation Precautions]

[Precautions on Introduction of User Programs]

CAUTION When transporting lithium batteries, follow the transportation regulations. For details on the regulated

models, refer to the MELSEC iQ-R Module Configuration Manual.

The halogens (such as fluorine, chlorine, bromine, and iodine), which are contained in a fumigant

used for disinfection and pest control of wood packaging materials, may cause failure of the product.

Prevent the entry of fumigant residues into the product or consider other methods (such as heat

treatment) instead of fumigation. The disinfection and pest control measures must be applied to

unprocessed raw wood.

CAUTION To utilize the application program (example) and the screens (example) for an actual system,

sufficiently confirm that the program and the screens will not cause system control problems on user's

own responsibility. Examine the positions where interlock conditions are required in a target system

and add them.

Mitsubishi Electric Corporation cannot be held responsible for any damages or problems which may

occur as a result of using the application program and the screens.

The application program and screens provided by Mitsubishi Electric Corporation may be changed

without any notice.

CONDITIONS OF USE FOR THE PRODUCT

INTRODUCTION Thank you for purchasing the "iQ Monozukuri" product.

This manual describes the design, procedures before operation, functions, and programming required for constructing a

system using this application. Before using this product, please read this manual and the relevant manuals carefully and

develop familiarity with the functions and performance of this application to design the product correctly.

To utilize the program introduced in this manual for an actual system, sufficiently confirm that the program will not cause

system control problems.

(1) Mitsubishi programmable controller ("the PRODUCT") shall be used in conditions; i) where any problem, fault or failure occurring in the PRODUCT, if any, shall not lead to any major or serious accident; and ii) where the backup and fail-safe function are systematically or automatically provided outside of the PRODUCT for the case of any problem, fault or failure occurring in the PRODUCT.

(2) The PRODUCT has been designed and manufactured for the purpose of being used in general industries. MITSUBISHI SHALL HAVE NO RESPONSIBILITY OR LIABILITY (INCLUDING, BUT NOT LIMITED TO ANY AND ALL RESPONSIBILITY OR LIABILITY BASED ON CONTRACT, WARRANTY, TORT, PRODUCT LIABILITY) FOR ANY INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO PROPERTY CAUSED BY the PRODUCT THAT ARE OPERATED OR USED IN APPLICATION NOT INTENDED OR EXCLUDED BY INSTRUCTIONS, PRECAUTIONS, OR WARNING CONTAINED IN MITSUBISHI'S USER, INSTRUCTION AND/OR SAFETY MANUALS, TECHNICAL BULLETINS AND GUIDELINES FOR the PRODUCT. ("Prohibited Application") Prohibited Applications include, but not limited to, the use of the PRODUCT in; Nuclear Power Plants and any other power plants operated by Power companies, and/or any other cases in which the

public could be affected if any problem or fault occurs in the PRODUCT. Railway companies or Public service purposes, and/or any other cases in which establishment of a special quality

assurance system is required by the Purchaser or End User. Aircraft or Aerospace, Medical applications, Train equipment, transport equipment such as Elevator and Escalator,

Incineration and Fuel devices, Vehicles, Manned transportation, Equipment for Recreation and Amusement, and Safety devices, handling of Nuclear or Hazardous Materials or Chemicals, Mining and Drilling, and/or other applications where there is a significant risk of injury to the public or property.

Notwithstanding the above, restrictions Mitsubishi may in its sole discretion, authorize use of the PRODUCT in one or more of the Prohibited Applications, provided that the usage of the PRODUCT is limited only for the specific applications agreed to by Mitsubishi and provided further that no special quality assurance or fail-safe, redundant or other safety features which exceed the general specifications of the PRODUCTs are required. For details, please contact the Mitsubishi representative in your region.

9

10

CONTENTS SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1

CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9

INTRODUCTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9

RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13

TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14

REQUESTING AND REGISTERING A LICENSE KEY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16

CHAPTER 1 OVERVIEW 17

1.1 Packaging Application Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

1.2 Application Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

1.3 Operations of Pillow Packaging Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

1.4 Functions of Each Packaging Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

1.5 Product Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Products in the iQ Monozukuri PACKAGING package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

1.6 Files in DVD-ROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

1.7 Applicable Hardware and Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

CHAPTER 2 SETTING AND PROCEDURE BEFORE OPERATION 29

2.1 Registering a License Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

2.2 Registering the FB Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

2.3 Upgrading the Library Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

2.4 Certifying the License Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

CHAPTER 3 SYSTEM CONSTRUCTION 41

3.1 System Configuration Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

3.2 Control Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Function block configuration example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Configuration example of advanced synchronous control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Operation timing example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

CHAPTER 4 FB LIBRARY 47

4.1 Functions of the FB Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

List of FBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Version history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

Restrictions and precautions common to all FBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

I/O signal processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

Combination of FBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Synchronous control parameters [Pr.XX] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

Synchronous control data [Cd.XX] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Mark detection setting parameters [Pr.XX] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Mark detection control data [Cd.XX] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Positioning data [Da.XX] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

4.2 Details of the FB Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

STD_MakeRotaryCutterCam (Cam auto-generation for rotary cutter (front end reference)) . . . . . . . . . . . . . . . 57

STD_MakeRotaryCutterCam (Cam auto-generation for rotary cutter (central reference)) . . . . . . . . . . . . . . . . . 61

PAC_MakeBoxMotionCam (Cam auto-generation for box motion) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

STD_MakeFlyingShearCam (Cam auto-generation for flying shear) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

PAC_MakeLongDwellDCam (Cam auto-generation for D-cam) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

C O

N T

E N

T S

STD_ReadMarkDetectData (Mark detection data reading). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

PAC_CalcMarkCompensation (Automatic compensation calculation using mark detection) . . . . . . . . . . . . . . . 86

STD_CtrlAuxiliaryAxis (Auxiliary axis correction) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

PAC_CalcGap (Work gap adjustment compensation amount calculation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

PAC_CalcPhase (Work loading position adjustment compensation amount calculation) . . . . . . . . . . . . . . . . . . 99

4.3 List of Structures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

AXIS_REF (Axis setting) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

PAC_COMPENSATION_REF (Compensation control setting) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

CHAPTER 5 APPLICATION PROGRAM EXAMPLE 104

5.1 Box Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

System configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

Control specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

Program configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

Program processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

5.2 Long Dwell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

System configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

Control specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

Program configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

Program processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

5.3 Alignment Conveyor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

System configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

Control specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

Program configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Program processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

Troubleshooting of the alignment conveyor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

5.4 Application Program Control FBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

ReadCamData (Cam data reading). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

CtrlOutputAxisSync (Output axis synchronization control) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

SaveCompensationBuffer (Compensation amount buffer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

5.5 Application Program Example: Operation Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

CHAPTER 6 GOT APPLICATION SCREEN EXAMPLES 162

6.1 Screen Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

Screen transition (All screens). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

Screen transition (Common) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

6.2 Basic Screen Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

6.3 Description of Common Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

Descriptions of character colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

Key window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

Title bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

Main menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

Sub menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

GOT system alarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

Window screens common in all screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

6.4 When the GOT is Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

11

12

Start logo screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

Operation to be performed when the GOT is started for the first time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

6.5 Base Screen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

Home screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

Equipment menu Rotary cutter (Front end reference) screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

Equipment menu Rotary cutter (Central reference) screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175

Equipment menu Box motion screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177

Equipment menu Long dwell screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

Equipment menu Cam monitor screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

Equipment menu Mark compensation screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

Equipment menu Alignment conveyor screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

Servo axis setting screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

Production screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

6.6 Window Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

GOT system alarm reset window screen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

6.7 List of Devices to be Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

List of GOT devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

APPENDICES 198

Appendix 1 List of Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

FB library: Warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

FB library: Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200

Application program control FB: Warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

Application program control FB: Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

Appendix 2 Functional Restrictions by Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

Appendix 3 Temporary License Registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

INSTRUCTION INDEX 208

REVISIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210

WARRANTY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212

RELEVANT MANUALS

This manual does not include information on restrictions of use such as combination with modules or PLC CPUs.

Please make sure to read the user's manual of the corresponding products before using this application package.

e-Manual refers to the Mitsubishi FA electronic book manuals that can be browsed using a dedicated tool.

e-Manual has the following features:

Required information can be cross-searched in multiple manuals.

Other manuals can be accessed from the links in the manual.

The hardware specifications of each part can be found from the product figures.

Pages that users often browse can be bookmarked.

Manual name [manual number] Description Available form

MELSEC iQ-R Simple Motion Module User's Manual

(Startup)

[IB-0300245]

Specifications, procedures before operation, system configuration, wiring,

and operation examples of the Simple Motion module

Print book

e-Manual

PDF

MELSEC iQ-R Simple Motion Module User's Manual

(Application)

[IB-0300247]

Functions, input/output signals, buffer memory addresses, parameter

settings, programming, and troubleshooting of the Simple Motion module

Print book

e-Manual

PDF

MELSEC iQ-R Simple Motion Module User's Manual

(Advanced Synchronous Control)

[IB-0300249]

Functions and programming for the synchronous control of the Simple

Motion module

Print book

e-Manual

PDF

MELSEC iQ-R Simple Motion Module User's Manual

(Network)

[IB-0300307]

Functions, parameter settings, troubleshooting, and buffer memory of CC-

Link IE Field Network

Print book

e-Manual

PDF

13

14

TERMS Unless otherwise specified, this manual uses the following terms.

Term Description

Alignment conveyor This function aligns unevenly placed workpieces to be packaged and transfers them to the supply conveyor.

Box motion This mechanism performs sealing and cutting with elliptical movements of two axes, the travel axis and seal axis.

A cutter seals and cuts the sheet or film conveyed by the conveyor into the specified size at the speed synchronized with

the sheet or film while moving downward and forward at the same time.

After completion of cutting, the cutter moves upward and returns to the waiting point.

Center seal To adhere a film or sheet on the back of an item to form a tube in packaging.

This processing is also called back sealing.

Cut pitch This word indicates the cutting interval of a sheet or film.

Cycle stop This function stops a series of operations to be performed by the machine at a specified position after a stop request is

issued.

Discharge conveyor This conveyor carries packaged items to outside the packaging machine.

Emergency stop This function immediately stops the operation of the machine.

End seal This mechanism adheres a sheet or film to seal items to be packaged.

FB The abbreviation for a function block

Film This word indicates a thin film in general.

For the packaging machine, this word indicates a film for packaging workpieces.

Finger This mechanism keeps the intervals of packaging target items or products constant on the conveyor.

Flying shear This mechanism performs traveling cutting synchronized with one axis in synchronization with the sheet.

A cutter travels (forward/backward) at a synchronous speed to cut the sheet or film conveyed by the conveyor into the

specified size.

Gap adjustment conveyor This conveyor aligns unevenly placed workpieces to be packaged.

GOT The abbreviation for Graphic Operation Terminal

Gusset This word indicates a margin.

A gusset bag has margins on both sides. A packaged product is rectangular in shape.

Inching This function operates the machine while the button is pressed.

Loading conveyor This conveyor loads workpieces to be packaged.

Long dwell This mechanism seals and cuts a sheet or film in the circular motion including straight motion (similar to the shape of the

letter "D").

The straight section is used to synchronize the conveyor speed, seal and cut the sheet or film.

The straight section ensures sufficient sealing and cutting time.

Mark compensation This function detects a registration mark and compensates the gap between the mark and reference point.

Meandering adjustment This function compensates the deformation of a sheet detected during sheet feeding.

No Gap No Seal This function stops end seal processing to protect the mechanism when the space between packaging target items is

too narrow to package.

No Product No Bag This function stops end seal processing and film feeding to prevent packaging mistakes when no packaging target items

are conveyed.

Potentiometer This device detects a rotation angle by applying a constant voltage between fixed terminals of a variable resistor and

measuring the voltage of a slide terminal.

Product This word indicates a packaged item.

Product length The size of an item to be packaged

Pulse generator A pulse generator is used for detecting the rotation speed of the feed roll.

This generator is also called rotary encoder.

Reel change This function automatically replaces the film or sheet.

Register mark This mark is used as the index for the interval of a sheet.

This mark is also called register mark or match mark.

Rotary cutter This mechanism seals and cuts a sheet or film with a cutter consisting of a circular blade and a fixed blade.

A rotating cutter seals and cuts the sheet or film conveyed by the conveyor into the specified size while adjusting the

speed.

The cutter rotates at the peripheral speed synchronized with the sheet or film.

Rotary cutter cam (central

reference)

This cam specifies the synchronization section in synchronous position adjustment based on the center of the sheet.

Rotary cutter cam (front end

reference)

This cam specifies the synchronization section in the synchronization starting point based on the front end of the sheet.

Rotary encoder Refer to "Pulse generator".

Seal axis This axis moves vertically to the line in the box motion.

Sealing To adhere a sheet or film by heat, pressure, or ultrasonic wave

Sensor A tension detector, proximity switch, or pulse generator

Supply conveyor This conveyor carries packaging target items to a packaging machine.

Temperature control This control regulates a heat source such as a heater at a set temperature.

Temporary license A license for using the application before getting an official license.

The temporary license is available for two months (from the registration date of the temporary license to the same day in

the month after next).

Tension control This control performs rewinding/unwinding with a constant tension regardless of winding diameter changes.

Travel axis This axis moves in parallel to the line in the box motion.

Work This word indicates a packaging target item.

Work length The size of an item to be packaged

Term Description

15

16

REQUESTING AND REGISTERING A LICENSE KEY To use the application, register a license key to the CPU module.

Before starting up the system, follow the "License Key Request Instructions" supplied with this product to get a license key.

1. The following information is required to request a license key.

Application information (product name, model, and product ID)

This information is described in the "License Certificate" supplied with this product.

Hardware information (model and serial number)

The model and serial number (manufacturing information for MELSEC iQ-R series) of the CPU module to be used. For how to

check the manufacturing information and firmware version, refer to the following.

MELSEC iQ-R Module Configuration Manual

2. Register the license key to the CPU module before creating an application program.

For the registration procedure, refer to the following.

Page 29 SETTING AND PROCEDURE BEFORE OPERATION

3. Attach the supplied "iQ Monozukuri seal" on the CPU module for which a license key has been registered.

For the position to attach the seal, refer to the following.

Position where the seal is attached: Above the PULL on the LED cover

Position where the seal is attached: Below the Ethernet port P2

1

1 OVERVIEW

1.1 Packaging Application Package The "packaging application package" provides the FB library of the standard functions used for packaging control and

application examples of the library (programs and GOT screens).

Users can easily create applications by programming with the libraries required for the system used and utilizing screen

examples.

1.2 Application Examples This application package can be used for controlling product packaging machines and cutting machines for film, paper, and

boards as shown below.

Horizontal pillow packaging machine

Vertical pillow packaging machine

1 OVERVIEW 1.1 Packaging Application Package 17

18

Cross-cutting machine

Rotary cutter

Conveyor line

1 OVERVIEW 1.2 Application Examples

1

1.3 Operations of Pillow Packaging Machines The following describes the operations of pillow packaging machines.

Horizontal pillow packaging machine This machine feeds a roll of packaging film, wraps workpieces such as food conveyed on conveyor belts with the film, and

adheres both ends of the film on the back of the workpieces lengthways to form a film tube. The workpieces arranged at

regular intervals in the tube are conveyed to the next step and this machine performs sealing and cutting widthways so that

they are packed one by one.

Vertical pillow packaging machine This machine feeds a roll of packaging film, and the conveyance roller axis feeds the film by the size of one bag and adheres

both ends of the film lengthways to form a bag. After a workpiece such as food is put into the bag, this machine performs

sealing and cutting the top of the bag. Packed workpieces are conveyed by the conveyor.

Film

Food

Heater

Center seal part

Cutter

Packaging film

Conveyor

Sweets or sauce

Seal axis

Conveyance roller axis

1 OVERVIEW 1.3 Operations of Pillow Packaging Machines 19

20

1.4 Functions of Each Packaging Machine The following describes functions of each packaging machine.

Rotary cutter This function performs sealing and cutting with a circular movement of one axis.

A cutter seals and cuts the sheet or film conveyed by the conveyor into the specified size while adjusting the speed. The cutter

rotates at the peripheral speed synchronized with the sheet or film.

Mechanism image

Operation outline

Cam pattern

Main axis

Rotary cutter axis

Sheet feeding

Rotary cutter axis

100%

Cam stroke ratio

t

1 OVERVIEW 1.4 Functions of Each Packaging Machine

1

Box motion This function performs sealing and cutting with elliptical movements of two axes.

A cuter seals and cuts the sheet or film conveyed by the conveyor into the specified size at the speed synchronized with the

sheet or film while moving downward and forward at the same time. After completion of cutting, the cutter moves upward and

returns to the waiting point.

Mechanism image

Operation outline

Cam pattern

Section Movement Remarks

1) Moving to the travel axis synchronization starting point

2) Moving to the seal axis machining point (close) Master axis - Travel axis synchronization section

3) Sealing and cutting operation

4) Moving to the seal axis waiting point (open)

5) Moving to the travel axis waiting point

1)

2) 3) 4)

5)

1) 2)

3)

4)

5)

Master axis

Travel axis

Seal axis

Seal axis

Travel axis

1) 2) 3) 5)4)

Cam stroke amount

Cam stroke amount

Cam axis length per cycle

Cam axis length per cycle

1 OVERVIEW 1.4 Functions of Each Packaging Machine 21

22

Flying shear This function performs traveling cutting with one axis in synchronization with the sheet.

A cutter travels (forward/backward) to cut the sheet or film conveyed by the conveyor into the specified size.

Mechanism image

Operation outline

Cam pattern

Main axis

Cutter axis

Cutter axis

Cycle endCycle starting point

Synchronization ending point

Synchronization starting point

Cam stroke amount

Cam axis length per cycle

1 OVERVIEW 1.4 Functions of Each Packaging Machine

1

Long dwell This function performs sealing and cutting with elliptical movements of one axis.

A cutter seals and cuts the sheet or film conveyed by the conveyor into the specified size while adjusting the speed. The cutter

rotates at the peripheral speed synchronized with the sheet or film.

Mechanism image

Operation outline

Cam pattern

Section Movement Remarks

1) Moving to the synchronization starting point

2) Moving to the seal process point Main axis - D-cam axis synchronous section

3) Sealing and cutting operation

4) Sealing complete D-cam axis retraction

5) Moving to the D-cam axis waiting point

Main axis

D-cam axis

Synchronous section

1) 2) 3) 4) 5)

Synchronous section

Cam stroke amount

Cam axis length per cycle

1 OVERVIEW 1.4 Functions of Each Packaging Machine 23

24

Alignment conveyor This function aligns the workpieces randomly fed from the upstream conveyor at equal spaces and discharges them to the

loading conveyor.

Mechanism image

Mark compensation This function detects registration marks printed on a sheet for packaging workpieces and compensates the cutter axis or

sheet feeding axis.

No Gap No Seal This function protects the cutter mechanism by stopping the cutter axis when spaces between products (workpieces) are too

narrow to package them.

Gap adjustment conveyor

Work feeding conveyor

Sensor Work length

Supply conveyor Work loading conveyor

Finger (partition plate)

Work gap (length per cycle) Sensor

Sensor

Randomly fed workpieces

Registration mark

Mark sensor Rotary cutter

No space between workpieces The cutter stops.

Did not cut to protect the cutter.

The cutter resumes in synchronization with the conveyor.

1 OVERVIEW 1.4 Functions of Each Packaging Machine

1

No Product No Bag This function stops the cutter axis and film feeding axis to prevent packaging mistakes when no products (workpieces) are

conveyed by the conveyor.

No workpieces is conveyed. The cutter stops.

Film feeding stops.

The conveyor continues its operation (workpiece conveyance).

The cutter and film resume in synchronization with the conveyor.

1 OVERVIEW 1.4 Functions of Each Packaging Machine 25

26

1.5 Product Configuration This product is the PACKAGING package for MELSEC iQ-R series.

Select and prepare MELSEC iQ-R power supply modules, base units, PLC CPUs, I/Os, intelligent modules, servo amplifiers,

driving devices such as inverters, and GOTs appropriate to the system used.

Products in the iQ Monozukuri PACKAGING package

AP20-PAC002AA-M Check that all the products in the following table are included in a package.

*1 There are two iQ Monozukuri seals included for each license (one spare seal).

Name Quantity Remarks

Before Using the Product 1

END-USER SOFTWARE LICENSE AGREEMENT 1

License Certificate 1

PACKAGING package (DVD-ROM) 1 For details, refer to the following.

Page 27 Files in DVD-ROM

License Key Request Instructions 1

iQ Monozukuri seal Number of licenses 2*1

1 OVERVIEW 1.5 Product Configuration

1

1.6 Files in DVD-ROM The following table describes the composition of the files in the DVD-ROM (packaging package) included in this package.

*1 "*" indicates their versions.

Folder File name*1 File type (Extension) Description Required application

Package

root/

RD77MS

Manual English bcnb62005762eng* PDF file (.pdf) iQ Monozukuri PACKAGING Instruction

Manual (English)

Adobe Reader

bcnb62005762eng* e-Manual file (.ema) e-Manual Viewer

Japanese bcnb62005761* PDF file (.pdf) iQ Monozukuri PACKAGING Instruction

Manual (Japanese)

Adobe Reader

bcnb62005761* e-Manual file (.ema) e-Manual Viewer

Simplified

Chinese

bcnb62005763chn* PDF file (.pdf) iQ Monozukuri PACKAGING Instruction

Manual (Chinese (Simplified))

Adobe Reader

bcnb62005763chn* e-Manual file (.ema) e-Manual Viewer

Lib PAC_PackagingControl_

R_****

Application library (.mslm) FB library for packaging applications MELSOFT GX

Works3

Project AP20-PAC002AA-R16-

77MS8_LongDwell_****

GX Works3 project file

(.gx3)

Application program examples using

the long dwell

MELSOFT GX

Works3

AP20-PAC002AA-R16-

77MS16_BoxMotion_****

GX Works3 project file

(.gx3)

Program examples using the box

motion

MELSOFT GX

Works3

AP20-PAC002AA-R16-

77MS16_AlignmentConv

eyor_****

GX Works3 project file

(.gx3)

Program examples for work alignment

on the conveyor

MELSOFT GX

Works3

AP20-PAC002AA-

GT27nnV_****

GT Designer3 project file

(.GTX)

Screen examples for packaging

applications

MELSOFT GT

Works3

LicRegSupport LicRegSupport Tool (.xlsm) License key registration support tool Microsoft Excel

AP20-

PAC002AA_R16_LicWrite

GX Works3 project file

(.gx3)

Programs for registering a license key

to the CPU module

MELSOFT GX

Works3

AP20-PAC002AA Text file (.txt) Version information

Package

root/

RD77GF

Manual English bcnb62005762eng* PDF file (.pdf) iQ Monozukuri PACKAGING Instruction

Manual (English)

Adobe Reader

bcnb62005762eng* e-Manual file (.ema) e-Manual Viewer

Japanese bcnb62005761* PDF file (.pdf) iQ Monozukuri PACKAGING Instruction

Manual (Japanese)

Adobe Reader

bcnb62005761* e-Manual file (.ema) e-Manual Viewer

Simplified

Chinese

bcnb62005763chn* PDF file (.pdf) iQ Monozukuri PACKAGING Instruction

Manual (Chinese (Simplified))

Adobe Reader

bcnb62005763chn* e-Manual file (.ema) e-Manual Viewer

Lib PAC_PackagingControl_

R_****

Application library (.mslm) FB library for packaging applications MELSOFT GX

Works3

Project AP20-PAC002AA-R16-

77GF8_LongDwell_****

GX Works3 project file

(.gx3)

Application program examples using

the long dwell

MELSOFT GX

Works3

AP20-PAC002AA-R16-

77GF16_BoxMotion_****

GX Works3 project file

(.gx3)

Program examples using the box

motion

MELSOFT GX

Works3

AP20-PAC002AA-R16-

77GF16_AlignmentConve

yor_****

GX Works3 project file

(.gx3)

Program examples for work alignment

on the conveyor

MELSOFT GX

Works3

AP20-PAC002AA-

GT27nnV_****

GT Designer3 project file

(.GTX)

Screen examples for packaging

applications

MELSOFT GT

Works3

LicRegSupport LicRegSupport Tool (.xlsm) License key registration support tool Microsoft Excel

AP20-

PAC002AA_R16_LicWrite

GX Works3 project file

(.gx3)

Programs for registering a license key

to the CPU module

MELSOFT GX

Works3

AP20-PAC002AA Text file (.txt) Version information

1 OVERVIEW 1.6 Files in DVD-ROM 27

28

1.7 Applicable Hardware and Software The following table lists applicable models and versions of the engineering tool.

*1 The projects included in this product were created in the indicated version.

Item Model

PLC CPU module R**CPU, R**ENCPU

Use the module with a firmware version of "25" or later.

Simple Motion module RD77MS, RD77GF

Engineering environment (controller) MELSOFT GX Works3 Version 1.057K or later*1

Engineering environment (GOT) MELSOFT GT Works3 Version 1.220E or later*1

1 OVERVIEW 1.7 Applicable Hardware and Software

2

2 SETTING AND PROCEDURE BEFORE OPERATION

2.1 Registering a License Key To use this application package, register a license key to the PLC CPU module that executes applications. Follow the steps

below to register a license key.

To execute the application before getting a license key, use a temporary license.

The temporary license is valid for two months (from the registration date of the temporary license to the same

day in the month after next).

For how to register a temporary license, refer to the following.

Page 204 Temporary License Registration

Items to be prepared

Creating and executing the program 1. Opening the license key registration project (AP20-PAC002AA_R16_LicWrite.gx3)

Copy the license key registration project (AP20-PAC002AA_R16_LicWrite.gx3) in the supplied DVD to a folder on the

personal computer, then open the file.

The project is created for the R16CPU. When using a model other than R16CPU, change the model.

* When registering a license key to multiple PLC CPU modules, register it one by one.

2. Preparing the program using the license key registration support tool

When this tool is not used, follow the procedure described in "3. Editing the initial program".

Copy the license key registration support tool (LicRegSupport.xlsm) in the supplied DVD to a folder in the personal

computer, and open the file. When the file is read-only, clear the read-only status. Enable the macro if it is disabled.

Input the product ID and license key, and press the [Program Generation] button.

Item Description

Product ID Numbers that are described in the "License Certificate"

License key Follow the "License Key Request Instructions" to get a license key.

License key registration project

(AP20-PAC002AA

_R16_LicWrite.gx3)

A project for registering a license key to the PLC CPU module.

It is included in the supplied DVD.

FormatLicense (Macro type)

PAC_LicenseWrite (Macro type)

License key registration support tool

(LicRegSupport.xlsm)

A tool that generates a license key registration program (ST instructions). It is included in the supplied DVD.

When the operating environment for Office is not installed, register the license key manually without this tool.

[Operating environment] Microsoft Office 2010, Microsoft Office 2013, Microsoft Office 2016

123-123456789

11AA12AB13AC14AD21BA22BB23BC24BD31CA32CB33CC34CD41DA42DB43DC44DD

Click.

2 SETTING AND PROCEDURE BEFORE OPERATION 2.1 Registering a License Key 29

30

The program in ST language is output. Press the [Copy] button. The output program is copied to the clipboard.

Follow the steps described in "3. Editing the initial program" to edit the program. After editing the program, press the [Close]

button to end the tool.

Precautions

Any operation in Excel is disabled while the license key registration support tool is being used. End the tool after using it.

Click.

Click.

2 SETTING AND PROCEDURE BEFORE OPERATION 2.1 Registering a License Key

2

3. Editing the initial program

Select "Program" "Initial" in the Navigation window and open the registered program. (Program name: Initial)

Set the license key to the license key label (wLicensekey) of the initial program.

Setting with the license key registration support tool

When the license key registration support tool is not used, refer to "Manual setting".

Press the [Copy] button to copy the program in ST language which is output to the license key registration support tool to the

clipboard.

Select all of the existing ST program and paste the copied program in the initial program.

After pasting the program, follow the procedure described in "4. Writing and executing the program".

Manual setting

Refer to the following example to set the license key and product ID to the initial program.

Open.

Attach.

11AA12AB13AC14AD21BA22BB23BC24BD31CA32CB33CC34CD41DA42DB43DC44DD

Snip

License key (example) Product ID (example) 123-123456879

2 SETTING AND PROCEDURE BEFORE OPERATION 2.1 Registering a License Key 31

32

4. Writing and executing the program

Write the created program to the PLC CPU module and execute it.

Select "Convert" "Rebuild All" from the menu and convert all the program created in step 3. When an error occurs, check

the details and correct the program.

Select "Online" "Write to PLC" from the menu and write all the program to the PLC CPU module.

Set the PLC CPU module to the RUN state and execute the scan program. Select "Program" "Scan" in the Navigation

window and open the registered program. (Program name: LicenseWrite) The scan program includes the function block

(FormatLicense) for formatting the license key registration area and the function block (PAC_LicenseWrite) for writing the

license key.

When registering the license key to the PLC CPU module for the first time, format the license key

registration area. Format it before registering the license key.

When another license of iQ Monozukuri has been registered, register the license without formatting it.

When the temporary license has already been registered, the expiration date is cleared by registering the

obtained license key.

Formatting the license key registration area

Turn on the execution flag (ExecuteFormat) of the function block (FormatLicense) in the scan program. Normal completion

(o_bComp) or Error completion (o_bError) becomes TRUE. At the error completion, check the PLC CPU error details.

Turn off the execution flag (ExecuteFormat) after checking the output of the function block.

Registering the license key

Turn on the execution flag (WriteLicense) of the function block (PAC_LicenseWrite) in the scan program. Normal completion

(o_bOK) or Error completion (o_bError) becomes TRUE. At the error completion, refer to Troubleshooting. (Page 33

Troubleshooting)

When Normal operation (o_bOK) turns on, the license key registration is completed. Turn off the execution flag

(WriteLicense).

2 SETTING AND PROCEDURE BEFORE OPERATION 2.1 Registering a License Key

2

5. Deleting the license key registration program

After the license key registration has been completed, delete the program in the PLC CPU module.

Select "Online" "Delete PLC Data" from the menu and select the [Select All] button in the "Online Data Operation" window

to delete the program.

The license key registration project is not used after the registration. Save it as necessary and end it.

Troubleshooting The following table lists errors that occur during the license key registration and corrective actions.

Precautions

The license key is held after the power-off since it is written to the device data storage file.

If the data memory has been reset by operating the CPU memory of GX Works3, registration information of all registered

license keys will be lost.

If the license key registration area of the device data storage file has been operated with SLMP or the FTP server function,

license information may be lost.

For the license key registration FB, set "FB type" to "Macro type".

Error details Cause Corrective action

After "PAC_LicenseWrite" has been

executed, Error completion

(o_bError) turns on and Normal

completion (o_bOK) remains off.

The license key registration area

has never been formatted.

The license key outside the range

of the memory was trying to be

written.

Format the license key registration area using "FormatLicense" and register

the license key using "PAC_LicenseWrite".

Using "FormatLicense" deletes other registered license keys. Register them

again.

After "PAC_LicenseWrite" is

executed, neither of Normal

completion (o_bOK) and Error

completion (o_bError) turns on.

The PLC CPU module is not in the

RUN state.

"Macro type" is not specified for

"FB type" of the license key

registration FB.

Set the PLC CPU module to the RUN state.

Specify "Macro type" for "FB type" of the license key registration FB.

Click.

Click.

2 SETTING AND PROCEDURE BEFORE OPERATION 2.1 Registering a License Key 33

34

2.2 Registering the FB Library The following describes the procedure for registering the FB library in the list. For the library file name and details of the

library, refer to "Page 47 FB LIBRARY". 1. Copy the library file (*.mslm) in the supplied

DVD to anywhere in a personal computer.

2. Start GX Works3, select "Project" "New",

and click the [Element Selection] icon.

3. The Element Selection window appears.

Click the Library tag and select the library.

4. Click the [Register to Library List] icon.

5. Click [Register Library].

Click.

Click.

Click.

Click.

Click.

2 SETTING AND PROCEDURE BEFORE OPERATION 2.2 Registering the FB Library

2

6. The dialog box shown on the left appears.

Click the [OK] button.

7. The "Register Library to Library List"

window appears. Select the library file

(*.mslm) copied in the personal computer

and click the [Open] button.

8. Imported FBs are displayed in the Element

Selection window.

9. Select the FB to be used from the Element

Selection window, and drag and drop it into

the work window. The FB is added in the

Navigation window.

10.Open "Property".

Click.

Drag and drop an FB.

The FB is added.

Click.

Right-click.

2 SETTING AND PROCEDURE BEFORE OPERATION 2.2 Registering the FB Library 35

36

When the subroutine type is set as the FB type, the size of programs can be reduced but the processing

speed becomes slow. Fixed cycle execution is recommended for some FBs. Check the fixed cycle interval

setting of the inter-module synchronization.

11. Select an FB type.

2 SETTING AND PROCEDURE BEFORE OPERATION 2.2 Registering the FB Library

2

2.3 Upgrading the Library Version The procedure for updating the library elements differs depending on the type of the programming language.

For details on the procedure for updating the library elements, refer to the following.

GX Works3 Operating Manual

If the elements of a library imported to a project cannot be updated, delete the library elements (FBs and structures) in the

Navigation window, and then drag and drop FBs of a new version into the Navigation window. Unless the old library elements

in the Navigation window are deleted, the update cannot be performed.

Replacement when updating a project of version 1.004E or earlier to 1.005F or later

Library change Replacement method

Change the data type of the variables AxisNo. and StartIO in the AXIS_REF

structure to word [unsigned].

Change the variable data type of I/O No. and axis No. to word [unsigned].

Correct the data type error in the type conversion instruction so that the data

type matches.

2 SETTING AND PROCEDURE BEFORE OPERATION 2.3 Upgrading the Library Version 37

38

2.4 Certifying the License Key To use the FB library supplied with this application package, certify the registered license key.

For the license key certification, arrange the function block in the scan program of the user program.

Placement of the license certification FB (PAC_Activation) in the user program The license certification FB (PAC_Activation) must be executed before the library FBs.

Place it at the front of the user-created GX Works3 project scan program.

If there are multiple scan programs, place it in the program with the earliest execution order.

The license certification FB does not operate correctly in non-scan programs.

The license certification FB is executed by simply placing it in the program.

How to check the program with the earliest execution order

Placement in the license certification FB scan program

Item Description

License certification FB

(PAC_Activation)

This FB certifies the license.

It is supplied with the FB library.

Set "FB type" to "Macro type" before using this function block.

Scan program with the earliest execution order

2 SETTING AND PROCEDURE BEFORE OPERATION 2.4 Certifying the License Key

2

CPU parameter setting of the user program Select "Parameter" CPU module "CPU Parameter" in the Navigation window to open the setting item window.

Select "File Setting" "File Setting for Device Data Storage" in the CPU parameter window.

Set "Use Or Not Setting" to "Use".

Precautions

This package uses addresses 0 to 1023 (1K word) of the data storage file (DEVSTORE.QST). When using the device data

storage file, set the file to 2K words or more and use the address 1024 or later.

If data is accidentally written to the addresses 0 to 1023 of the data storage file, license information may be lost. In this

case, register the license again.

In this package program example, "access from external devices" is enabled in the global label. After writing the program

example to the CPU module, reset the memory when disabling "access from external devices". If the memory has been

reset, registration information of all registered license keys will be lost. Register the licenses again.

Operation check of user program certification Write the user program to the PLC CPU module and check the operation of the license certification FB (PAC_Activation).

When the license key is normally certified, Normal completion (o_bActivateOK) becomes TRUE.

When Error completion (o_bError) turns on, check "Troubleshooting".

After checking the normal operation, attach the "iQ Monozukuri seal" on the CPU module. (REQUESTING AND

REGISTERING A LICENSE KEY)

Troubleshooting The following table lists errors that occur during the license key certification and corrective actions.

Error details Cause Corrective action

"o_bActivateOK" of "PAC_Activation"

is not TRUE but "o_bError" is TRUE.

The license key of the corresponding

application package is not registered.

Register the license key. (Page 29 Registering a License Key)

The expiration date of the temporary

license (two months) passed.

Get and register the license key. (Page 29 Registering a License Key)

The CPU module outputs the error

code (2840H) and stops.

"Not Use" is set to "File Setting for

Device Data Storage".

Set "File Setting for Device Data Storage" to "Use" in the CPU parameter and

write the CPU parameter. (Page 38 Certifying the License Key)

The CPU module outputs the error

code (3100H) and stops.

The firmware version of the PLC CPU

module is not "25" or later.

Update the firmware version of the PLC CPU module to "25" or later.

The PLC CPU module outputs the

error code (32FFH) and stops.

An incorrect license key is registered.

1) The product ID, PLC CPU module

model, or manufacturing

information at the request is

incorrect.

2) The license key is trying to be

certified with a PLC CPU module

that is not requested.

1) Delete the registered license key using "FormatLicense" and register the

correct license key.

2) Delete the registered license key from the PLC CPU module where data is

accidentally written by using "FormatLicense" and register the license key

in the requested PLC CPU module.

Using "FormatLicense" deletes other registered license keys. Register them

again.

2 SETTING AND PROCEDURE BEFORE OPERATION 2.4 Certifying the License Key 39

40

Replacing method of the module When replacing the PLC CPU module

To replace the CPU module, a new license key is required.

For the new license key, please contact your local Mitsubishi Electric representative.

When replacing a module other than the PLC CPU module (such as a Simple Motion module)

No specific operation is required. Refer to the manual of the module to replace the module.

2 SETTING AND PROCEDURE BEFORE OPERATION 2.4 Certifying the License Key

3

3 SYSTEM CONSTRUCTION

3.1 System Configuration Example The following figure shows the system configuration example of the horizontal pillow packaging machine with this application.

System configuration example when using RD77MS

PLC CPU Simple Motion module

Power supply module GOT

Application screens FB settings Cam monitor Servo axis setting Production screen

Application program, packaging machine FB group Box motion cam

generation Mark compensation Conveyor control

SSCNET/H

Servo amplifier

Servo amplifier

Servo amplifier

Servo amplifier

Servo amplifier

Servo amplifier

External input signal (DI)

Product loading sensor

Travel axis

Seal axis

Mark sensor

Box motion

Film feeding axis Finger sensor

Loading conveyor axis

Horizontal pillow packaging machine

Adjustment conveyor sensor

Adjustment conveyor axis

Supply conveyor sensor

Supply conveyor axis

Alignment conveyor

3 SYSTEM CONSTRUCTION 3.1 System Configuration Example 41

42

System configuration example when using RD77GF

CC-Link IE Field

Supply conveyor axis

Power supply module

PLC CPU Simple Motion module

GOT

Remote I/O module

Application screens FB settings Cam monitor Servo axis setting Production screen

Application program, packaging machine FB group

Box motion cam generation

Mark compensation Conveyor control

Servo amplifier

Servo amplifier

Servo amplifier

Servo amplifier

Servo amplifier

Servo amplifier

Travel axis

Seal axis

Mark sensor

Product loading sensor

Finger sensor

Film feeding axis Loading conveyor axis

Horizontal pillow packaging machine

Box motion

Adjustment conveyor sensor

Supply conveyor sensor

Adjustment conveyor axis

Alignment conveyor

3 SYSTEM CONSTRUCTION 3.1 System Configuration Example

3

3.2 Control Overview

Function block configuration example The following shows the FB configuration examples for controlling the horizontal pillow packaging machine with this library.

They can be used for rotary cutter and long dwell by replacing the cam generation FB in accordance with the mechanism of

equipment.

Box motion control (travel axis, seal axis) Cam patterns for two axis (one for the travel axis, the other one for the seal axis) are generated by inputting production

settings such as the production speed and product length in the box motion cam generation FB.

Mark compensation control A difference between the command value and the mark pitch calculated from the current value of the film axis at mark

detection is output as a compensation value.

PAC_MakeBoxMotionCam

Production setting (Cam parameter)

CtrlOutputAxisSync

(Clutch and cam output)

CtrlOutputAxisSync

Generates cam data from the production speed and

product length.

Cam data for travel axis

Cam data for seal axis

Synchronous control output processing of travel axis

(Clutch and cam output)

Synchronous control output processing of seal axis

Cam auto-generation for box motion FB

Synchronization command

Synchronization command

Output axis synchronized control FB

Output axis synchronized control FB

Axis settings, waiting point settings

Axis settings, waiting point settings

PAC_CalcMarkCompensationSTD_ReadMarkDetectData STD_CtrlAuxiliaryAxis

(Virtual servo positioning)

Current value data read at film register mark detection

Measures the distance between marks and calculates the

compensation amount of the film axis

Auxiliary axis control of the film axis with compensation amount

Mark detection value

Automatic compensation calculation using mark

detection FBMark sensor

Correction value

Auxiliary axis correction FB

Mark detection data reading FB

3 SYSTEM CONSTRUCTION 3.2 Control Overview 43

44

Alignment conveyor control

Gap adjustment control The work gap is calculated from the workpiece position detected on the gap adjustment conveyor to output the compensation

amount so that the randomly fed workpieces from the upstream conveyor is equally spaced (between fingers) on the

downstream conveyor.

Loading position adjustment control The deviation is calculated between the position of workpiece detected on the supply conveyor and the finger position of the

loading conveyor to output the compensation amount so that each workpiece aligned (between fingers) on the upstream

conveyor is placed between fingers of the loading conveyor.

PAC_CalcGapSTD_ReadMarkDetectData STD_CtrlAuxiliaryAxis

(Virtual servo positioning)

Current value data read at workpiece detection

Calculates the compensation amount to adjust the gap

between workpieces.

Auxiliary axis control of the gap adjustment conveyor with

compensation amount

Mark detection value

Work gap adjustment compensation amount

calculation FBMark sensor

Correction value

Auxiliary axis correction FB

Mark detection data reading FB

PAC_CalcPhaseSTD_ReadMarkDetectData STD_CtrlAuxiliaryAxis

(Virtual servo positioning)

Current value data read at workpiece detection

Calculate the compensation amount to place each

workpiece between fingers

Auxiliary axis control of the supply conveyor with compensation amount

Mark detection value

Work loading position adjustment compensation

amount calculation FBMark sensor

Correction value

Auxiliary axis correction FB

Mark detection data reading FB

3 SYSTEM CONSTRUCTION 3.2 Control Overview

3

Configuration example of advanced synchronous control The following shows a configuration example of advanced synchronous control with the Simple Motion module for controlling

the horizontal pillow packaging machine with the library provided with this application package.

Horizontal pillow packaging Each axis synchronous control setting

Conveyor axis Film feeding axis

Synchronous control operation image

Travel axis Seal axis

Alignment conveyor Each axis synchronous control setting

Supply conveyor axis

Adjustment conveyor axis

Loading conveyor axis

Main axis (Virtual servo)

Mark compensation (Virtual servo)

Film feeding axis

Travel axis Seal axis

Horizontal pillow packaging Synchronous control

Box motion cam

Starts at the speed of "product length production quantity".

Phase adjustment (Virtual servo)

Supply conveyor (Servo input axis)

Supply conveyor axis

Adjustment conveyor axis

Gap adjustment (Virtual servo)

Alignment conveyor Synchronous control

Loading conveyor (Servo input axis)

* The above image is for the combined system.

3 SYSTEM CONSTRUCTION 3.2 Control Overview 45

46

Operation timing example The following figure shows an operation timing example for controlling the horizontal pillow packaging machine with the library

provided with this application package.

[Setting example]

1 cycle (product length): 100 mm

Film feeding axis waiting point: 50 mm

Travel axis waiting point: 50 mm

Seal axis waiting point: 50 mm

*1 When workpieces are not conveyed or spaces between workpieces are too wide, this function stops the travel axis, seal axis, and film feeding axis to prevent packaging mistakes.

*2 When spaces between workpieces are too narrow, this function stops the travel axis and seal axis to prevent sealing and cutting on workpieces.

Main axis

500

100

50 Conveyor axis

Film feeding axis

100

Travel axis (Box motion)

Seal axis (Box motion)

No Product No Bag*1 No Gap No Seal*2

Start of main axis

Mark compensation

1 cycle section

0

0

0

0

0

0

[mm]

[mm]

[mm]

t[s]

t[s]

t[s]

t[s]

t[s]

t[s]

[mm]

[mm]

Film feeding axis synchronization command

Travel axis/seal axis synchronization command

3 SYSTEM CONSTRUCTION 3.2 Control Overview

4

4 FB LIBRARY

This FB library is designed for packaging using the Simple Motion module.

4.1 Functions of the FB Library

List of FBs The following table lists the FBs in the FB library (PAC_PackagingControl_R).

: FB required for control

No. Item FB name Description Cutting and sealing control Mark compen sation

Alignment conveyor Refer enceRotary

cutter Box motion

Flying shear

Long dwell

Gap adjust ment

Loading position adjustment

01 Cam auto-

generation

STD_MakeRotaryCutter

Cam+RD77MS

Cam auto-

generation for

rotary cutter

Page

57

STD_MakeRotaryCutter

Cam+RD77GF

Page

61

PAC_MakeBoxMotionC

am

Cam auto-

generation for

box motion

Page

65

STD_MakeFlyingShear

Cam

Cam auto-

generation for

flying shear

Page

71

PAC_MakeLongDwellD

Cam

Cam auto-

generation for

D-cam

Page

77

02 Mark

compensation

STD_ReadMarkDetectD

ata

Mark detection

data reading

Page

82

PAC_CalcMarkCompen

sation

Auto deviation

compensation

calculation with

mark detection

Page

86

STD_CtrlAuxiliaryAxis Auxiliary axis

correction

Page

90

03 Alignment

conveyor

PAC_CalcGap Work gap

adjustment

compensation

amount

calculation

Page

94

PAC_CalcPhase Work loading

position

adjustment

compensation

amount

calculation

Page

99

99 Activation PAC_Activation License

activation

Page

38

4 FB LIBRARY 4.1 Functions of the FB Library 47

48

Version history The following table shows the version history of the FB library (PAC_PackagingControl_R).

Restrictions and precautions common to all FBs The number of FB steps in a program varies depending on the CPU model to be used and I/O definitions.

These FBs use the index register Z9. When using interrupt programs, do not use this index register in the interrupt

programs.

When combining macro and subroutine types in the program, use the R**CPU or R**ENCPU with a firmware version of

"26" or later.

The restrictions and precautions specific to each FB are separately described. Refer to the following.

Page 57 Details of the FB Library

Version Description

1.000A First edition

1.001B STD_MakeRotaryCutterCam+RD77GF (Cam auto-generation for rotary cutter (central reference)) is added.

PAC_MakeLongDwellDCam (Cam auto-generation for D-cam) is added.

The subroutine type is supported for the compile method of FB library.

PAC_Activation (License activation) is added.

1.002C PAC_CalcGap (Work gap adjustment compensation amount calculation) is added.

PAC_CalcPhase (Work loading position adjustment compensation amount calculation) is added.

The input label specification of STD_CtrlAuxiliaryAxis (Auxiliary axis correction) is changed.

1.003D PAC_Activation (License activation) has supported the temporary license.

1.004E The following FBs are modified.

PAC_CalcMarkCompensation (Automatic compensation calculation using mark detection)

1.005F The data type of AXIS_REF structure in the following FBs have been changed.

STD_MakeRotaryCutterCam+RD77MS

STD_MakeRotaryCutterCam+RD77GF

PAC_MakeBoxMotionCam

STD_MakeFlyingShearCam

PAC_MakeLongDwellDCam

STD_ReadMarkDetectData

PAC_CalcMarkCompensation

STD_CtrlAuxiliaryAxis

PAC_CalcGap

PAC_CalcPhase

4 FB LIBRARY 4.1 Functions of the FB Library

4

I/O signal processing The timing on when each I/O signal turns on/off may differ from the following timing depending on the FB used. For details,

refer to "Page 57 Details of the FB Library".

*1 When a value outside the range is input during normal operation, an error code is output but the previous operation continues. After that, when a normal value is input, the error code is cleared.

Status Pulsed execution (multiple scan execution type) Real-time execution

Normal

completion

Hold i_bEN (Execution command) on until o_bOK (Normal completion)

turns on. When i_bEN (Execution command) is turned off before

o_bOK (Normal completion) or o_bErr (Error completion) turns on, stop

the FB processing and end it with o_bOK (Normal completion) or

o_bErr (Error completion) that remains off.

Error

completion

A value

input to the

FB is

outside the

range.

i_bEN (Execution command)

o_bENO (Execution status)

i_*** (Input value)

o_bOK (Normal completion)

o_*** (Output value)

o_bErr (Error completion)

o_uErrorID (Error code)

0

0 Normal value

0

Output value

i_bEN (Execution command)

o_bENO (Execution status)

o_bOK (Normal completion)

o_*** (Output value)

o_bErr (Error completion)

o_uErrorID (Error code)

0 Output value

0 Normal value

0

0

i_*** (Input value)

i_bEN (Execution command)

o_bENO (Execution status)

i_*** (Input value)

Error cause

o_bOK (Normal completion)

o_*** (Output value)

o_bErr (Error completion)

o_uErrorID (Error code) 0

0

0 Normal value

0

[Md.31] Status: b13, etc.

Error code

i_bEN (Execution command)

o_bENO (Execution status)

i_*** (Input value)

Error cause

o_bOK (Normal completion)

o_*** (Output value)

o_bErr (Error completion)

o_uErrorID (Error code)

0

Error code

0

0

0 Normal value

0

[Md.31] Status: b13, etc.

Output value

i_bEN (Execution command)

o_bENO (Execution status)

i_*** (Input value)

o_bOK (Normal completion)

o_bErr (Error completion)

o_uErrorID (Error code) 0 Error code0

Outside the range

0 *1

Error code

Normal value

Normal value

Outside the range

4 FB LIBRARY 4.1 Functions of the FB Library 49

50

Combination of FBs The following shows combinations of FBs required for each mechanism control of the packaging machine.

For details of each FB and label, refer to "Page 57 Details of the FB Library".

For connection examples and operation timing of FBs, refer to "Page 104 APPLICATION PROGRAM EXAMPLE".

Mechanism Combination of FBs

Rotary cutter The cam auto-generation FB for rotary cutter generates cam data.

The generated cam data is used for starting the synchronous control in the output axis synchronous control FB to drive the cutter axis.*1

Box motion The cam auto-generation for box motion FB for box motion generates cam data of the travel axis and seal axis.

The generated cam data is used for starting the synchronous control in the output axis synchronous control FB to drive the travel axis and

seal axis.*1

Flying shear The cam auto-generation FB for flying shear generates cam data.

The generated cam data is used for starting the synchronous control in the output axis synchronous control FB to drive the flying shear

axis.*1

Output axis synchronized control FB (Cutter axis) Cam auto-generation for rotary cutter FB

B: i_bEN o_bENO :B

E: i_eSheetLength o_bOK :B

E: i_eSheetSyncWidth o_bError :B

E: i_eSyncAxisLength o_uErrorID :UW

E: i_eSyncStartPoint

E: i_eSyncSectionAccRatio

UW: i_uCamResolution

UW: io_uCamNo io_uCamNo :UW

DUT: io_stOutputAxis io_stOutputAxis :DUT

STD_MakeRotaryCutterCam+RD77MS

B: i_bEN

B: i_bSyncCommand

UW: i_uCamNo

E: i_eWaitingPos

E: i_eClutchOffSmoothingAmount

E: i_eClutchOnSmoothingAmount

E: i_eStrokeAmount

E: i_eLengthPerCycle

CtrlOutputAxisSync

DUT: i_stOutputAxis

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_bInSync :B

Cam auto-generation for box motion FB

B: i_bEN

UW: i_uProductPerMinute

E: i_eProductLength

E: i_eTravelAxisMaxLength

E: i_eSyncStartPoint

E: i_eSyncSectionAccRatio

E: i_eSealAxisClosedLength

UD: i_udSealAxisMoveTime

UD: i_udSealingTime

D: i_dSealStartTimingOffset

D: i_dSealEndTimingOffset

UW: i_uCamResolution

UW: io_uTravelCamNo

UW: io_uSealCamNo

DUT: io_stTravelAxis

DUT: io_stSealAxis

PAC_MakeBoxMotionCam o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_eMainInputAxisSpeed :E

o_eTravelAxisMaxDistance :E

o_eMainInputAxisSyncStartPos :E

o_eMainInputAxisSyncEndPos :E

o_eMainInputAxisSealStartPos :E

o_eMainInputAxisSealEndPos :E

io_uTravelCamNo :UW

io_uSealCamNo :UW

io_stTravelAxis :DUT

io_stSealAxis :DUT

Output axis synchronous control FB (Seal axis)

Output axis synchronous control FB (Travel axis)

o_eMainInputAxisSealDecelEndPos :E

o_eMainInputAxisSealAccStartPos :E

B: i_bEN

B: i_bSyncCommand

UW: i_uCamNo

E: i_eWaitingPos

DUT: i_stOutputAxis

E: i_eClutchOffSmoothingAmount

E: i_eClutchOnSmoothingAmount

E: i_eStrokeAmount

E: i_eLengthPerCycle

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_bInSync :B

CtrlOutputAxisSync

B: i_bEN

B: i_bSyncCommand

UW: i_uCamNo

E: i_eWaitingPos

DUT: i_stOutputAxis

E: i_eClutchOffSmoothingAmount

E: i_eClutchOnSmoothingAmount

E: i_eStrokeAmount

E: i_eLengthPerCycle

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_bInSync :B

CtrlOutputAxisSync

Cam auto-generation FB for flying shear

B:i_bEN o_bENO:B

E:i_eMainInputAxisStartPos o_bOK:B

E:i_eMainInputAxisSyncStartPos o_bError:B

E:i_eMainInputAxisCycleEndPos o_uErrorID :UW

E:i_eOutputAxisSyncStartPos o_eMainInputAxisSyncStartPos:E

E:i_eOutputAxisSyncEndPos o_eMainInputAxisSyncEndPos:E

E:i_eOutputAxisMaxLength o_eMainInputAxisCycleDonePos:E

E:i_eSyncSectionAccRatio

UW:i_uCamResolution

UW:io_uCamNo io_uCamNo:UW

DUT:io_stOutputAxis io_stOutputAxis:DUT

STD_MakeFlyingShearCam

B: i_bEN

B: i_bSyncCommand

UW: i_uCamNo

E: i_eWaitingPos

E: i_eClutchOffSmoothingAmount

E: i_eClutchOnSmoothingAmount

E: i_eStrokeAmount

E: i_eLengthPerCycle

CtrlOutputAxisSync

DUT: i_stOutputAxis

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_bInSync :B

Output axis synchronous control FB (Flying shear axis)

4 FB LIBRARY 4.1 Functions of the FB Library

4

*1 For details of the output axis synchronous control FB, refer to the following. Page 104 APPLICATION PROGRAM EXAMPLE

*2 For details of the compensation amount buffer FB, refer to the following. Page 104 APPLICATION PROGRAM EXAMPLE

Long dwell D-

cam

The cam auto-generation for D-cam FB generates cam data.

The generated cam data is used for starting the synchronous control in the output axis synchronous control FB to drive the D-cam axis.*1

Mark

compensation

The mark detection data read FB reads mark detection data from the Simple Motion module.

The auto deviation compensation calculation FB with mark detection automatically calculates the compensation amount from the read mark

detection data.

The calculated compensation amount is used to drive the auxiliary axis corresponding to the output axis in the auxiliary axis correction FB

and compensate the auxiliary axis.

Alignment

conveyor

The work gap adjustment compensation amount calculation FB is used to align unevenly fed workpieces at equal spaces.

The mark detection data reading FB reads mark detection data from the Simple Motion module.

The work gap adjustment compensation amount calculation FB calculates the compensation amount by using the read mark detection data.

The compensation amount buffer FB performs buffering of the calculated compensation amount and compensation starting position.*2

With the buffered compensation amount, the auxiliary axis correction FB starts the auxiliary axis corresponding to the output axis and

performs compensation.

When a phase adjustment with the loading conveyor is required after the work gap adjustment, the work loading position adjustment

compensation amount calculation FB is used.

The mark detection data reading FB reads mark detection data from the Simple Motion module.

The work loading position adjustment compensation amount calculation FB calculates the compensation amount by using the read mark

detection data.

The compensation amount and compensation starting position calculated by the compensation amount buffer FB are buffered.*2

With the buffered compensation amount, the auxiliary axis correction FB starts the auxiliary axis corresponding to the output axis and

performs compensation.

Mechanism Combination of FBs

Output axis synchronized control FB (D-cam axis)

Cam auto-generation for D-cam FB

B: i_bEN

B: i_bSyncCommand

UW: i_uCamNo

E: i_eWaitingPos

E: i_eClutchOffSmoothingAmount

E: i_eClutchOnSmoothingAmount

E: i_eStrokeAmount

E: i_eLengthPerCycle

CtrlOutputAxisSync

DUT: i_stOutputAxis

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_bInSync :B

B: i_bEN o_bENO :B

E: i_eProductLength o_bOK :B

E: i_eSyncAngle o_bError :B

E: i_eSealLength o_uErrorID :UW

E: i_eEccentricLength o_eSyncStartPos :E

o_eSyncEndPos :E

E: i_eSealSectionAccRatio o_eSealStartPos :E

E: i_eInOutSectionAccRatio o_eSealEndPos :E

UW: i_uCamResolution

UW: io_uCamNo io_uCamNo :UW

DUT: io_stOutputAxis io_stOutputAxis :DUT

PAC_MakeLongDwellDCam

B: i_bEN

UW: i_uMarkDetectSettingNo

D: i_dMarkDetectData

DUT: io_stCompensationSetting

UW: i_uMarkDetectCount

UW: i_uMissedMarkLimit

DUT: io_stOutputAxis

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_dCompensationAmount :D

o_uMissedMarkAmount :UW

io_stCompensationSetting :DUT

io_stOutputAxis :DUT

PAC_CalcMarkCompensation

B: i_bEN

E: i_eCompensationStartPos

D: i_dCompensationAmount

DUT: i_stOutputAxis

DUT: i_stCompensationSetting

DUT: i_stAuxiliaryAxis

STD_CtrlAuxiliaryAxis

B: i_bEN

UW: i_uLatchDataRangeChangeRequest

D: i_dLatchDataRangeUpperLimit

D: i_dLatchDataRangeLowerLimit

DUT: io_stOutputAxis

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_dMarkDetectData :D

UW: io_uMarkDetectSettingNo io_uMarkDetectSettingNo :UW

o_uMarkDetectCount :UW

io_stOutputAxis :DUT

STD_ReadMarkDetectData

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_bCompensationComplete :B

Mark detection data reading FB

Auxiliary axis correction FB

Automatic compensation calculation using mark detection FB

B: i_bEN

E: i_eCompensationStartPos

D: i_dCompensationAmount

DUT: i_stOutputAxis

DUT: i_stCompensationSetting

DUT: i_stAuxiliaryAxis

STD_CtrlAuxiliaryAxis

B: i_bEN

UW: i_uLatchDataRangeChangeRequest

D: i_dLatchDataRangeUpperLimit

D: i_dLatchDataRangeLowerLimit

DUT: io_stOutputAxis

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_dMarkDetectData :D

UW: io_uMarkDetectSettingNo io_uMarkDetectSettingNo :UW

o_uMarkDetectCount :UW

io_stOutputAxis :DUT

STD_ReadMarkDetectData

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_bCompensationComplete :B

Mark detection data reading FB Mark gap adjustment compensation amount calculation FB

Compensation amount buffer FB

Auxiliary axis correction FBB: i_bEN

D: i_dCompensationAmount

D: i_dCompensationStartPosition

UW: i_uMarkDetectCount

DUT: io_stOutputAxis

o_bENO :B

o_bBusy :B

o_bError :B

o_uErrorID :B

o_dCompensationAmount :D

io_stOutputAxis :DUT

PAC_CalcGap

SaveCompensationBuffer

B: i_bEN

E: i_eWorkLength

E: i_eSensorPosition

D: i_dMarkDetectData

UW: i_uMarkDetectCount

UW: io_uMarkDetectSettingNo

DUT: io_stOutputAxis

DUT: io_stCompensationSetting

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_dCompensationAmount :D

o_dCompensationStartPosition :D

io_uMarkDetectSettingNo :UW

io_stOutputAxis :DUT

io_stCompensationSetting :DUT

B: i_bEN

E: i_eCompensationStartPos

D: i_dCompensationAmount

DUT: i_stOutputAxis

DUT: i_stCompensationSetting

DUT: i_stAuxiliaryAxis

STD_CtrlAuxiliaryAxis

B: i_bEN

UW: i_uLatchDataRangeChangeRequest

D: i_dLatchDataRangeUpperLimit

D: i_dLatchDataRangeLowerLimit

DUT: io_stOutputAxis

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_dMarkDetectData :D

UW: io_uMarkDetectSettingNo io_uMarkDetectSettingNo :UW

o_uMarkDetectCount :UW

io_stOutputAxis :DUT

STD_ReadMarkDetectData

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_bCompensationComplete :B

Mark detection data reading FB Work loading position adjustment

compensation amount calculation FB

Compensation amount buffer FB

Auxiliary axis correction FBB: i_bEN

D: i_dCompensationAmount

D: i_dCompensationStartPosition

UW: i_uMarkDetectCount

DUT: io_stOutputAxis

o_bENO :B

o_bBusy :B

o_bError :B

o_uErrorID :B

o_dCompensationAmount :D

io_stOutputAxis :DUT

PAC_CalcPhase

SaveCompensationBuffer

B: i_bEN

E: i_eWorkLength

E: i_eSensorPosition

E: i_eWorkLoadPosition

D: i_dMarkDetectData

UW: i_uMarkDetectCount

UW: io_uMarkDetectSettingNo

DUT: io_stOutputAxis

DUT: io_stCompensationSetting

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_dCompensationAmount :D

o_dCompensationStartPosition :D

io_uMarkDetectSettingNo :UW

io_stOutputAxis :DUT

io_stCompensationSetting :DUT

4 FB LIBRARY 4.1 Functions of the FB Library 51

52

Synchronous control parameters [Pr.XX] The following table lists the synchronous control parameters required for the operation of the FBs.

Set servo input axis parameters ([Pr.300] to [Pr.304]), synchronous encoder axis parameters ([Pr.320] to [Pr.329]), and

synchronous parameters ([Pr.438] to [Pr.468]) with the Simple Motion setting tool or user programs as needed.

However, do not use user programs to set or change the parameters ([Pr.400] to [Pr.437]) to be set by FBs, input labels, or

structures.

For details of synchronous control parameters, refer to the following.

MELSEC iQ-R Simple Motion Module User's Manual (Advanced Synchronous Control)

: Set with FBs (setting value)

: Set with labels (label name)

: Set by users as needed

Parameter type Parameter No. Name Setting method STD_CtrlAuxiliaryAxis (Auxiliary axis correction)

Servo input axis parameter Pr.300 Servo input axis type

Fetch cycle: At power supply ON

Synchronous encoder axis

parameter

Pr.320 Synchronous encoder axis type

Fetch cycle: At power supply ON

Pr.321 Synchronous encoder axis unit setting

Fetch cycle: At power supply ON

Pr.324 Synchronous encoder axis length per cycle

Fetch cycle: At power supply ON

Synchronous

parameter

Main axis Pr.400 Main input axis No.

Fetch cycle: At start of synchronous control

Pr.402 Composite main shaft gear

Fetch cycle: Operation cycle

Pr.403 Main shaft gear: Numerator

Fetch cycle: At start of synchronous control

Pr.404 Main shaft gear: Denominator

Fetch cycle: At start of synchronous control

Auxiliary axis Pr.418 Auxiliary shaft axis No.

Fetch cycle: At start of synchronous control

(i_stAuxiliaryAxis)

Pr.419 Composite auxiliary shaft gear

Fetch cycle: Operation cycle

(0011H)

Pr.420 Auxiliary shaft gear: Numerator

Fetch cycle: At start of synchronous control

(1)

Pr.421 Auxiliary shaft gear: Denominator

Fetch cycle: At start of synchronous control

(1)

4 FB LIBRARY 4.1 Functions of the FB Library

4

Synchronous control data [Cd.XX] The following table lists the synchronous control data required for the operation of FBs.

Set synchronous encoder axis control data ([Cd.320] to [Cd.325]) and cam operation control data (cam position calculation:

[Cd.612] to [Cd.618]) with user programs as needed.

However, do not use user programs to set or change cam operation control data (cam data operation: ([Cd.600] to [Cd.607])

and cam auto-generation ([Cd.608] to [Cd.611]) to be used in FBs.

For details of control data, refer to the following.

MELSEC iQ-R Simple Motion Module User's Manual (Advanced Synchronous Control)

Memory area Control data No.

Name Setting method 1) STD_MakeRotaryCutterCam (Cam auto-generation for rotary cutter) 2) PAC_MakeBoxMotionCam (Cam auto-generation for box motion) 3) STD_MakeFlyingShearCam (Cam auto-generation for flying shear) 4) PAC_MakeLongDwellDCam (Cam auto-generation for D-cam) 5) STD_CtrlAuxiliaryAxis (Auxiliary axis correction)

1) 2) 3) 4) 5)

Synchronous control

system control data

Cd.380 Synchronous control start

Fetch cycle: Operation

cycle

Cam

operation

control

data

Cam data

operation

Cd.600 Cam data operation

request

Fetch cycle: Main cycle

Cd.601 Operation cam No.

Fetch cycle: At

requesting cam data

operation

Cd.602 Cam data first position

Fetch cycle: At

requesting cam data

operation

Cd.603 Number of cam data

operation points

Fetch cycle: At

requesting cam data

operation

Cd.604 Cam data format

Fetch cycle: At

requesting cam data

operation

Refresh cycle: At

completing cam data

operation

Cd.605 Cam resolution/

coordinate number

Fetch cycle: At

requesting cam data

operation

Refresh cycle: At

completing cam data

operation

Cd.606 Cam data starting point

Fetch cycle: At

requesting cam data

operation

Refresh cycle: At

completing cam data

operation

Cd.607 Cam data value

Fetch cycle: At

requesting cam data

operation

Refresh cycle: At

completing cam data

operation

4 FB LIBRARY 4.1 Functions of the FB Library 53

54

: Set with FBs

: Set by users as needed

Cam

operation

control

data

Cam auto-

generation

Cd.608 Cam auto-generation

request

Fetch cycle: Main cycle

Cd.609 Cam auto-generation

cam No.

Fetch cycle: At

requesting cam auto-

generation

Cd.610 Cam auto-generation

type

Fetch cycle: At

requesting cam auto-

generation

Cd.611 Cam auto-generation

data

Fetch cycle: At

requesting cam auto-

generation

Memory area Control data No.

Name Setting method 1) STD_MakeRotaryCutterCam (Cam auto-generation for rotary cutter) 2) PAC_MakeBoxMotionCam (Cam auto-generation for box motion) 3) STD_MakeFlyingShearCam (Cam auto-generation for flying shear) 4) PAC_MakeLongDwellDCam (Cam auto-generation for D-cam) 5) STD_CtrlAuxiliaryAxis (Auxiliary axis correction)

1) 2) 3) 4) 5)

4 FB LIBRARY 4.1 Functions of the FB Library

4

Mark detection setting parameters [Pr.XX] The following table lists the mark detection setting parameters required for the operation of FBs.

Set detailed parameters 2 ([Pr.42] to [Pr.95]) and mark detection setting parameters ([Pr.800] to [Pr.807]) with the Simple

Motion setting tool or user programs depending on the system configuration.

However, do not use user programs to set or change the mark detection setting parameters to be used in FBs.

For details of control data, refer to the following.

MELSEC iQ-R Simple Motion Module User's Manual (Application)

: Set with labels (label name)

: Set by users as needed

Parameter type

Parameter No.

Name Setting method STD_ReadMarkDetectData (Mark detection data reading)

Detailed

parameters 2

Pr.42 External command function selection [RD77MS]

Fetch cycle: At writing to buffer memory

Pr.95 External command signal selection [RD77MS]

Fetch cycle: At the rising edge of PLC READY signal [Y0]

Mark

detection

setting

Pr.800 Mark detection signal setting [RD77MS]

Fetch cycle: At power supply ON

Pr.801 Mark detection signal compensation time

Fetch cycle: At power supply ON or the rising edge of PLC READY signal [Y0]

Pr.802 Mark detection data type

Fetch cycle: At power supply ON

Pr.803 Mark detection data axis No.

Fetch cycle: At power supply ON

Pr.804 Mark detection data buffer memory No.

Fetch cycle: At power supply ON

Pr.805 Latch data range upper limit value

Fetch cycle: At power supply ON, the rising edge of PLC READY signal [Y0],

or latch data range change request

(i_dLatchDataRangeUpperLimit)

Pr.806 Latch data range lower limit value

Fetch cycle: At power supply ON, the rising edge of PLC READY signal [Y0],

or latch data range change request

(i_dLatchDataRangeLowerLimit)

Pr.807 Mark detection mode setting

Fetch cycle: At power supply ON or the rising edge of PLC READY signal [Y0]

(0: Available, other than 0: Not available)

Pr.808 Mark detection signal link device type [RD77GF]

Fetch cycle: At power supply ON

Pr.809 Mark detection signal link device number [RD77GF]

Fetch cycle: At power supply ON

Pr.810 Mark detection signal link device bit specification [RD77GF]

Fetch cycle: At power supply ON

Pr.811 Mark detection signal detection direction setting [RD77GF]

Fetch cycle: At power supply ON

4 FB LIBRARY 4.1 Functions of the FB Library 55

56

Mark detection control data [Cd.XX] The following table lists the mark detection control data required for the operation of FBs.

Set mark detection control data ([Cd.800] to [Cd.802]) with user programs depending on the system configuration.

However, do not use user programs to set or change the mark detection control data to be used in FBs.

For details of control data, refer to the following.

MELSEC iQ-R Simple Motion Module User's Manual (Application)

: Set with FBs (setting value)

: Set with labels (label name)

: Set by users as needed

Positioning data [Da.XX] The following table lists the positioning data required for the operation of FBs.

Set positioning data ([Da.1] to [Da.29]) with user programs depending on the program used.

However, do not use user programs to set or change the positioning data to be used in FBs.

For details of positioning data, refer to the following.

MELSEC iQ-R Simple Motion Module User's Manual (Application)

: Set with FBs (setting value)

: Set with labels (label name)

: Set by users as needed

Control data type Control data No. Name Setting method STD_ReadMarkDetectData (Mark detection data reading)

Axis control data Cd.8 External command valid

Fetch cycle: At request

Mark detection control data Cd.800 Number of mark detection clear

request

Fetch cycle: Operation cycle

Cd.801 Mark detection invalid flag

Fetch cycle: Operation cycle

Cd.802 Latch data range change request

Fetch cycle: Operation cycle or DI

input

(i_uLatchDataRangeChangeRequest)

Positioning data

Name Setting method STD_CtrlAuxiliaryAxis (Auxiliary axis correction)

Da.1 Operation pattern (0)

Da.2 Control method (02H)

Da.3 Acceleration time No. (i_st ConpensationSetting)

Da.4 Deceleration time No. (i_st ConpensationSetting)

Da.6 Positioning address/movement amount (i_dCompensationAmount)

Da.8 Command speed (i_st ConpensationSetting)

Da.9 Dwell time/JUMP destination positioning data No.

Da.10 M code/Condition data No./Number of LOOP to LEND repetitions/

Number of pitches

Da.27 M code ON signal output timing

Da.28 ABS direction in degrees

4 FB LIBRARY 4.1 Functions of the FB Library

4

4.2 Details of the FB Library This section describes the details of each FB.

STD_MakeRotaryCutterCam (Cam auto-generation for rotary cutter (front end reference))

Name STD_MakeRotaryCutterCam+RD77MS

Function overview

Item Description

Function overview This FB automatically generates cam data for rotary cutter (front end reference).

Symbol

Applicable hardware and

software

Applicable module RD77MS

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 947 steps

FB dependence

Execution command B: i_bEN o_bENO :B Execution status

Sheet length E: i_eSheetLength o_bOK :B Normal completion

Sheet synchronization width E: i_eSheetSyncWidth o_bError :B Error completion

Synchronous axis length E: i_eSyncAxisLength o_uErrorID :UW Error code

Synchronization starting point E: i_eSyncStartPoint

E: i_eSyncSectionAccRatio

Cam resolution UW: i_uCamResolution

Cam auto-generation cam No. UW: io_uCamNo io_uCamNo :UW Cam auto-generation cam No.

Output axis setting DUT: io_stOutputAxis io_stOutputAxis :DUT Output axis setting

STD_MakeRotaryCutterCam+RD77MS

Synchronous section acceleration ratio

4 FB LIBRARY 4.2 Details of the FB Library 57

58

*1 For details of control data, refer to the following. MELSEC iQ-R Simple Motion Module User's Manual (Advanced Synchronous Control)

Function description This FB automatically generates cam data for driving the rotary cutter (front end reference).

Turning on i_bEN (Execution command) starts generating cam data based on the set data.

When the cam generation is normally completed, o_bOK (Normal completion) turns on.

i_eSyncSectionAccRatio (Synchronous section speed acceleration ratio) changes the speed in the synchronous section.

If a warning related to the cam data operation occurs in the Simple Motion module during cam generation, an error (ErrorID:

2203H) is stored.

If an error has occurred in the FB, Error turns on and the error code is stored in ErrorID.

For details of error codes, refer to "Page 198 List of Error Codes".

Restrictions and

precautions

If a value other than 0 to 3 has been set in "[Pr.1] Unit setting", this FB is executed with the unit [mm].

The cam to be automatically generated is in the stroke ratio data format.

The cam data to be automatically generated will be saved in the cam open area.

If i_bEN (Execution command) turns off during cam generation, the cam may not be normally generated.

When generating multiple cams at the same time, input o_bOK (Normal completion) of the cam auto-generation FB as an

interlock condition so that the generation of the next cam starts after the generation of one cam is successfully completed.

If the cam generation fails, the cam data may be undefined. Try the cam auto-generation again. Check that normal cam is

generated and then perform the operation.

Since cam operation control data ([Cd.608] to [Cd.611]) is set in this FB, do not use user programs to set or change the data.*1

Use the FB CtrlOutputAxisSync or create a user program for the operation of the cutter axis.

Compiling method Macro type, subroutine type

FB operation type Pulsed execution (multiple scan execution type)

Item Description

Sheet synchronization width (i)

Synchronization starting point (i)

Synchronous axis length (i)

Sheet feeding

Sheet length (i)Cam axis current value per cycle

Sheet synchronization width (i) Synchronization starting point (i)

Sheet length (i)

Cam axis (synchronous axis) speed

Synchronous speed (Sheet feeding speed)

Output axis (Cam axis)

Cam stroke ratio (Cam data to be generated)

100%

t

t

t

* (i) Input label

Synchronous section acceleration ratio (i)

4 FB LIBRARY 4.2 Details of the FB Library

4

Labels

Input labels

*1 : Always, : When the FB is started (cannot be changed)

Output labels

*1 : The value will be held after the FB stops. : The value will be cleared after the FB stops.

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit On, off On: The FB is activated.

Off: The FB is not activated.

Sheet length i_eSheetLength Single

precision

real number

Refer to the description. 200.0 Set the sheet length.

Set this value for the cam axis length per

cycle.

0.01 Sheet length 10000.00

[(Optional) Same unit (with two digits after

the decimal point (fixed))]

Sheet

synchronizati

on width

i_eSheetSyncWi

dth

Single

precision

real number

Refer to the description. 50.0 Set the length of the section where the

output axis is synchronized with the sheet.

0.01 Sheet synchronization width <

Sheet length and synchronous axis

length

[(Optional) Same unit (with two digits after

the decimal point (fixed))]

Synchronous

axis length

i_eSyncAxisLen

gth

Single

precision

real number

Refer to the description. 200.0 Set the cycle length of the output axis

(rotary cutter).

0.01 Synchronous axis length

10000.00

[(Optional) Same unit (with two digits after

the decimal point (fixed))]

Synchronizati

on starting

point

i_eSyncStartPoi

nt

Single

precision

real number

Refer to the description. 50.0 Set the synchronization starting point of

the output axis to the sheet.

0.00 Synchronization starting point <

Sheet length

[(Optional) Same unit (with two digits after

the decimal point (fixed))]

Synchronous

section

acceleration

ratio

i_eSyncSection

AccRatio

Single

precision

real number

-50.00 Synchronous section

acceleration ratio 50.00 [%]

0.00 Set this item when the fine adjustment of

the synchronous speed in the

synchronous section is required.

Synchronous section speed =

Synchronous speed (100% +

Synchronous section acceleration ratio)

Cam

resolution

i_uCamResoluti

on

Word

[Unsigned]

256/512/1024/2048/4096/8192/

16384/32768

256 Set the cam resolution of the cam to be

generated.

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit On: Execution command is on.

Off: Execution command is off.

Normal completion o_bOK Bit This label indicates that the cam auto-generation has

been completed and the FB has been normally

completed.

Error completion o_bError Bit On: An error has occurred in the FB.

Off: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the

FB is stored.

Mark pitch

Sheet length

4 FB LIBRARY 4.2 Details of the FB Library 59

60

I/O labels

Output axis setting (AXIS_REF structure)

*1 : Always, : When the FB is started (cannot be changed)

Name Label name Data type Read timing*1

Setting range

Initial value

Description

Cam auto-generation

cam No.

io_uCamNo Word [Unsigned] 1 Cam

auto-

generation

cam No.

256

1 Set the cam No. to be automatically generated

for the cutter axis.

Output axis setting io_stOutputAxis AXIS_REF Refer to the output axis setting below.

Name Label name Data type Read timing*1

Setting range

Initial value

Description

Axis number AxisNo Word [Unsigned] 1 Axis No.

maximum

number of

axes of the

module used

Set the axis No. of the output axis to be used for

the cutter axis.

This FB uses the unit set in "[Pr.1] Unit setting" of

the axis No.

Start I/O number StartIO Word [Unsigned] 0H Start I/

O number

FEH

0 Installation address of the Simple Motion module

(Upper three digits of four digits (hexadecimal))

4 FB LIBRARY 4.2 Details of the FB Library

4

STD_MakeRotaryCutterCam (Cam auto-generation for rotary cutter (central reference))

Name STD_MakeRotaryCutterCam+RD77GF

Function details

Item Description

Function overview This FB automatically generates cam data (central reference) for rotary cutter.

Symbol

Applicable hardware and

software

Applicable module RD77GF

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 1135 steps

FB dependence

Execution command B: i_bEN o_bENO :B Execution status

Sheet length E: i_eSheetLength o_bOK :B Normal completion

Sheet synchronization width E: i_eSheetSyncWidth o_bError :B Error completion

Synchronous axis length E: i_eSyncAxisLength o_uErrorID :UW Error code

o_eAsyncSpeedResult :EE: i_eSyncPositionAdjustment

E: i_eSyncSectionAccRatio

Cam resolution UW: i_uCamResolution

Auto-generation option i_uAutoGenerationOption

i_eAccDecWith

Number of cutter i_uNumberOfCutter

UW: io_uCamNo io_uCamNo :UW

Output axis setting DUT: io_stOutputAxis io_stOutputAxis :DUT Output axis setting

STD_MakeRotaryCutterCam+RD77GF

Synchronous section acceleration ratio

Synchronous position adjustment

Acceleration/ deceleration width

Cam auto-generation cam No.

Cam auto-generation cam No.

Asynchronous speed result

4 FB LIBRARY 4.2 Details of the FB Library 61

62

*1 For details of control data, refer to the following. MELSEC iQ-R Simple Motion Module User's Manual (Advanced Synchronous Control)

Function description This FB automatically generates cam data for driving the rotary cutter (central reference).

Turning on i_bEN (Execution command) starts generating cam data based on the set data.

When the cam generation is normally completed, o_bOK (Normal completion) turns on.

i_eSyncSectionAccRatio (Synchronous section speed acceleration ratio) changes the speed in the synchronous section.

If a warning related to the cam data operation occurs in the Simple Motion module during cam generation, an error (ErrorID:

2203H) is stored.

If an error has occurred in the FB, Error turns on and an error code is stored in ErrorID.

For details of error codes, refer to "Page 198 List of Error Codes".

Restrictions and

precautions

If a value other than 0 to 3 has been set in "[Pr.1] Unit setting", this FB is executed with the unit [mm].

The cam to be automatically generated is in the stroke ratio data format.

The cam data to be automatically generated will be saved in the cam open area.

If i_bEN (Execution command) turns off during cam generation, the cam may not be normally generated.

When generating multiple cams at the same time, input o_bOK (Normal completion) of the cam auto-generation FB as an

interlock condition so that the generation of the next cam starts after the generation of one cam is successfully completed.

If the cam generation fails, the cam data may be undefined. Try the cam auto-generation again. Check that normal cam is

generated and then perform the operation.

Since cam operation control data ([Cd.608] to [Cd.611]) is set in this FB, do not use user programs to set or change the data.*1

Use the FB CtrlOutputAxisSync or create a user program for the operation of the cutter axis.

Compiling method Macro type, subroutine type

FB operation type Pulsed execution (multiple scan execution type)

Item Description

Sheet synchronization width (i)

Synchronization starting point (i) Acceleration/deceleration width (i)

Synchronous axis length (i)

Sheet feeding

Cam axis current value per cycle

Sheet synchronization width (i)

Acceleration/deceleration width (i)

Acceleration/deceleration width (i)

Sheet length (i)

Cam axis (synchronous axis) speed

Synchronous speed (Sheet feeding speed)

Cam stroke ratio (Cam data to be generated)

100%

t

t

t

* (i) Input label

Synchronous axis cycle length/diameter Synchronous

axis

Synchronous section acceleration ratio (i) Same speed as 0% synchronous speed

Negative value: Set the synchronous section at the front of the sheet 0: The center of the sheet is the synchronous section. Positive value: Set the synchronous section at the end of the sheet.

Asynchronous speed (Automatically calculated)

Sheet length (i)

4 FB LIBRARY 4.2 Details of the FB Library

4

Labels

Input labels

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit On, off On: The FB is activated.

Off: The FB is not activated.

Sheet length i_eSheetLength Single

precision

real number

Refer to the description. 200.0 Set the sheet length.

Set this value for the cam axis length per

cycle.

0.01 Sheet length 10000.00

[(Optional) Same unit (with two digits after

the decimal point (fixed))]

Sheet

synchronization

width

i_eSheetSyncWi

dth

Single

precision

real number

Refer to the description. 50.0 Set the length of the section where the

output axis is synchronized with the sheet.

0.01 Sheet synchronization width <

Sheet length

0.01 Sheet synchronization width <

Synchronous axis length/Number of

cutter

[(Optional) Same unit (with two digits after

the decimal point (fixed))]

Synchronous

axis length

i_eSyncAxisLen

gth

Single

precision

real number

Refer to the description. 200.0 Set the cycle length of the output axis

(rotary cutter).

If the auto-generation option is set to

diameter, the calculation is "circumference

= set value ".

If the auto-generation option is set to

circumference, the calculation is

"circumference = set value".

0.01 Circumference 10000.00

[(Optional) Same unit (with two digits after

the decimal point (fixed))]

Synchronous

position

adjustment

i_eSyncPosition

Adjustment

Single

precision

real number

Refer to the description. 0.0 Set the position adjustment of the

synchronous section of the sheet and

output axis.

Absolute value of synchronous position

adjustment Half of the sheet length

Negative value: Set the synchronous

section at the front of the sheet.

0: The center of the sheet is the

synchronous section.

Positive value: Set synchronous section to

back end of sheet.

Synchronous

section

acceleration

ratio

i_eSyncSection

AccRatio

Single

precision

real number

-50.00 Synchronous section

acceleration ratio 50.00 [%]

0.00 Set this item when the fine adjustment of

the synchronous speed in the

synchronous section is required.

Synchronous section speed =

Synchronous speed (100% +

Synchronous section acceleration ratio)

Cam resolution i_uCamResoluti

on

Word

[Unsigned]

256/512/1024/2048/4096/8192/

16384/32768

256 Set the cam resolution of the cam to be

generated.

Auto-generation

option

i_uAutoGenerati

onOption

Word

[Unsigned]

0 Auto-generation option 3 3 Bit 0: Acceleration/deceleration method

0: Trapezoidal acceleration/deceleration

1: S-curve acceleration/deceleration

Bit 1: Synchronous axis length setting

0: Diameter

1: Circumference

Mark pitch

Sheet length

4 FB LIBRARY 4.2 Details of the FB Library 63

64

*1 : Always, : When the FB is started (cannot be changed)

Output labels

*1 : The value will be held after the FB stops. : The value will be cleared after the FB stops.

I/O labels

Output axis setting (AXIS_REF structure)

*1 : Always, : When the FB is started (cannot be changed)

Acceleration/

deceleration

width

i_eAccDecWidth Single

precision

real number

Refer to the description. 25 Set the sheet width (one side) of the

acceleration/deceleration area.

2 Acceleration/deceleration width

Sheet length - Sheet synchronization

width

When a negative value is set, the

acceleration/deceleration width is

calculated to become the maximum value.

Number of

cutter

i_uNumberOfCut

ter

Word

[Unsigned]

1 Number of cutter 256 1 Set the number of rotary cutters.

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit On: Execution command is on.

Off: Execution command is off.

Normal completion o_bOK Bit This label indicates that the cam auto-generation has

been completed and the FB has been normally

completed.

Error completion o_bError Bit On: An error has occurred in the FB.

Off: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the

FB is stored.

Asynchronous

speed result

o_eAsyncSpeedResult Single precision real

number

When cam auto-generation is normal, the

asynchronous speed is stored as a ratio of

synchronous speed. [multiplier]

Name Label name Data type Read timing*1

Setting range Initial value

Description

Cam auto-generation

cam No.

io_uCamNo Word [Unsigned] 1 Cam auto-

generation cam No.

256

1 Set the cam No. to be automatically

generated for the cutter axis.

Output axis setting io_stOutputAxis AXIS_REF Refer to the output axis setting below.

Name Label name Data type Read timing*1

Setting range Initial value

Description

Axis No. AxisNo Word [Unsigned] 1 Axis No.

maximum number of

axes of the module

used

Set the axis No. of the output axis to be

used for the cutter axis.

This FB uses the unit set in "[Pr.1] Unit

setting" of the axis No.

Start I/O number StartIO Word [Unsigned] 0H Start I/O

number FEH

0 Installation address of the Simple Motion

module (Upper three digits of four digits

(hexadecimal))

Name Label name Data type Read timing*1

Setting range Initial value

Description

4 FB LIBRARY 4.2 Details of the FB Library

4

PAC_MakeBoxMotionCam (Cam auto-generation for box motion)

Name PAC_MakeBoxMotionCam

Function overview

Item Description

Function overview This FB automatically generates two cams of the travel axis and seal axis required for the box motion mechanism.

Symbol

Applicable hardware and

software

Applicable module RD77MS, RD77GF

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 3644 steps

FB dependence

Function description This FB automatically generates two cams (for the travel axis and seal axis) for the box motion mechanism that is driven by two

servo axes.

Turning on i_bEN (Execution command) starts generating cam data based on the set data.

Execution command B: i_bEN Execution status

Production speed UW: i_uProductPerMinute Normal completion

Product length E: i_eProductLength Error completion

Travel axis movement amount limit value E: i_eTravelAxisMaxLength Error code

Travel axis synchronization starting point E: i_eSyncStartPoint Main input axis speed

Travel axis synchronous section acceleration ratio E: i_eSyncSectionAccRatio Travel axis maximum point

Seal axis movement amount E: i_eSealAxisClosedLength Travel axis synchronization starting point

Seal axis acceleration/ deceleration UD: i_udSealAxisMoveTime Travel axis synchronization

ending point

Sealing time UD: i_udSealingTime Seal axis acceleration starting point

Seal starting time offset D: i_dSealStartTimingOffset Seal axis seal starting point

Seal ending time offset D: i_dSealEndTimingOffset Seal axis seal ending point

Cam resolution UW: i_uCamResolution Seal axis deceleration ending point

Travel axis cam auto-generation cam No. UW: io_uTravelCamNo Travel axis cam

auto-generation cam No. Seal axis cam

auto-generation cam No. UW: io_uSealCamNo Seal axis cam auto-generation cam No.

Travel axis setting DUT: io_stTravelAxis Travel axis setting

Seal axis setting DUT: io_stSealAxis Seal axis setting

PAC_MakeBoxMotionCam

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_eMainInputAxisSpeed :E

o_eTravelAxisMaxDistance :E

o_eMainInputAxisSyncStartPos :E

o_eMainInputAxisSyncEndPos :E

o_eMainInputAxisSealAccStartPos :E

o_eMainInputAxisSealStartPos :E

o_eMainInputAxisSealEndPos :E

o_eMainInputAxisSealDecelEndPos :E

io_uTravelCamNo :UW

io_uSealCamNo :UW

io_stTravelAxis :DUT

io_stSealAxis :DUT

Travel axis movement amount limit value (i)

P13X, P25X: Product length (i)

P11Y: Travel axis synchronization starting point (i)

Seal axis acceleration/ deceleration (i)

Seal axis acceleration/ deceleration (i)

Sealing time (i)

Registration mark

Seal axis reference point

* (i) Input label (o) Output label

Main input axis reference point

Travel axis reference point

P22Y, P23Y: Seal axis movement amount (i)

4 FB LIBRARY 4.2 Details of the FB Library 65

66

Function description Cam pattern to be generated

By setting i_dSealStartTimingOffset (Seal starting time offset), the sealing start position (P21X) and the synchronization starting

point (P11X) can be shifted. A positive (negative) value set for i_dSealStartTimingOffset moves the seal axis cam pattern in

parallel to the left (right) by the set value and increases/decreases the travel axis cam pattern synchronous section (P11X to

P12X) by the set value after the comparison with the patterns before change.

By setting i_dSealEndTimingOffset (Seal ending time offset), the sealing end position (P24X) and the synchronization ending

point (P12X) can be shifted. A positive (negative) value set for i_dSealEndTimingOffset increases/decreases the travel axis cam

pattern synchronous section (P11X to P12X) by the set value. (Set the absolute value of the seal axis start/end offset not to

exceed the value of i_udSealAxisMoveTime (Seal axis acceleration/deceleration).)

Cam pattern to be generated [with seal axis offset]

Item Description

200 400

100

200

300

400

0

50

100 500

100

20

40

60

80 Sealing time (i)

Travel axis movement amount limit value (i)

P11

P10

P12

P13

P20 P21

P22 P23

P24 P25

P13X: Product length (i)

Seal axis acceleration/ deceleration (i) P25X: Product length (i)

0

Travel axis reference point

Main input axis reference point

Seal axis reference point

Main input axis reference point

200 300 400

Travel axis point

Main input axis point

Main input axis point

P22Y, P23Y: Seal axis movement amount (i)Seal axis point

P11Y: Travel axis synchronization starting point (i)

500300100

* (i) Input label

400

400

100

200

300

400

0

50

300100 200 500

100

20

40

60

80

Travel axis movement amount limit value (i)

P11

P10

P12

P13

P20 P25

P13X: Product length (i)

P25X: Product length (i)

Seal starting time offset (i)

P22'

P12'

0

P23'

P21' P24'

(+) (-) (+)

Travel axis reference point

Main input axis reference point

Seal axis reference point

Main input axis reference point

Travel axis point

Main input axis point

Main input axis point

Seal axis point

P11Y: Travel axis synchronization starting point (i)

(-)

200 500300100

* (i) Input label

Seal ending time offset (i)

4 FB LIBRARY 4.2 Details of the FB Library

4

*1 For details of control data, refer to the following. MELSEC iQ-R Simple Motion Module User's Manual (Advanced Synchronous Control)

Function description After the cam generation is normally completed and the following output data is updated, o_bOK (Normal completion) turns on.

"o_eMainInputAxisSpeed (Main input axis speed)"

"o_eTravelAxisMaxDistance (Travel axis maximum point)"

"o_eMainInputAxisSyncStartPos (Travel axis synchronization starting point)"

"o_eMainInputAxisSyncEndPos (Travel axis synchronization ending point)"

"o_eMainInputAxisSealAccStartPos (Seal axis acceleration starting point)"

"o_eMainInputAxisSealStartPos (Seal axis seal starting point)"

"o_eMainInputAxisSealEndPos (Seal axis seal ending point)"

"o_eMainInputAxisSealDecelEndPos (Seal axis deceleration ending point)"

Even though i_bEN (Execution command) turns off, the above output data will be held. The above output data will be cleared when

i_bEN (Execution command) turns on.

i_eSyncSectionAccRatio (Synchronous section speed acceleration ratio) changes the speed in the synchronous section.

If the calculated cam stroke amount of the travel axis exceeds the value of i_eTravelAxisMaxLength (Travel axis movement

amount limit value), an error (ErrorID: 2115H) will be stored and the cam with i_eTravelAxisMaxLength at the top will be

generated again.

If the unit set in "[Pr.1] Unit setting" differs between the travel axis and seal axis, the operation continues but an error (ErrorID:

2135H) is stored.

If a warning related to the cam data operation occurs in the Simple Motion module during cam generation, an error (ErrorID:

2203H) is stored.

If a value other than "0" has been set in "[Cd.600] Cam data operation request" at the cam generation, an error (ErrorID: 2205H)

is stored.

If an error has occurred in the FB, Error turns on and the error code is stored in ErrorID.

For details of error codes, refer to "Page 198 List of Error Codes".

Restrictions and

precautions

If a value other than 0 to 3 has been set in "[Pr.1] Unit setting", this FB is executed with the unit [mm].

The cam to be automatically generated is in the coordinate data format.

The cam data that has been automatically generated is saved in the cam storage area.

If i_bEN (Execution command) turns off during cam generation, the cam may not be normally generated.

When generating multiple cams at the same time, input o_bOK (Normal completion) of the cam auto-generation FB as an

interlock condition so that the generation of the next cam starts after the generation of one cam is successfully completed.

If the cam generation fails, the cam data may be undefined. Try the cam auto-generation again. Check that normal cam is

generated and then perform the operation.

Since cam operation control data ([Cd.600] to [Cd.607]) is set in this FB, do not use user programs to set or change the data.*1

Use the FB CtrlOutputAxisSync or create a user program for the operation of the travel axis and seal axis.

Compiling method Macro type, subroutine type

FB operation type Pulsed execution (multiple scan execution type)

Item Description

200 400

100

200

300

400

5000

50

100 200 300 400 500

100

20

40

60

80

Travel axis movement amount limit value (i)

P11

P10

P12

P13

P21P20

P22 P23

52P42P

0

Seal axis acceleration starting point (o)

Seal axis seal starting point (o)

Seal axis seal ending point (o)

Seal axis deceleration ending point (o)

Travel axis synchronization ending point (o)

Travel axis point

Main input axis point

Main input axis point

Seal axis point

100 300

Travel axis maximum point (o)

* (i) Input label (o) Output label

Travel axis synchronization starting point (o)

4 FB LIBRARY 4.2 Details of the FB Library 67

68

Labels

Input labels

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit On, off On: The FB is activated.

Off: The FB is not activated.

Production

speed

i_uProductPerMi

nute

Word

[Unsigned]

0 < Production speed

10000 [products/min]

60 Set the production speed [products/min].

Product length i_eProductLengt

h

Single

precision

real number

Refer to the description. 500.0 Set the product length.

0.1 Product length 100000.0 [mm]

0.01 Product length 10000.00 [inch]

0.01 Product length 10000.00 [degree]

1 Product length 9999999 [pulse]

[The unit setting depends on the axis No. setting

value in the travel axis setting.]

Travel axis

movement

amount limit

value

i_eTravelAxisMa

xLength

Single

precision

real number

Refer to the description. 350.0 Set the movement amount limit value of the travel

axis.

If the calculated stroke amount exceeds this

setting, the cam with this setting at the top will be

generated again.

0.1 Travel axis movement amount limit value

100000.0 [mm]

0.01 Travel axis movement amount limit value

10000.00 [inch]

0.01 Travel axis movement amount limit value

10000.00 [degree]

1 Travel axis movement amount limit value

9999999 [pulse]

[The unit setting depends on the axis No. setting

value in the travel axis setting.]

Travel axis

synchronization

starting point

i_eSyncStartPoi

nt

Single

precision

real number

Refer to the description. 50.0 Set the synchronization starting point of the travel

axis.

0.1 Travel axis synchronization starting point

100000.0 [mm]

0.01 Travel axis synchronization starting point

10000.00 [inch]

0.01 Travel axis synchronization starting point

10000.00 [degree]

1 Travel axis synchronization starting point

9999999 [pulse]

[The unit setting depends on the axis No. setting

value in the travel axis setting.]

Travel axis

synchronous

section

acceleration

ratio

i_eSyncSection

AccRatio

Single

precision

real number

-50.00 Synchronous

section acceleration ratio

50.00 [%]

0.0 Set this item when the fine adjustment of the

synchronous speed in the synchronous section is

required.

Synchronous section speed = Synchronous speed

(100% + Acceleration ratio)

Seal axis

movement

amount

i_eSealAxisClos

edLength

Single

precision

real number

Refer to the description. 80.0 Set the movement amount (stroke amount) of the

seal axis.

0.1 Seal axis movement amount 100000.0

[mm]

0.01 Seal axis movement amount 10000.00

[inch]

0.01 Seal axis movement amount 10000.00

[degree]

1 Seal axis movement amount 9999999

[pulse]

[The unit setting depends on the axis No. setting

value in the seal axis setting.]

Product length

Work length

4 FB LIBRARY 4.2 Details of the FB Library

4

*1 : Always, : When the FB is started (cannot be changed)

Output labels

*1 : The value will be held after the FB stops. : The value will be cleared after the FB stops.

Seal axis

acceleration/

deceleration

i_udSealAxisMo

veTime

Double word

[Unsigned]

0 < Seal axis

acceleration/deceleration

5000 [ms]

100 Set the acceleration/deceleration at opening/

closing of the seal axis.

Sealing time i_udSealingTime Double word

[Unsigned]

0 < Sealing length

30000 [ms]

200 Set the sealing time.

Seal starting

time offset

i_dSealStartTimi

ngOffset

Double word

[Signed]

|Seal starting time offset|

Seal axis acceleration/

deceleration [ms]

0 Set the offset amount of the timing to start sealing.

Seal ending

time offset

i_dSealEndTimi

ngOffset

Double word

[Signed]

|Seal ending time offset|

Seal axis acceleration/

deceleration [ms]

0 Set the offset amount of the timing to end sealing.

Cam resolution i_uCamResoluti

on

Word

[Unsigned]

6 Cam resolution 2048 256 Set the cam resolution (Number of coordinates) of

the cam to be generated.

(Set the resolution common to the travel axis and

seal axis.)

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit On: Execution command is on.

Off: Execution command is off.

Normal completion o_bOK Bit This label indicates that the cam auto-generation has

been completed and the FB has been normally

completed.

Error completion o_bError Bit On: An error has occurred in the FB.

Off: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the

FB is stored.

Main input axis

speed

o_eMainInputAxisSpeed Single precision real

number

The calculated main input axis speed is stored.

[The unit setting depends on the axis No. setting

value in the travel axis setting.]

Travel axis

maximum point

o_eTravelAxisMaxDistance Single precision real

number

The calculated maximum point of the travel axis is

stored.

[The unit setting depends on the axis No. setting

value in the travel axis setting.]

Travel axis

synchronization

starting point

o_eMainInputAxisSyncStartPos Single precision real

number

The main input axis point at the start of

synchronization is stored.

[The unit setting depends on the axis No. setting

value in the travel axis setting.]

Travel axis

synchronization

ending point

o_eMainInputAxisSyncEndPos Single precision real

number

The main input axis point at the end of the

synchronization is stored.

[The unit setting depends on the axis No. setting

value in the travel axis setting.]

Seal axis

acceleration starting

point

o_eMainInputAxisSealAccStartPos Single precision real

number

The main input axis point at the start of the seal axis

operation is stored.

[The unit setting depends on the axis No. setting

value in the seal axis setting.]

Seal axis seal

starting point

o_eMainInputAxisSealStartPos Single precision real

number

The main input axis point at the start of the seal axis

sealing is stored.

[The unit setting depends on the axis No. setting

value in the seal axis setting.]

Seal axis seal

ending point

o_eMainInputAxisSealEndPos Single precision real

number

The main input axis point at the end of the seal axis

sealing is stored.

[The unit setting depends on the axis No. setting

value in the seal axis setting.]

Seal axis

deceleration ending

point

o_eMainInputAxisSealDecelEndPos Single precision real

number

The main input axis point at the end of the seal axis

operation is stored.

[The unit setting depends on the axis No. setting

value in the seal axis setting.]

Name Label name Data type Read timing*1

Setting range Initial value

Description

4 FB LIBRARY 4.2 Details of the FB Library 69

70

I/O labels

Travel axis setting (AXIS_REF structure)

Seal axis setting (AXIS_REF structure)

*1 : Always, : When the FB is started (cannot be changed)

Name Label name Data type Read timing*1

Setting range Initial value

Description

Travel axis cam auto-

generation cam No.

io_uTravelCamNo Word [Unsigned] 1 Travel axis cam

auto-generation cam

No. 256

1 Set the cam No. to be automatically

generated for the travel axis.

Seal axis cam auto-

generation cam No.

io_uSealCamNo Word [Unsigned] 1 Seal axis cam

auto-generation cam

No. 256

2 Set the cam No. to be automatically

generated for the seal axis.

Travel axis setting io_stTravelAxis AXIS_REF Refer to the travel axis setting below.

Seal axis setting io_stSealAxis AXIS_REF Refer to the seal axis setting below.

Name Label name Data type Read timing*1

Setting range Initial value

Description

Axis number AxisNo Word [Unsigned] 1 Axis No.

maximum number of

axes of the module

used

Set the axis No. of the output axis used

for the travel axis.

This FB uses the unit set in "[Pr.1] Unit

setting" of the axis No.

Start I/O number StartIO Word [Unsigned] 0H Start I/O

number FEH

0 Installation address of the Simple Motion

module (Upper three digits of four digits

(hexadecimal))

Name Label name Data type Read timing*1

Setting range Initial value

Description

Axis number AxisNo Word [Unsigned] 1 Axis No.

maximum number of

axes of the module

used

Set the axis No. of the output axis used

for the seal axis.

This FB uses the unit set in "[Pr.1] Unit

setting" of the axis No.

4 FB LIBRARY 4.2 Details of the FB Library

4

STD_MakeFlyingShearCam (Cam auto-generation for flying shear)

Name STD_MakeFlyingShearCam

Function overview

Item Description

Function overview This FB automatically generates cam for flying shear.

Symbol

Applicable hardware and

software

Applicable module RD77MS, RD77GF

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 2449 steps

FB dependence

Execution command B: i_bEN o_bENO :B Execution status

Main input axis cycle starting point E: i_eMainInputAxisStartPos o_bOK :B Normal completion

Main input axis synchronization starting point E: i_eMainInputAxisSyncStartPos o_bError :B Error completion

Main input axis cycle ending point E: i_eMainInputAxisCycleEndPos o_uErrorID :UW Error code

Output axis synchronization starting point E: i_eOutputAxisSyncStartPos o_eMainInputAxisSyncStartPos :E Synchronization

starting point Output axis synchronization

ending point E: i_eOutputAxisSyncEndPos o_eMainInputAxisSyncEndPos :E Synchronization ending point

Output axis movement amount limit value E: i_eOutputAxisMaxLength o_eMainInputAxisCycleDonePos :E Cycle ending point

E: i_eSyncSectionAccRatio

Cam resolution UW: i_uCamResolution

Cam auto-generation cam No. UW: io_uCamNo io_uCamNo :UW Cam auto-generation cam No.

Output axis setting DUT: io_stOutputAxis io_stOutputAxis :DUT Output axis setting

STD_MakeFlyingShearCam

Synchronous section acceleration ratio

4 FB LIBRARY 4.2 Details of the FB Library 71

72

Function description This FB automatically generates cam for driving the flying shear.

Turning on i_bEN (Execution command) starts generating cam data based on the set data.

Calculate the main input axis length per cycle as the product length.

Specify the main input axis cycle starting point, synchronization starting point, cycle ending point of the flying shear (output axis)

to the main input axis, and specify the synchronization starting point and synchronization ending point to the flying shear (output

axis) to generate a cam pattern.*1

Item Description

P10X: Main input axis cycle starting point (i)

1)

2)

3)

4)

5)

P11X: Main input axis synchronization starting point (i)

P13X: Main input axis cycle ending point (i)

P11Y: Output axis synchronization starting point (i)

Output axis movement amount limit value (i)

Main input axis reference point

Output axis reference point

Registration mark

* (i) Input label

P12Y: Output axis synchronization ending point (i)

4 FB LIBRARY 4.2 Details of the FB Library

4

*1 By setting the main input axis cycle starting point to "0" and the cycle ending point to the "product length", a cam pattern is generated at the main input axis per cycle = cam axis per cycle. By setting the main input axis cycle starting point to "a value larger than 0" or the cycle ending point to "a value smaller than product length", a cam pattern is generated at the main input axis per cycle cam axis per cycle.

*2 By setting i_eOutputAxisMaxLength to "0", the movement amount limit is ignored. *3 For details of control data, refer to the following.

MELSEC iQ-R Simple Motion Module User's Manual (Advanced Synchronous Control)

Function description The cam pattern to be generated is a reciprocated cam pattern.

After the cam generation is normally completed and the following output data is updated, o_bOK (Normal completion) turns on.

"o_eMainInputAxisSyncStartPos (Synchronization starting point)"

"o_eMainInputAxisSyncEndPos (Synchronization ending point)"

"o_eMainInputAxisCycleDonePos (Cycle ending point)"

Even though i_bEN (Execution command) turns off, the above output data will be held. The above output data will be cleared when

i_bEN (Execution command) turns on.

When performing the synchronous control with the FB CtrlOutputAxisSync, set the main input axis cycle starting point for

i_eWaitingPos (Waiting point).

If the calculated output axis movement amount exceeds the value of i_eOutputAxisMaxLength (Output axis movement amount

limit value), an error (ErrorID: 2200H) is stored.*2

i_eSyncSectionAccRatio (Synchronous section speed acceleration ratio) changes the speed in the synchronous section.

If a warning related to the cam data operation occurs in the Simple Motion module during cam generation, an error (ErrorID:

2203H) is stored.

If a value other than "0" has been set in "[Cd.600] Cam data operation request" at the cam generation, an error (ErrorID: 2205H)

is stored.

If an error has occurred in the FB, Error turns on and the error code is stored in ErrorID.

For details of error codes, refer to "Page 198 List of Error Codes".

Restrictions and

precautions

If a value other than 0 to 3 has been set in "[Pr.1] Unit setting", this FB is executed with the unit [mm].

The cam to be automatically generated is in the coordinate data format.

The cam data that has been automatically generated is saved in the cam storage area.

If i_bEN (Execution command) turns off during cam generation, the cam may not be normally generated.

When generating multiple cams at the same time, input o_bOK (Normal completion) of the cam auto-generation FB as an

interlock condition so that the generation of the next cam starts after the generation of one cam is successfully completed.

If the cam generation fails, the cam data may be undefined. Try the cam auto-generation again. Check that normal cam is

generated and then perform the operation.

Since cam operation control data ([Cd.600] to [Cd.607]) is set in this FB, do not use user programs to set or change the data.*3

Use the FB CtrlOutputAxisSync or create a user program for the operation of the flying shear axis.

Compiling method Macro type, subroutine type

FB operation type Pulsed execution (multiple scan execution type)

Item Description

4001000

Output axis movement amount limit value (i)

500

100

200

300

400

P11

P12

P10 Synchronization ending point (o)

Cycle ending point (o)

P13

Product length

5001000

500

100

200

300

400

P10

P11

P12

P13

P10X: Main input axis cycle starting point (i)

* (i) Input label (o) Output label

Output axis reference point

200 300

400200 300 600

Output axis point

Output axis stroke

Output axis per cycle

Main input axis point

P11X: Main input axis synchronization starting point (i)

P11Y: Output axis synchronization starting point (i)

Synchronization starting point (o)

P13X: Main input axis cycle ending point (i)

Main input axis reference point

P12Y: Output axis synchronization ending point (i)

4 FB LIBRARY 4.2 Details of the FB Library 73

74

Labels

Input labels

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit On, off On: The FB is activated.

Off: The FB is not activated.

Main input axis

cycle starting

point

i_eMainInputAxi

sStartPos

Single

precision

real number

Refer to the description. 200.0 Set the main input axis point where the one cycle

operation starts.

0.0 Main input axis cycle starting point

100000.0 [mm]

0.00 Main input axis cycle starting point

10000.00 [inch]

0.00 Main input axis cycle starting point

10000.00 [degree]

0 Main input axis cycle starting point

9999999 [pulse]

[The unit setting depends on the axis No. setting

value in the output axis setting.]

Main input axis

synchronization

starting point

i_eMainInputAxi

sSyncStartPos

Single

precision

real number

Refer to the description. 300.0 Set the main input axis point at the start of the

synchronous section.

0.1 Main input axis synchronization starting

point 100000.0 [mm]

0.01 Main input axis synchronization starting

point 10000.00 [inch]

0.01 Main input axis synchronization starting

point 10000.00 [degree]

1 Main input axis synchronization starting point

9999999 [pulse]

[The unit setting depends on the axis No. setting

value in the output axis setting.]

Main input axis

cycle ending

point

i_eMainInputAxi

sCycleEndPos

Single

precision

real number

Refer to the description. 900.0 Set the end point of the main input axis 1 cycle.

0.1 Main input axis cycle ending point

100000.0 [mm]

0.01 Main input axis cycle ending point

10000.00 [inch]

0.01 Main input axis cycle ending point

10000.00 [degree]

1 Main input axis cycle ending point 9999999

[pulse]

[The unit setting depends on the axis No. setting

value in the output axis setting.]

Output axis

synchronization

starting point

i_eOutputAxisSy

ncStartPos

Single

precision

real number

Refer to the description. 50.0 Set the output axis point at the start of the

synchronous section.

0.1 Output axis synchronization starting point

100000.0 [mm]

0.01 Output axis synchronization starting point

10000.00 [inch]

0.01 Output axis synchronization starting point

10000.00 [degree]

1 Output axis synchronization starting point

9999999 [pulse]

[The unit setting depends on the axis No. setting

value in the output axis setting.]

Output axis

synchronization

ending point

i_eOutputAxisSy

ncEndPos

Single

precision

real number

Refer to the description. 350.0 Set the output axis point at the end of the

synchronous section.

0.1 Output axis synchronization ending point

100000.0 [mm]

0.01 Output axis synchronization ending point

10000.00 [inch]

0.01 Output axis synchronization ending point

10000.00 [degree]

1 Output axis synchronization ending point

9999999 [pulse]

[The unit setting depends on the axis No. setting

value in the output axis setting.]

4 FB LIBRARY 4.2 Details of the FB Library

4

*1 : Always, : When the FB is started (cannot be changed)

Output labels

*1 : The value will be held after the FB stops. : The value will be cleared after the FB stops.

Output axis

movement

amount limit

value

i_eOutputAxisM

axLength

Single

precision

real number

Refer to the description. 0.0 Set the movement amount limit value of the output

axis.

"0" = Limit value invalid, other than "0" = Limit

value valid

0.1 Output axis movement amount limit value

100000.0 [mm]

0.01 Output axis movement amount limit value

10000.00 [inch]

0.01 Output axis movement amount limit value

10000.00 [degree]

1 Output axis movement amount limit value

9999999 [pulse]

[The unit setting depends on the axis No. setting

value in the output axis setting.]

Synchronous

section

acceleration

ratio

i_eSyncSection

AccRatio

Single

precision

real number

-50.00 Synchronous

section acceleration ratio

50.00 [%]

0.00 Set this item when the fine adjustment of the

synchronous speed in the synchronous section is

required.

Synchronous section speed = Synchronous speed

(100% + Acceleration ratio)

Cam resolution i_uCamResoluti

on

Word

[Unsigned]

5 Cam resolution 2048 256 Set the cam resolution (Number of coordinates) of

the cam to be generated.

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit On: Execution command is on.

Off: Execution command is off.

Normal completion o_bOK Bit This label indicates that the cam auto-generation has

been completed and the FB has been normally

completed.

Error completion o_bError Bit On: An error has occurred in the FB.

Off: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the

FB is stored.

Synchronization

starting point

o_eMainInputAxisSyncStartPos Single precision real

number

The main input axis point at the start of the

synchronization is stored.

[The unit setting depends on the axis No. setting

value in the output axis setting.]

Synchronization

ending point

o_eMainInputAxisSyncEndPos Single precision real

number

The main input axis point at the end of the

synchronization is stored.

[The unit setting depends on the axis No. setting

value in the output axis setting.]

Cycle ending point o_eMainInputAxisCycleDonePos Single precision real

number

The main input axis point at the end of the operation

is stored.

[The unit setting depends on the axis No. setting

value in the output axis setting.]

Name Label name Data type Read timing*1

Setting range Initial value

Description

4 FB LIBRARY 4.2 Details of the FB Library 75

76

I/O labels

Output axis setting (AXIS_REF structure)

*1 : Always, : When the FB is started (cannot be changed)

Name Label name Data type Read timing*1

Setting range

Initial value

Description

Cam auto-generation

cam No.

io_uCamNo Word [Unsigned] 1 Cam

auto-

generation

cam No.

256

1 Set the cam No. to be automatically generated for

the flying shear.

Output axis setting io_stOutputAxis AXIS_REF Refer to the output axis setting below.

Name Label name Data type Read timing*1

Setting range

Initial value

Description

Axis number AxisNo Word [Unsigned] 1 Axis No.

maximum

number of

axes of the

module used

Set the axis No. of the output axis to be used for

the flying shear axis.

This FB uses the unit set in "[Pr.1] Unit setting" of

the axis No.

Start I/O number StartIO Word [Unsigned] 0H Start I/

O number

FEH

0 Installation address of the Simple Motion module

(Upper three digits of four digits (hexadecimal))

4 FB LIBRARY 4.2 Details of the FB Library

4

PAC_MakeLongDwellDCam (Cam auto-generation for D-cam)

Name PAC_MakeLongDwellDCam

Function details

Item Description

Function overview This FB automatically generates a cam pattern for the long dwell.

Symbol

Applicable hardware and

software

Applicable module RD77MS, RD77GF

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 5613 steps

FB dependence

Function description This FB automatically generates a cam pattern for the long dwell mechanism (D-cam axis) increases the sealing time.

Turning on i_bEN (Execution command) starts generating cam data based on the set data.

In calculation, one cycle length of the main input axis is the product length.

The cam pattern is generated so that the D-cam axis rotates once (360 degree) per product length (1 cycle length) [mm].

Execution command B: i_bEN o_bENO :B Execution status

Product length E: i_eProductLength o_bOK :B Normal completion

Synchronous angle E: i_eSyncAngle o_bError :B Error completion

Seal length E: i_eSealLength o_uErrorID :UW Error code

Eccentric length E: i_eEccentricLength o_eSyncStartPos :E

o_eSyncEndPos :E

E: i_eSealSectionAccRatio o_eSealStartPos :E Seal starting point

E: i_eInOutSectionAccRatio o_eSealEndPos :E Seal ending point

Cam resolution UW: i_uCamResolution

UW: io_uCamNo io_uCamNo :UW

Output axis setting DUT: io_stOutputAxis io_stOutputAxis :DUT Output axis setting

PAC_MakeLongDwellDCam

Inlet/outlet section acceleration rate

Seal section acceleration rate

Cam auto-generation cam No.

Synchronization starting point

Synchronization ending point Cam auto-generation cam No.

P2: Seal starting point (o)

P0, P6: Waiting position

P4: Seal ending point (o)

P5: Synchronization ending point (o)

Eccentric length (i)

Product length (i)

Seal length (i)

* (i) Input label (o) Output label

Synchronous angle (i)

P1: Synchronization starting point (o)

4 FB LIBRARY 4.2 Details of the FB Library 77

78

Function description Cam pattern to be generated

i_eSealSectionAccRatio (Seal section acceleration rate) changes the speed in the sealing section.

i_eInOutSectionAccRatio (Inlet/outlet section acceleration rate) changes the speed in the entrance/exit section.

Cam pattern when only i_eSealSectionAccRatio (Seal section acceleration rate) is set

Cam pattern when only i_eInOutSectionAccRatio (Inlet/outlet section acceleration rate) is set

Item Description

400100 200 3000

90

180

270

360

Output axis point [degree]

500

P4

Seal starting point (o)

Synchronous section

Midpoint Synchronous angle (i)

Product length (i)

P6

P5

P3 P2

P1

Main input axis point [mm]

P0

* (i) Input label (o) Output label

Synchronization starting point (o)

Synchronization ending point (o)

Seal ending point (o)

400100 200 3000

90

180

270

360

Output axis point [degree]

P0

500

P1

P2 P3

P4 P5

P6

Synchronous section (-50%)

Synchronous angle (i)

Product length (i)

Main input axis point [mm]

* (i) Input label

Synchronous section (+50%)

: Synchronous section -50% : Synchronous section +50% : Synchronous section 0%Synchronous

section (+0%)

400100 200 3000 500

P1

P2 P3

P4 P5

P6

90

180

270

360

Output axis point [degree]

P0

Synchronous section (-50%)

Synchronous angle (i)

Product length (i)

Main input axis point [mm]

* (i) Input label

Synchronous section (+50%)

: Synchronous section -50% : Synchronous section +50% : Synchronous section 0%Synchronous

section (+0%)

4 FB LIBRARY 4.2 Details of the FB Library

4

*1 For details of control data, refer to the following. MELSEC iQ-R Simple Motion Module User's Manual (Advanced Synchronous Control)

Function description Cam pattern when both i_eSealSectionAccRatio and i_eInOutSectionAccRatio are set

After the cam generation is normally completed and the output label is updated, o_bOK (Normal completion) turns on.

If a warning related to the cam data operation occurs in the Simple Motion module during cam generation, an error (ErrorID:

2203H) is stored.

If a value other than "0" has been set in "[Cd.600] Cam data operation request" at the cam generation, an error (ErrorID: 2205H)

is stored.

If an error has occurred in the FB, Error turns on and an error code is stored in ErrorID.

For details of error codes, refer to "Page 198 List of Error Codes".

Restrictions and

precautions

The cam to be automatically generated is in the coordinate data format.

The cam data that has been automatically generated is saved in the cam storage area.

If i_bEN (Execution command) turns off during cam generation, the cam may not be normally generated.

When generating multiple cams at the same time, input o_bOK (Normal completion) of the cam auto-generation FB as an

interlock condition so that the generation of the next cam starts after the generation of one cam is successfully completed.

If the cam generation fails, the cam data may be undefined. Try the cam auto-generation again. Check that normal cam is

generated and then perform the operation.

Since cam operation control data ([Cd.600] to [Cd.607]) is set in this FB, do not use user programs to set or change the data.*1

Use the FB CtrlOutputAxisSync or create a user program for the operation of the D-cam axis.

The number of FB steps in a program varies depending on the CPU model to be used and I/O definitions.

Compiling method Macro type, subroutine type

FB operation type Pulsed execution (multiple scan execution type)

Item Description

400100 200 3000

90

180

270

360

P0

500

P1 P2

P3

P4 P5

P6

Output axis point [degree]

Synchronous section (-50%)

Synchronous angle (i)

Product length (i)

Main input axis point [mm]

* (i) Input label

Synchronous section (+50%)

: Synchronous section -50% : Synchronous section +50% : Synchronous section 0%Synchronous

section (+0%)

4 FB LIBRARY 4.2 Details of the FB Library 79

80

Labels

Input labels

*1 : Always, : When the FB is started (cannot be changed)

Output labels

*1 : The value will be held after the FB stops. : The value will be cleared after the FB stops.

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit On, off On: The FB is activated.

Off: The FB is not activated.

Product

length

i_eProductLength Single

precision

real number

0.1 Product length

100000.0 [mm]

500.0 Set the product length.

Synchronous

angle

i_eSyncAngle Single

precision

real number

0.1 Synchronous angle

180.0 [degree]

100.0 Set the angle including the seal section and

inlet/outlet section.

Seal length i_eSealLength Single

precision

real number

0.1 Seal length 100000.0

[mm]

100.0 Set the seal section length.

Eccentric

length

i_eEccentricLength Single

precision

real number

0.1 Eccentric length

100000.0 [mm]

100.0 Set the distance from the center of the seal

section to the center of the circle.

Seal section

acceleration

rate

i_eSealSectionAcc

Ratio

Single

precision

real number

-50.0 Seal section

acceleration rate 50.0 [%]

0.0 Set this item when fine adjustment of the

synchronous speed in the sealing section is

required.

Synchronous section speed = Synchronous

speed (100% + Acceleration ratio)

Inlet/outlet

section

acceleration

rate

i_eInOutSectionAc

cRatio

Single

precision

real number

-50.0 Inlet/outlet section

acceleration rate 50.0 [%]

0.0 Set this item when the fine adjustment of the

synchronous speed in the inlet/outlet section is

required.

Synchronous section speed = Synchronous

speed (100% + Acceleration ratio)

Cam

resolution

i_uCamResolution Word

[Unsigned]

9 Cam resolution 1024 256 Set the cam resolution of the cam to be

generated.

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit On: Execution command is on.

Off: Execution command is off.

Normal completion o_bOK Bit This label indicates that the cam auto-generation has

been completed and the FB has been normally

completed.

Error completion o_bError Bit On: An error has occurred in the FB.

Off: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the FB is

stored.

Synchronization

starting point

o_eSyncStartPos Single precision real

number

The main input axis point at the start of the

synchronization is stored. [mm]

Seal starting point o_eSealStartPos Single precision real

number

The main input axis point at the start of the seal is

stored. [mm]

Seal ending point o_eSealEndPos Single precision real

number

The main input axis point at the end of the seal is stored.

[mm]

Synchronization

ending point

o_eSyncEndPos Single precision real

number

The main input axis point at the end of the

synchronization is stored. [mm]

Product length

Work length

4 FB LIBRARY 4.2 Details of the FB Library

4

I/O labels

Output axis setting (AXIS_REF structure)

*1 : Always, : When the FB is started (cannot be changed)

Name Label name Data type Read timing*1

Setting range Initial value

Description

Cam auto-generation

cam No.

io_uCamNo Word [Unsigned] 1 Cam auto-

generation cam No.

256

1 Set the cam No. to be automatically

generated for the D-cam axis.

Output axis setting io_stOutputAxis AXIS_REF Refer to the output axis setting below.

Name Label name Data type Read timing*1

Setting range Initial value

Description

Axis No. AxisNo Word [Unsigned] 1 Axis No.

maximum number of

axes of the module

used

Set the axis No. of the output axis to be

used for the D-cam axis.

Start I/O number StartIO Word [Unsigned] 0H Start I/O

number FEH

0 Installation address of the Simple Motion

module (Upper three digits of four digits

(hexadecimal))

4 FB LIBRARY 4.2 Details of the FB Library 81

82

STD_ReadMarkDetectData (Mark detection data reading)

Name STD_ReadMarkDetectData

Function overview

Item Description

Function overview This FB reads mark detection data.

Symbol

Applicable hardware and

software

Applicable module RD77MS, RD77GF

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 671 steps

FB dependence

Function description This FB reads mark detection data.

Turning on i_bEN (Execution command) normally starts the FB and turns on o_bOK (Normal completion). o_dMarkDetectData

(Mark detection data) and o_dMarkDetectCount (Mark detection counts), the data of the set io_uMarkDetectSettingNo (Mark

detection setting No.), is stored.

While i_bEN (Execution command) is on, o_dMarkDetectData (Mark detection data) and o_dMarkDetectCount (Mark detection

counts) are updated at every scan.

Main input axis current point and current feed value

Execution command B: i_bEN

Mark detection setting No.Mark detection setting No. io_uMarkDetectSettingNo :UWUW: io_uMarkDetectSettingNo

Latch data range change request UW: i_uLatchDataRangeChangeRequest

Latch data range

upper limit D: i_dLatchDataRangeUpperLimit

Latch data range lower limit D: i_dLatchDataRangeLowerLimit

Output axis setting DUT: io_stOutputAxis

o_bENO :B Execution status

o_bOK :B Normal completion

o_bError :B Error completion

o_uErrorID :UW Error code

o_dMarkDetectData :D Mark detection data

o_uMarkDetectCount :UW Mark detection counts

io_stOutputAxis :DUT Output axis setting

STD_ReadMarkDetectData

Normal completion (o)

Execution command (i)

Execution status (o)

Mark detection data (o)

Mark detection counts (o)

100 200 300 400

[Cd.800] Number of mark detection clear request

Main input axis current point

[Md.801] Mark detection data storage area

[Md.800] Number of mark detection

Mark detection Mark detection Mark detection Mark detection

1 2

200

0

1 32

200 400300

0

100

0 300

0

0

0 01

***

*

* (i) Input label (o) Output label

4 FB LIBRARY 4.2 Details of the FB Library

4

*1 For details of the mark detection setting, refer to the following. MELSEC iQ-R Simple Motion Module User's Manual (Application)

Function description Current value per cycle

By setting i_dLatchDataRangeUpperLimit (Latch data range upper limit) and i_dLatchDataRangeLowerLimit (Latch data range

lower limit) and turning on i_uLatchDataRangeChangeRequest (Latch data range change request), mark detection is performed

when the data at mark detection is within the range.

When the latch data range upper limit is equal to the latch data range lower limit

When the upper limit value is equal to the lower limit value, the range of mark detection data is not checked. The mark detection

processing is executed within the entire range.

When the latch data range upper limit is larger than the latch data range lower limit

When the upper limit value is larger than the lower limit value, the mark detection processing is executed when mark detection data

is "equal to or larger than the lower limit value and smaller than the upper limit value".

When the latch data range upper limit is smaller than the latch data range lower limit

When the upper limit value is smaller than the lower limit value, the mark detection processing is executed when mark detection

data is "equal to or larger than the lower limit value or smaller than the upper limit value".

If an error has occurred in the FB, Error turns on and the error code is stored in ErrorID.

For details of error codes, refer to "Page 198 List of Error Codes".

Restrictions and

precautions

If a series of processing (from operation processing to compensation completion) is not completed until the next mark detection,

execute this FB in the fixed cycle execution type.

If a value other than 0 to 3 has been set in "[Pr.1] Unit setting", this FB is executed with the unit [mm].

This FB supports only the continuous detection mode. Do not set a value other than "0" in "[Pr.807] Mark detection mode setting".

Configure the mark detection settings with the Simple Motion setting tool or user programs before execution of the FB.

"[Pr.800] to [Pr.804], [Pr.807] (0: Available, other than 0: Not available), [Pr.95], [Pr.42], [Cd.8]"

Since control data ([Cd.800], [Cd.802]) is set in this FB, do not use user programs to set or change the data.*1

This FB reads the mark detection data stored in the Simple Motion module.

Compiling method Macro type, subroutine type

FB operation type Real-time execution

Item Description

Mark detection Mark detection Mark detection Mark detection

Normal completion (o)

Execution command (i)

Execution status (o)

Mark detection data (o)

Mark detection counts (o)

100

[Cd.800] Number of mark detection clear request

[Md.800] Number of mark detection

[Md.801] Mark detection data storage area

Current value per cycle after main shaft gear

1 2

100

0

1 32

100 100100

0

100

0 100

0

0

0 01

***

*

* (i) Input label (o) Output label

Latch data range lower limit (i)

Latch data range upper limit (i) t

Mark detection processing range

* (i) Input label

Latch data range lower limit (i)

Latch data range upper limit (i)

Mark detection processing range

t

* (i) Input label

4 FB LIBRARY 4.2 Details of the FB Library 83

84

Labels

Input labels

*1 : Always, : When the FB is started (cannot be changed)

Output labels

*1 : The value will be held after the FB stops. : The value will be cleared after the FB stops. *2 The value is held when an error has occurred.

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit On, off On: The FB is activated and reading of

mark detection data starts.

Off: The FB is not activated.

Latch data

range change

request

i_uLatchDataRa

ngeChangeReq

uest

Word

[Unsigned]

0 Latch data range change request

2

0 Request the latch data range processing.

Set either of the following values

according to the timing to update a new

value.

1: At the next operation cycle after the

request

2. At the next DI input after the request

This label is used as a fetch trigger of the

latch data range upper/lower limit value.

Latch data

range upper

limit value

i_dLatchDataRa

ngeUpperLimit

Double word

[Signed]

When

requesting

the latch

data range

change

-2147483648 Latch data range

upper limit 2147483647

[The unit setting depends on the axis

No. setting value in the output axis

setting.] (10-4 mm, 10-5 inch, 10-5

degree, pulse)

0 Set a valid upper limit value as latch data

at mark detection.

Latch data

range lower

limit value

i_dLatchDataRa

ngeLowerLimit

Double word

[Signed]

-2147483648 Latch data range

lower limit 2147483647

[The unit setting depends on the axis

No. setting value in the output axis

setting.] (10-4 mm, 10-5 inch, 10-5

degree, pulse)

0 Set a valid lower limit value as latch data

at mark detection.

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit On: Execution command is on.

Off: Execution command is off.

Normal completion o_bOK Bit This label indicates that the FB has normally started.

Error completion o_bError Bit On: An error has occurred in the FB.

Off: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the

FB is stored.

Mark detection data o_dMarkDetectData Double word [Signed] *2 Latch data at mark detection is stored.

Data range: -2147483648 Mark detection data

2147483647

[The unit setting depends on the axis No. setting

value in the output axis setting.] (10-4 mm, 10-5 inch,

10-5 degree, pulse)

Refresh cycle: At updating mark detection counts

Mark detection

counts

o_uMarkDetectCount Word [Unsigned] *2 The mark detection counts after Execution command

turns on is stored.

Data range: 0 Mark detection counts 65535 (Ring

counter)

Refresh cycle: At updating mark detection counts

4 FB LIBRARY 4.2 Details of the FB Library

4

I/O labels

Output axis setting (AXIS_REF structure)

*1 : Always, : When the FB is started (cannot be changed)

Name Label name Data type Read timing*1

Setting range Initial value

Description

Mark detection setting

No.

io_uMarkDetectS

ettingNo

Word [Unsigned] 1 Mark detection

setting No.

maximum number of

mark detection

settings of the

module used

Set the reference number of mark

detection data.

Output axis setting io_stOutputAxis AXIS_REF Refer to the output axis setting below.

Name Label name Data type Read timing*1

Setting range Initial value

Description

Axis number AxisNo Word [Unsigned] 1 Axis No.

maximum number of

axes of the module

used

Set the axis No. of the output axis used

for mark compensation.

This FB uses the unit setting of the main

input axis corresponding to the output

axis.

Start I/O number StartIO Word [Unsigned] 0H Start I/O

number FEH

0 Installation address of the Simple Motion

module (Upper three digits of four digits

(hexadecimal))

4 FB LIBRARY 4.2 Details of the FB Library 85

86

PAC_CalcMarkCompensation (Automatic compensation calculation using mark detection)

Name PAC_CalcMarkCompensation

Function overview

Item Description

Function overview This FB detects a registration mark on the film using the mark detection function of the Simple Motion module and outputs the

compensation amount for the deviation from the mark reference point.

Symbol

Applicable hardware and

software

Applicable module RD77MS, RD77GF

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 1683 steps

FB dependence

Mark detection setting No. UW: i_uMarkDetectSettingNo

Execution command B: i_bEN

Mark detection data D: i_dMarkDetectData

Compensation control setting DUT: io_stCompensationSetting

Mark detection counts UW: i_uMarkDetectCount

UW: i_uMissedMarkLimit

Output axis setting DUT: io_stOutputAxis

o_bENO :B Execution status

o_bOK :B Normal completion

o_bError :B Error completion

o_uErrorID :UW Error code

o_dCompensationAmount :D Compensation amount

o_uMissedMarkAmount :UW Mark undetected counts

io_stCompensationSetting :DUT Compensation control setting

io_stOutputAxis :DUT Output axis setting

PAC_CalcMarkCompensation

Mark undetected permissible counts

4 FB LIBRARY 4.2 Details of the FB Library

4

Function description Turning on i_bEN (Execution command) normally starts the FB and turns on o_bOK (Normal completion).

At the timing when i_uMarkDetectCount (Mark detection counts) is refreshed, the interval between register marks is calculated

from the current value and previous value of i_dMarkDetectData (Mark detection data) and the difference from "[Pr.439] Cam

axis length per cycle" of the axis set in the output axis setting is output to o_dCompensationAmount (Compensation amount).

For i_dMarkDetectData (Mark detection data), set the real current value ([Pr.802] = 2).

Since this FB uses the previous value of i_dMarkDetectData (Mark detection data) for the compensation amount calculation, this

FB does not calculate the compensation amount at the first update of i_uMarkDetectCount (Mark detection counts). This FB

calculates the compensation amount at the second update or later.

This FB can set a compensation target range to the calculated compensation amount. By setting the compensation range with

MaxTolerance (Maximum compensation amount) and MinTolerance (Minimum compensation amount), the compensation

amount is output to o_dCompensationAmount (Compensation amount) only when the calculated compensation amount is within

the compensation range. When the calculated compensation amount is outside the compensation range, the FB functions as

follows.

When the absolute value of the calculated compensation amount is smaller than the value in MinTolerance (Minimum

compensation amount), "0" is stored in o_dCompensationAmount (Compensation amount) and the calculated compensation

amount is used as the cumulative compensation amount and added to the compensation amount to be calculated at the next

update. The cumulative compensation amount is held until it is output to o_dCompensationAmount (Compensation amount).

When the absolute value of the calculated compensation amount is larger than the value in MaxTolerance (Maximum

compensation amount), "0" is stored in o_dCompensationAmount (Compensation amount) and an outside mark range error

(ErrorID: 2123H) is stored. The calculated compensation amount is discarded and the cumulative compensation amount is

held.*1

Set MinTolerance (Minimum compensation amount) and MaxTolerance (Maximum compensation amount) to satisfy the following

formula.

Mark detection points: Area a and a'

o_dCompensationAmount (Compensation amount): 0 is output.

The calculated compensation amount is added to the cumulative compensation amount and held.

Mark detection points: Area b and b'

o_dCompensationAmount (Compensation amount): The calculated compensation amount is output.

The cumulative compensation amount is reset.

Mark detection points: Area c and c'

o_dCompensationAmount (Compensation amount): 0 is output.

ErrorID: 2123H is stored in the error code and the operation continues.

The calculated compensation amount is discarded.

The cumulative compensation amount is held.

This FB determines that no mark is detected if i_uMarkDetectCount (Mark detection counts) has not been refreshed even if

"[Md.101] Real current value" moves by a certain amount after i_uMarkDetectCount (Mark detection counts) is refreshed. Once

movement amount of "[Md.101] Real current value" from the detection of a mark to the detection of the next mark exceeds the

sum of "[Pr.439] Cam axis length per cycle" and MaxTolerance (Maximum compensation amount), o_uMissedMarkAmount (Mark

undetected counts) is incremented by one for each "[Pr.439] Cam axis length per cycle". After the movement amount of

"[Md.101] Real current value" exceeds the sum of "[Pr.439] Cam axis length per cycle" and MaxTolerance (Maximum

compensation amount), o_uMissedMarkAmount (Mark undetected counts) is incremented by one for each "[Pr.439] Cam axis

length per cycle". When the value of o_uMissedMarkAmount (Mark undetected counts) exceeds the value of

i_uMarkMissedMarkLimit (Mark undetected permissible counts), an error (ErrorID: 2201H) is stored and the FB stops. The value

of o_uMissedMarkAmount (Mark undetected counts) is cumulative. The value of o_uMissedMarkAmount (Mark undetected

counts) is held even after the update of i_uMarkDetectCount (Mark detection counts), and this FB adds 1 to the counts every

mark undetection.

Use output values of STD_ReadMarkDetectData for i_dMarkDetectData (Mark detection data) and i_uMarkDetectCount (Mark

detection counts).

To compensate the compensation amount calculated by this FB, use STD_CtrlAuxiliaryAxis. The compensation direction

depends on the compensation target. To compensate the film axis, use o_dCompensationAmount (Compensation amount). To

compensate the rotary cutter or box motion axis, use o_dCompensationAmount (Compensation amount) in reverse.

If an error has occurred in the FB, Error turns on and the error code is stored in ErrorID.

For details of error codes, refer to "Page 198 List of Error Codes".

Item Description

MinTolerance (Minimum compensation amount) < MaxTolerance

(Maximum compensation amount) < [Pr.439] Cam axis length per cycle

2

a b ca'b'

Mark reference point

c'

[Pr.439] Cam axis length per cycle

[Pr.439] Cam axis length per cycle / 2

* (i) Input label

Minimum compensation amount (i) Maximum compensation amount (i)

Minimum compensation amount (i) Maximum compensation amount (i)

4 FB LIBRARY 4.2 Details of the FB Library 87

88

*1 The operation of the FB continues. If the mark pitch is normal at the next cycle, "0" is stored in error.

Labels

Input labels

*1 : Always, : When the FB is started (cannot be changed)

Restrictions and

precautions

Execute this FB in a fixed cycle. (Motion calculation cycle event task (I44: Inter-module synchronization) is recommended.)

If a value other than 0 to 3 has been set in "[Pr.1] Unit setting", this FB is executed with the unit [mm].

When using this FB, construct a system in which "[Md.101] Real current value" operates in the increasing direction.

To improve accuracy in calculation of the compensation amount, data to be set to i_dMarkDetectdata (Mark detection data) has

been changed from the cam axis current value per cycle ([Pr.802] = 11 or 12) to the real current value ([Pr.802] = 2). Use this FB

in the following combinations.

This FB [Ver1.001B or earlier] Cam axis current value per cycle ([Pr.802] = 11 or 12)

This FB [Ver1.002C or later] Real current value ([Pr.802] =2)

Compiling method Macro type, subroutine type

FB operation type Real-time execution

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit On, off On: The FB is activated.

Off: The FB is not activated.

Mark

detection

setting No.

i_uMarkDetectS

ettingNo

Word

[Unsigned]

1 Mark detection setting No.

Maximum number of mark detection

settings of the module used

Set the reference number of mark

detection data.

Mark

detection

data

i_dMarkDetectD

ata

Double word

[Signed]

-2147483648 Mark detection data

2147483647

[The unit setting depends on the axis

No. setting value in the output axis

setting.] (10-4 mm, 10-5 inch, 10-5

degree, pulse)

0 Enter o_dMarkDetectData (Mark

detection data) of the FB

STD_ReadMarkDetectData.

Mark

detection

counts

i_uMarkDetectC

ount

Word

[Unsigned]

0 Mark detection counts 65535

[times]

(Ring counter)

0 Enter o_uMarkDetectCount (Mark

detection counts) of the FB

STD_ReadMarkDetectData.

A compensation amount is calculated at

update of this data.

Mark

undetected

permissible

counts

i_uMissedMarkLi

mit

Word

[Unsigned]

0 Mark undetected permissible

counts 100 [times]

0 Set the permissible value of the mark

undetected counts.

If the value of the mark undetected

counts exceeds this setting, an error is

stored.

0: Invalid

1 to 100: Permissible value of the mark

undetected counts

Item Description

4 FB LIBRARY 4.2 Details of the FB Library

4

Output labels

*1 : The value will be held after the FB stops. : The value will be cleared after the FB stops. *2 The value is held when an error has occurred.

I/O labels

Output axis setting (AXIS_REF structure)

Compensation control setting (PAC_COMPENSATION_REF structure)

*1 : Always, : When the FB is started (cannot be changed)

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit On: Execution command is on.

Off: Execution command is off.

Normal completion o_bOK Bit This label indicates that the FB has normally started.

Error completion o_bError Bit On: An error has occurred in the FB.

Off: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the

FB is stored.

Compensation

amount

o_dCompensationAmount Double word [Signed] The calculated compensation amount is stored.

If the absolute value of the compensation amount is

smaller than the minimum compensation amount or

larger than the maximum compensation amount, "0"

is output.

Data range: -2147483648 Compensation amount

2147483647

[The unit setting depends on the axis No. setting

value in the output axis setting.] (10-4 mm, 10-5 inch,

10-5 degree, pulse)

Mark undetected

counts

o_uMissedMarkAmount Word [Unsigned] *2 The value of the mark undetected counts is stored.

If this data exceeds the mark undetected permissible

counts, an error is stored.

Name Label name Data type Read timing*1

Setting range

Initial value

Description

Output axis setting io_stOutputAxis AXIS_REF Refer to the output axis setting below.

Compensation control

setting

io_stCompensatio

nSetting

PAC_COMPENSATI

ON_REF

Refer to the compensation control setting below.

Name Label name Data type Read timing*1

Setting range

Initial value

Description

Axis number AxisNo Word [Unsigned] 1 Axis No.

maximum

number of

axes of the

module used

Set the axis No. of the output axis used for mark

compensation.

This FB uses the unit setting of the main input

axis corresponding to the output axis.

Start I/O number StartIO Word [Unsigned] 0H Start I/O

number

FEH

0 Installation address of the Simple Motion

module (Upper three digits of four digits

(hexadecimal))

Name Label name Data type Read timing*1

Setting range

Initial value

Description

Minimum

compensation amount

eMinTolerance Single precision real

number

0.0

Minimum

compensation

amount <

Maximum

compensation

amount <

"[Pr.439] Cam

axis length

per cycle / 2"

0.0 Set the lower limit value of the compensation

range with an absolute value.

Maximum

compensation amount

eMaxTolerance Single precision real

number

0.0 Set the upper limit value of the compensation

range with an absolute value.

4 FB LIBRARY 4.2 Details of the FB Library 89

90

STD_CtrlAuxiliaryAxis (Auxiliary axis correction)

Name STD_CtrlAuxiliaryAxis

Function overview

Item Description

Function overview This FB performs positioning by compensation amount.

Symbol

Applicable hardware and

software

Applicable module RD77MS, RD77GF

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 2267 steps

FB dependence

Function description This FB performs positioning of the auxiliary axis and compensates the output axis.

Turning on i_bEN (Execution command) normally starts the FB and turns on o_bOK (Normal completion).

If a positive value is set in i_eCompensationStartPos (Compensation starting point), the input of i_dCompensationAmount

(Compensation amount) changes and compensating operation starts when "[Md.401] Current value per cycle after main shaft

gear" passes the compensation starting point.

If -1 is set in i_eCompensationStartPos (Compensation starting point), the compensation starting point is disabled and

compensating operation starts when i_dCompensationAmount (Compensation amount) changes. When the compensation

amount changes during auxiliary axis control, the compensation amount is ignored. The compensation amount which is input

after the ongoing positioning completion will be fetched.

o_bCompensationComplete (Compensation completion) turns on at completion of positioning of the auxiliary axis.

If a positive value is set for the compensation starting point

If the unit set in "[Pr.1] Unit setting" differs between the main input axis and auxiliary axis corresponding to the output axis, the

operation continues but an error (ErrorID: 2136H) is stored.

If an error has occurred in the FB, Error turns on and the error code is stored in ErrorID.

For details of error codes, refer to "Page 198 List of Error Codes".

Execution command B: i_bEN

Compensation starting point E: i_eCompensationStartPos

Compensation amount D: i_dCompensationAmount

Output axis setting DUT: i_stOutputAxis

Compensation control setting DUT: i_stCompensationSetting

Auxiliary axis setting DUT: i_stAuxiliaryAxis

o_bENO :B Execution status

o_bOK :B Normal completion

o_bError :B Error completion

o_uErrorID :UW Error code

o_bCompensationComplete :B Compensation completion

STD_CtrlAuxiliaryAxis

X1

X2

00 X10 X2

Execution command (i)

Compensation starting point (i)

Normal completion (o)

Execution status (o)

Current value per cycle after main shaft gear

Compensation amount (i)

Positioning axis current value for compensation

Compensation completion (o)

* (i) Input label (o) Output label

4 FB LIBRARY 4.2 Details of the FB Library

4

*1 For details of synchronous control parameters, refer to the following. MELSEC iQ-R Simple Motion Module User's Manual (Advanced Synchronous Control)

Labels

Input labels

Restrictions and

precautions

If a series of processing (from operation processing to compensation completion) is not completed until the next mark detection,

execute this FB in the fixed cycle execution type.

If parameters have been set as below, this FB is executed with the unit [mm].

"[Pr.1] Unit setting": Other than 0 to 3

"[Pr.300] Servo input axis type": Other than 1 to 4

Control unit of "[Pr.321] Synchronous encoder axis unit setting": Other than 0 to 3

"[Pr.400] Main input axis type": Other than 1 to the maximum number of module axes (servo input axis) and 801 to 800 + maximum

number of module axes (synchronous encoder)

Since synchronous parameters ([Pr.400] to [Pr.437]) such as "auxiliary shaft module" used in the synchronous control are set in

this FB, input label, or structure, do not use user programs to set or change the parameters.*1

Since the positioning signal of the auxiliary axis specified with the axis No. in the auxiliary axis setting is used in this FB, do not

use user programs to set or change them.

If the rotation direction of the main input axis and auxiliary axis are different and the compensation speed of the auxiliary axis

exceeds the main input axis speed, the output axis may reverse.

This FB sets a compensation amount ([Da.6] Positioning address/movement amount), compensation axis speed ([Da.8]

Command speed), compensation acceleration ([Da.3] Acceleration time No.), and compensation deceleration ([Da.4]

Deceleration time No.) for the positioning data No. set with input labels.

Since "[Da.1] Operation pattern" and "[Da.2] Control method" are set in this FB, do not use user programs to set or change them.

For the following settings, use user programs as required.

"[Da.9], [Da.10], [Da.27], [Da.28]"

Set i_eCompensationStartPos (Compensation starting point) not to overlap the synchronous section to avoid the compensation

operation from being performed at sealing.

Set the time equal to or longer than the execution cycle (scan time) of this FB for "[Pr.40] Positioning complete signal output time"

(initial value: 300[ms]) of the auxiliary axis. Otherwise, o_bCompensationComplete (Compensation completion) does not turn on.

Compiling method Macro type, subroutine type

FB operation type Real-time execution

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit On, off On: The FB is activated and the

compensation operation is available.

Off: The FB is not activated.

Compensation

starting point

i_eCompensatio

nStartPos

Single

precision

real number

Refer to the description. 0.0 The compensation starts when the main

input axis point per cycle reaches the set

value.

0.0 Compensation starting point <

Cam axis length per cycle [mm]

0.00 Compensation starting point <

Cam axis length per cycle [inch]

0.00 Compensation starting point <

Cam axis length per cycle [degree]

0 Compensation starting point < Cam

axis length per cycle [pulse]

[The unit setting depends on the setting

value of the main input axis.]

-1: Compensation starts when the

compensation amount changes.

Compensation

amount

i_dCompensatio

nAmount

Double word

[Signed]

-2147483648 Compensation

amount 2147483647

[The unit setting depends on the axis

No. setting value in the auxiliary axis

setting.] (10-4 mm, 10-5 inch, 10-5

degree, pulse)

0 Input the compensation amount.

Output axis

setting

i_stOutputAxis AXIS_REF Refer to the output axis setting below.

Auxiliary axis

setting

i_stAuxiliaryAxis AXIS_REF Refer to the auxiliary axis setting below.

Compensation

control setting

i_stCompensatio

nSetting

PAC_COMP

ENSATION_

REF

Refer to the compensation control setting

below.

Item Description

4 FB LIBRARY 4.2 Details of the FB Library 91

92

Output axis setting (AXIS_REF structure)

Auxiliary axis setting (AXIS_REF structure)

Compensation control setting (PAC_COMPENSATION_REF structure)

*1 : Always, : When the FB is started (cannot be changed)

Name Label name Data type Read timing*1

Setting range

Initial value

Description

Axis number AxisNo Word [Unsigned] 1 Axis No.

maximum

number of

axes of the

module used

Set the axis No. of the output axis used for mark

compensation.

The unit setting of the main input axis that drives

the output axis is also used by the compensation

starting point.

Start I/O number StartIO Word [Unsigned] 0H Start I/O

number FEH

0 Installation address of the Simple Motion module

(Upper three digits of four digits (hexadecimal))

Name Label name Data type Read timing*1

Setting range

Initial value

Description

Axis number AxisNo Word [Unsigned] 1 Axis No.

maximum

number of

axes of the

module used

Set the axis No. of the auxiliary axis used for mark

compensation.

The unit setting of the axis is the unit of labels used

by the auxiliary axis.

Name Label name Data type Read timing*1

Setting range

Initial value

Description

Positioning data No. uPointTableNo Word [Unsigned] 1

Positioning

data No.

100

1 Set the positioning data No. for performing the

compensation operation.

Compensation axis

speed

eCompensationSp

eed

Single precision

real number

Refer to the

description.

1000.0 Set the positioning speed for compensation.

Set the speed added/subtracted to/from the line

speed in this setting.

mm: 0.01 Compensation axis speed

20000000.00 [mm/min]

inch: 0.001 Compensation axis speed

2000000.000 [inch/min]

degree: 0.001 Compensation axis speed

2000000.000 [degree/min]

pulse: 1 Compensation axis speed

1000000000 [pulse/s]

[The unit setting depends on the axis No. setting

value in the auxiliary axis setting.]

If the set speed is 8 digits or more (the number of

significant figures of the single precision real

number is 7 digits), round off the eighth digits of

the value.

Compensation

acceleration

uCompensationAc

c

Word [Unsigned] 0

Compensation

acceleration

3

0 Set the positioning acceleration for compensation.

0: [Pr.9] Acceleration time 0

1: [Pr.25] Acceleration time 1

2: [Pr.26] Acceleration time 2

3: [Pr.27] Acceleration time 3

Compensation

deceleration

uCompensationD

ecel

Word [Unsigned] 0

Compensation

deceleration

3

0 Set the positioning deceleration for compensation.

0: [Pr.10] Deceleration time 0

1: [Pr.28] Deceleration time 1

2: [Pr.29] Deceleration time 2

3: [Pr.30] Deceleration time 3

4 FB LIBRARY 4.2 Details of the FB Library

4

Output labels

*1 : The value will be held after the FB stops. : The value will be cleared after the FB stops.

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit On: Execution command is on.

Off: Execution command is off.

Normal completion o_bOK Bit This label indicates that the FB has normally started.

Error completion o_bError Bit On: An error has occurred in the FB.

Off: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the

FB is stored.

Compensation

completion

o_bCompensationComplete Bit This device turns on when positioning for

compensation is completed.

4 FB LIBRARY 4.2 Details of the FB Library 93

94

PAC_CalcGap (Work gap adjustment compensation amount calculation)

Name PAC_CalcGap

Function details

Item Description

Function overview This FB detects a workpiece on the conveyor using the mark detection function of the Simple Motion module and outputs the

compensation amount for adjusting the space from the workpiece ahead.

Symbol

Applicable hardware

and software

Applicable module RD77MS, RD77GF

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 1332 steps

FB dependence

Execution command

Work length

Sensor position

Mark detection data

Mark detection counts

Mark detection setting No.

Output axis setting

Compensation control setting

Execution status

Normal completion

Error completion

Error code

Compensation amount Compensation starting point Mark detection setting No.

Output axis setting Compensation control setting

PAC_CalcGap B: i_bEN

E: i_eWorkLength

E: i_eSensorPosition

D: i_dMarkDetectData

UW: i_uMarkDetectCount

UW: io_uMarkDetectSettingNo

DUT: io_stOutputAxis

DUT: io_stCompensationSetting

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_dCompensationAmount :D

o_dCompensationStartPosition :D

io_uMarkDetectSettingNo :UW

io_stOutputAxis :DUT

io_stCompensationSetting :DUT

4 FB LIBRARY 4.2 Details of the FB Library

4

Function description As the following shows, this FB outputs compensation amounts to align the workpieces fed from the work feeding conveyor at

irregular intervals into equal intervals (length per cycle) by using the gap adjustment conveyor which is synchronized with the supply

conveyor and the sensor attached above the gap adjustment conveyor.

Outline diagram (gap adjustment)

Turning on i_bEN (Execution command) normally starts the FB and turns on o_bOK (Normal completion).

"[Md.407] Cam axis current value per cycle" of the axis (gap adjustment conveyor) specified with the output axis setting at the first

mark detection is set as a reference point. After that, the compensation amount is calculated from the difference between the

previous and current values of i_dMarkDetectData (Mark detection data) at each update of i_uMarkDetectCount (Mark detection

counts).

The compensation amount is not calculated at the first detection of the work. It is calculated at the second i_uMarkDetection (Mark

detection data) or later.

i_dMarkDetectData (Mark detection data) uses the cam axis current value per cycle (when [Pr.802] is set to 11 or 12).

o_dCompensationStartPosition (Compensation starting point) outputs the previous value of i_dMarkDetectData (Mark detection

data) added by i_eWorkLength (Work length) and i_eSensorPosition (Sensor position).

Compensation starting point concept

Item Description

Gap adjustment conveyorWork feeding conveyor Supply conveyor

* (i)Input label

Work detection sensor Work gap

(length per cycle) Work length (i)

Sensor position (i)

Gap adjustment conveyor Supply conveyor

Sensor position (i) Work length (i)

1)2) 1)2)3)

Work detection sensor

Work detection sensor

Gap adjustment conveyor Supply conveyor

Sensor position (i) Work length (i)

* (i)Input label

If the work 2) is detected and immediately compensated, the work 1) moves as well.

Check that the work 1) is on the next conveyor, and then start compensation of the work 2).

1001001001001001001000

100

1) 40

-20 -10 -40 10

2) 5 4) 20 7) 30

20 -70

7)6)5)4)3)2)1)

7)6)5)4)3)2)1)

1 cycle

1 cycle 100

Mark detection value

40

Compensation amount

10 -20 -10 -40 -70 200

Work position (before compensation) Work position (after compensation)

3) 30 6) 105) 80

Work position before alignment

Work position after alignment

(Supply conveyor)

(Gap adjustment conveyor)

4 FB LIBRARY 4.2 Details of the FB Library 95

96

Labels

Input labels

Function description This FB performs the following compensation using MaxTolerance (maximum compensation amount) and MinTolerance (minimum

compensation amount) according to the calculated compensation amount.

When the absolute value of the calculated compensation amount is smaller than the value in MinTolerance (Minimum

compensation amount)

"0" is stored in o_dCompensationAmount (Compensation amount)

When the calculated compensation amount (positive value) is larger than the value in MaxTolerance (Maximum compensation

amount)

"The value of the MaxTolerance" is stored in o_dCompensationAmount (Compensation amount), and a maximum compensation

amount exceeded error (ErrorID: 2123H) is stored.

For the calculated compensation amount (negative value)

The calculated compensation amount is output as the compensation amount as is.

Depending on the space between workpieces coveyed from the work charging conveyor and the line speed, the workpieces may

not be adjusted to have desired intervals on one conveyor. In that case, connect multiple gap adjustment conveyors.

If an error has occurred in the FB, Error turns on and the error code is stored in ErrorID.

For details of error codes, refer to "Page 198 List of Error Codes".

Restrictions and

precautions

Set 0 (mm) or 1 (inch) in the main input axis. If a value outside the range is set, an error (ErrorID: 214DH) occurs.

To use this FB, configure a system in which "[Md.407] Cam axis current value per cycle" moves in the increment direction.

Set the work gap and the sensor position and the work length to satisfy the following formula. Work gap (length per cycle) + Sensor

position + Work length 214748.3647 [mm] or 21474.83647 [inch]

If the mark detection data is behind the actual detection position, minimize the delay by setting the gain tuning of the servo and

"[Pr.801] Mark detection signal compensation time". If the delay is long, compensation amount may not be calculated correctly.

Compiling method Macro type, subroutine type

FB operation type Real-time execution

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit On, off ON: The FB is activated.

OFF: The FB is not activated.

Work length i_eWorkLength Single

precision

real number

Refer to the description. 40.0 Set the work length.

0.1 Work length 100000.0 [mm]

0.01 Work length 10000.00 [inch]

[The unit setting depends on the setting

value of the main input axis.]

Sensor

position

i_eSensorPosition Single

precision

real number

Refer to the description. 240.0 Set the distance between the sensor of the

gap adjustment conveyor that detects the

workpiece and conveyor end.

0.1 Sensor position 100000.0 [mm]

0.01 Sensor position 10000.00 [inch]

[The unit setting depends on the setting

value of the main input axis.]

Mark

detection

data

i_dMarkDetectData Double word

[Signed]

-2147483648 Mark

detection data

2147483647

[The unit setting depends

on the axis No. setting

value of the output axis

setting.] (10-4 mm, 10-5

inch)

0 Enter STD_ReadMarkDetectDataFB of

o_dMarkDetectData (Mark detection data).

Item Description

Calculated compensation amount

Calculated compensation amount (Current value - Previous value of the mark detection data)

Calculated compensation amount

0

0

Maximum compensation amount

Compensation amount (o_dCompensationAmount)

Maximum compensation

amount

Minimum compensation

amount

- Minimum compensation

amount

Product length

Work length

4 FB LIBRARY 4.2 Details of the FB Library

4

*1 : Always, : When the FB is started (cannot be changed)

Output labels

*1 : The value is held after the FB stops. : The value is cleared after the FB stops.

I/O labels

Output axis setting (AXIS_REF structure)

Mark

detection

counts

i_uMarkDetectCount Word

[Unsigned]

0 Mark detection counts

65535 [times]

(Ring counter)

0 Enter o_uMarkDetectCount (Mark detection

counts) of STD_ReadMarkDetectDataFB.

A compensation amount is calculated at

updating this data.

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit ON: Execution command is on.

OFF: Execution command is off.

Normal completion o_bOK Bit Indicates that the FB has normally started.

Error completion o_bError Bit ON: An error has occurred in the FB.

OFF: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the

FB is stored.

Compensation

amount

o_dCompensationAmount Double word [Signed] The calculated compensation amount is stored.

If the absolute value of the compensation amount is

smaller than the minimum compensation amount, "0"

is output.

If it exceeds the maximum compensation amount,

"Maximum compensation amount" is output.

Data range: -2147483648 Compensation amount

2147483647

[The unit setting depends on the axis No. setting

value of the output axis setting.]

(10-4 mm, 10-5 inch)

Compensation

starting point

o_dCompensationStartPosition Double word [Signed] The calculated compensation starting point is stored.

Data range: -2147483648 Compensation starting

point 2147483647

[The unit setting depends on the axis No. setting

value of the output axis setting.]

(10-4 mm, 10-5 inch)

Name Label name Data type Read timing*1

Setting range Initial value

Description

Mark detection

setting No.

io_uMarkDetectSettin

gNo

Word [Unsigned] 1 Mark detection

setting No. Maximum

number of mark

detection settings of the

module used

Set the reference No. of mark detection

data.

Output axis

setting

io_stOutputAxis AXIS_REF Refer to the output axis setting below.

Compensation

control setting

io_stCompensationSe

tting

PAC_COMPEN

SATION_REF

Refer to compensation control setting

below.

Name Label name Data type Read timing*1

Setting range Initial value

Description

Axis No. AxisNo Word [Unsigned] 1 Axis No. Maximum

number of axes of the

module used

Set the axis No. of the output axis (gap

adjustment conveyor) used for the mark

compensation processing.

The unit setting of the main input axis

corresponding to the output axis is used in

this FB.

Start I/O

number

StartIO Word [Unsigned] 0H Start I/O number

FEH

Installation address of the Simple Motion

module (Upper three digits of four digits

(hexadecimal))

Name Label name Data type Read timing*1

Setting range Initial value

Description

4 FB LIBRARY 4.2 Details of the FB Library 97

98

Compensation control setting (PAC_COMPENSATION_REF structure)

*1 : Always, : When the FB is started (cannot be changed)

Name Label name Data type Read timing*1

Setting range Initial value

Description

Minimum

compensation

amount

eMinTolerance Single precision

real number

0.0 Minimum

compensation amount <

Maximum

compensation amount

"[Pr.439] Cam axis

length per cycle"

Set the lower limit value of the

compensation range.

If the compensation amount absolute value

is smaller than this setting, "0" is stored in

the compensation amount.

Maximum

compensation

amount

eMaxTolerance Single precision

real number

Set the upper limit value of the

compensation range.

If the compensation amount is larger than

this setting, "this setting value" is stored.

4 FB LIBRARY 4.2 Details of the FB Library

4

PAC_CalcPhase (Work loading position adjustment compensation amount calculation)

Name PAC_CalcPhase

Function details

Item Description

Function overview This FB detects a workpiece on the conveyor by using the mark detection function of the Simple Motion module and outputs the

compensation amount of the phase difference (deviation) with the loading conveyor.

Symbol

Applicable hardware and

software

Applicable module RD77MS, RD77GF

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 1488 steps

FB dependence

Execution command

Work length

Sensor position

Mark detection data

Work loading position

Mark detection counts Mark detection

setting No. Output axis setting

Compensation control setting

Execution status

Normal completion

Error completion

Error code

Compensation starting point

Compensation amount

Mark detection setting No. Output axis setting Compensation control setting

PAC_CalcPhase B: i_bEN

E: i_eWorkLength

E: i_eSensorPosition

E: i_eWorkLoadPosition

D: i_dMarkDetectData

UW: i_uMarkDetectCount

UW: io_uMarkDetectSettingNo

DUT: io_stOutputAxis

DUT: io_stCompensationSetting

o_bENO :B

o_bOK :B

o_bError :B

o_uErrorID :UW

o_dCompensationAmount :D

o_dCompensationStartPosition :D

io_uMarkDetectSettingNo :UW

io_stOutputAxis :DUT

io_stCompensationSetting :DUT

4 FB LIBRARY 4.2 Details of the FB Library 99

10

Function description As the following shows, this FB outputs the compensation amount to load workpieces fed from the gap adjustment conveyor in a

desired position between fingers (partition plates) by using the supply conveyor which is synchronized with the loading conveyor

and the sensor attached above the supply conveyor.

Outline diagram

Turning on i_bEN (Execution command) normally starts the FB and turns on o_bOK (Normal completion).

During the work detection, the compensation amount is calculated from "[Md.407] Cam axis current value per cycle" of the

loading conveyor and the i_eWorkLoadPosition (Work loading position) and outputted.

o_dCompensationStartPosition (Compensation starting point) outputs the previous value of i_dMarkDetectData (Mark detection

data) added by i_eWorkLength (Work length) and i_eSensorPosition (Sensor position).

i_dMarkDetectData (Mark detection data) uses the cam axis current value per cycle (when [Pr.802] is set to 11 or 12).

i_eWorkLoadPosition (Work loading position) shows the loading position from the edge of the finger.

This FB performs the following compensation using MaxTolerance (maximum compensation amount) and MinTolerance

(minimum compensation amount) according to the calculated compensation amount.

When the absolute value of the calculated compensation amount is smaller than the value in MinTolerance (Minimum

compensation amount)

"0" is stored in o_dCompensationAmount (Compensation amount)

When the calculated compensation amount (positive value) is larger than the value in MaxTolerance (Maximum compensation

amount)

The length per cycle is subtracted from o_dCompensationAmount (Compensation amount) and the workpiece is loaded between

the fingers of the next cycle. A maximum compensation amount exceeded error (ErrorID: 2123H) is stored.

For the calculated compensation amount (negative value)

The calculated compensation amount is output as the compensation amount as is.

The compensation amount at the first work detection is output as a negative value to a deceleration direction. The maximum

compensation amount and minimum compensation amount are ignored.

If an error has occurred in the FB, Error turns on and the error code is stored in ErrorID.

For details of error codes, refer to "Page 198 List of Error Codes".

Restrictions and

precautions

Set 0 (mm) or 1 (inch) in the main input axis. If a value outside the range is set, an error (ErrorID: 214DH) occurs.

To use this FB, configure a system in which "[Md.407] Cam axis current value per cycle" moves in the increment direction.

Set the work gap and the sensor position and the work length to satisfy the following formula. Work gap (length per cycle) +

Sensor position + Work length 214748.3647 [mm] or 21474.83647 [inch]

If the mark detection data is behind the actual detection position, minimize the delay by setting the gain tuning of the servo and

"[Pr.801] Mark detection signal compensation time". If the delay is long, compensation amount may not be calculated correctly.

Adjust the work intervals using PAC_CalcGap (Work gap adjustment compensation amount calculation) FB so that each

workpiece is within the length per cycle on the supply conveyor.

Set "[Pr.439] Cam axis length per cycle" of the supply conveyor and loading conveyor to the same value.

Compiling method Macro type, subroutine type

FB operation type Real-time execution

Item Description

Sensor

Supply conveyor

Finger (partition plate)

Work loading position

Distance between sensor and conveyor end

Work length Finger gap (length per cycle)

Gap adjustment conveyor Work loading conveyor

- Minimum compensation

amount

Minimum compensation

amount

Maximum compensation

amount

Calculated compensation amount

Calculated compensation amount (Mark detection data - Reference point)

Calculated compensation amount

Calculated compensation amount - Length per cycle

0

0

Compensation amount (o_dCompensationAmount)

0 4 FB LIBRARY 4.2 Details of the FB Library

4

Labels

Input labels

*1 : Always, : When the FB is started (cannot be changed)

Output labels

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit On, off ON: The FB is activated.

OFF: The FB is not activated.

Work length i_eWorkLength Single

precision

real number

Refer to the description. 40.0 Set the work length.

0.1 Work length 100000.0 [mm]

0.01 Work length 10000.00 [inch]

[The unit setting depends on the setting value

of the main input axis.]

Sensor

position

i_eSensorPosition Single

precision

real number

Refer to the description. 240.0 Set the distance between the sensor that

detects the workpiece on the supply conveyor

and the conveyor end.

0.1 Sensor position 100000.0 [mm]

0.01 Sensor position 10000.00 [inch]

[The unit setting depends on the setting value

of the main input axis.]

Work

loading

position

i_eWorkLoadPosition Single

precision

real number

0.0 Work loading

position < "[Pr.439] Cam

axis length per cycle"

0.0 Set the distance between the finger edge and

work edge on the loading conveyor.

Mark

detection

data

i_dMarkDetectData Double word

[Signed]

-2147483648 Mark

detection data

2147483647

[The unit setting depends

on the axis No. setting

value of the output axis

setting.] (10-4 mm, 10-5

inch)

0 Enter STD_ReadMarkDetectDataFB of

o_dMarkDetectData (Mark detection data).

Mark

detection

counts

i_uMarkDetectCount Word

[Unsigned]

0 Mark detection counts

65535 [times]

(Ring counter)

0 Enter o_uMarkDetectCount (Mark detection

counts) of STD_ReadMarkDetectDataFB.

A compensation amount is calculated at

updating this data.

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit ON: Execution command is on.

OFF: Execution command is off.

Normal completion o_bOK Bit Indicates that the FB has normally started.

Error completion o_bError Bit ON: An error has occurred in the FB.

OFF: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the FB is stored.

Compensation

amount

o_dCompensationAmount Double word

[Signed]

The calculated compensation amount is stored.

If the absolute value of the compensation amount is smaller than

the minimum compensation amount, "0" is output.

If it exceeds the maximum compensation amount, "Maximum

compensation amount" is output.

Data range: -2147483648 Compensation amount 2147483647

[The unit setting depends on the axis No. setting value of the output

axis setting.]

(10-4 mm, 10-5 inch)

Product length

Work length

4 FB LIBRARY 4.2 Details of the FB Library 101

10

*1 : The value is held after the FB stops. : The value is cleared after the FB stops.

I/O labels

Output axis setting (AXIS_REF structure)

Compensation control setting (PAC_COMPENSATION_REF structure)

*1 : Always, : When the FB is started (cannot be changed)

Compensation

starting point

o_dCompensationStartPosition Double word

[Signed]

The calculated compensation starting point is stored.

Data range: -2147483648 Compensation starting point

2147483647

[The unit setting depends on the axis No. setting value of the output

axis setting.]

(10-4 mm, 10-5 inch)

Name Label name Data type Read timing*1

Setting range Initial value

Description

Mark detection

setting No.

io_uMarkDetectSettin

gNo

Word [Unsigned] 1 Mark detection

setting No. Maximum

number of mark

detection settings of the

module used

Set the reference No. of mark detection

data.

Output axis

setting

io_stOutputAxis AXIS_REF Refer to the output axis setting below.

Compensation

control setting

io_stCompensationSe

tting

PAC_COMPEN

SATION_REF

Refer to compensation control setting

below.

Name Label name Data type Read timing*1

Setting range Initial value

Description

Axis No. AxisNo Word [Unsigned] 1 Axis No. Maximum

number of axes of the

module used

Set the axis No. of the output axis (supply

conveyor) used for the mark compensation

processing.

The unit setting of the main input axis

corresponding to the output axis is used in

this FB.

Start I/O

number

StartIO Word [Unsigned] 0H Start I/O number

FEH

Installation address of the Simple Motion

module (Upper three digits of four digits

(hexadecimal))

Name Label name Data type Read timing*1

Setting range Initial value

Description

Minimum

compensation

amount

eMinTolerance Single precision

real number

0.0 Minimum

compensation amount <

Maximum

compensation amount

"[Pr.439] Cam axis

length per cycle"

Set the lower limit value of the

compensation range.

If the compensation amount absolute value

is smaller than this setting, "0" is stored in

the compensation amount.

Maximum

compensation

amount

eMaxTolerance Single precision

real number

Set the upper limit value of the

compensation range.

If the compensation amount is larger than

this setting, "Calculated compensation

amount - Length per cycle" is stored.

Name Label name Data type Value to be held*1

Description

2 4 FB LIBRARY 4.2 Details of the FB Library

4

4.3 List of Structures

AXIS_REF (Axis setting)

Name AXIS_REF

Labels

PAC_COMPENSATION_REF (Compensation control setting)

Name PAC_COMPENSATION_REF

Labels

Name Label name Data type Description

Axis number AxisNo Word [Unsigned] Axis number

Start I/O number StartIO Word [Unsigned] Installation address of the Simple Motion module (Upper three digits of four

digits (hexadecimal))

Name Label name Data type Description

Positioning data No. uPointTableNo Word [Unsigned] Set the positioning data No. for performing the compensation operation.

Compensation axis

speed

eCompensationSpeed Single precision real

number

Set the positioning speed for compensation.

Set the speed added/subtracted to/from the line speed in this setting.

If the set speed is 8 digits or more (the number of significant figures of the single

precision real number is 7 digits), round off the eighth digits of the value.

mm: 0.01 Compensation axis speed 20000000.00 [mm/min]

inch: 0.001 Compensation axis speed 2000000.000 [inch/min]

degree: 0.001 Compensation axis speed 2000000.000 [degree/min]

pulse: 1 Compensation axis speed 1000000000 [pulse/s]

[The unit setting depends on the axis No. setting value in the auxiliary axis

setting.]

Compensation

acceleration

uCompensationAcc Word [Unsigned] Set the positioning acceleration for compensation.

0: [Pr.9] Acceleration time 0

1: [Pr.25] Acceleration time 1

2: [Pr.26] Acceleration time 2

3: [Pr.27] Acceleration time 3

Compensation

deceleration

uCompensationDecel Word [Unsigned] Set the positioning deceleration for compensation.

0: [Pr.10] Deceleration time 0

1: [Pr.28] Deceleration time 1

2: [Pr.29] Deceleration time 2

3: [Pr.30] Deceleration time 3

Minimum

compensation amount

eMinTolerance Single precision real

number

Set the minimum compensation amount with an absolute value.

Maximum

compensation amount

eMaxTolerance Single precision real

number

Set the maximum compensation amount with an absolute value.

4 FB LIBRARY 4.3 List of Structures 103

10

5 APPLICATION PROGRAM EXAMPLE

This chapter describes the program examples for the horizontal pillow packaging machine with the packaging library in this

application package.

*1 "****" indicates their versions.

Precautions

To utilize this program for an actual system, sufficiently confirm that the program will not cause system control problems on

user's own responsibility. Examine the positions where interlock conditions are required in a target system and add them.

When the Simple Motion module detects an error or warning in this sample program, the operation suspends control.

Program example Network Project name Reference

Box motion SSCNET/H AP20-PAC002AA-R16-

77MS16_BoxMotion_****.gx3*1 Page 105 Box Motion

CC-Link IE Field AP20-PAC002AA-R16-

77GF16_BoxMotion_****.gx3*1

Long dwell SSCNET/H AP20-PAC002AA-R16-

77MS8_LongDwell_****.gx3*1 Page 122 Long Dwell

CC-Link IE Field AP20-PAC002AA-R16-

77GF8_LongDwell_****.gx3*1

Alignment conveyor SSCNET/H AP20-PAC002AA-R16-

77MS16_AlignmentConveyor_****.gx3*1 Page 138 Alignment Conveyor

CC-Link IE Field AP20-PAC002AA-R16-

77GF16_AlignmentConveyor_****.gx3*1

4 5 APPLICATION PROGRAM EXAMPLE

5

5.1 Box Motion This section describes the system configuration and program specifications of the program example of a horizontal pillow

packaging machine when using the box motion mechanism.

System configuration AP20-PAC002AA-R16-77MS16_Box Motion_****.gx3 (SSCNET/H)

*1 The end seal part has been configured with the box motion. This application package also includes programs to generate cam patterns for using the rotary cutter.

Simple Motion module RD77MS16

Power supply module R61P Servo amplifier

MR-J4-B

PLC CPU R16CPU

GOT2000 GT27**-V

Ethernet

Axis 3Axis 2Axis 1 Axis 4

Box motion Film feeding axisLoading conveyor axis

Travel axis

Seal axis HG-KR (3000 r/min) 4194304 pulse/rev

Finger pitch

HG-KR (3000 r/min) 4194304 pulse/rev Movement amount: 100 mm/rev

HG-KR (3000 r/min) 4194304 pulse/rev Movement amount: 100 mm/rev

HG-KR (3000 r/min) 4194304 pulse/rev Film mark pitch

500 mm

Axis 5

HG-KR (3000 r/min) 4194304 pulse/rev

500 mm

*1

Cutter axis

Mark sensor

Finger sensor

Movement amount: 360 degree/rev

Movement amount: 20 mm/rev

Production speed: 60 products/min Product length: 500 mm

Movement amount: 20 mm/rev

SSCNET/H

5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion 105

10

AP20-PAC002AA-R16-77GF16_BoxMotion_****.gx3 (CC-Link IE Field Network)

*2 The end seal part has been configured with the box motion. This application package also includes programs to generate cam patterns for using the rotary cutter.

Control specifications Item Travel axis

(Box motion) Seal axis (Box motion)

Film axis Conveyor axis Cutter axis (Rotary cutter)

Axis No. 1 2 3 4 5

Unit setting 0: mm 0: mm 0: mm 0: mm 2: degree

Home position return Data setting method Data setting method Data setting method Data setting method Data setting method

Auxiliary axis No. 13 (Virtual) 14 (Virtual)

Cam No. 1 2 0 (Straight line) 0 (Straight line) 3

Clutch Address Address Address Address Address

Item Main axis 1 Main axis 2

Axis No. 7 (Virtual) 8 (Virtual)

Unit setting 2: degree 0: mm

Ethernet

*2

CC-Link IE Field

Remote I/O module NZ2GF2B1-16D

Simple Motion module RD77GF16

Power supply module R61P

Servo amplifier MR-J4-GF

PLC CPU R16CPU

GOT2000 GT27**-V

Axis 3Axis 2Axis 1 Axis 4

Box motionFilm feeding axis Loading conveyor axis

Travel axis

Seal axis HG-KR (3000 r/min) 4194304 pulse/rev

Finger pitch

HG-KR (3000 r/min) 4194304 pulse/rev Movement amount: 100 mm/rev

HG-KR (3000 r/min) 4194304 pulse/rev Movement amount: 100 mm/rev

HG-KR (3000 r/min) 4194304 pulse/rev

Film mark pitch 500 mm

Axis 5

HG-KR (3000 r/min) 4194304 pulse/rev

500 mm

Cutter axis

Mark sensor

Finger sensor

Movement amount: 360 degree/rev

Movement amount: 20 mm/rev

Production speed: 60 products/min Product length: 500 mm

Movement amount: 20 mm/rev

6 5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion

5

Program configuration

Language The following languages are used in this program.

Program comment: English

Label comment: Japanese, English, Chinese (Simplified)

List of programs

FB The following table lists the FBs used in this program.

PAC_PackagingControl_R AP20-PAC002AA-R16-77MS16_BoxMotion_****.gx3

*1 The FB that repeats calling in the program is set to the subroutine type. For details of the macro type and subroutine type, refer to the following. MELSEC iQ-R Programming Manual (Program Design)

AP20-PAC002AA-R16-77GF16_BoxMotion_****.gx3

*1 The FB that repeats calling in the program is set to the subroutine type. For details of the macro type and subroutine type, refer to the following. MELSEC iQ-R Programming Manual (Program Design)

Program name Description Execution type Describing method

Initial Initial parameter setting Initial ST

PreOperation License activation

Preparing operation (Servo ON/OFF)

Home position return

Scan FBD

Operation Reset error

JOG operation

Cam generation

Cam data reading

Synchronous control start

Operation start/stop

Scan FBD

PackagingControl Mark compensation

Initial phase adjustment

No Product No Bag/No Gap No Seal

Event (I44) FBD

HMI_IF Touch panel I/O processing Scan ST

Item FB name Description Execution type*1 Program

Activation PAC_Activation License activation Macro type PreOperation

Cam auto-generation STD_MakeRotaryCutterCam+RD

77MS

Cam auto-generation for rotary cutter (front end

reference)

Macro type Operation

PAC_MakeBoxMotionCam Cam auto-generation for box motion Macro type Operation

Mark compensation STD_ReadMarkDetectData Mark detection data reading Macro type PackagingControl

PAC_CalcMarkCompensation Automatic compensation calculation using

mark detection

Macro type PackagingControl

STD_CtrlAuxiliaryAxis Auxiliary axis correction Macro type PackagingControl

Item FB name Description Execution type*1 Program

Activation PAC_Activation License activation Macro type PreOperation

Cam auto-generation STD_MakeRotaryCutterCam+RD

77GF

Cam auto-generation for rotary cutter (central

reference)

Macro type Operation

PAC_MakeBoxMotionCam Cam auto-generation for box motion Macro type Operation

Mark compensation STD_ReadMarkDetectData Mark detection data reading Macro type PackagingControl

PAC_CalcMarkCompensation Automatic compensation calculation using

mark detection

Macro type PackagingControl

STD_CtrlAuxiliaryAxis Auxiliary axis correction Macro type PackagingControl

5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion 107

10

PLCopen Motion Control PLCopen Motion Control FB library can be downloaded from the Mitsubishi Electric FA site.

*1 The FB that repeats calling in the program is set to the subroutine type. For details of the macro type and subroutine type, refer to the following. MELSEC iQ-R Programming Manual (Program Design)

Example Prg Control (Application program control)

*1 The FB that repeats calling in the program is set to the subroutine type. For details of the macro type and subroutine type, refer to the following. MELSEC iQ-R Programming Manual (Program Design)

Devices to be used AP20-PAC002AA-R16-77GF16_BoxMotion_****.gx3

In this program example, a link device is used for the interface between the PLC CPU and remote I/O module (NZ2GF2B1-

16D). The device range is shown below.

Parameter Refer to the project for parameter setting details.

System parameter To perform the control in synchronization with the calculation cycle of the Simple Motion module, use the inter-module

synchronization function.

Set the interval of the fixed cycle depending on the calculation cycle of the system.

For RD77MS

FB name Description Execution type*1 Program

MC_Power+RD77 Operation possible (PLCopen Motion Control FB) Macro type PreOperation

MCv_Home+RD77 Home position return (PLCopen Motion Control FB) Macro type PreOperation

MC_Reset+RD77 Axis error reset (PLCopen Motion Control FB) Macro type PreOperation

MCv_Jog+RD77 JOG operation (PLCopen Motion Control FB) Macro type Operation

FB name Description Execution type*1 Program

CtrlOutputAxisSync Output axis synchronization control Macro type PackagingControl

ReadCamData Cam data reading Macro type PreOperation

Item Symbol Point Range

Link relay B 16 0 to F

8 5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion

5

For RD77GF

Simple Motion parameter In this application program example, the following parameters are disabled.

Set the parameters for safety measures depending on the intended use.

Servo parameter In this application program example, the servo amplifier input signal is not used.

Set the parameters for safety measures depending on the intended use.

Parameter Settings

[Pr.82] Forced stop valid/invalid selection Disabled

"[Pr.116] FLS signal selection" input type Disabled

"[Pr.117] RLS signal selection" input type Disabled

"[Pr.118] DOG signal selection" input type Disabled

"[Pr.119] STOP signal selection" input type Disabled

Parameter Settings

PA04: Function selection A-1 Servo forced stop invalid selection

1: Invalid

PC17: Function selection C-4 [MR-J4-B] Origin set condition selection

1: Servo motor Z phase passage not required after power on

PD41: Function selection D-4 [MR-J4-GF] Sensor input method selection

1: Input from controller

5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion 109

11

Synchronous control image The synchronization control image set in the box motion program example is shown below.

Synchronous control (whole image)

Film feeding axis

Travel axis Seal axisLoading conveyor

Main axis

Straight cam

Product length

Box motion cam

Output axis for main axis

Product length

Straight cam

Product length

Advanced synchronous control

500 mm

500 mm

500 mm

500 mm

500 mm 500 mm

Axis 7

Axis 8

Virtual servo for main axis positioning

Axis 8

Axis 4

Axis 14

Axis 13

Axis 3

Axis 1 Axis 2

Auxiliary axis for initial phase focusing

Auxiliary axis for mark compensation, initial phase focusing

Address clutch for No Product No Bag/No Gap No Seal

Straight cam

Product length

360 degree

Set the product length as the cam stroke length and start the virtual servo at the speed of the production quantity 360. ([products/min]) [degree/min])

Use the speed-position switching control (ABS) so that the virtual servo stops at 0 degree.

Mark sensor

Finger sensor

Mark pitch distance Seal stroke

Travel stroke

Product length

0 5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion

5

Program processing

Initial (Initial parameter setting) Set each variable's initial value and constants.

Production information parameter

Main axis control parameter

Box motion cam generation parameter

Film axis parameter

Mark compensation parameter

Conveyor axis parameter

Rotary cutter cam generation parameter

Cam monitor screen parameter

PreOperation

Each axis servo ON, home position return Perform servo ON and home position return with the switches in the servo axis setting screen displayed on the GOT.

Operation

Error reset processing Perform error reset processing with the switch in the servo axis setting screen displayed on the GOT.

5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion 111

11

JOG operation processing Specify the JOG speed and start JOG operation (forward/reverse) using the switches in the servo axis setting screen

displayed on the GOT.

Cam data generation Cam data is generated according to the values set in the box motion screen and rotary cutter screen displayed on the GOT.

Box motion

2 5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion

5

Rotary cutter

AP20-PAC002AA-R16-77MS16_BoxMotion_****.gx3

AP20-PAC002AA-R16-77GF16_BoxMotion_****.gx3

5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion 113

11

Reading data for displaying cam data Read the cam data of the box motion for the cam monitor screen displayed on the GOT.

4 5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion

5

Production start preparation Set the command velocity of the virtual servo for main axis positioning and start positioning No. using the [Start] switch in the

production screen displayed on the GOT.

Set the speed-position switching control.

AP20-PAC002AA-R16-77MS16_BoxMotion_****.gx3

AP20-PAC002AA-R16-77GF16_BoxMotion_****.gx3

Synchronous control start Execute CtrlOutputAxisSync (Output axis synchronized control) with the [Synchronization start] switch in the servo axis

setting screen displayed on the GOT.

Start synchronous control of all axes once the output axis is prepared and monitors the process during synchronous control.

5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion 115

11

Start of main axis Check that each axis has been switched to synchronous control ,and start speed-position switching control of the virtual servo

for main axis positioning.

In operation lamp will be activated.

Stop operation with the [End] switch in the production screen displayed on the GOT.

Operation stops when production ends.

Start mark compensation Check that film phase focusing is complete, and start mark compensation using the [Start compensation] switch in the mark

compensation screen displayed on the GOT.

6 5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion

5

PackagingControl

Mark compensation The amount of deviation is calculated from mark detection data of the film axis. The movement amount of the auxiliary axis is

compensated by the calculated deviation amount.

The mark detection range can be changed using the [Change request] switch in the mark compensation screen displayed on

the GOT.

The acceleration and deceleration time of the auxiliary axis setting are stored in buffer memory.

5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion 117

11

Phase focusing processing at startup of the operation Adjust the phases of the film axis, conveyor axis, and main axis according to the current values at detection of each sensor

when the operation is started (Refer to Timing for phase focusing.).

Run the travel axis and seal axis in the same phase as the main axis.

8 5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion

5

Timing for phase focusing

Adjust the phases of the conveyor and film feeding so that the finger point and film mark point on the conveyor match with the

offset point (sealing starting point) of the main axis per cycle when the main axis is started.

1 cycle length (product length): 500 mm

Offset point per cycle (sealing starting point): 100 mm

Finger point: One cycle detection point at startup (conveyor) 250 mm Compensation amount 250 mm - 100 mm = 150

mm

Mark detection point: One cycle detection point at startup (film feeding) 400 mm Compensation amount 400 mm - 100

mm = 300 mm 300 mm - 500 mm = -200 mm

500

250 Conveyor axis

500

1 cycle

0

0

0

0

[mm]

[mm]

t[s]

t[s]

t[s]

t[s]

[mm]

[mm]

Film feeding axis

Travel axis (Box motion)

Seal axis (Box motion)

Start of main axis

Finger sensor

Mark sensor

500

100

Main axis

0

[mm]

t[s]

250 400

400

150(Auxiliary axis)

0 (Auxiliary axis)

0

-200

Sealing section 1 cycle 1 cycle 1 cycle 1 cycle

Film feeding axis phase focusing completion

Conveyor axis phase focusing completion

5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion 119

12

No Product No Bag/No Gap No Seal processing This processing turns off the clutches of the travel axis, seal axis, and film feeding axis to temporarily stop them when

workpieces are not conveyed during operation or workpieces cannot be sealed because their positions are incorrect.

0 5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion

5

Timing for No Product No Bag/No Gap No Seal

HMI_IF (Touch panel I/O processing) The processing for displaying the GOT screen is performed.

Axis status monitor and lamp display

Axis error reset processing

FB error monitor

FB error reset processing

Production information setting and monitor

500

Conveyor axis

500

1 cycle

0

0

0

0

[mm]

[mm]

t[s]

t[s]

t[s]

t[s]

[mm]

[mm]

Film feeding axis

Travel axis (Box motion)

Seal axis (Box motion)

500 Main axis

0

[mm]

t[s]

1 cycle 1 cycle 1 cycle 1 cycle

No Product detection

No gap detection

Smoothing section

No Product No Bag

No Gap No Seal

5 APPLICATION PROGRAM EXAMPLE 5.1 Box Motion 121

12

5.2 Long Dwell This section describes the system configuration and program specifications of a program example for a horizontal pillow

packaging machine using the long dwell mechanism.

System configuration AP20-PAC002AA-R16-77MS8_LongDwell_****.gx3 (SSCNET/H)

*1 The end seal part has been configured with the long dwell. This application package also includes programs to generate cam patterns for using the rotary cutter.

Simple Motion module RD77MS8

Power supply module R61P

Servo amplifier MR-J4-B

PLC CPU R16CPU

GOT2000 GT27**-V

Ethernet

Axis 4Axis 3Axis 1 Axis 5

Long dwell Film feeding axisLoading conveyor axis

D-cam axis

Finger pitch

HG-KR (3000 r/min) 4194304 pulse/rev Movement amount: 100 mm/rev

HG-KR (3000 r/min) 4194304 pulse/rev Movement amount: 100 mm/rev

HG-KR (3000 r/min) 4194304 pulse/rev Movement amount: 360 degree/rev

Film mark pitch 500 mm

Production speed: 60 products/min Product length: 500 mm

HG-KR (3000 r/min) 4194304 pulse/rev

Movement amount: 360 degree/rev

500 mm

*1

Cutter axis

Mark sensor

Finger sensor

SSCNET/H

2 5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell

5

AP20-PAC002AA-R16-77GF8_LongDwell_****.gx3 (CC-Link IE Field Network)

*2 The end seal part has been configured with the long dwell. This application package also includes programs to generate cam patterns for using the rotary cutter.

Control specifications Item D-cam axis

(Long dwell) Film axis Conveyor axis Cutter axis

(Rotary cutter)

Axis No. 1 3 4 5

Unit setting 2: degree 0: mm 0: mm 2: degree

Home position return Data setting method Data setting method Data setting method Data setting method

Auxiliary axis No. 7 (Virtual) 8 (Virtual)

Cam No. 1 0 (Straight line) 0 (Straight line) 3

Clutch Address Address Address Address

Item Main axis 1 Main axis 2

Axis No. 2 (Virtual) 6 (Virtual)

Unit setting 2: degree 0: mm

Simple Motion module RD77GF8

Power supply module R61P Servo amplifier

MR-J4-GF

PLC CPU R16CPU

GOT2000 GT27**-V

Ethernet

Axis 4Axis 3Axis 1 Axis 5

Long dwell Film feeding axisLoading conveyor axis

D-cam axis

Finger pitch

HG-KR (3000 r/min) 4194304 pulse/rev Movement amount: 100 mm/rev

HG-KR (3000 r/min) 4194304 pulse/rev Movement amount: 100 mm/rev

HG-KR (3000 r/min) 4194304 pulse/rev Movement amount: 360 degree/rev

Film mark pitch 500 mm

Production speed: 60 products/min Product length: 500 mm

HG-KR (3000 r/min) 4194304 pulse/rev

Movement amount: 360 degree/rev

500 mm

*2

Cutter axis

Mark sensor

Finger sensor

CC-Link IE Field

Remote I/O module NZ2GF2B1-16D

5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell 123

12

Program configuration

Language The following languages are used in this program.

Program comment: English

Label comment: Japanese, English, Chinese (Simplified)

List of programs

FB The following table lists the FBs used in this program.

PAC_PackagingControl_R AP20-PAC002AA-R16-77MS8_LongDwell_****.gx3

*1 The FB that repeats calling in the program is set to the subroutine type. For details of the macro type and subroutine type, refer to the following. MELSEC iQ-R Programming Manual (Program Design)

AP20-PAC002AA-R16-77GF8_LongDwell_****.gx3

*1 The FB that repeats calling in the program is set to the subroutine type. For details of the macro type and subroutine type, refer to the following. MELSEC iQ-R Programming Manual (Program Design)

Program name Description Execution type Describing method

Initial Initial parameter setting Initial ST

PreOperation License activation

Preparing operation (Servo ON/OFF)

Home position return

Scan FBD

Operation Reset error

JOG operation

Cam generation

Cam data reading

Synchronous control start

Operation start/stop

Scan FBD

PackagingControl Mark compensation

Initial phase adjustment

No Product No Bag/No Gap No Seal

Event (I44) FBD

HMI_IF Touch panel I/O processing Scan ST

Item FB name Description Execution type*1 Program

Activation PAC_Activation License activation Macro type PreOperation

Cam auto-generation STD_MakeRotaryCutterCam+

RD77MS

Cam auto-generation for rotary cutter (front end

reference)

Macro type Operation

PAC_MakeLongDwellDCam Cam auto-generation for D-cam Macro type Operation

Mark compensation STD_ReadMarkDetectData Mark detection data reading Macro type PackagingControl

PAC_CalcMarkCompensation Automatic compensation calculation using mark

detection

Macro type PackagingControl

STD_CtrlAuxiliaryAxis Auxiliary axis correction Macro type PackagingControl

Item FB name Description Execution type*1 Program

Activation PAC_Activation License activation Macro type PreOperation

Cam auto-generation STD_MakeRotaryCutterCam+

RD77GF

Cam auto-generation for rotary cutter (central

reference)

Macro type Operation

PAC_MakeLongDwellDCam Cam auto-generation for D-cam Macro type Operation

Mark compensation STD_ReadMarkDetectData Mark detection data reading Macro type PackagingControl

PAC_CalcMarkCompensation Automatic compensation calculation using mark

detection

Macro type PackagingControl

STD_CtrlAuxiliaryAxis Auxiliary axis correction Macro type PackagingControl

4 5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell

5

PLCopen Motion Control PLCopen Motion Control FB library can be downloaded from the Mitsubishi Electric FA site.

*1 The FB that repeats calling in the program is set to the subroutine type. For details of the macro type and subroutine type, refer to the following. MELSEC iQ-R Programming Manual (Program Design)

Example Prg Control (Application program control)

*1 The FB that repeats calling in the program is set to the subroutine type. For details of the macro type and subroutine type, refer to the following. MELSEC iQ-R Programming Manual (Program Design)

Devices to be used AP20-PAC002AA-R16-77GF8_LongDwell_****.gx3

In this program example, a link device is used for the interface between the PLC CPU and remote I/O module (NZ2GF2B1-

16D). The device range is shown below.

Parameter Refer to the project for parameter setting details.

System parameter For system parameter setting details, refer to the following.

Page 198 List of Error Codes

Simple Motion parameter In this application program example, the following parameters are disabled.

Set the parameters for safety measures depending on the intended use.

FB name Description Execution type*1 Program

MC_Power+RD77 Operation possible (PLCopen Motion Control FB) Macro type PreOperation

MCv_Home+RD77 Home position return (PLCopen Motion Control FB) Macro type PreOperation

MC_Reset+RD77 Axis error reset (PLCopen Motion Control FB) Macro type Operation

MCv_Jog+RD77 JOG operation (PLCopen Motion Control FB) Macro type Operation

FB name Description Execution type*1 Program

CtrlOutputAxisSync Output axis synchronization control Macro type PackagingControl

ReadCamData Cam data reading Macro type Operation

Item Symbol Point Range

Link relay B 16 0 to F

Parameter Settings

[Pr.82] Forced stop valid/invalid selection Disabled

"[Pr.116] FLS signal selection" input type Disabled

"[Pr.117] RLS signal selection" input type Disabled

"[Pr.118] DOG signal selection" input type Disabled

"[Pr.119] STOP signal selection" input type Disabled

5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell 125

12

Servo parameter In this application program example, the servo amplifier input signal is not used.

Set the parameters for safety measures depending on the intended use.

Parameter Settings

PA04: Function selection A-1 Servo forced stop invalid selection

1: Invalid

PC17: Function selection C-4 [MR-J4-B] Origin set condition selection

1: Servo motor Z phase passage not required after power on

PD41: Function selection D-4 [MR-J4-GF] Sensor input method selection

1: Input from controller

6 5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell

5

Synchronous control image The synchronization control image set in the long dwell program example is shown below.

Synchronous control (whole image)

Film feeding axis

D-cam axisLoading conveyor

Main axis Output axis for main axis

Product length Product length

Advanced synchronous control

500 mm

500 mm

500 mm

500 mm

500 mm

Axis 2

Axis 6

Virtual servo for main axis positioning

Axis 6

Axis 4

Axis 8

Axis 7

Axis 3

Axis 1

Auxiliary axis for initial phase focusing

Auxiliary axis for mark compensation, initial phase focusing

Address clutch for No Product No Bag/No Gap No Seal

Straight cam

Product length

360 degree

Set the product length as the cam stroke length and start the virtual servo at the speed of the production quantity 360. ([products/min] [degree/min])

Use the speed-position switching control (ABS) so that the virtual servo stops at 0 degree.

Mark sensor

Finger sensor

Mark pitch distance

Long dwell cam

Product length

360 degree

500 mm

D-cam stroke

Straight cam Straight cam

Product length

5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell 127

12

Program processing

Initial (Initial parameter setting) Set each variable's initial value and constants.

Production information parameter

Main axis control parameter

Long dwell D-cam generation parameter

Film axis parameter

Mark compensation parameter

Conveyor axis parameter

Rotary cutter cam generation parameter

Cam monitor screen parameter

PreOperation

Each axis servo ON, home position return Perform servo ON and home position return with the switches in the servo axis setting screen displayed on the GOT.

Operation

Error reset processing Perform error reset processing with the switch in the servo axis setting screen displayed on the GOT.

8 5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell

5

JOG operation processing Specify the JOG speed and start JOG operation (forward/reverse) using the switches in the servo axis setting screen

displayed on the GOT.

Cam data generation Cam data is generated according to the values set in the long dwell and rotary cutter screen displayed on the GOT.

Long dwell

5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell 129

13

Rotary cutter

AP20-PAC002AA-R16-77MS8_LongDwell_****.gx3

AP20-PAC002AA-R16-77GF8_LongDwell_****.gx3

Reading data for displaying cam data Read the cam data of the long dwell for the cam monitor screen displayed on the GOT.

0 5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell

5

Production start preparation Set the command velocity of the virtual servo for main axis positioning and start positioning No. using the [Start] switch in the

production screen displayed on the GOT.

Set the speed-position switching control.

AP20-PAC002AA-R16-77MS8_LongDwell_****.gx3

AP20-PAC002AA-R16-77GF8_LongDwell_****.gx3

Synchronous control start Execute CtrlOutputAxisSync (Output axis synchronized control) with the [Synchronization start] switch in the servo axis

setting screen displayed on the GOT.

Start synchronous control of all axes once the output axis is prepared and monitors the process during synchronous control.

5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell 131

13

Start of main axis Check that each axis has been switched to synchronous control, and start speed-position switching control of the virtual servo

for main axis positioning.

In operation lamp will be activated.

Stop operation with the [End] switch in the production screen displayed on the GOT.

Operation stops when production ends.

Start mark compensation Check that film phase focusing is complete, and start mark compensation using the [Start compensation] switch in the mark

compensation screen displayed on the GOT.

2 5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell

5

PackagingControl

Mark compensation The amount of deviation is calculated from mark detection data of the film axis. The movement amount of the auxiliary axis is

compensated by the calculated deviation amount.

The mark detection range can be changed using the [Change request] switch in the mark compensation screen displayed on

the GOT.

The acceleration and deceleration time of the auxiliary axis setting are stored in buffer memory.

5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell 133

13

Phase focusing processing at startup of the operation Adjust the phases of the film axis, conveyor axis, and main axis according to the current values at detection of each sensor

when the operation is started. (Refer to Timing for phase focusing.)

Run the D-cam axis in the same phase as the main axis.

4 5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell

5

Timing for phase focusing

Adjust the phases of the conveyor and film feeding so that the finger point and film mark point on the conveyor match with the

offset point (synchronization starting point) of the main axis per cycle when the main axis is started.

1 cycle length (product length): 500 mm

Offset point per cycle (synchronization starting point): 149mm

Finger point: One cycle detection point at startup (conveyor) 250 mm Compensation amount 250 mm - 149mm = 101mm

Mark detection point: One cycle detection point at startup (film feeding) 400 mm Compensation amount 400 mm -

149mm = 251mm 251mm - 500 mm = -249mm

500

250 Conveyor axis

500

1 cycle

0

0

0

[mm]

[mm]

t[s]

t[s]

t[s]

[degree]

Film feeding axis

D-cam axis (Long dwell)

Start of main axis

Finger sensor

Mark sensor

500Main axis

0

[mm]

t[s]

250 400

400

101(Auxiliary axis)

0(Auxiliary axis)

0

-249

Sealing section

1 cycle 1 cycle 1 cycle 1 cycle

Film feeding axis phase focusing completion

Conveyor axis phase focusing completion

149

5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell 135

13

No Product No Bag/No Gap No Seal processing This processing turns off the clutches of the D-cam axis and film feeding axis to temporarily stop them when workpieces are

not conveyed during operation or workpieces cannot be sealed because their positions are incorrect.

Timing for No Product No Bag/No Gap No Seal

500

Conveyor axis

500

1 cycle

0

0

0

[mm]

[mm]

t[s]

t[s]

t[s]

[degree]

Film feeding axis

D-cam axis (Long dwell)

500 Main axis

0

[mm]

t[s]

1 cycle 1 cycle 1 cycle 1 cycle

No Product detection

No gap detection

No Gap No Seal

Smoothing section

No Product No Bag

6 5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell

5

HMI_IF (Touch panel I/O processing) The processing for displaying the GOT screen is performed.

Axis status monitor and lamp display

Axis error reset processing

FB error monitor

FB error reset processing

Production information setting and monitor

5 APPLICATION PROGRAM EXAMPLE 5.2 Long Dwell 137

13

5.3 Alignment Conveyor This section describes the system configuration and program specifications of the program example for the alignment

conveyor.

System configuration AP20-PAC002AA-R16-77MS16_AlignmentConveyor_****.gx3 (SSCNET/H)

Axis 4Axis 9Axis 11Axis 13 GOT2000 GT27**-V

Power supply module R61P

PLC CPU R16CPU Simple Motion module

RD77MS16 Servo amplifier

MR-J4-B

Ethernet SSCNET/H

Production speed: 60 products/min Product length: 500 mm Adjustment

conveyor sensor

Adjustment conveyor sensor

Supply conveyor

sensor Product loading sensor

Adjustment conveyor axis 2

Adjustment conveyor axis 1

Finger sensor

Supply conveyor axis

Loading conveyor axis

8 5 APPLICATION PROGRAM EXAMPLE 5.3 Alignment Conveyor

5

AP20-PAC002AA-R16-77GF16_AlignmentConveyor_****.gx3 (CC-Link IE Field Network)

Axis 4Axis 9Axis 11Axis 13 GOT2000 GT27**-V

Power supply module R61P

PLC CPU R16CPU Simple Motion module

RD77GF16

Servo amplifier MR-J4-GF

Ethernet

CC-Link IE Field

Remote I/O module NZ2GF2B1-16DProduction speed:

60 products/min Product length: 500 mm

Adjustment conveyor sensor

Adjustment conveyor sensor

Supply conveyor

sensor Product loading sensor

Adjustment conveyor axis 2

Adjustment conveyor axis 1

Supply conveyor axis

Finger sensor

Loading conveyor axis

5 APPLICATION PROGRAM EXAMPLE 5.3 Alignment Conveyor 139

14

Control specifications

Program configuration

Language The following languages are used in this program.

Program comment: English

Label comment: Japanese, English, Chinese (Simplified)

List of programs

FB The following tables list the FBs used in this program.

PAC_PackagingControl_R AP20-PAC002AA-R16-77MS16_AlignmentConveyor

AP20-PAC002AA-R16-77GF16_AlignmentConveyor

*1 The FB that repeats calling in the program is set to the subroutine type. For details of the macro type and subroutine type, refer to the following. MELSEC iQ-R Programming Manual (Program Design)

Item Work loading conveyor axis Supply conveyor axis Gap adjustment conveyor axis 1

Gap adjustment conveyor axis 2

Axis No. 4 9 11 13

Unit setting 0: mm 0: mm 0: mm 0: mm

Home position return Data setting method Data setting method Data setting method Data setting method

Auxiliary axis No. 10 (Virtual) 12 (Virtual) 14 (Virtual)

Cam No. 0 (Straight line) 0 (Straight line) 0 (Straight line)

Clutch Lock-up clutch Lock-up clutch Lock-up clutch

Item Main axis 1 Main axis 2

Axis No. 7 (Virtual) 8 (Virtual)

Unit setting 2: degree 0: mm

Program name Description Execution type Describing method

Initial Initial parameter setting Initial ST

PreOperation License activation

Preparing operation (Servo ON/OFF)

Home position return

Scan FBD

Operation Error reset

JOG operation

Synchronous control start

Operation start/stop

Scan FBD

ConveyorControl Work gap adjustment

Work loading position adjustment

Scan FBD

HMI_IF Touch panel I/O processing Scan ST

Item FB name Description Execution type*1 Program

Activation PAC_Activation License activation Macro type PreOperation

Mark compensation STD_ReadMarkDetectData Mark detection data reading Subroutine type ConveyorControl

STD_CtrlAuxiliaryAxis Auxiliary axis correction Subroutine type ConveyorControl

Alignment conveyor PAC_CalcGap Work gap adjustment compensation

amount calculation

Subroutine type ConveyorControl

PAC_CalcPhase Work loading position adjustment

compensation amount calculation

Subroutine type ConveyorControl

0 5 APPLICATION PROGRAM EXAMPLE 5.3 Alignment Conveyor

5

PLCopen Motion Control PLCopen Motion Control FB library can be downloaded from the Mitsubishi Electric FA site.

*1 The FB that repeats calling in the program is set to the subroutine type. For details of the macro type and subroutine type, refer to the following. MELSEC iQ-R Programming Manual (Program Design)

Example Prg Control (Application program control)

*1 The FB that repeats calling in the program is set to the subroutine type. For details of the macro type and subroutine type, refer to the following. MELSEC iQ-R Programming Manual (Program Design)

Parameter Refer to the project for parameter setting details.

System parameter The system parameter setting is not changed from the initial values.

Simple Motion parameter In this application program example, the following parameters are disabled.

Set the parameters for safety measures depending on the intended use.

Servo parameter In this application program example, the servo amplifier input signal is not used.

Set the parameters for safety measures depending on the intended use.

FB name Description Execution type*1 Program

MC_Power+RD77 Operation possible (PLCopen Motion Control FB) Subroutine type PreOperation

MCv_Home+RD77 Home position return (PLCopen Motion Control FB) Subroutine type PreOperation

MC_Reset+RD77 Axis error reset (PLCopen Motion Control FB) Subroutine type Operation

MCv_Jog+RD77 JOG operation (PLCopen Motion Control FB) Subroutine type Operation

FB name Description Execution type*1 Program

SaveCompensationBuffer Compensation amount buffer Subroutine type ConveyorControl

GapAdjustment Work gap adjustment Subroutine type ConveyorControl

PhaseAdjustment Work loading position adjustment Macro type ConveyorControl

Parameter Settings

[Pr.82] Forced stop valid/invalid selection Disabled

"[Pr.116] FLS signal selection" input type Disabled

"[Pr.117] RLS signal selection" input type Disabled

"[Pr.118] DOG signal selection" input type Disabled

"[Pr.119] STOP signal selection" input type Disabled

Parameter Settings

PA04: Function selection A-1 Servo forced stop invalid selection

1: Invalid

PC17: Function selection C-4 [MR-J4-B] Origin set condition selection

1: Servo motor Z phase passage not required after power on

PD41: Function selection D-4 [MR-J4-GF] Sensor input method selection

1: Input from controller

5 APPLICATION PROGRAM EXAMPLE 5.3 Alignment Conveyor 141

14

Synchronous control image The synchronization control image set in the alignment conveyor program example is shown below.

Synchronous control (whole image)

Output axis cam pattern

Axis 8 Axis 4

Axis 4

Axis 9

Axis 9

Axis 10 Axis 12

Axis 11 Axis 14 Axis13

Axis 11

For main axis control (Virtual servo)

Axis 8

Axis 7

Output axis for main axis

Advanced synchronous control

Adjustment conveyor axis 1

Adjustment conveyor axis 2

Supply conveyor axis

Loading conveyor axis

Adjustment conveyor sensor

Adjustment conveyor sensor

Supply conveyor

sensor Product loading sensor

Finger sensor

500 mm

Straight cam

Product length

360 degree

Set the product length as the cam stroke length and start the virtual servo at the speed of the production quantity 360. ([products/min]) [degree/min])

Use the speed-position switching control (ABS) so that the virtual servo stops at 0 degree.

Straight cam

500 mm Product length

500 mm Product length

All output axis cam patterns of conveyors are the same.

2 5 APPLICATION PROGRAM EXAMPLE 5.3 Alignment Conveyor

5

Program processing

Initial (Initial parameter setting) Set each variable's initial values and constants.

Production information parameter

Loading conveyor axis parameter

Supply conveyor axis parameter

Adjustment conveyor axis parameter

PreOperation

Each axis servo ON, home position return Perform servo ON and home position return with the switches in the servo axis setting screen displayed on the GOT.

Operation

Error reset processing Perform error reset processing with the switch in the servo axis setting screen displayed on the GOT.

JOG operation processing Specify the JOG speed and start JOG operation (forward/reverse) using the switches in the servo axis setting screen

displayed on the GOT.

5 APPLICATION PROGRAM EXAMPLE 5.3 Alignment Conveyor 143

14

Synchronous control start Start the synchronous control of the output axis with the [synchronization start] switch in the servo axis setting screen

displayed on the GOT, and monitor the process during synchronous control.

Production start preparation Set the command velocity of the virtual servo for main axis positioning and start positioning No. using the [Start] switch in the

production screen displayed on the GOT.

AP20-PAC002AA-R16-77MS16_AlignmentConveyor_****.gx3

Validate external command signals and execute the alignment conveyor FBs (GapAdjustment, PhaseAdjustment).

4 5 APPLICATION PROGRAM EXAMPLE 5.3 Alignment Conveyor

5

AP20-PAC002AA-R16-77GF16_AlignmentConveyor_****.gx3

5 APPLICATION PROGRAM EXAMPLE 5.3 Alignment Conveyor 145

14

Start of main axis Check that the output axis has been switched to synchronous control and that no error occurs in the alignment conveyor FBs,

and start speed control of the virtual servo for main axis positioning.

In operation lamp will be activated.

Stop the operation with the [End] switch in the production screen displayed on the GOT and end the alignment conveyor FBs.

Operation stops when production ends.

6 5 APPLICATION PROGRAM EXAMPLE 5.3 Alignment Conveyor

5

ConveyorControl

Work loading position adjustment Calculate the compensation amount so that the aligned workpieces are on the loading position of the loading conveyor. The

movement amount of the auxiliary axis is compensated by the calculated amount.

The mark detection range can be changed by using the change request switch in the mark compensation screen displayed on

the GOT.

The acceleration and deceleration time of the auxiliary axis setting are stored in buffer memory.

Operation outline

Calculate the compensation amount by detecting the workpieces with the sensor, and compensate the supply conveyor with

the auxiliary axis.

For supplying

For supplyingFor loading

Work length

Work loading position

For loading

Compensation amount including the work loading position

Distance between sensor and supply conveyor end

First work detection position

500

500 500 500 500 500 500 500

150

1) 2)

1) 2) 3) 4) 5) 6) 7)

2) 1) 1)3) 2)

Feeding conveyor work position

Feeding to loading conveyor

Current value per cycle of supply conveyor

Current value per cycle of loading conveyor

Cam axis length per cycle

Sensor position

Work loading position

5 APPLICATION PROGRAM EXAMPLE 5.3 Alignment Conveyor 147

14

Work gap adjustment Calculate the compensation amount so that the workpieces are equally spaced. The movement amount of the auxiliary axis is

compensated with the calculated amount.

The mark detection range can be changed by using the change request switch in the mark compensation screen displayed on

the GOT.

The acceleration and deceleration time of the auxiliary axis setting are stored in buffer memory.

Operation outline

Calculate the compensation amount by detecting the workpieces with the sensor, and compensate each gap adjustment

conveyor with the auxiliary axis.

Work position (before alignment)

500

Work position (after alignment)

2) Compensation starting point = Sensor position + Work length

3) Compensation starting point

1) 3)

3)2)1)

Current value per cycle of supply conveyor

Current value per cycle of gap adjustment conveyor

2) 4)

8 5 APPLICATION PROGRAM EXAMPLE 5.3 Alignment Conveyor

5

Acquire the mark detection data with STD_ReadMarkDetectData, and calculate the compensation amount and

compensation starting position with PAC_CalcGap and PAC_CalcPhase.

The calculated compensation amount and compensation starting position are buffered with SaveCompensationBuffer, and

the compensation amount is output when the compensation starting position is exceeded.

The output compensation amount is input as the movement amount of STD_CtrlAuxiliaryAxis, and the positioning of the

auxiliary axis is performed.

HMI_IF (Touch panel I/O processing) The I/O processing for displaying the GOT screen is performed.

Axis status monitor and lamp display

Error reset processing

FB error monitor

Production amount monitor

Troubleshooting of the alignment conveyor Error details Cause Corrective action

The space between workpieces is narrow after the

adjustment.

Compensation does not complete by the time a

workpiece is loaded on the rear conveyor due to a

large compensation amount.

Adjust the maximum compensation amount so that

the compensation completes by the time a

workpiece is loaded on the rear conveyor.

The difference between the compensation amount

and maximum compensation amount will be

discarded. Align the workpieces on the rear

conveyors.

A workpiece is not loaded to the intended position

on the loading conveyor.

Two or more workpieces are detected in one cycle

of the loading conveyor.

Align the workpieces on the supply conveyor so

that a workpiece is detected in one cycle of the

loading conveyor.

The next workpiece is detected before the

compensation of a workpiece completes.

Adjust the space between workpieces and sensor

position not to detect the next workpiece before a

workpiece is detected and compensation is

completed.

A workpiece touches the front workpiece. The mark detection data is significantly delayed

from the cam axis current value per cycle.

If the mark detection data is delayed from the

actual detection position, minimize the delay by

setting the gain tuning of the servo and "[Pr.801]

Mark detection signal compensation time".

Set "[Pr.801] Mark detection signal compensation

time" so that the mark detection data does not

precede the cam axis current value per cycle.

Two workpieces are loaded between fingers on the

loading conveyor.

5 APPLICATION PROGRAM EXAMPLE 5.3 Alignment Conveyor 149

15

5.4 Application Program Control FBs

ReadCamData (Cam data reading)

Name ReadCamData

Function overview

Item Description

Function overview This FB reads cam data so that the cam outline of the cam No. specified from the Simple Motion module can be recognized.

Symbol

Applicable hardware and

software

Applicable module RD77MS, RD77GF

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 1421 steps

FB dependence

Function description This FB reads the cam data to be displayed on the application screen example of the GOT (cam monitor screen) from the Simple

Motion module.

Turning on i_bEN (Execution command) starts reading of cam data of a specified i_uCamNo (Cam No.).

This FB reads cam data in the cam open area using "[Cd.600] Cam data operation request" of the Simple Motion module and

reads "[Cd.605] Cam resolution" and "[Cd.607] Cam data value" (128 points) in the read cam data.

After reading of cam data is completed and the output label is updated, o_bOK (Normal completion) turns on.

If an error has occurred in the FB, Error turns on and an error code is stored in ErrorID.

For details of error codes, refer to "Page 198 List of Error Codes".

Restrictions and

precautions

This FB uses the index register Z18 to Z19. When using interrupt programs, do not use this index register in the interrupt programs.

Compiling method Macro type, subroutine type

FB operation type Pulsed execution (multiple scan execution type)

Execution command B: i_bEN

o_dMinInVal :D Minimum input value

o_dMaxInVal :D Maximum input value

o_stCamData :DUT Cam data

o_dMinOutVal :D Minimum output value

o_dMaxOutVal :D Maximum output value

o_bENO :B Execution status

Start I/O number UW: i_uStartIO o_bOK :B Normal completion

Cam No. UW: i_uCamNo o_bError :B Error completion

o_uErrorID :UW Error code

o_uCamResolution :UW Cam resolution

ReadCamData

Stroke

100 [%]

360 [degree]

0 1 cycle

100 [%]

360 [degree]

0 1 cycle

Maximum output value (o)

Stroke[Cd.605] Cam resolution 128 points

[Cd.600]

[Cd.607] Cam data value (cam open area) Cam outline data

Maximum input value (o)

Minimum input value (o)

Minimum output value (o)

Cam data operation request

0 5 APPLICATION PROGRAM EXAMPLE 5.4 Application Program Control FBs

5

Labels

Input labels

*1 : Always, : When the FB is started (cannot be changed)

Output labels

Cam data (CamData structure)

*1 : The value will be held after the FB stops. : The value will be cleared after the FB stops.

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit On, off On: The FB is activated.

Off: The FB is not activated.

Start I/O

number

i_uStartIO Word

[Unsigned]

0H Start I/O number FEH 0 Installation address of the Simple Motion

module (Upper three digits of four digits

(hexadecimal))

Cam No. i_uCamNo Word

[Unsigned]

1 Cam No. 256 1 Set the cam No. to read data.

1 to 256: Generation cam

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit On: Execution command is on.

Off: Execution command is off.

Normal completion o_bOK Bit On: Reading of cam data has been completed and

the output data has been updated normally.

Off: The operation of the FB has not been

completed.

Error completion o_bError Bit On: An error has occurred in the FB.

Off: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the

FB is stored.

Cam resolution o_uCamResolution Word [Unsigned] The cam resolution of the read cam is stored.

Minimum input

value

o_dMinInVal Double word [Signed] The minimum value of the cam data input value

(Cam axis length per cycle) is stored.

Maximum input

value

o_dMaxInVal Double word [Signed] The maximum value of the cam data input value

(Cam axis length per cycle) is stored.

Minimum output

value

o_dMinOutVal Double word [Signed] The minimum value of the cam data output value

(Cam stroke amount) is stored.

Maximum output

value

o_dMaxOutVal Double word [Signed] The maximum value of the cam data output value

(Cam stroke amount) is stored.

Cam data o_stCamData CamData Refer to the cam data below.

Name Label name Array No. Data type Value to be held*1

Description

Input value

(Cycle point)

d128InVal_Cycle [0] Double word

[Signed] (0..127)

The first point of the input value (Cam axis length per

cycle) is stored.

[1] The second point of the input value (Cam axis length per

cycle) is stored.

[127] The 128th point of the input value (Cam axis length per

cycle) is stored.

Output value

(Stroke amount)

d128OutVal_Stroke [0] Double word

[Signed] (0..127)

The first point of the output value (Cam stroke amount) is

stored.

[1] The second point of the output value (Cam stroke

amount) is stored.

[127] The 128th point of the output value (Cam stroke amount)

is stored.

5 APPLICATION PROGRAM EXAMPLE 5.4 Application Program Control FBs 151

15

CtrlOutputAxisSync (Output axis synchronization control)

Name CtrlOutputAxisSync

Function overview

Item Description

Function overview This FB controls the output axis synchronized with the master axis.

Symbol

Applicable hardware and

software

Applicable module RD77MS, RD77GF

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 1581 steps

FB dependence

Execution command B: i_bEN o_bENO :B Execution status

Synchronization command B: i_bSyncCommand o_bOK :B Normal completion

Cam No. UW: i_uCamNo o_bError :B Error completion

Waiting point E: i_eWaitingPos o_uErrorID :UW Error code

1 cycle length E: i_eLengthPerCycle

Cam stroke amount E: i_eStrokeAmount

Clutch ON smoothing amount E: i_eClutchOnSmoothingAmount

Clutch OFF smoothing amount E: i_eClutchOffSmoothingAmount

o_bInSync :B In synchronization

Output axis setting DUT: i_stOutputAxis

CtrlOutputAxisSync

2 5 APPLICATION PROGRAM EXAMPLE 5.4 Application Program Control FBs

5

Function description This FB controls the output axis by synchronizing the cam created by the cam generation FB with the main input axis.

When the current value of the main input axis per cycle is equal to the value of i_eWaitingPos (Waiting point) and

i_bSyncCommand (Synchronization command) is on, the clutch turns on from i_eWaitingPos (Waiting point).

When the current value of the main input axis per cycle is equal to the value of i_eWaitingPos (Waiting point) and

i_bSyncCommand (Synchronization command) is off, the clutch turns off from i_eWaitingPos (Waiting point).

The output axis movement amount delays from the main input axis movement amount by i_eClutchOnSmoothingAmount (Clutch

ON smoothing amount) and moves by i_eClutchOffSmoothingAmount (Clutch OFF smoothing amount). Change the waiting

point as needed.

When the clutch turns on during synchronous control, o_bInSync (In synchronization) turns on.

Sample data

Cam axis current value per cycle: 1000

Cam stroke amount: 200

Cam type: Straight cam

Clutch ON/OFF timing

If an error has occurred in the FB, Error turns on and an error code is stored in ErrorID.

For details of error codes, refer to "Page 198 List of Error Codes".

Item Description

Cycle times (o)

In synchronization (o)

Execution command (i)

Execution status (o)

Normal completion (o)

Synchronization command (i)

During synchronous control

900700 800500 600100 200 300 400

900700 800500 600

600

0

500

100

200

300

400

1000

200

400

600

800

100 200 300 4000 t[ms]

t[ms]

After main shaft gear

Output axis

* 321

[Md.420] Main shaft clutch ON/OFF status

Waiting point (i)

700500 600100 200 300 400

100

0

200

100

200

Main input axis

Synchronous position

Clutch ON smoothing amount Delay by smoothing amount

Clutch OFF smoothing amount Advance by smoothing amount

700600500100 200 4003000

Output axis stop position

Output axis speed

(o) Output label

t[ms]

t[ms]

* (i) Input labelClutch ON point waiting point (i)

Clutch OFF point waiting point (i)

5 APPLICATION PROGRAM EXAMPLE 5.4 Application Program Control FBs 153

15

*1 For details of the synchronous control parameters and control data, refer to the following. MELSEC iQ-R Simple Motion Module User's Manual (Advanced Synchronous Control)

Labels

Input labels

Restrictions and

precautions

Execute this FB in the Simple Motion calculation cycle event task (I44: Inter-module synchronization).

If parameters has been set as below, this FB is executed with the unit [mm].

"[Pr.1] Unit setting": Other than 0 to 3

"[Pr.300] Servo input axis type": Other than 1 to 4

Control unit of "[Pr.321] Synchronous encoder axis unit setting": Other than 0 to 3

"[Pr.400] Main input axis type": 1 to the maximum number of module axes (servo input axis), other than 801 to 800 + maximum

number of module axes (synchronous encoder)

Set the parameters of the "input axis module" used in the synchronous control according to the machine mechanism.

Servo input axis parameters: [Pr.300] to [Pr.304]

Synchronous encoder axis parameters: [Pr.320] to [Pr.329]

Since the following synchronous parameters used in the synchronous control are set in this FB, input labels, or structure, do not

use user programs to set or change them.

"[Pr.405] to [Pr.407], [Pr.409], [Pr.411], [Pr.413], [Pr.414], [Pr.439] to [Pr.441]"

To use synchronous parameters in a machanism, set synchronous encoder axis control data ([Cd.320] to [Cd.325]) by users.

This FB performs the main axis clutch control in the address mode and switches the on/off state of the main clutch by changing

"[Pr.405] Main shaft clutch control setting".

Setting value of [Pr.405] at clutch ON: H0004

Setting value of [Pr.405] at clutch OFF: H0042

This FB use the slippage method (Linear: Input value follow up) as the clutch smoothing method ([Pr.411] = 5).

Create "[Cd.380] Synchronous control start" with user programs.*1

When Execution command turns off while o_bInSync (In synchronization) is on, the FB turns off the output of o_bInSync while

holding the on state of the clutch.

Set i_eWaitingPos (Waiting point) not to overlap the synchronous section of the main input axis and output axis.

Compiling method Macro type, subroutine type

FB operation type Real-time execution

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit On, off On: The FB is activated.

Off: The FB is not activated.

Synchronization

command

i_bSyncComman

d

Bit On, off Enable the main axis clutch control.

On: The clutch turns on from the waiting

point.

Off: The clutch turns off to stop at the

waiting point.

Cam No. i_uCamNo Word

[Unsigned]

0 Cam No. 256 1 Set the cam No. of the cam to be used for

the output axis.

0: Straight cam

1 to 256: Generation cam

Waiting point i_eWaitingPos Single

precision

real number

Refer to the description. 0.0 Set the point where the address clutch

turns on or off to the current value per

cycle after main shaft gear.

0.0 Waiting point 100000.0 [mm]

0.00 Waiting point 10000.00 [inch]

0.00 Waiting point 10000.00

[degree]

0 Waiting point 9999999 [pulse]

[The unit setting depends on the axis No.

setting value in the output axis setting.]

1 cycle length i_eLengthPerCycl

e

Single

precision

real number

Refer to the description. 200.0 Set the 1 cycle length of the cam axis.

0.1 1 cycle length 100000.0 [mm]

0.01 1 cycle length 10000.00 [inch]

0.01 1 cycle length 10000.00

[degree]

1 1 cycle length 9999999 [pulse]

[The unit setting depends on the axis No.

setting value in the output axis setting.]

Item Description

4 5 APPLICATION PROGRAM EXAMPLE 5.4 Application Program Control FBs

5

Output axis setting (AXIS_REF structure)

*1 : Always, : When the FB is started (cannot be changed)

Cam stroke

amount

i_eStrokeAmount Single

precision

real number

Refer to the description. 200.0 Set the cam stroke amount

corresponding to 100% of the stroke ratio

in units of the output axis for the cam

control in the stroke ratio data format.

(For the cam data in the coordinate data

format, an output value of coordinate data

will be a cam stroke position.)

0.1 Cam stroke amount 100000.0

[mm]

0.01 Cam stroke amount 10000.00

[inch]

0.01 Cam stroke amount 10000.00

[degree]

1 Cam stroke amount 9999999

[pulse]

[The unit setting depends on the axis No.

setting value in the output axis setting.]

Clutch ON

smoothing

amount

i_eClutchOnSmo

othingAmount

Single

precision

real number

Refer to the description. 0.0 Set the smoothing amount when the

clutch is on.

0.0 Clutch ON smoothing amount

100000.0 [mm]

0.00 Clutch ON smoothing amount

10000.00 [inch]

0.00 Clutch ON smoothing amount

10000.00 [degree]

0 Clutch ON smoothing amount

9999999 [pulse]

[The unit setting depends on the axis No.

setting value in the output axis setting.]

Clutch OFF

smoothing

amount

i_eClutchOffSmo

othingAmount

Single

precision

real number

Refer to the description. 0.0 Set the smoothing amount when the

clutch is off.

0.0 Clutch OFF smoothing amount

100000.0 [mm]

0.00 Clutch OFF smoothing amount

10000.00 [inch]

0.00 Clutch OFF smoothing amount

10000.00 [degree]

0 Clutch OFF smoothing amount

9999999 [pulse]

[The unit setting depends on the axis No.

setting value in the output axis setting.]

Output axis

setting

i_stOutputAxis AXIS_REF Refer to the output axis setting below.

Name Label name Data type Read timing *1

Setting range

Initial value

Description

Axis number AxisNo Word [Unsigned] 1 Axis No.

maximum

number of

axes of the

module used

Set the axis No. of the output axis.

The unit setting of the main input axis that drives

the output axis is also used for the 1 cycle length

and the clutch ON/OFF smoothing amount.

The unit setting of the set axis No. is also used for

the cam stroke amount.

Start I/O number StartIO Word [Unsigned] 0H Start I/

O number

FEH

0 Installation address of the Simple Motion module

(Upper three digits of four digits (hexadecimal))

Name Label name Data type Read timing*1

Setting range Initial value

Description

5 APPLICATION PROGRAM EXAMPLE 5.4 Application Program Control FBs 155

15

Output labels

*1 : The value will be held after the FB stops. : The value will be cleared after the FB stops.

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit On: Execution command is on.

Off: Execution command is off.

Normal completion o_bOK Bit This label indicates that the FB has normally started.

Error completion o_bError Bit On: An error has occurred in the FB.

Off: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the

FB is stored.

In synchronization o_bInSync Bit On: The clutch turns on during synchronous control.

Off: The clutch turns off during synchronous control.

6 5 APPLICATION PROGRAM EXAMPLE 5.4 Application Program Control FBs

5

SaveCompensationBuffer (Compensation amount buffer)

Name SaveCompensationBuffer

Function details

Item Description

Function overview This FB stores the input compensation amount and compensation starting point temporarily, and outputs the oldest compensation

amount when the axis specified with the output axis setting exceeds the compensation starting point.

Symbol

Applicable hardware and

software

Applicable module RD77MS, RD77GF

Applicable CPU MELSEC iQ-R series

Engineering software GX Works3

Number of steps 837 steps

FB dependence

Function description This FB stores the input compensation amount and compensation starting point temporarily, and outputs the oldest compensation

amount in the stored ones when the compensation starting point is exceeded by the axis set in the output axis setting.

After i_bEN (Execution command) is turned on, i_dCompensationAmount (Compensation amount) and

i_dCompensationStartPosition (Compensation starting point) when i_uMarkDetectCount (Mark detection counts) is changed is

stored in the position of the buffer pointer for storing.

When "[Md.407] Cam axis current value per cycle" exceeds the compensation starting point, the compensation amount stored in

the position of the buffer pointer for storing is output.

Operation when the maximum storage number is 4

If an error has occurred in the FB, Error turns on and the error code is stored in ErrorID.

Refer to "Page 198 List of Error Codes" for details of error codes.

Restrictions and

precautions

To change the maximum storage number, change the number of arrangements for stnBufferData (buffer data) which is a local

label of this FB and the value of dBufferNum (maximum storage number) in the program.

Adjust the maximum storage number using the maximum number of workpieces to be loaded on a single conveyor as reference.

Compiling method Macro type, subroutine type

FB operation type Real-time execution

Execution command

Compensation amount

Compensation starting point

Mark detection counts

Output axis setting Output axis setting

Execution status

Executing

Error completion

Error code

Compensation amount

B: i_bEN

D: i_dCompensationAmount

D: i_dCompensationStartPosition

UW: i_uMarkDetectCount

DUT: io_stOutputAxis

o_bENO :B

o_bBusy :B

o_bError :B

o_uErrorID :B

o_dCompensationAmount :D

io_stOutputAxis :DUT

SaveCompensationBuffer

Compensation amount

Compensation starting point

Buffer pointer for storage

Buffer pointer for output

Compensation amount output 0 -20 -10 20

Mark detection counts 0 1 3 4 5 62

: Compensation starting point

30

0 1

0 0 -10 20 30 -10-20

0 01305 300 320 350330

0 2 3 0 11

2 3 0 1

0

[Md.407] Cam axis current value per cycle

5 APPLICATION PROGRAM EXAMPLE 5.4 Application Program Control FBs 157

15

Labels

Input labels

*1 : Always, : When the FB is started (cannot be changed)

Output labels

*1 : The value will be held after the FB stops. : The value will be cleared after the FB stops.

I/O labels

Output axis setting (AXIS_REF structure)

Name Label name Data type Read timing*1

Setting range Initial value

Description

Execution

command

i_bEN Bit ON, OFF ON: The FB is activated.

OFF: The FB is not activated.

Compensation

amount

i_dCompensationA

mount

Double word

[Signed]

-2147483648

Compensation amount

2147483647

0 Enter the output value from the

compensation amount calculation FB

(PAC_CalcGap or PAC_CalcPhase).Compensation

starting point

i_dCompensationS

tartPosition

Double word

[Signed]

0

Mark detection

counts

i_uMarkDetectCou

nt

Word

[Unsigned]

0 Mark detection counts

65535 [times]

(Ring counter)

0 Enter o_uMarkDetectCount (Mark detection

counts) of STD_ReadMarkDetectDataFB.

A compensation amount is calculated at

updating this data.

Name Label name Data type Value to be held*1

Description

Execution status o_bENO Bit ON: Execution command is on.

OFF: Execution command is off.

Executing o_bBusy Bit This label indicates that the FB is operating.

Error completion o_bError Bit ON: An error has occurred in the FB.

OFF: No error has occurred.

Error code o_uErrorID Word [Unsigned] The error code of the error that has occurred in the FB

is stored.

Compensation amount o_dCompensationAmount Double word [Signed] The oldest stored compensation amount is stored.

Data range: -2147483648 Compensation amount

2147483647

[The unit setting depends on the axis No. setting value

of the output axis setting.]

(10-4 mm, 10-5 inch, 10-5 degree, pulse)

Name Label name Data type Read timing*1

Setting range Initial value

Description

Output axis

setting

io_stOutputAxis AXIS_REF Refer to the output axis setting below.

Name Label name Data type Read timing*1

Setting range Initial value

Description

Axis No. AxisNo Word [Unsigned] 1 Axis No. Maximum

number of axes of the

module used

Set the axis No. of the output axis.

"[Md.407] Cam axis current value per cycle"

of the output axis is referred.

Start I/O

number

StartIO Word [Unsigned] 0H Start I/O number

FEH

Installation address of the Simple Motion

module (Upper three digits of four digits

(hexadecimal))

8 5 APPLICATION PROGRAM EXAMPLE 5.4 Application Program Control FBs

5

Buffer data (BufferData structure)

*1 : Always, : When the FB is started (cannot be changed) *2 : The value will be held after the FB stops. : The value will be cleared after the FB stops.

Name Label name Data type Value to be held*2

Description

Compensation amount dCompensationAmount Double word [Signed] The value of i_dCompensationAmount is stored.

Compensation starting

point

dCompensationStartPosition Double word [Signed] The value of i_dCompensationStartPosition is

converted into the value per cycle and stored.

The number of cycles

until compensation

uCyclesTillCompensation Word [Unsigned] The number of cycles required until the compensation

starts is calculated from the value of

i_dCompensationStartPosition.

Cycle counter value uCycleCounterValue Word [Unsigned] The cycle counter value (uCycleCounter) when the

mark detection counts is changed is stored.

5 APPLICATION PROGRAM EXAMPLE 5.4 Application Program Control FBs 159

16

5.5 Application Program Example: Operation Procedure

Start the operation with the following procedure.

(For the function details of windows, refer to "Page 162 GOT APPLICATION SCREEN EXAMPLES".) 1. Write project data to the PLC CPU and

GOT and start the system. Touch [Servo

axis setting] to display the servo axis

setting screen.

2. Touch the [All axes servo ON] switch. All

axes are in the servo-on status.

3. When this is the first startup of the system,

touch the [Home position return] switch of

each axis and perform home position

return operations.

0 5 APPLICATION PROGRAM EXAMPLE 5.5 Application Program Example: Operation Procedure

5

4. Touch the [Synchronization start] switch.

Turning on the synchronization start switch

turns each axis to the synchronous control

mode. (Caution: Generate a came in the

equipment menu before turning the

[Synchronization start] switch ON. Cam

generation is not required for the alignment

conveyor project.)

5. Switch the screen to the production screen.

(Precautions: In the project for the

alignment conveyor, the product length is

set to the length per cycle as default. Even

if the product length is changed, the set

value is ignored. The "Production amount

monitor" counts the number of updated

times of the loading conveyor length per

cycle, not the actual production amount.)

6. Touch the [Start] switch and start the

operation at the set speed.

7. The operation stops when the [End] switch

is touched or the target production amount

is reached. (Cycle stop: For the box

motion, the travel axis and seal axis stop at

the waiting position. For the long dwell, the

D-cam axis stops at the waiting position.

For the alignment conveyor, the conveyor

axis stops immediately.)

When the [End] switch is touched, or the target

production amount is reached

5 APPLICATION PROGRAM EXAMPLE 5.5 Application Program Example: Operation Procedure 161

16

6 GOT APPLICATION SCREEN EXAMPLES

Precautions

To utilize these screen examples for an actual system, sufficiently confirm that the screens will not cause system control

problems on user's own responsibility. Examine the positions where interlock conditions are required in a target system and

add them.

When the Simple Motion module detects an error or warning in this sample program, the operation suspends control.

To use the program with unnecessary screens erased, change the screen number of the switching destination screen as

necessary.

There are slight differences in color and layout between the actual screens and the screens described in this manual.

2 6 GOT APPLICATION SCREEN EXAMPLES

6

6.1 Screen Layout

Screen transition (All screens) The following shows the screen transition of all screens.

When a GOT is started, the start logo screen appears first. For details, refer to "Page 170 Start logo screen".

After the start logo screen has appeared, the Home screen appears. However, when the GOT is started for the first time,

the Language Setting window screen appears after the start logo screen has appeared. For details of the operation of when

the GOT is started for the first time, refer to "Page 170 Operation to be performed when the GOT is started for the first

time".

For the screen transition common in all screens, refer to "Page 164 Screen transition (Common)".

When a window screen has been displayed and the screen is switched to another main screen, the window

screen will be closed and switched to the touched main screen.

Box motion Cam monitor Mark compensation

Start logo screen

Home screen

Axis setting 1 Axis setting 2

Rotary cutter (Front end reference)

Rotary cutter (Central reference) Long dwell

Axis setting 3

Equipment menu

Servo axis setting

Production screen

Alignment conveyor 1

Alignment conveyor 2

Alignment conveyor 3

Axis setting 4

6 GOT APPLICATION SCREEN EXAMPLES 6.1 Screen Layout 163

16

Screen transition (Common) The following shows the screen transition common in all screens.

Touching the globe mark switch displays the Language Setting window screen for language switching.

Touching the date and time display area displays the Clock Setting window screen.

When a GOT system alarm has occurred, touching the system alarm message display area that is to be displayed at the

bottom of the screen displays the GOT system alarm reset window screen.

System alarm message display area

GOT system alarm reset

Language Setting

Clock Setting

4 6 GOT APPLICATION SCREEN EXAMPLES 6.1 Screen Layout

6

6.2 Basic Screen Layout The following shows the basic layout of a main screen.

(1) Title display area

Displays the title bar.

For details, refer to "Page 167 Title bar".

(2) Date and time display area

Displays the current date (upper side) and time (lower side). Touching this display area displays the Clock Setting window

screen.

For details of the Clock Setting window screen, refer to "Page 170 Clock Setting window screen".

(3) Language setting area

Touching the globe mark switch displays the Language Setting window screen.

For details of the Language Setting window screen, refer to "Page 169 Language Setting window screen".

(4) Function area

Displays the screen of each function.

For details, refer to "Page 171 Base Screen".

(5) Main menu display area

Displays the screen transition switches to display each main screen.

For details of the main menu switches, refer to "Page 167 Main menu".

(6) Sub menu display area

Displays the screen transition switches to display each sub screen.

For details of the sub menu switches, refer to "Page 168 Sub menu".

(7) System alarm message display area

When a GOT system alarm occurs, a system alarm is displayed overlapping the bottom of the screen that is being displayed.

For details of the GOT system alarms, refer to "Page 168 GOT system alarm".

(4) Function area

(1) Title display area

(7) System alarm message display area

(5) Main menu display area

(6) Sub menu display area

(2) Date and time display area

(3) Language setting area

6 GOT APPLICATION SCREEN EXAMPLES 6.2 Basic Screen Layout 165

16

6.3 Description of Common Items

Descriptions of character colors The following table lists colors used for numerical values and characters displayed as setting values or current values.

Switch The following table lists switches used in common.

Key window Use the following user creation key windows for inputting numerical values.

Numerical value input (Decimal key window) Numerical values can be input using the numeric keypad. The input range is displayed at the bottom of the input value area.

Character colors

Background colors

Description Application example

White Black Displays target data values. The values can be changed using the

key windows to be displayed when the display area is touched.

Black Displays target data values. The values cannot be changed.

Display Details

Touch this switch to display the Language Setting window screen.

Touch this switch to display the Clock Setting window screen.

Object Type of key window Window screen

Numerical value input Decimal key window W-30010

6 6 GOT APPLICATION SCREEN EXAMPLES 6.3 Description of Common Items

6

Title bar The title bar is displayed as follows in all screens.

The title of the currently-displayed screen is displayed in (1).

The date and time are displayed in (2). When the date and time display area is touched, the Clock Setting window screen

appears. On the window screen, year, month, date, hour, minute, and second can be changed. For details of the Clock

Setting window screen, refer to "Page 170 Clock Setting window screen".

Touching the globe mark switch in (3) displays the Language Setting window screen. The display language can be

switched. For details of the Language Setting window screen, refer to "Page 169 Language Setting window screen".

Main menu Touching a switch with a main screen name jumps to the corresponding screen. The blue switch indicates the screen being

displayed.

Switch Description

Touch this switch to return to the home screen.

Touch this switch to jump to each screen.

When a switch other than the one of the screen being displayed is touched, the switch color changes to blue and the

screen of the touched switch is displayed.

Touch this switch to return to the previous screen.

Up to 10 previous screens are kept in the screen history.

(1) (3)(2)

6 GOT APPLICATION SCREEN EXAMPLES 6.3 Description of Common Items 167

16

Sub menu After switching to the equipment menu screen, touching a switch with a sub screen name jumps to the corresponding screen.

The blue switch indicates the screen being displayed.

GOT system alarm If a GOT system alarm has occurred, a system alarm message is popped up at the bottom of the screen as follows. The

system alarm message is displayed running from right to left of the screen at a low speed in the order of the occurrence date

and time, comment, and detailed information.

The GOT system alarm message is displayed in the language set in the Language Setting window screen. However, if no

PLC CPU has been connected or the PLC CPU is off when the GOT is started, a GOT system alarm message is displayed in

English.

When a system alarm has occurred, touching the system alarm message display area displays the GOT system alarm reset

window screen.

Touch the [OK] switch when you reset the system alarm. The system alarm that cannot be reset is not cleared even though

the [OK] switch is touched.

Touch the [Cancel] switch when you do not reset the system alarm.

Even though the main screen is switched while the GOT system alarm reset window screen is being displayed, the GOT

system alarm reset window screen is not closed but still displayed.

Switch Description

Touch this switch to jump to each screen.

When a switch other than the one of the screen being displayed is touched, the switch color changes to blue and the

screen of the touched switch is displayed.

8 6 GOT APPLICATION SCREEN EXAMPLES 6.3 Description of Common Items

6

Window screens common in all screens The following explains window screens common in all screens.

Language Setting window screen Switches the language displayed in the screen.

(1) Touch this switch to switch the language to Japanese.

(2) Touch this switch to switch the language to English.

(3) Touch this switch to switch the language to Chinese (Simplified).

While the Language Setting window screen is being displayed, switches in the main screen cannot be

operated.

(1)

(3)

(2)

6 GOT APPLICATION SCREEN EXAMPLES 6.3 Description of Common Items 169

17

Clock Setting window screen Changes the current date and time.

(1) Date/time data addition switch

Touching an addition switch (year, month, date, hour, minute, second) adds one to each value.

(2) Date and time setting

Sets the date and time (year, month, date, hour, minute, and second).

The following shows the input range of each item.

Year: 2000 to 2099, Month: 01 to 12, Date: 01 to 31

Hour: 00 to 23, Minute: 00 to 59, Second: 00 to 59

(3) Date/time data subtraction switch

Touching a subtraction switch (year, month, date, hour, minute, and second) subtracts one from each value.

(4) 0 Set switch

Sets 0 for second.

(5) [Set] switch

Touching this switch sets the current date and time and closes the window screen.

(6) [Cancel] switch

Touching this switch closes the window screen without reflecting the set date and time.

If setting the date and time that does not exist in the date and time setting (Ex: 2015/2/30) is attempted,

touching the [Set] switch closes the window screen without reflecting the set date and time. At that time, a

GOT system alarm occurs and "Clock data input out of range" is displayed in the system alarm message

display area.

6.4 When the GOT is Started

Start logo screen In the start logo screen that is to be displayed when the GOT is started, the iQ Monozukuri logo appears at the center of the

screen.

Operation to be performed when the GOT is started for the first time When the GOT is started for the first time, the Language Setting window screen appears after the start logo screen has

appeared. Select a language.

For details of the Language Setting window screen, refer to "Page 169 Language Setting window screen".

(3)

(1)

(2)

(4)

(5) (6)

0 6 GOT APPLICATION SCREEN EXAMPLES 6.4 When the GOT is Started

6

6.5 Base Screen The following table lists base screens.

Screen No. Screen title Description Reference

30000 Home Home screen Page 172

30050 Header Title bar Page 167

30051 Footer Main menu Page 167

30061 Sub menu 1 Sub menu Page 168

30100 Rotary cutter(Front end) Rotary cutter (Front end reference) screen Page 173

30101 Rotary cutter(Central) Rotary cutter (Central reference) screen Page 175

30110 Box motion Box motion screen Page 177

30111 Long dwell Long dwell screen Page 180

30120 Cam monitor Cam monitor screen Page 182

30130 Mark compensation Mark compensation screen Page 183

30140 Alignment conveyor 1 Alignment conveyor 1 Page 186

30141 Alignment conveyor 2 Alignment conveyor 2 Page 186

30142 Alignment conveyor 3 Alignment conveyor 3 Page 186

30200 Servo axis setting 1 Servo axis setting 1 screen Page 190

30201 Servo axis setting 2 Servo axis setting 2 screen Page 190

30202 Servo axis setting 3 Servo axis setting 3 screen Page 190

30203 Servo axis setting 4 Servo axis setting 4 screen Page 190

30300 Production screen Production screen Page 194

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 171

17

Home screen After the GOT is started, the Home screen appears first. Touch a switch to switch the screen to each screen.

(1) Title bar

In the Home screen, the application package name, "PACKAGING" is displayed at the center of the title bar.

(2) Equipment menu switch

Touch this switch to switch the screen to the "Rotary cutter (Front end reference)" screen.

(3) Servo axis setting switch

Touch this switch to switch the screen to the "Servo axis setting 1" screen.

(4) Production screen switch

Touch this switch to switch the screen to the "Production screen".

(4)

(3)

(2)

(1)

2 6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen

6

Equipment menu Rotary cutter (Front end reference) screen Set parameters to generate cam patterns for the rotary cutter (front end reference).

Only Simple Motion module RD77MS is compatible with the rotary cutter (front end reference).

Rotary cutter (Front end reference) cam setting (1) Cam No.

Sets the number of the cam to be generated for the rotary cutter (front end reference).

(2) Cam resolution

Sets the cam resolution to be generated for the rotary cutter (front end reference).

(3) Synchronous axis cycle length

Set the cycle length of the rotary cutter (front end reference).

(4) Sheet length

Set the sheet length (cutting length).

(5) Sheet synchronization width

Set the synchronization length of the sheet.

(6) Synchronization starting point

Set the length between the start of the sheet and synchronization start section.

(7) Synchronous section acceleration ratio

Set this item when the fine adjustment of the synchronous speed in the synchronous section is required.

"Synchronous section speed = Synchronous speed (100% + Acceleration ratio)"

(4)

(3)

(7) (6)

(5)

(2)

(10)

(1)

(9)

(8)

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 173

17

Rotary cutter (Front end reference) cam generation (8) Cam generation switch

Touching this switch generates cam data according to the setting values on the screen.

(9) Function block error display

(10) FB Error Reset

Touching this switch resets function block errors.

When an error occurs in CtrlOutputAxisSync (Output axis synchronized control), synchronization control is released via a

reset operation.

Display Description

"FB ERR" is displayed when an error has occurred in the function block.

4 6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen

6

Equipment menu Rotary cutter (Central reference) screen Set parameters to generate cam patterns for the rotary cutter (central reference).

Only Simple Motion module RD77GF is compatible with the rotary cutter (central reference).

Rotary cutter (Central reference) cam setting (1) Cam No.

Set the number of the cam to be generated for the rotary cutter (central reference).

(2) Cam resolution

Set the cam resolution to be generated for the rotary cutter (central reference).

(3) Acceleration/deceleration system

Set the acceleration/deceleration system.

(4) Synchronous axis length setting

Set whether or not to generate the cam with the synchronous axis length in diameter/circumference.

(5) Number of cutter

Set the number of rotary cutters.

(6) Synchronous axis length

Set the axis length of the rotary cutter.

(7) Sheet length

Set the sheet length (cutting length).

(8) Sheet synchronization width

Set the synchronization length of the sheet.

(9) Synchronous position adjustment

Set the position adjustment of the synchronization start section.

Negative value: Set the synchronous section at the front of the sheet.

0: The center of the sheet is the synchronous section.

Positive value: Set the synchronous section at the end of the sheet.

(10) Synchronous section acceleration ratio

Set this item when the fine adjustment of the synchronous speed in the synchronous section is required.

"Synchronous section speed = Synchronous speed (100% + Acceleration ratio)"

(11) Acceleration/deceleration width

Set the sheet width (one side) of the acceleration/deceleration area.

(7)

(6)

(4)

(10) (9)

(8)

(2)

(1)

(3)

(13)

(11)

(5)

(12)

(14)

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 175

17

Rotary cutter (Central reference) cam generation (12) Cam generation switch

Touching this switch generates cam data according to the setting values on the screen.

(13) Function block error display

(14) FB error reset

Touching this switch resets function block errors.

When an error occurs in CtrlOutputAxisSync (Output axis synchronized control), synchronization control is released via a

reset operation.

Display Description

"FB ERR" is displayed when an error has occurred in the function block.

6 6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen

6

Equipment menu Box motion screen Set parameters to generate cam patterns for the box motion.

This screen can be used in the box motion project.

Box motion cam setting

(1) Cam resolution

Set the resolution of the cam to be generated for the box motion.

(2) Production speed

Set the production speed.

(3) Seal axis cam No.

Set the number of the cam to be generated for (opening/closing) the seal axis in the box motion.

(4) Travel axis cam No.

Set the number of the cam to be generated for (traveling) the travel axis in the box motion.

(5) Seal axis stroke amount

Set the stroke amount of the seal axis.

(1) (4) (3)

(2) (5)

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 177

17

(6) Product length

Set the product length.

(7) Travel axis movement amount limit value

Set the movement amount limit value of the travel axis.

(8) Synchronization starting point

Set the synchronization starting point of the travel axis.

(9) Sealing time

Set the sealing time.

(10) Seal axis acceleration/deceleration

Set the acceleration/deceleration at opening/closing of the seal axis.

(11) Synchronous section acceleration ratio

Set the acceleration ratio of the synchronous speed of the travel axis.

(12) Seal starting time offset

Set the offset amount of the timing to start sealing (synchronization start).

(13) Seal ending time offset

Set the offset amount of timing to end sealing (synchronization end).

(7)

(6)

(10)(9)

(11)

(8)

(13)

(12)

8 6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen

6

Box motion cam generation

(14) Cam generation switch

Touching this switch generates cam data according to the setting values on the screen.

(15) Function block error display

(16) FB Error Reset

Touching this switch resets function block errors.

When an error occurs in CtrlOutputAxisSync (Output axis synchronized control), synchronization control is released via a

reset operation.

Display Description

"FB ERR" is displayed when an error has occurred in the function block.

(16)

(15)

(14)

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 179

18

Equipment menu Long dwell screen Set parameters to generate cam patterns for the long dwell.

This screen can be used in the long dwell project.

Long dwell cam setting (1) Cam No.

Set the number of the cam to be generated for the long dwell.

(2) Cam resolution

Set the resolution of the cam to be generated for the long dwell.

(3) Synchronous angle

Set the angle including the seal section and inlet/outlet section.

(4) Eccentric length

Set the distance from the center of the seal section to the center of the circle.

(5) Product length

Set the product length.

(6) Seal length

Set the seal section length.

(7) Seal section acceleration rate

Set this item when fine adjustment of the synchronous speed in the sealing section is required.

"Synchronous section speed = Synchronous speed (100% + Acceleration ratio)"

(8) Inlet/outlet section acceleration rate

Set this item when the fine adjustment of the synchronous speed in the inlet/outlet section is required.

"Synchronous section speed = Synchronous speed (100% + Acceleration ratio)"

(5)

(4)

(8) (7)

(6)

(2)

(1)

(3)

(10)

(9)

(11)

0 6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen

6

Long dwell cam generation (9) Cam generation switch

Touching this switch generates cam data according to the setting values on the screen.

(10) Function block error display

(11) FB error reset

Touching this switch resets function block errors.

When an error occurs in CtrlOutputAxisSync (Output axis synchronized control), synchronization control is released via a

reset operation.

Display Description

"FB ERR" is displayed when an error has occurred in the function block.

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 181

18

Equipment menu Cam monitor screen This screen displays read cam pattern of the specified cam No.

Cam monitor (1) Cam No.

Set the cam No. of the cam pattern to be monitored.

(2) READ switch

Touching this switch reads the cam data of the specified cam No.

(3) Cam No.

Cam No. of the read cam data

(4) Cam resolution

Cam resolution of the read cam data

(5) Cam pattern display

Waveform of the stroke coordinates of the read cam data

(6) Stroke amount display

Maximum stroke amount of the read cam data

(7) 1 cycle length display

1 cycle length of the read cam data

(8) Function block error display

(9) FB Error Reset

Touching this switch resets function block errors.

When an error occurs in CtrlOutputAxisSync (Output axis synchronized control), synchronization control is released via a

reset operation.

Display Description

"FB ERR" is displayed when an error has occurred in the function block.

(6)

(4) (3)

(2)

(9)

(8)

(1)

(5)

(7)

2 6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen

6

Equipment menu Mark compensation screen On this screen, users can set parameters, start/stop the mark compensation control, and monitor detection data.

Latch data range

(1) Upper limit

Set the upper limit value of the mark detection range.

(2) Lower limit

Set the lower limit value of the mark detection range.

(3) Change request switch

Touching this switch changes the latch data range with the new setting values.

(3)

(2)

(1)

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 183

18

Compensation axis setting

(4) Compensation starting point

Set the point to start the mark compensation in one cycle.

(5) Speed

Set the positioning speed at compensation.

(6) Acceleration

Set the positioning acceleration time at compensation.

(7) Deceleration

Set the positioning deceleration time at compensation.

Compensation control setting

(8) Minimum compensation amount

Set the lower limit value of the compensation range.

(9) Maximum compensation amount

Set the upper limit value of the compensation range.

(10) Mark undetected permissible counts

Set the permissible value of the mark undetected counts.

Compensation start/Compensation end

(11) Compensation start switch

Touching this switch starts the mark compensation control.

(12) Compensation end switch

Touching this switch stops the mark compensation control.

(5)

(7)

(6)

(4)

(9)

(10)

(8)

(12)(11)

4 6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen

6

Mark detection monitor

(13) Detection data

Latch data at mark detection

(14) Detection counts

Counts of mark detections

(15) Compensation amount

Compensation amount calculated from the mark detection data

(16) Mark pitch

Set the distance between marks.

Error display

(17) Function block error display

Display Description

"FB ERR" is displayed when an error has occurred in the function block.

(16)

(15)

(14)

(13)

(17)

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 185

18

Equipment menu Alignment conveyor screen Set parameters of the sensor position and work length of the alignment conveyor, and the compensation control of the

conveyor.

The screen settings are provided on the assumption of the following equipment configuration.

Latch data range (1) Upper limit

Set the upper limit value of the mark detection range.

(2) Lower limit

Set the lower limit value of the mark detection range.

(3) Change request switch

Touching this switch changes the latch data range with the new setting values.

Loading conveyor axisSupply conveyor axisGap adjustment conveyor axis 1

Adjustment sensor 1

Supply sensor

Finger sensor

Gap adjustment conveyor axis 2

Adjustment sensor 2

Alignment conveyor screen 3 Alignment conveyor

screen 2

Alignment conveyor screen 1

(12)

(1)

(2)

(3)

(4)

(5)

(6)

(7) (8)

(9) (10) (11)

6 6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen

6

Equipment setting (4) 1) Supply sensor position

Set the distance between the supply conveyor end and work detection sensor.

(5) 2) Loading position

Set the distance between the finger edge and work edge on the loading conveyor.

(6) 3) Work length

Set the work length.

Compensation axis setting (7) Speed

Set the speed at compensation.

(8) Acceleration

Set the acceleration time at compensation.

(9) Deceleration

Set the deceleration time at compensation.

Compensation control setting (10) Minimum compensation amount

Set the minimum value of the compensation amount at compensation.

(11) Maximum compensation amount

Set the maximum value of the compensation amount at compensation.

Error display (12) Function block error display

Display Description

"FB ERR" is displayed when an error has occurred in the function block.

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 187

18

Latch data range (1) Upper limit

Set the upper limit value of the mark detection range.

(2) Lower limit

Set the lower limit value of the mark detection range.

(3) Change request switch

Touching this switch changes the latch data range with the new setting values.

Equipment setting (4) 1) Adjustment sensor position

Set the distance between the gap adjustment conveyor 1 end and work detection sensor.

(5) 2) Work length

Set the work length.

Compensation axis setting (6) Speed

Set the speed at compensation.

(7) Acceleration

Set the acceleration time at compensation.

(8) Deceleration

Set the deceleration time at compensation.

Compensation control setting (9) Minimum compensation amount

Set the minimum value of the compensation amount at compensation.

(10) Maximum compensation amount

Set the maximum value of the compensation amount at compensation.

(1)

(2)

(3)

(4)

(5)

(6) (7)

(8) (9) (10)

8 6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen

6

Latch data range (1) Upper limit

Set the upper limit value of the mark detection range.

(2) Lower limit

Set the lower limit value of the mark detection range.

(3) Change request switch

Touching this switch changes the latch data range with the new setting values.

Equipment setting (4) 1) Adjustment sensor position

Set the distance between the gap adjustment conveyor 2 end and work detection sensor.

(5) 2) Work length

Set the work length.

Compensation axis setting (6) Speed

Set the speed at compensation.

(7) Acceleration

Set the acceleration time at compensation.

(8) Deceleration

Set the deceleration time at compensation.

Compensation control setting (9) Minimum compensation amount

Set the minimum value of the compensation amount at compensation.

(10) Maximum compensation amount

Set the maximum value of the compensation amount at compensation.

(1)

(2)

(3)

(4)

(5)

(6) (7)

(8) (9) (10)

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 189

19

Servo axis setting screen On this screen, users can start JOG operation and home position return and reset errors of each servo axis.

When using box motion, select servo axis setting screen 1 and 2, and when using long dwell, select servo axis setting screen

2 and 3.

0 6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen

6

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 191

19

Each axis servo setting

Servo state

JOG operation

Home position return

All axes servo setting

Display Description

[Servo ON indicator lamp]

Servo ON: On

Servo OFF: Off

[BUSY indicator lamp]

Positioning control in progress: On

Stopped (standby): Off

[Error indicator lamp]

An error or axis warning occurred: On

No error or axis warning: Off

[Error reset switch]

On: Errors are reset.

Display Description

[JOG speed setting]

Set the JOG operation speed.

[JOG operation switch]

JOG (Forward)

On: JOG operation (forward run) starts.

JOG (Reverse)

On: JOG operation (reverse run) starts.

Display Description

[Home position return in execution lamp]

When the home position return is in execution: On

When the home position return has stopped: Off

[Home position return complete lamp]

When the home position return is completed: On

When the home position return is not completed: Off

[Current feed value monitor]

Current feed value

[Home position return switch]

On: The home position return starts.

Display Description

[PLC Ready indicator lamp]

When PLC Ready is on: On

When PLC Ready is off: Off

[All axes servo ON/OFF switch]

All axes servo ON

On: The all axes servo ON command is on.

All axes servo OFF

On: The all axes servo ON command is off.

[Synchronization start/end switch]

Synchronization start

On: Synchronous control start is on.

Synchronization end

On: Synchronous control start is off.

2 6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen

6

[Servo axis setting screen transition switches]

Switches to the setting screen of the axis assigned in system configuration.

[All Error Reset switch]

On: All errors are reset.

When an error occurs in CtrlOutputAxisSync (Output axis synchronized control),

synchronization control is released via a reset operation.

Display Description

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 193

19

Production screen Set the parameters for production and start or stop the packaging machine and alignment conveyor.

Phase compensation is performed by signal input from the mark sensor. After completion of phase compensation, the

production amount monitor count starts.

In the project for the alignment conveyor, the product length is set to the length per cycle as default. Even if the product length

is changed, the set value is ignored.

The production amount and production amount monitor increase every time the length per cycle of the loading conveyor is

updated. (This is for checking the conveyor operation. The number of workpieces differs from that of the actual loaded

workpieces.)

Product operation (1) In operation lamp

This lamp turns on when the production is in progress (while the packaging machine and alignment conveyor are running).

(2) Start switch

Touching this switch starts the packaging machine and alignment conveyor.

The alignment conveyor project starts the alignment conveyor FB by this switch operation.

(3) End switch

Touching this switch stops the packaging machine and alignment conveyor that are running.

The alignment conveyor project stops the alignment conveyor FB by this switch operation.

Setting (4) Production speed

Set the production speed.

(5) Product length

Set the product length (cutting size).

(6) Production amount

Set the production quantity. The operation will stop when the production amount is reached.

(8)

(6)

(5)

(7)

(2)

(3)

(4)

(1)

4 6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen

6

Monitor (7) Production amount monitor

Current production quantity

(8) Reset switch

Touching this switch resets the production amount monitor (clears the count to zero).

6 GOT APPLICATION SCREEN EXAMPLES 6.5 Base Screen 195

19

6.6 Window Screen The following table lists window screens.

GOT system alarm reset window screen Resets a GOT system alarm.

When a GOT system alarm has occurred, touching the system alarm message display area (bottom of the screen) displays

this screen.

Touching the [OK] switch resets the system alarm and closes the window screen.

Touching the [Cancel] switch closes the window screen without resetting the system alarm.

Screen No. Screen title Description Reference

30000 GOT System Alarm Reset GOT system alarm reset window screen Page 196

30001 Language Setting Language Setting window screen Page 169

30002 Clock Setting Clock Setting window screen Page 170

30010 Key Window (Dec) Numerical input [Decimal key window] Page 166

(1) (2)

6 6 GOT APPLICATION SCREEN EXAMPLES 6.6 Window Screen

6

6.7 List of Devices to be Used Some devices set as switches and lamps in screens may also be set in the common settings including scripts. When these

devices need to be changed in a batch, using [Batch Edit] is recommended. For the details of [Batch Edit], refer to "GT

Designer3 (GOT2000) Help".

List of GOT devices Type Device number Use

Bit GB40 Always ON

Bit GB30001 Clock Setting window display script

(Initial setting (clock setting)) trigger

Bit GS512.b0 Time change information

Bit GD30031.b13 System signal 1-1 GOT error reset signal

Word GD30000 Base screen switching device

Word GD30001 Overlap window screen 1 switching device

Word GD30004 Overlap window screen 2 switching device

Word GD30016 Superimposed window 1 switching device

Word GD30018 Dialog window screen switching device

Word GD30031 System signal 1-1

Word GD30041 System signal 2-1

Word GD30060 to GD30065 Date and time adjustment switch

Word GS513 to GS516 Time after change

Word GS650 to GS652 Current time

6 GOT APPLICATION SCREEN EXAMPLES 6.7 List of Devices to be Used 197

19

APPENDICES Appendix 1 List of Error Codes

FB library: Warning When an error occurs at the startup of an FB, the FB does not operate. When an error occurs while an FB is operating, the FB

continuously operates with the value before the occurrence of the error.

ErrID Description Corrective action

HEX DEC

2100H 8448 A value outside the range has been set as the axis No. Check the setting and execute the FB again.

2101H 8449 A value outside the range has been set as the positioning data No.

2102H 8450 A value outside the range has been set as the speed.

2103H 8451 A value outside the range has been set as the acceleration/

deceleration.

2104H 8452 A value outside the range has been set as the cam No.

2105H 8453 A value outside the range has been set as the travel axis cam No.

2106H 8454 A value outside the range has been set as the seal axis cam No.

2107H 8455 A single value has been set as both the travel axis cam No. and

seal axis cam No.

2108H 8456 A value outside the range has been set as the cam resolution.

2109H 8457 A value outside the range has been set as the seat length.

210AH 8458 A value outside the range has been set as the sheet

synchronization width.

210BH 8459 A value outside the range has been set as the synchronous axis

length.

210CH 8460 A value outside the range has been set as the synchronization

starting point.

210DH 8461 A value outside the range has been set as the synchronous

section acceleration ratio.

210EH 8462 A value outside the range has been set as the production speed.

210FH 8463 A value outside the range has been set as the product length.

2110H 8464 A value outside the range has been set as the travel axis

movement amount limit value.

2111H 8465 A value outside the range has been set as the seal axis movement

amount.

2112H 8466 A value outside the range has been set as the sealing time.

2113H 8467 A value outside the range has been set as the seal axis

acceleration/deceleration.

2114H 8468 A value outside the range has been set as the seal time offset.

2115H 8469 The calculated cam stroke amount for the travel axis has

exceeded the travel axis movement amount limit value.

Although the cam data at occurrence of this warning can be

used, ensure the safety before operation.

8 APPX Appendix 1 List of Error Codes

A

2116H 8470 A value outside the range has been set as the main input axis

cycle starting point.

Check the setting and execute the FB again.

2117H 8471 A value outside the range has been set as the main input axis

synchronization starting point.

2118H 8472 A value outside the range has been set as the output axis

synchronization starting point.

2119H 8473 A value outside the range has been set as the output axis

synchronization ending point.

211BH 8475 A value outside the range has been set as the main input axis

cycle ending point.

211CH 8476 A value outside the range has been set as the output axis

movement amount limit value.

211DH 8477 A value outside the range has been set as the mark detection

setting No.

2121H 8481 A value outside the range has been set as the minimum

compensation amount or maximum compensation amount.

2122H 8482 A value outside the range has been set as the mark undetected

permissible counts.

2123H 8483 The calculated compensation amount is larger than the maximum

compensation amount.

This error code will turn off when the compensation amount to be

calculated next time is smaller than the maximum compensation

amount in the next cycle or later.

Check if "[Pr.439] Cam axis length per cycle" is proper.

2124H 8484 A value outside the range has been set as the compensation

starting point.

Check the setting and execute the FB again.

212DH 8493 A value outside the range has been set in "[Pr.802] Mark detection

data type".

212EH 8494 A value outside the range has been set in "[Pr.807] Mark detection

mode setting".

212FH 8495 A value outside the range has been set as the travel axis No.

2130H 8496 A value outside the range has been set as the seal axis No.

2131H 8497 A value outside the range or 0 (invalid) has been set in "[Pr.400]

Main input axis No.".

2132H 8498 A value outside the range has been set as the output axis No.

2133H 8499 A value outside the range has been set as the auxiliary axis No.

2134H 8500 A single value has been set as both the travel axis No. and seal

axis No.

2135H 8501 The value set in "[Pr.1] Unit setting" of the travel axis and the value

set in "[Pr.1] Unit setting" of the seal axis are not the same.

Even though this warning has occurred, the operation

continues. However, ensure the safety before operation

because the operation may differ from that of when both the

axes have different values in "[Pr.1] Unit setting".

2136H 8502 The value set in "[Pr.1] Unit setting" of the main input axis and the

value set in "[Pr.1] Unit setting" of the auxiliary axis are not the

same.

Even though this warning has occurred, the operation

continues. However, ensure the safety before operation

because the operation may differ from that of when both the

axes have different values in "[Pr.1] Unit setting".

2140H 8512 A value outside the range has been set as the synchronous angle. Check the setting and execute the FB again.

2141H 8513 A value outside the range has been set as the seal length.

2142H 8514 A value outside the range has been set as the eccentric radius.

2143H 8515 A value outside the range has been set as the seal section

acceleration rate.

2144H 8516 A value outside the range has been set as the inlet/outlet section

acceleration rate.

2145H 8517 A value outside the range has been set as the number of cutters.

2146H 8518 The sealing angle has exceeded the synchronous angle. Set a larger synchronous angle or change the sealing length or

eccentric radius and set a smaller sealing angle to satisfy the

following conditional expression.

i_eSyncAngle 2 * atan(i_eSealLength / (2 *

i_eEccentricRadius))

2147H 8519 The synchronization length exceeded the product length. Increase the product length or review the D-cam parameter.

ErrID Description Corrective action

HEX DEC

APPX Appendix 1 List of Error Codes 199

20

FB library: Error When an error has occurred, an FB stops its operation.

214AH 8522 A value outside the range has been set for the sensor position. Check the setting and execute the FB again.

214BH 8523 A value outside the range is set for the workpiece length.

214CH 8524 A value outside the range has been set for the loading position.

214DH 8525 A value outside the range has been set in "[Pr.1] Unit setting".

2150H 8528 A value outside the range has been set as the synchronous

section position adjustment.

2151H 8529 A value outside the range is set as the auto-generation option.

2152H 8530 A value outside the range has been set as the acceleration/

deceleration width.

2153H 8531 A value outside the range has been set as the number of cutters.

2154H 8532 The FB in use is different. Use an FB that is compatible with the Simple Motion used.

ErrID Description Corrective action

HEX DEC

200H 512 The FB is started while the target axis is operating. Stop the target axis and execute the FB again.

201H 513 The target axis is not in the servo-on status. Set the servo-on status for the target axis and execute the FB

again.

202H 514 A motion error has occurred in the target axis. Check "[Md.23] Axis error No." of the target axis to check the

error details and eliminate the cause of the error. After that,

execute the FB again.

205H 517 A PLC CPU error has occurred during the execution of an FB. Check the error number (SD0) to check the error details and

eliminate the cause of the error. After that, execute the FB

again.

2200H 8704 The calculated cam stroke amount for the output axis has

exceeded the output axis movement amount limit value.

Check the set main input axis cycle ending point in the

direction of the main input axis reference point and execute the

FB again.

If this error still cannot be cleared, check the following input

label setting values.

Output axis synchronization starting point

Output axis synchronization ending point

Output axis movement amount limit value

Main input axis synchronization starting point

2201H 8705 The value of the mark undetected counts has exceeded the mark

undetected permissible counts.

Check the mark status.

Check for a sensor failure or disconnection.

2203H 8707 A cam data operation warning has occurred at cam generation. Check "[Md.24] Axis warning No." of the axis 1 to check the

warning details and eliminate the cause of the warning. After

that, execute the FB again.

2205H 8709 Another FB was activated while cam was being generated by an

FB or a user program.

Before starting the FB, check that "[Cd.600] Cam data

operation request" has been set to "0".

2206H 8710 The seal starting time offset value has exceeded the travel axis

synchronization starting point value.

Set a smaller value as the seal starting time offset value or a

lager value as the travel axis synchronization starting point to

satisfy the following conditional expression.

i_dSealStartTimingOffset {i_uProductPerMinute/(60

1000) i_eProductLength} < i_eSyncStartPoint 2

ErrID Description Corrective action

HEX DEC

0 APPX Appendix 1 List of Error Codes

A

2207H 8711 The value converted into the travel axis from the travel axis

synchronization ending point has exceeded the travel axis

movement amount limit value.

Adjust the following parameters to satisfy the following two

conditional expressions.

1) Set a larger value as the travel axis movement amount limit

value.

2) Set a smaller value as the travel axis synchronization

starting point.

3) Set a smaller value as the synchronous section.

a) Set a smaller value as the travel axis synchronous section

acceleration ratio.

b) Shorten the seal axis acceleration/deceleration.

c) Shorten the sealing time.

d) Set a smaller value as the product length.

e) Set a smaller value as the production speed.

i_eSyncStartPoint < i_eTravelAxisMaxLength

i_eSyncStartPoint + {i_udSealingTime +

i_udSealAxisMoveTime 2} {i_uProductPerMinute/(60

1000) i_eProductLength} (1 + i_eSyncSectionAccRatio/

100) < i_eTravelAxisMaxLength

2208H 8712 The seal axis deceleration ending point has exceeded the product

length.

Adjust the following parameters to satisfy the following

conditional expression.

1) Set a smaller value as the synchronous section.

a) Shorten the seal axis acceleration/deceleration.

b) Shorten the sealing time.

c) Set a smaller value as the production speed.

2) Set a larger value as the product length.

3) Set a smaller negative value or a positive value as the seal

starting time offset.

4) Set a smaller negative value or a positive value as the seal

ending time offset.

i_eSyncStartPoint 2 + {i_udSealingTime +

i_udSealAxisMoveTime 2} {i_uProductPerMinute/(60

1000) i_eProductLength} < i_eProductLength

2209H 8713 A value larger than the number of coordinates of the cam data

generated for the box motion has been set as the cam resolution

(number of coordinates).

Set a smaller value as the cam resolution (number of

coordinates) to satisfy the following conditional expression.

i_uCamResolution {i_eProductLength - (i_udSealingTime

+ i_udSealAxisMoveTime 2) (i_uProductPerMinute/(60

1000) i_eProductLength)} UCC*1

i_uCamResolution {( i_udSealAxisMoveTime 2)

(i_uProductPerMinute/(60 1000) i_eProductLength )}

UCC*1

220AH 8714 The positions of the main input axis cycle starting point, main input

axis synchronization starting point, and main input axis cycle

ending point are not correct.

Check those values to satisfy the following conditional

expression.

i_eMainInputAxisStartPos < i_eMainInputAxisSyncStartPos

< i_eMainInputAxisCycleEndPos

220BH 8715 The positions of the output axis synchronization starting point,

output axis synchronization ending point, and output axis

movement amount limit value are not correct.

Check those values to satisfy the following conditional

expression.

i_eOutputAxisSyncStartPos < i_eOutputAxisSyncEndPos <

i_eOutputAxisMaxLength

220CH 8716 The value converted into the main input axis from the output axis

synchronization ending point has exceeded the main input axis

cycle ending point.

Set smaller values as the main input axis cycle starting point

and the output axis synchronization ending point or a larger

value as the synchronous section acceleration ratio to satisfy

the following conditional expression.

i_eMainInputAxisSyncStartPos - i_eMainInputAxisStartPos +

(i_eOutputAxisSyncEndPos - i_eOutputAxisSyncStartPos)/

(1 + i_eSyncSectionAccRatio/100) <

i_eMainInputAxisCycleEndPos - i_eMainInputAxisStartPos

220DH 8717 A value larger than the number of coordinates of the cam data

generated for the flying shear has been set as the cam resolution

(number of coordinates).

Set a smaller value as the cam resolution (number of

coordinates) to satisfy the following conditional expression.

i_uCamResolution < {i_eMainInputAxisCycleEndPos -

i_eMainInputAxisStartPos - (i_eOutputAxisSyncEndPos -

i_eOutputAxisSyncStartPos)/(1 + i_eSyncSectionAccRatio/

100)} UCC*1

F000H 61440 The module set in the start I/O number setting is not the iQ

Monozukuri-compatible Simple Motion module.

Replace the module with the Simple Motion module for the

packaging machine control FBs.

F001H 61441 The license key of the application to be used in the PLC CPU used

is not authenticated.

Certify the license key of the application to be used.

F002H 61442 A value outside the range is set for the start I/O number. Check the setting and execute the FB again.

ErrID Description Corrective action

HEX DEC

APPX Appendix 1 List of Error Codes 201

20

*1 UCC (Unit conversion coefficient): When the unit of the product length is [mm]: 10^4 (= 10000), [inch] or [degree]: 10^5 (= 100000), [pulse]: 1

Application program control FB: Warning When a warning occurs at the startup of an FB, the FB does not operate. When a warning occurs while an FB is operating, the

FB continuously operates with the value before the occurrence of the warning.

Application program control FB: Error When an error has occurred, an FB stops its operation.

F003H 61443 The module set in the start I/O number setting is not the Simple

Motion module.

Specify a Simple Motion module.

ErrID Description Corrective action

HEX DEC

2D00H 11520 A value outside the range has been set as the axis No. Check the setting and execute the FB again.

2D01H 11521 A value outside the range has been set as the cam No.

2D02H 11522 A value outside the range has been set as the waiting point.

2D03H 11523 A value outside the range has been set as the 1 cycle length.

2D04H 11524 A value outside the range has been set as the cam stroke amount.

2D05H 11525 A value outside the range has been set as the clutch smoothing

amount.

2D06H 11526 A value outside the range has been set as the start I/O number.

2D07H 11527 The number of buffers exceeded the maximum storage number.

ErrID Description Corrective action

HEX DEC

2DE0H 11744 The FB is started during synchronous control of the target axis. Execute the FB again after completing the synchronous control

of the target axis.

2DE1H 11745 The target axis is not in the servo-on status. Set the servo-on status for the target axis and execute the FB

again.

2DE2H 11746 A motion error has occurred in the target axis. Check "[Md.23] Axis error No." of the target axis to check the

error details and eliminate the cause of the error. After that,

execute the FB again.

2DE3H 11747 A PLC CPU error has occurred during the execution of an FB. Check the error number (SD0) to check the error details and

eliminate the cause of the error. After that, execute the FB

again.

2DE4H 11748 A cam data operation warning has occurred while the cam

operation has been requested.

Check "[Md.24] Axis warning No." of the axis 1 to check the

warning details and eliminate the cause of the warning. After

that, execute the FB again.

ErrID Description Corrective action

HEX DEC

2 APPX Appendix 1 List of Error Codes

APPX Appendix 2 Functional Restrictions by Version 203

A

Appendix 2 Functional Restrictions by Version Available functions depend on the version of the application package.

The following table shows combinations of each version and function.

*1 When updating a project of version 1.004E or earlier to 1.005F or later, replace the project. For details, refer to the following. Page 37 Upgrading the Library Version

Function Version Reference

The standard Simple Motion module can be used by registering a license key. Version 1.001B

or later

Page 29 SETTING AND PROCEDURE BEFORE

OPERATION

FB STD_MakeRotaryCutterCam+RD77GF is added. Page 57 Details of the FB Library

Page 104 APPLICATION PROGRAM EXAMPLEPAC_MakeLongDwellDCam is added.

The subroutine type is supported for the compile method of FB library. Page 57 Details of the FB Library

FB PAC_CalcGap is added. Version 1.002C

or later

Page 57 Details of the FB Library

PAC_CalcPhase is added. Page 104 APPLICATION PROGRAM EXAMPLE

FB Invalid (-1) for the input label "Compensation starting point" of

STD_CtrlAuxiliaryAxis has been added.

Page 57 Details of the FB Library

A temporary license is available before a license key is obtained. Version 1.003D

or later

Page 29 SETTING AND PROCEDURE BEFORE

OPERATION

FB For i_dMarkDetectData (Mark detection data), set the real current

value.

PAC_CalcMarkCompensation

Version 1.004E

or later

Page 57 Details of the FB Library

The data type of the AXIS_REF structure member (label) is changed.*1 Version 1.005F

or later

Page 57 Details of the FB Library

20

Appendix 3 Temporary License Registration When using this application package before getting a license key, register a temporary license by following the steps below.

The temporary license is valid for two months (from the registration date of the temporary license to the same day in the

month after next).

*1 If the same day does not exist in the month after next, it is valid until the last day of the month.

Items to be prepared

Clock setting of the PLC CPU module Set the clock data (the current date and time) on "Clock Setting" of GX Works3.

For the clock setting, refer to the following.

GX Works3 Operating Manual

Executing the program 1. Executing the temporary license registration program

Copy the license key registration project (AP20-PAC002AA_R16_LicWrite.gx3) in the supplied DVD to a folder on the

personal computer, then open the file.

The project is created for the R16CPU. When using a model other than R16CPU, change the model.

* When registering a license key to multiple PLC CPU modules, register it one by one.

2. Writing and executing the program

Write the program to the PLC CPU module and execute it.

Select "Online" "Write to PLC" from the menu and write all the program to the PLC CPU module.

Set the PLC CPU module to the RUN state and execute the scan program. Select "Program" "Scan" in the Navigation

window and open the registered program. (Program name: LicenseWrite) The scan program includes the function block

(FormatLicense) for formatting the license key registration area, the function block (PAC_LicenseWrite) for writing the

license key, and the function block (PAC_TempLicenseWrite) for writing the temporary license.

When registering the temporary license to the PLC CPU module for the first time, format the license key

registration area. Format it before registering the license key.

When another license of iQ Monozukuri has been registered, register the license without formatting it.

Item Description

License key registration project

(AP20-PAC002AA_R16_LicWrite.gx3)

A project for registering a license key to the PLC CPU module.

It is included in the supplied DVD.

FormatLicense (Macro type)

PAC_TempLicenseWrite (Macro type)

Registration date 1/1/2018 20/6/2018 31/7/2018 31/12/2018 31/12/2019

Invalid Valid Invalid

Day before the expiration date 1/3/2018

20/8/2018 30/9/2018

29/2/2020 (Leap year) 28/2/2019

*1

*1

*1

0:00 0:00 0:00

4 APPX Appendix 3 Temporary License Registration

A

Registering the temporary license

Turn on the execution flag (WriteTempLicense) of the function block (PAC_TempLicenseWrite) in the scan program. Normal

completion (o_bOK) or Error completion (o_bError) becomes TRUE. At the error completion, refer to Troubleshooting.

(Page 206 Troubleshooting)

When Normal operation (o_bOK) turns on, the license key registration is completed. Turn off the execution flag

(WriteTempLicense).

3. Deleting the program

After the temporary license registration has been completed, delete the program in the PLC CPU module.

Select "Online" "Delete PLC Data" from the menu and select the [Select All] button in the "Online Data Operation" window

to delete the program.

Click.

Click.

APPX Appendix 3 Temporary License Registration 205

20

Troubleshooting The following table lists errors that occur during the temporary license registration and corrective actions.

Precautions

The temporary license is written to the device data storage file, and thus retained after power off.

If the license key registration area of the device data storage file is operated with SLMP or the FTP server function, license

information may be lost.

For the license key registration FB, set "FB type" to "Macro type".

Error details Cause Corrective action

After "PAC_TempLicenseWrite" is

executed, Error completion

(o_bError) turns on and Normal

completion (o_bOK) remains off.

The license key registration area

has never been formatted.

The license key outside the range

of the memory was about to be

written.

Format the license key registration area by using "FormatLicense" and

register the temporary license by using "PAC_TempLicenseWrite".

Using "FormatLicense" deletes other registered license keys. Register them

again.

The temporary license of the same

product has already been registered.

Continue to use the temporary license.

Get a license and register the license key by using "PAC_LicenseWrite".

After "PAC_TempLicenseWrite" is

executed, neither Normal completion

(o_bOK) nor Error completion

(o_bError) turns on.

The PLC CPU module is not in the

RUN state.

"Macro type" is not specified for

"FB type" of the license key

registration FB.

Set the PLC CPU module to the RUN state.

Specify "Macro type" for "FB type" of the license key registration FB.

6 APPX Appendix 3 Temporary License Registration

A

MEMO

APPX Appendix 3 Temporary License Registration 207

208

INSTRUCTION INDEX

C

CtrlOutputAxisSync . . . . . . . . . . . . . . . . . . . . . 152

P

PAC_CalcGap . . . . . . . . . . . . . . . . . . . . . . . . . 94 PAC_CalcMarkCompensation . . . . . . . . . . . . . . 86 PAC_CalcPhase . . . . . . . . . . . . . . . . . . . . . . . . 99 PAC_MakeBoxMotionCam. . . . . . . . . . . . . . . . . 65 PAC_MakeLongDwellDCam . . . . . . . . . . . . . . . 77

R

ReadCamData . . . . . . . . . . . . . . . . . . . . . . . . 150

S

SaveCompensationBuffer . . . . . . . . . . . . . . . . 157 STD_CtrlAuxiliaryAxis . . . . . . . . . . . . . . . . . . . . 90 STD_MakeFlyingShearCam. . . . . . . . . . . . . . . . 71 STD_MakeRotaryCutterCam+RD77GF . . . . . . . . 61 STD_MakeRotaryCutterCam+RD77MS. . . . . . . . 57 STD_ReadMarkDetectData . . . . . . . . . . . . . . . . 82

I

209

MEMO

210

REVISIONS * The manual number is given on the bottom left of the back cover.

2016 MITSUBISHI ELECTRIC CORPORATION

Revision date *Manual number Description

July 2016 BCN-B62005-762-A First edition

November 2017 BCN-B62005-762-B Added models

RD77GF

Added functions

Standard Simple Motion modules are available by license key registration, FBs are added (Cam

auto-generation for rotary cutter (central reference), Cam auto-generation for D-cam) and program

examples are added (long dwell).

Added or modified parts

RELEVANT MANUALS, TERMS, REQUESTING AND REGISTERING A LICENSE KEY, Section

1.4, 1.5, 1.6, 1.7, Chapter 2, Section 2.1, 2.2, 2.4, 3.1, 3.2, 4.1, 4.2, Chapter 5, Section 5.1, 5.2, 5.3,

5.4, Chapter 6, Section 6.1, 6.3, 6.4, 6.5, 6.7, Appendix 1, 2, TRADEMARKS

August 2018 BCN-B62005-762-C Added functions

FBs are added (Work gap adjustment compensation amount calculation, Work loading position

adjustment compensation amount calculation), a program example is added (alignment conveyor),

and screen examples are added (alignment conveyor).

Added or modified parts

TERMS, Section 1.2, 1.4, 1.6, 1.7, 3.1, 3.2, 4.1, 4.2, Chapter 5, Section, 5.1, 5.2, 5.3, 5.4, 5.5, 6.1,

6.3, 6.5, Appendix 1, 2

October 2018 BCN-B62005-762-D Added functions

A temporary license is available before a license key is obtained.

Added or modified parts

TERMS, Section 2.1, 2.3, 2.4, 4.1, 6.5, Appendix 2, 3

July 2019 BCN-B62005-762-E Added or modified parts

Section 1.7, 2.1, 4.1, 4.2, 5.1, 5.2, Appendix 2

September 2019 BCN-B62005-762-F Added or modified parts

Section 1.7, 2.3, 4.1, 4.2, 4.3, 5.1, 5.2, 5.4, Appendix 2

This manual confers no industrial property rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held

responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.

211

WARRANTY Please check the following product warranty details before using this product.

(1) Software included in this product

Check "END-USER SOFTWARE LICENSE AGREEMENT" (BCN-EP2005-0001) included in this product.

(2) Hardware included as a system component of this system

Check the product warranty details of each hardware.

212

TRADEMARKS Ethernet is a registered trademark of Fuji Xerox Co., Ltd. in Japan.

Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or

other countries.

Adobe, Acrobat, and Reader are either a registered trademark or a trademark of Adobe Systems Incorporated in the United

States and other countries.

The company names, system names and product names mentioned in this manual are either registered trademarks or

trademarks of their respective companies.

In some cases, trademark symbols such as '' or '' are not specified in this manual.

BCN-B62005-762-F(1909)

Specifications subject to change without notice.

When exported from Japan, this manual does not require application to the Ministry

Manualsnet FAQs

If you want to find out how the AP20-PAC002AA-MD Mitsubishi works, you can view and download the Mitsubishi AP20-PAC002AA-MD Packaging Instruction Manual on the Manualsnet website.

Yes, we have the Instruction Manual for Mitsubishi AP20-PAC002AA-MD as well as other Mitsubishi manuals. All you need to do is to use our search bar and find the user manual that you are looking for.

The Instruction Manual should include all the details that are needed to use a Mitsubishi AP20-PAC002AA-MD. Full manuals and user guide PDFs can be downloaded from Manualsnet.com.

The best way to navigate the Mitsubishi AP20-PAC002AA-MD Packaging Instruction Manual is by checking the Table of Contents at the top of the page where available. This allows you to navigate a manual by jumping to the section you are looking for.

This Mitsubishi AP20-PAC002AA-MD Packaging Instruction Manual consists of sections like Table of Contents, to name a few. For easier navigation, use the Table of Contents in the upper left corner.

You can download Mitsubishi AP20-PAC002AA-MD Packaging Instruction Manual free of charge simply by clicking the “download” button in the upper right corner of any manuals page. This feature allows you to download any manual in a couple of seconds and is generally in PDF format. You can also save a manual for later by adding it to your saved documents in the user profile.

To be able to print Mitsubishi AP20-PAC002AA-MD Packaging Instruction Manual, simply download the document to your computer. Once downloaded, open the PDF file and print the Mitsubishi AP20-PAC002AA-MD Packaging Instruction Manual as you would any other document. This can usually be achieved by clicking on “File” and then “Print” from the menu bar.