Download  Print this page

Mitsubishi Electric MELSEC iQ-F Series Reference Manual

Cam output control function block reference.
Hide thumbs

Advertisement

MELSEC iQ-F Cam Output Control Function Block
Reference

Advertisement

Table of Contents

   Also See for Mitsubishi Electric MELSEC iQ-F Series

   Related Manuals for Mitsubishi Electric MELSEC iQ-F Series

   Summary of Contents for Mitsubishi Electric MELSEC iQ-F Series

  • Page 1 MELSEC iQ-F Cam Output Control Function Block Reference...
  • Page 3: Table Of Contents

    CONTENTS CHAPTER 1 OVERVIEW Function Block (FB) List ..............2 Device Name .
  • Page 4: Chapter 1 Overview

    OVERVIEW Function Block (FB) List The following shows the list of FBs for using the cam output control function. Item Description M+CamCtr_CamOutput_F Turns on or off the cam output according to the input angle (count value). M+CamCtr_CamOutputTable_F Sets the angle for ON/OFF control of the cam output. M+CamCtr_AngleAdvFunc_F Sets the automatic angle advance.
  • Page 5 MEMO 1 OVERVIEW 1.3 Procedure Overview...
  • Page 6: Chapter 2 System Configuration

    SYSTEM CONFIGURATION The following shows the system configuration example for this FB list. Workpiece Position detection device Axis control Inverter, Absolute encoder servo amplifier, etc. Cam control Current position input Cam output FX5U CPU module 2 SYSTEM CONFIGURATION...
  • Page 7 MEMO 2 SYSTEM CONFIGURATION...
  • Page 8: Chapter 3 Specification

    SPECIFICATION The following shows an operation overview of the FBs. In normal use At startup Global label Synchronization flag Scan unCamOutput (Cam output data) uResolution M+CamCtr_CamOutputTable (Resolution) (Cam output table setting) bRotateDirection (Rotation direction) bAutoOrIndividual (Angle advance function Fixed cycle interrupt selection) M+CamCtr_AngleAdvFunc b48CamCtrAngle...
  • Page 9 • Automatic angle advance function setting FB This FB is executed in the scan processing when the angle advance function is set. By turning on i_bEN (Execution command), the synchronization flag of the global label is turned on and becomes read protected.
  • Page 10 The following table shows the structure of the global label used in this FB. Name Structure name Variable name Data type Setting Latch Description range   Output data M+Global_FX5CPU Structure (0..2) Output data of 3CH (Unlatched data) structure _CamCtr Synchronization flag uSemaphore Word [Unsigned]/Bit...
  • Page 11 Name Structure name Variable name Data type Setting Latch Description range Angle advance M+Global_FX5CPU  Structure  Angle advance function setting data function setting _AngleAdvFuncSet of STEP0 to STEP6 STEP data structure Rotation speed uRotationalSpeed Word [Unsigned]/Bit 0 to HFFFF Stores the rotation speed.
  • Page 12: Details Of The Fb Library

    Details of the FB Library M+CamCtr_CamOutputTable_F (Cam output table setting) Name M+CamCtr_CamOutputTable_F Overview Item Description Function overview Sets the angle for ON/OFF control of the cam output. Symbol M+CamCtr_CamOutputTable_F i_bEN o_bENO UW : i_uCh o_bOK (10) UW : i_uCamNo o_bErr (11) i_bRotateDirection o_uErrId...
  • Page 13 ■Details of the input label array Array Target step Setting item Data type Setting range STEP 0 Output ON angle Word [Unsigned]/Bit string [16-bit] 0 to the value set in i_uResolution (Resolution) Output OFF angle STEP 1 Output ON angle Output OFF angle ...
  • Page 14 Item Description Function description (1) By turning on i_bEN (Execution command), unCamOutput (Cam output data) of M+Global_FX5CPU_CamCtr (Output data of 3CH (Unlatched data)) and uResolution (Resolution), bRotateDirection (Rotation direction), and st48CamCtrAngle (Control angle data) of M+Global_FX5CPU_CamCtrLatch (Setting data of 3CH (Latch data)) are set. Also, b48CamCtrAngle (Control angle status) for the cam output number is turned on.
  • Page 15 Item Description Timing chart [For normal completion] i_bEN (Execution command) o_bENO (Execution status) i_u16AngleSet (Control angle) Data o_bOK (Normal completion) o_bErr (Error completion) o_uErrId (Error code) unCamOutputData Output data (Cam output data) [For error completion] i_bEN (Execution command) o_bENO (Execution status) i_u16AngleSet (Control angle) Not executed o_bOK (Normal completion)
  • Page 16 Item Description Restrictions and (1) This FB does not include error recovery processing. Program the error recovery processing separately in accordance with the precautions required system operation. (2) This FB uses M+Global_FX5CPU_CamCtr (Output data of 3CH (Unlatched data)) and M+Global_FX5CPU_CamCtrLatch (Setting data of 3CH (Latch data)).
  • Page 17: M+camctr_angleadvfunc_f (automatic Angle Advance Function Setting)

    M+CamCtr_AngleAdvFunc_F (Automatic angle advance function setting) Name M+CamCtr_AngleAdvFunc_F Overview Item Description Function overview Sets the automatic angle advance. Symbol M+CamCtr_AngleAdvFunc_F i_bEN o_bENO UW : i_uCh o_bOK i_bAutoOrIndividual o_bErr UW : i_uCamNo o_uErrId (10) UW : i_u21AngleAdvFuncSet i_bAngleAdvFuncClear Label ■Input label Name Variable name Data type...
  • Page 18 ■Details of the input label array Array When the automatic angle advance is specified When the individual automatic angle advance is specified Setting Setting item Setting range Setting Setting item Setting range point point Rotation speed a (rpm) 0 to 1000 rpm Rotation speed a (rpm) 0 to 1000 rpm ON angle advance...
  • Page 19 ■Explanation of angle advance g Rotation speed (r/min) • Automatic angle advance function In accordance with the rotation speed of the encoder, this function executes the ON/OFF operation faster by the applied arbitrary angle amount (angle advance amount) than the set angle. By using this function, the mechanical operation delay that occurs during the high-speed rotation can be compensated.
  • Page 20 ■Output label Name Variable name Data type Default Description value Execution status o_bENO ON: The execution command is on. OFF: The execution command is off. Normal o_bOK When this label is on, it indicates that the angle advance completion setting is completed normally. Error completion o_bErr When this label is on, it indicates that an error has occurred in...
  • Page 21 Item Description Timing chart [When operation completes without error] i_bEN (Execution command) o_bENO (Execution status) i_u21AngleAdvFuncSet Data (Angle advance function setting) o_bOK (Normal completion) o_bErr (Error completion) o_uErrId (Error code) u63AngleAdvFuncSet Setting data (Angle advance function setting) [When an error occurs] i_bEN (Execution command) o_bENO (Execution status) i_u21AngleAdvFuncSet...
  • Page 22 Item Description Restrictions and (1) This FB does not include error recovery processing. Program the error recovery processing separately in accordance with the precautions required system operation. (2) This FB uses M+Global_FX5CPU_CamCtrLatch (Setting data of 3CH (Latch data)). (3) The cam output table setting must be completed before the execution of this FB, as the ON/OFF advance angle amount is judged from the maximum value of the ON/OFF advance angle amount set by Page 10 M+CamCtr_CamOutputTable_F (Cam output table setting).
  • Page 23: M+camctr_camoutput_f (cam Output)

    M+CamCtr_CamOutput_F (Cam output) Name M+CamCtr_CamOutput_F Overview Item Description Function overview Turns on and off the cam output according to the input angle (count value). Symbol M+CamCtr_CamOutput_F i_bEN o_bENO UW : i_uCh o_bOK i_b48CamOutputNo o_bErr UW : i_uCounterValue o_uErrId o_b48CamOutput (10): pbo_uRevolvingSpeed Label ■Input label Name...
  • Page 24 ■External public label Name Variable name Data type Default value Description (10) Rotation speed pbo_uRevolvingSpeed Word [Unsigned]/ Stores the calculation result of rotation speed. Bit string [16-bit] (Unit: rpm) ■Global label (using latch label) Refer to Page 26 Global Labels. Function overview Item Description...
  • Page 25 Item Description Timing chart [When operation completes without error] i_bEN (Execution command) o_bENO (Execution status) o_b48CamOutput Output data (Cam output) o_bOK (Normal completion) o_bErr (Error completion) o_uErrId (Error code) [When an error occurs] i_bEN (Execution command) o_bENO (Execution status) o_b48CamOutput (Cam output) o_bOK (Normal completion) o_bErr (Error completion)
  • Page 26 Item Description Restrictions and (1) Set the program capacity of the CPU parameter to 64000 steps to use this FB library. If it is set to 128000 steps, the operation precautions may not be performed normally. (2) This FB does not include error recovery processing. Program the error recovery processing separately in accordance with the required system operation.
  • Page 27 *1 The speed is calculated by using the high-speed ring counter (SD8099) under the following conditions, and the calculation result is displayed in [External public label] rotation speed. 1) The value of the high-speed ring counter (SD8099) is stored every 1 ms from i_bEN (Execution command) on. 2) The value of [input label] current value is stored every 1 ms from i_bEN (Execution command) on.
  • Page 28: Global Labels

    Global Labels The following global labels are used in each FB. The global labels are used in each FB processing. Do not change data. Global label configuration Unlatched data M+Global_FX5CPU_CamCtr uSemaphore (Synchronization flag) Current value 0 unCamOutput Current value 1 (Cam output data) Current value 2 Current value 3...
  • Page 29: Chapter 4 Iq-f Setting

    IQ-F SETTING Setting Parameters For the fixed cycle interrupt and high-speed counter, set parameters with GX Works3. Setting the fixed cycle Set the interrupt program of the 1 ms cycle internal timer. Select [Add New Data] from "Navigation" window  [Program]  [Fixed Scan] and create the fixed scan program. The fixed scan program is registered in interrupt pointer I31.
  • Page 30 Select "Interrupt Settings" from "Navigation" window  [Parameter]  [FX5UCPU] [CPU Parameter]. Set the fixed cycle interval of I31 in "Interrupt Setting from Internal Timer" to "1 ms". 4 IQ-F SETTING 4.1 Setting Parameters...
  • Page 31: Chapter 5 Wiring

    WIRING The following shows a wiring example for the iQ-F series programmable controller of Mitsubishi Electric Corporation, an encoder, and a device. (2) Absolute encoder Gray code signal, etc. 24V X20 X21 (1) FX5UCPU COM4 • • • • •...
  • Page 32 MEMO 5 WIRING...
  • Page 33: Chapter 6 Creating Programs

    CREATING PROGRAMS Library Registration Procedure Select the library tag in the "Element Selection" window. Click the "Register to Library List" icon and select "Register Library...". The "Register Library to Library List" window appears. Select "M+CamCtr_F.mslm" and click the [Open] button. The imported FB is displayed in the "Element Selection"...
  • Page 34: Arranging The Fb

    Arranging the FB Select the FB from the "Element Selection" window and arrange it. Enter the execution commands and setting of the FB. Assign the devices which will store the execution completion state and error codes of the FB. 6 CREATING PROGRAMS 6.2 Arranging the FB...
  • Page 35: Program Example

    Program Example The program example provides the following operations on condition that an absolute encoder with 2048 resolution is used and 1 is assigned to the channel. • Execution of 0 degree offset • Execution of the cam output table setting •...
  • Page 36 Set the rotation direction to forward, table data clear to off, and table data set to off. Set the control angle data. The following shows an example for setting control using the following STEPs. STEP0 Output ON angle = 256, Output OFF angle = 768 STEP1 Output ON angle = 1280, Output OFF angle = 1536 STEP0 1536...
  • Page 37 The cam output table is set by turning on i_bEN (Execution command). 6 CREATING PROGRAMS 6.3 Program Example...
  • Page 38 Automatic angle advance function setting program In the program example, set the following items. • Set i_uCh (Channel number) to 1. • Set i_uCamNo (Cam output number) to 0. • Set the automatic angle advance. • In this program example, set i_bAngleAdvFuncClear (Angle advance function clear) to off not to clear the angle advance function setting.
  • Page 39 Set the setting data of the automatic angle advance or individual automatic angle advance in i_u21AngleAdvFuncSet (Angle advance function setting). • Set the angle advance function setting data. The following shows an example for setting control using the following STEPs. STEP0 Speed = 5, Angle advance amount = 10 STEP1 Speed = 10, Angle advance amount = 20 Rotation speed (r/min)
  • Page 40 The angle advance function setting is executed by turning on i_bEN (Execution command). 6 CREATING PROGRAMS 6.3 Program Example...
  • Page 41 Cam output program Arrange this FB in the 1 ms interrupt processing. In the program example, set the following items. • Set i_uCh (Channel number) to 1. • Enable or disable the 48 points in i_b48CamOutputNo (Cam output number). The program example uses the following labels. Label name Date type Class...
  • Page 42 Convert the resolution to the specified resolution. This program example performs calculation using 2048 encoder resolution and 1024 resolution for cam output. ((Encoder current angle)  1024  2048) Current angle = INT *1 Convert (round down) the real number to an integer. Turn on i_bEN (Execution command) in the main scan processing to start the cam output.
  • Page 43 MEMO 6 CREATING PROGRAMS 6.3 Program Example...
  • Page 44: Instruction Index

    INSTRUCTION INDEX ....15 M+CamCtr_AngleAdvFunc_F ....21 M+CamCtr_CamOutput_F ... . . 10 M+CamCtr_CamOutputTable_F...
  • Page 45 MEMO...
  • Page 46: Revisions

    Japanese manual number: SH-082059-A 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.
  • Page 48 Manual number: SH(NA)-082060ENG-A(1901) HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission. Specifications subject to change without notice.

This manual is also suitable for:

Melsec iq-f fx5Melsec iq-f fx5uMelsec iq-f fx5uc

Comments to this Manuals

Symbols: 0
Latest comments: