Mitsubishi Electric MELSEC iQ-F Manual Download Page 19

2  POSITIONING MODULE FB

2.4  M+FX5PG_MPG

17

2

Error code

Processing

• By turning ON or OFF i_bEN (Execution command), the manual pulse generator operation is enabled or disabled.
• This FB is constantly executed after i_bEN (Execution command) is turned on.
• The workpiece moves for the number of pulses input from the manual pulse generator while o_bOK (Normal completion) is 

ON.

• If the setting value of the target axis is out of the setting range, o_bErr (Error completion) turns on and the processing of this 

FB is interrupted. In addition, the error code 100 (hexadecimal) is stored in o_uErrId (Error code). For the error code, refer to 

Page 17 Error code.

FB compilation method

Macro type

FB operation

Always executed

Timing chart of I/O signals

[For normal completion (Axis 1)]

[For error completion (Axis 1)]

Restrictions or precautions

• This FB does not include the error recovery processing. Program the error recovery processing separately in accordance 

with the required system operation.

• This FB cannot be used in an interrupt program.
• Do not use this FB in programs that are executed only once, such as a subroutine program or FOR-NEXT loop, because 

i_bEN (Execution command) cannot be turned off and the normal operation cannot be acquired. Always use this FB in 
programs that can turn off i_bEN (Execution command).

• Do not change i_uAxis (Target axis) while i_bEN (Execution command) is ON.
• When this FB is used twice or more, precaution must be taken to avoid duplication of the target axis.
• Every input must be provided with a value for proper FB operation.
• The pulse output mode and external input/output signal logic, etc. must be set according to the connected devices and 

system before operating the positioning module. Set the GX Works3 module parameters according to the application. Refer 
to the 

MELSEC iQ-F FX5 User's Manual (Positioning Control - Intelligent function module) for details on setting the 

module parameters.

Error code (hexadecimal)

Description

Action

100

The set value of i_uAxis (Target axis) is out of the range.
The target axis is not within the range of 1 to 4.

Try again after checking the setting.

Item

Description

0

1

0

0

Cd.21: Manual pulse generator

enable flag

BUSY signal (Md.141: BUSY.b0)

i_bEN

o_bENO

o_bOK

o_bErr

o_uErrId

o_bErr

Cd.21: Manual pulse generator

enable flag

BUSY signal (Md.141: BUSY.b0)

i_bEN

o_bENO

o_bOK

o_uErrId

Error code

0

0

0

Summary of Contents for MELSEC iQ-F

Page 1: ...MELSEC iQ F FX5 Positioning Module Function Block Reference ...

Page 2: ......

Page 3: ...5PG_JOG 12 2 4 M FX5PG_MPG 16 2 5 M FX5PG_ChangeSpeed 18 2 6 M FX5PG_ChangeAccDecTime 21 2 7 M FX5PG_ChangePosition 25 2 8 M FX5PG_Restart 28 2 9 M FX5PG_OperateError 30 2 10 M FX5PG_InitializeParameter 34 2 11 M FX5PG_WriteFlash 36 2 12 M FX5PG_ABRST 38 2 13 M FX5PG_StartAddressOffsetPositioning 42 2 14 M FX5PG_SetTimeOffsetPositioning 47 INDEX 52 REVISIONS 54 ...

Page 4: ...Speed Changes the speed M FX5PG_ChangeAccDecTime Changes the acceleration deceleration time during speed change M FX5PG_ChangePosition Changes the target position M FX5PG_Restart Restarts an axis that has stopped M FX5PG_OperateError Monitors errors and warnings and resets errors M FX5PG_InitializeParameter Initializes parameters M FX5PG_WriteFlash Writes positioning data and block start data in t...

Page 5: ...1 FUNCTION BLOCK FB LIST 3 1 MEMO ...

Page 6: ...DataNo Positioning data No Word Unsigned 1 to 600 Specify the positioning data No No Variable name Name Data type Default value Description 5 o_bENO Execution status Bit OFF ON The execution command is ON OFF The execution command is OFF 6 o_bOK Normal completion Bit OFF When this label is ON it indicates that the positioning data setting has been completed 7 o_bErr Error completion Bit OFF When t...

Page 7: ...ircular interpolation control with sub point specified ABS 0EH INC Circular interpolation control with sub point specified INC 0FH ABS Circular interpolation control with center point specified ABS CW 10H ABS Circular interpolation control with center point specified ABS CCW 11H INC Circular interpolation control with center point specified INC CW 12H INC Circular interpolation control with center...

Page 8: ... 18 M code On signal output timing 1 WITH mode 2 AFTER mode 17 pb_uABS Da 28 ABS direction in degrees Word Unsigned 0 to 3 Set the ABS movement direction for the position control when the unit is degree When 4 or higher which is out of the setting range is specified b0 and 1 are enabled For example when 4 is set 0 is applied 0 Setting value of Cd 40 ABS direction in degrees 1 ABS clockwise 2 ABS c...

Page 9: ...nit setting 2 Not used Set 0 Item Description Available device Target module FX5 20PG P Target CPU FX5U CPU FX5UC CPU Engineering tool GX Works3 Version 1 035M or later Language Ladder diagram Number of basic steps 274 steps The number of FB steps integrated in the program varies depending on the CPU module used the input output definition and the setting options of GX Works3 For the setting optio...

Page 10: ... value for proper FB operation The pulse output mode and external input output signal logic etc must be set according to the connected devices and system before operating the positioning module Set the GX Works3 module parameters according to the application Refer to the MELSEC iQ F FX5 User s Manual Positioning Control Intelligent function module for details on setting the module parameters Error...

Page 11: ...Set the positioning start No corresponding to the control to be started in Cd 3 Positioning start No 1 to 600 Positioning data No 7000 to 7004 Block start specification 9001 Machine OPR 9002 Fast OPR 9003 Current value change 9004 Multiple axes simultaneous start No Variable name Name Data type Default value Description 5 o_bENO Execution status Bit OFF ON The execution command is ON OFF The execu...

Page 12: ... ready signal Md 140 Module status b0 ON Positioning start signal Cd 184 Positioning start signal OFF Start complete signal Md 31 Status b14 OFF BUSY signal Md 141 BUSY b0 b1 OFF When Start complete signal Md 31 Status b14 turns on or i_bEN Execution command is turned off Positioning start signal Cd 184 Positioning start signal is turned off If the setting value of the target axis is out of the se...

Page 13: ...r or buffer memory Every input must be provided with a value for proper FB operation The pulse output mode and external input output signal logic etc must be set according to the connected devices and system before operating the positioning module Set the GX Works3 module parameters according to the application Refer to the MELSEC iQ F FX5 User s Manual Positioning Control Intelligent function mod...

Page 14: ...JogSpd Cd 17 JOG speed Double Word Unsigned 0 to 2000000000 0 to 3000000000 0 to 5000000 Specify the JOG speed Set 0 for the inching operation Pr 1 Unit setting 0 mm 0 to 2000000000 10 2 mm min Pr 1 Unit setting 1 inch 0 to 2000000000 10 3 inch min Pr 1 Unit setting 2 degree 0 to 3000000000 10 3 degree min Pr 1 Unit setting 3 pulse 0 to 5000000 pulse s 7 i_uInching Cd 16 Inching movement amount Wo...

Page 15: ...mmand and i_bRJog Reverse run JOG command are on at the same time the operation stops When i_bEN Execution command is turned off during the operation that has been started by i_bFJog Forward run JOG command or i_bRJog Reverse run JOG command the operation stops When i_bRJog Reverse run JOG command is turned on during the forward run JOG operation the operation stops However when i_bRJog Reverse ru...

Page 16: ... i_bFJog Cd 181 Forward run JOG start signal Cd 182 Reverse run JOG start signal i_bEN o_bENO i_bRJog o_bOK o_bErr o_uErrId BUSY signal Md 141 BUSY b0 Cd 181 Forward run JOG start signal Cd 182 Reverse run JOG start signal BUSY signal Md 141 BUSY b0 o_bENO i_bFJog i_bRJog o_bOK o_bErr o_uErrId i_bEN 0 Cd 181 Forward run JOG start signal Cd 182 Reverse run JOG start signal o_bENO i_bFJog i_bRJog o_...

Page 17: ...id duplication of the target axis Setting a large value for the JOG speed from the beginning is dangerous For safety set a small value first and increase the value gradually while checking the operation to determine the value optimal for the control When values other than 0 are set in both i_uInching Cd 16 Inching movement amount and i_udJogSpd Cd 17 JOG speed the inching operation is performed Ev...

Page 18: ...ue is 10001 or higher the magnification is 10000 No Variable name Name Data type Default value Description 5 o_bENO Execution status Bit OFF ON The execution command is ON OFF The execution command is OFF 6 o_bOK Normal completion Bit OFF When this label is ON it indicates that the manual pulse generator operation has been enabled 7 o_bErr Error completion Bit OFF When this label is ON it indicate...

Page 19: ...ly once such as a subroutine program or FOR NEXT loop because i_bEN Execution command cannot be turned off and the normal operation cannot be acquired Always use this FB in programs that can turn off i_bEN Execution command Do not change i_uAxis Target axis while i_bEN Execution command is ON When this FB is used twice or more precaution must be taken to avoid duplication of the target axis Every ...

Page 20: ...Unsigned 0 to 2000000000 0 to 3000000000 0 to 5000000 Set a new speed Pr 1 Unit setting 0 mm 0 to 2000000000 10 2 mm min Pr 1 Unit setting 1 inch 0 to 2000000000 10 3 inch min Pr 1 Unit setting 2 degree 0 to 3000000000 10 3 degree min Pr 1 Unit setting 3 pulse 0 to 5000000 pulse s No Variable name Name Data type Default value Description 5 o_bENO Execution status Bit OFF ON The execution command i...

Page 21: ...n command the speed used for the control is changed to a new speed If the setting value of the target axis is out of the setting range o_bErr Error completion turns on and the processing of this FB is interrupted In addition the error code 100 hexadecimal is stored in o_uErrId Error code For the error code refer to Page 20 Error code FB compilation method Macro type FB operation Pulse execution mu...

Page 22: ...n command is turned on while BUSY signal Md 141 BUSY b0 b1 is OFF o_bErr Error completion turns on and the processing of this FB is interrupted In addition the error code 201 hexadecimal is stored in o_uErrId Error code For the error code refer to Page 20 Error code The pulse output mode and external input output signal logic etc must be set according to the connected devices and system before ope...

Page 23: ...608 ms Set a new acceleration time When 0 is set the acceleration time is not changed after the speed is changed In this case the operation is controlled at the previously set acceleration time 6 i_udNewDecTime Cd 11 New deceleration time value Double Word Unsigned 0 to 8388608 ms Set a new deceleration time When 0 is set the deceleration time is not changed after the speed is changed In this case...

Page 24: ...e Cd 10 New acceleration time value and i_udNewDecTime Cd 11 New deceleration time value are set and Cd 12 Acceleration deceleration time change during speed change enable disable selection is changed to 1 Acceleration deceleration time change enabled When i_bEnable Acceleration deceleration time change enabled flag is OFF i_udNewAccTime Cd 10 New acceleration time value and i_udNewDecTime Cd 11 N...

Page 25: ...ime value Cd 12 Acceleration deceleration time change during speed change enable disable selection i_bEN o_bENO i_bEnable enable o_bOK o_bErr o_uErrId 0 Present value Present value 0 1 Cd 11 New deceleration time value Cd 10 New acceleration time value Cd 12 Acceleration deceleration time change during speed change enable disable selection i_bEN o_bENO i_bEnable disable o_bOK o_bErr o_uErrId Prese...

Page 26: ...Execution command When this FB is used twice or more precaution must be taken to avoid duplication of the target axis Every input must be provided with a value for proper FB operation The pulse output mode and external input output signal logic etc must be set according to the connected devices and system before operating the positioning module Set the GX Works3 module parameters according to the ...

Page 27: ...ng 0 mm 2147483648 to 2147483647 10 1 μm Pr 1 Unit setting 1 inch 2147483648 to 2147483647 10 5 inch Pr 1 Unit setting 2 degree 0 to 35999999 10 5 degree Pr 1 Unit setting 3 pulse 2147483648 to 2147483647 pulse INC Pr 1 Unit setting 0 mm 2147483648 to 2147483647 10 1 μm Pr 1 Unit setting 1 inch 2147483648 to 2147483647 10 5 inch Pr 1 Unit setting 2 degree 2147483648 to 2147483647 10 5 degree Pr 1 ...

Page 28: ...f basic steps 150 steps The number of FB steps integrated in the program varies depending on the CPU module used the input output definition and the setting options of GX Works3 For the setting options of GX Works3 refer to GX Works3 Operating Manual Processing By turning on i_bEN Execution command the target position is changed according to the value set in i_dPosChgAdr Cd 27 Target position chan...

Page 29: ...cimal is stored in o_uErrId Error code For the error code refer to Page 27 Error code The pulse output mode and external input output signal logic etc must be set according to the connected devices and system before operating the positioning module Set the GX Works3 module parameters according to the application Refer to the MELSEC iQ F FX5 User s Manual Positioning Control Intelligent function mo...

Page 30: ...ilable device Target module FX5 20PG P Target CPU FX5U CPU FX5UC CPU Engineering tool GX Works3 Version 1 035M or later Language Ladder diagram Number of basic steps 148 steps The number of FB steps integrated in the program varies depending on the CPU module used the input output definition and the setting options of GX Works3 For the setting options of GX Works3 refer to GX Works3 Operating Manu...

Page 31: ...ed with a value for proper FB operation The pulse output mode and external input output signal logic etc must be set according to the connected devices and system before operating the positioning module Set the GX Works3 module parameters according to the application Refer to the MELSEC iQ F FX5 User s Manual Positioning Control Intelligent function module for details on setting the module paramet...

Page 32: ...s ON OFF The execution command is OFF 6 o_bOK Normal completion Bit OFF When this label is ON it indicates that error reset has been completed 7 o_bModuleErr Axis error detection Bit OFF When this label is ON it indicates that an axis error has occurred 8 o_uModuleErrId Axis error code Word Unsigned 0 The error code of the error that has occurred in the module of the specified axis is stored 9 o_b...

Page 33: ...g on i_bEN Execution command errors of the target axis are monitored When a module error occurs an error code is stored in o_uModuleErrId Axis error code After i_bEN Execution command is turned ON the generated error is reset by turning on i_bErrReset Error reset command When a warning occurs in the module the warning can be reset by turning on i_bErrReset Error reset command If the setting value ...

Page 34: ... Axis warning detection signal Md 31 Status b9 o_bModuleWarn o_bOK o_bErr o_uErrId i_bErrReset i_bEN o_bENO Cd 5 Axis error reset Error detection signal Md 31 Status b13 o_bModuleErr o_uModuleErrId Error code 0 0 0 0 0 o_uModuleWarnId o_bModuleWarn o_bOK o_bErr o_uErrId i_bErrReset i_bEN o_bENO Error detection signal Md 31 Status b13 o_bModuleErr o_uModuleErrId Cd 5 Axis error reset Axis warning d...

Page 35: ...ed twice or more precaution must be taken to avoid duplication of the target axis Do not change i_uAxis Target axis while i_bEN Execution command is ON Every input must be provided with a value for proper FB operation The pulse output mode and external input output signal logic etc must be set according to the connected devices and system before operating the positioning module Set the GX Works3 m...

Page 36: ... Structure The setting range differs depending on the module label Specifies the module label for the positioning module No Variable name Name Data type Default value Description 3 o_bENO Execution status Bit OFF ON The execution command is ON OFF The execution command is OFF 4 o_bOK Normal completion Bit OFF When this label is ON it indicates that parameter initialization has been completed 5 o_b...

Page 37: ... accordance with the required system operation This FB cannot be used in an interrupt program Do not use this FB in programs that are executed only once such as a subroutine program or FOR NEXT loop because i_bEN Execution command cannot be turned off and the normal operation cannot be acquired Always use this FB in programs that can turn off i_bEN Execution command Every input must be provided wi...

Page 38: ... Module label Structure The setting range differs depending on the module label Specifies the module label for the positioning module No Variable name Name Data type Default value Description 3 o_bENO Execution status Bit OFF ON The execution command is ON OFF The execution command is OFF 4 o_bOK Normal completion Bit OFF When this label is ON it indicates that writing the setting data to the flas...

Page 39: ...very processing separately in accordance with the required system operation This FB cannot be used in an interrupt program Do not use this FB in programs that are executed only once such as a subroutine program or FOR NEXT loop because i_bEN Execution command cannot be turned off and the normal operation cannot be acquired Always use this FB in programs that can turn off i_bEN Execution command Ev...

Page 40: ...S transmission data ready Bit ON OFF The ready signal from the servo amplifier No Variable name Name Data type Default value Description 7 o_bENO Execution status Bit OFF ON The execution command is ON OFF The execution command is OFF 8 o_bOK Normal completion Bit OFF When this label is ON it indicates that the absolute position restoration request has been completed 9 o_bServoOn Servo ON signal B...

Page 41: ...depending on the CPU module used the input output definition and the setting options of GX Works3 For the setting options of GX Works3 refer to GX Works3 Operating Manual Processing By turning on i_bEN Execution command the absolute position is restored When the absolute position restoration is completed with an error o_bAbsNG ABS error turns on and an error code is stored in o_uAbsErrId ABS error...

Page 42: ...rror Item Description 0 Executed Unexecuted Unexecuted 0 o_bAbsNG Absolute position restoration instruction o_bOK o_uAbsErrId o_bErr o_uErrId i_bEN o_bENO Error code 0 0 Unexecuted 0 o_bAbsNG Absolute position restoration instruction o_bOK o_uAbsErrId o_bErr o_uErrId i_bEN o_bENO Executed Unexecuted Unexecuted 0 0 Error code o_bAbsNG Absolute position restoration instruction o_bOK o_uAbsErrId o_bE...

Page 43: ...n after the absolute position restoration has been completed Do not turn off i_bEN Execution command during the absolute position restoration If i_bEN Execution command is turned off before the absolute position restoration is completed an error occurs when i_bEN Execution command is turned on and the error 1861 Dedicated instruction error is stored in o_uAbsErrId ABS error code When the error 186...

Page 44: ...wing axis The setting range varies according to the positioning module in use 5 i_uStartBlock Start block Word Unsigned 0 to 4 Specify the start block 0 Start block 0 1 Start block 1 2 Start block 2 3 Start block 3 4 Start block 4 6 i_uPoint Point Word Unsigned 1 to 50 Specify the point number 7 i_bShape Da 11 Shape Bit ON OFF Set the shape OFF End ON Continuous 8 i_uStartDataNo Da 12 Start data N...

Page 45: ...bel will not turn ON 13 o_bErr Error completion Bit OFF When this label is ON it indicates that an error has occurred in the FB 14 o_uErrId Error code Word Unsigned 0 Stores the error code that occurred in the FB Item Description Available device Target module FX5 20PG P Target CPU FX5U CPU FX5UC CPU Engineering tool GX Works3 Version 1 035M or later Language Ladder diagram Number of basic steps 6...

Page 46: ...rror code If the set value of the start block is out of the range o_bErr Error completion turns ON and processing of this FB is interrupted In addition error code 106 hexadecimal is stored in o_uErrId Error code For details on the error code refer to the Page 46 Error code If the set value of the point is out of the range o_bErr Error completion turns ON and processing of this FB is interrupted In...

Page 47: ...ositioning start point number o_bOK o_bErr o_uErrId Da 18 Parameter 1 Da 15 Condition target Da 14 Parameter Da 13 Special start instruction Da 16 Condition operator Da 17 Address Da 11 Shape o_bENO i_bEN Da 12 Start data No Present value Present value Present value Error code 0 0 Present value Present value Present value Present value Present value Present value Present value Cd 184 Positioning s...

Page 48: ...itioning module Set the GX Works3 module parameters according to the application Refer to the MELSEC iQ F FX5 User s Manual Positioning Control Intelligent function module for details on setting the module parameters Error code hexadecimal Description Action 103 The i_uPrecedingAxis Preceding axis setting value is out of the setting range The preceding axis is not set between 1 and 4 Try again aft...

Page 49: ...ries according to the positioning module in use 5 i_uPrecedingAxisDat aNo Preceding axis data No Word Unsigned 1 to 600 Set the positioning data No for the preceding axis 6 i_uFollowingAxisDat aNo Following axis data No Word Unsigned 1 to 600 Set the positioning data No for the following axis 7 i_uOffsetTime Offset time Word Unsigned 0 to 65535 Set the start timing offset time No Variable name Nam...

Page 50: ...e o_bErr Error completion turns ON and processing of this FB is interrupted In addition error code 104 hexadecimal is stored in o_uErrId Error code For details on the error code refer to the Page 51 Error code If the same axis number is set for the preceding axis and following axis o_bErr Error completion turns ON and processing of this FB is interrupted In addition error code 105 hexadecimal is s...

Page 51: ...lue Present value Da 9 Dwell time Da 10 M code Da 7 Arc address Da 8 Command speed Cd 30 Simultaneous start target axis start data No Axis 1 start data No Cd 31 Simultaneous start target axis start data No Axis 2 start data No Cd 32 Simultaneous start target axis start data No Axis 3 start data No Cd 33 Simultaneous start target axis start data No Axis 4 start data No Da 27 M code ON signal output...

Page 52: ...ommand speed Da 27 M code ON signal output timing Da 28 ABS direction in degrees Da 29 Interpolation speed specification method o_bOK o_bErr o_uErrId Da 6 Positioning address movement amount Da 2 Control method Da 3 Acceleration time Da 4 Deceleration time Da 5 Axis to be interpolated o_bENO i_bEN Da 1 Operation pattern Cd 30 Simultaneous start target axis start data No Axis 1 start data No Cd 31 ...

Page 53: ...g axis and following axis do not start at a simultaneous timing Instead the following axis starts with a delay Every input must be provided with a value for proper FB operation The pulse output mode and external input output signal logic etc must be set according to the connected devices and system before operating the positioning module Set the GX Works3 module parameters according to the applica...

Page 54: ... M FX5PG_ChangeSpeed 18 M FX5PG_InitializeParameter 34 M FX5PG_JOG 12 M FX5PG_MPG 16 M FX5PG_OperateError 30 M FX5PG_Restart 28 M FX5PG_SetPositioningData 4 M FX5PG_SetTimeOffsetPositioning 47 M FX5PG_StartAddressOffsetPositioning 42 M FX5PG_StartPositioning 9 M FX5PG_WriteFlash 36 ...

Page 55: ...I 53 MEMO ...

Page 56: ...tion This manual confers no industrial property rights or any 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 57: ......

Page 58: ...A KU TOKYO 100 8310 JAPAN Specifications are subject to change without notice When exported from Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission Manual number JY997D75101A ...

Reviews: