Mitsubishi Electric MELSEC-Q64DA Reference Manual

Mitsubishi Electric MELSEC-Q64DA Reference Manual

Digital-analog converter module

Advertisement

Quick Links

MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual
Applicable modules:
Reference Manual Revision History ............................................................................................................................... 2
1.
Overview ............................................................................................................................................................ 3
1.1.
Overview of the FB Library ............................................................................................................................. 3
1.2.
Function of the FB Library ............................................................................................................................... 3
1.3.
System Configuration Example ...................................................................................................................... 4
1.4.
Relevant Manuals ........................................................................................................................................... 4
1.5.
Note ................................................................................................................................................................. 4
2.
Details of the FB Library ..................................................................................................................................... 5
2.1.
M+Q64DA_WriteDAVal (DA conversion data write) ....................................................................................... 5
2.2.
M+Q64DA_WriteAllDAVal (DA conversion data write (All CHs)) .................................................................... 9
2.3.
M+Q64DA_SetDAConversion (DA conversion enable/disable setting) ....................................................... 13
2.4.
M+Q64DA_SetDAOutput (DA output enable/disable setting) ...................................................................... 17
2.5.
M+Q64DA_RequestSetting (Operating condition setting request operation) .............................................. 21
2.6.
M+Q64DA_SetOffsetVal (Offset setting) ...................................................................................................... 25
2.7.
M+Q64DA_SetGainVal (Gain setting) .......................................................................................................... 30
2.8.
M+Q64DA_ErrorOperation (Error operation) ............................................................................................... 35
FB Library Application Examples ......................................................................................................... 39
Q64DA, Q64DAN
MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual
<CONTENTS>
1/49
FBM-M042-B

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Electric MELSEC-Q64DA

  • Page 1: Table Of Contents

    MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual Applicable modules: Q64DA, Q64DAN <CONTENTS> Reference Manual Revision History ..........................2 Overview ................................3 1.1. Overview of the FB Library ..........................3 1.2. Function of the FB Library ..........................3 1.3. System Configuration Example ........................4 1.4.
  • Page 2: Reference Manual Revision History

    Reference Manual Revision History Reference Manual Number Date Description FBM-M042-A 2010/12/10 First edition FBM-M042-B 2015/03/27 1) Added applicable GX Works2 Version. •This FB is able to install on GX Works2 of all language versions. 2) Added the following "FB Version Upgrade History". •M+Q64DA_SetOffsetVal •M+Q64DA_SetGainVal MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual...
  • Page 3: Overview

    Overview 1.1. Overview of the FB Library This FB Library is for using the MELSEC-Q Digital-Analog Converter Module. 1.2. Function of the FB Library Item Description M+Q64DA_WriteDAVal Writes DA conversion data of a specified channel. M+Q64DA_WriteAllDAVal Writes DA conversion data of all channels. M+Q64DA_SetDAConversion Sets the DA conversion enable/disable setting of a specified channel or all channels.
  • Page 4: System Configuration Example

    1.3. System Configuration Example D/A converter module (Q64DA) CPU module (QCPU) Input module (QX40) Power supply module Output module (QY40) 1.4. Relevant Manuals •Digital-Analog Converter Module User's Manual •QCPU User's Manual (Hardware Design, Maintenance and Inspection) •GX Works2 Version 1 Operating Manual (Common) •GX Works2 Version 1 Operating Manual (Simple Project, Function Block) 1.5.
  • Page 5: Details Of The Fb Library

    Details of the FB Library 2.1. M+Q64DA_WriteDAVal (DA conversion data write) FB Name M+Q64DA_WriteDAVal Function Overview Item Description Function overview Writes DA conversion data of a specified channel. M+Q64DA_WriteDAVal Symbol Execution command B : FB_EN FB_ENO : B Execution status Module start XY address W : i_Start_IO_No FB_OK : B...
  • Page 6 Item Description Function description 1) By turning ON FB_EN (Execution command), DA conversion data is written to the specified channel. 2) The DA conversion data to be written depends on the resolution mode setting. 3) When the input value is invalid, the FB_ERROR output turns ON, processing is interrupted, and the error code is stored in ERROR_ID (Error code).
  • Page 7 Item Description •Digital-Analog Converter Module User's Manual Relevant manual •QCPU User's Manual (Hardware Design, Maintenance and Inspection) •GX Works2 Version 1 Operating Manual (Common) •GX Works2 Version 1 Operating Manual (Simple Project, Function Block) Error codes Error code list Error code Description 10 (Decimal) The specified target channel is not valid.
  • Page 8 FB Version Upgrade History Version Date Description 1.00A 2010/12/10 First edition Note This chapter includes information related to the M+Q64DA_WriteDAVal function block. It does not include information on restrictions of use such as combination with digital-analog converter modules or programmable controller CPUs. Before using any Mitsubishi products, please read all the relevant manuals.
  • Page 9: M+Q64Da_Writealldaval (Da Conversion Data Write (All Chs))

    2.2. M+Q64DA_WriteAllDAVal (DA conversion data write (All CHs)) FB Name M+Q64DA_WriteAllDAVal Function Overview Item Description Function overview Writes DA conversion data of all channels. Symbol M+Q64DA_WriteAllDAVal Execution command B : FB_EN FB_ENO : B Execution status Module start XY address W : i_Start_IO_No FB_OK : B Completed without error...
  • Page 10 Item Description Function description 1) By turning ON FB_EN (Execution command), DA conversion data is written to the all channels. 2) The DA conversion data to be written to the all channels depends on the resolution mode setting. Compiling method Macro type Restrictions and 1) The FB does not include error recovery processing.
  • Page 11 Error codes Error code list Error code Description None No errors are stored for this FB. Labels Input labels Name (Comment) Label name Data Setting range Description type Execution FB_EN ON, OFF ON: The FB is activated. command OFF: The FB is not activated. Module start XY i_Start_IO_No Word...
  • Page 12 Output labels Name (Comment) Label name Data Initial Description type value Execution status FB_ENO ON: Execution command is ON. OFF: Execution command is OFF. Completed without FB_OK When ON, it indicates that DA conversion values of error all channels are being written. Error flag FB_ERROR When ON, it indicates that an error has occurred.
  • Page 13: M+Q64Da_Setdaconversion (Da Conversion Enable/Disable Setting)

    2.3. M+Q64DA_SetDAConversion (DA conversion enable/disable setting) FB Name M+Q64DA_SetDAConversion Function Overview Item Description Function overview Sets the DA conversion enable/disable setting of a specified channel or all channels. M+Q64DA_SetDAConversion Symbol Execution command B : FB_EN FB_ENO : B Execution status Module start XY address W : i_Start_IO_No FB_OK : B...
  • Page 14 Item Description Function description 1) By turning ON FB_EN (Execution command), the DA conversion enable/disable setting of the specified channel is set. 2) FB operation is one-shot only, triggered by the FB_EN signal. 3) The setting value is enabled by turning ON the operating condition setting request signal (Y9) or by executing the operating condition setting request FB (M+Q64DA_RequestSetting).
  • Page 15 Item Description Timing chart [When operation completes without error] [When an error occurs] FB_EN FB_EN (Execution command) (Execution command) FB_ENO FB_ENO (Execution status) (Execution status) DA conversion enable/disable DA conversion enable/disable No processing No processing Writing No processing setting write processing setting write processing FB_OK FB_OK...
  • Page 16 Output labels Name (Comment) Label name Data Initial Description type value Execution status FB_ENO ON: Execution command is ON. OFF: Execution command is OFF. Completed without FB_OK When ON, it indicates that DA conversion error enable/disable setting is completed. Error flag FB_ERROR When ON, it indicates that an error has occurred.
  • Page 17: M+Q64Da_Setdaoutput (Da Output Enable/Disable Setting)

    2.4. M+Q64DA_SetDAOutput (DA output enable/disable setting) FB Name M+Q64DA_SetDAOutput Function Overview Item Description Function overview Sets the DA output enable/disable setting of a specified channel or all channels. M+Q64DA_SetDAOutput Symbol Execution command B : FB_EN FB_ENO : B Execution status Module start XY address W : i_Start_IO_No FB_OK : B...
  • Page 18 Item Description Function description 1) By turning ON FB_EN (Execution command), DA output enable/disable setting of the specified channel or all channels is set. 2) When the input value is invalid, the FB_ERROR output turns ON, processing is interrupted, and the error code is stored in ERROR_ID (Error code). Refer to the error code explanation section for details.
  • Page 19 Item Description •Digital-Analog Converter Module User's Manual Relevant manual •QCPU User's Manual (Hardware Design, Maintenance and Inspection) •GX Works2 Version 1 Operating Manual (Common) •GX Works2 Version 1 Operating Manual (Simple Project, Function Block) Error codes Error code list Error code Description 10 (Decimal) The specified target channel is not valid.
  • Page 20 Output labels Name (Comment) Label name Data Initial Description type value Execution status FB_ENO ON: Execution command is ON. OFF: Execution command is OFF. Completed without FB_OK When ON, it indicates that DA output enable/disable error setting is completed. Error flag FB_ERROR When ON, it indicates that an error has occurred.
  • Page 21: M+Q64Da_Requestsetting (Operating Condition Setting Request Operation)

    2.5. M+Q64DA_RequestSetting (Operating condition setting request operation) FB Name M+Q64DA_RequestSetting Function Overview Item Description Function overview Enables settings of each function. M+Q64DA_RequestSetting Symbol Execution command B : FB_EN FB_ENO : B Execution status Module start XY address W : i_Start_IO_No FB_OK : B Completed without error FB_ERROR : B...
  • Page 22 Item Description Function description 1) By turning ON FB_EN (Execution command), settings of each function are enabled. 2) The buffer memory is updated by executing the DA conversion enable/disable setting FB/DA output enable/disable setting FB. The set data, however, is not enabled. Execute this FB to enable the settings.
  • Page 23 Item Description •Digital-Analog Converter Module User's Manual Relevant manual •QCPU User's Manual (Hardware Design, Maintenance and Inspection) •GX Works2 Version 1 Operating Manual (Common) •GX Works2 Version 1 Operating Manual (Simple Project, Function Block) Error codes Error code list Error code Description None No errors are stored for this FB.
  • Page 24 FB Version Upgrade History Version Date Description 1.00A 2010/12/10 First edition Note This chapter includes information related to the M+Q64DA_RequestSetting function block. It does not include information on restrictions of use such as combination with digital-analog converter modules or programmable controller CPUs. Before using any Mitsubishi products, please read all the relevant manuals.
  • Page 25: M+Q64Da_Setoffsetval (Offset Setting)

    2.6. M+Q64DA_SetOffsetVal (Offset setting) FB Name M+Q64DA_SetOffsetVal Function Overview Item Description Function overview Performs offset setting of a specified channel. Symbol M+Q64DA_SetOffsetVal Execution command B : FB_EN FB_ENO : B Execution status Module start XY address W : i_Start_IO_No FB_OK : B Completed without error Channel No.
  • Page 26 Item Description Function description 1) By turning ON FB_EN (Execution command), the offset value of the specified channel is set. 2) To adjust the D/A output, set i_Adjust_Amount (Offset/gain adjustment amount) and turn OFF i_Value_Change (Setting value change command) and then ON while FB_EN (Execution command) is ON.
  • Page 27 Item Description Timing chart [When operation completes without error] FB_EN(Execution command) FB_ENO (Execution status) Operation mode Normal mode Offset/gain setting mode Normal mode CH offset command Channel change request (YB) i_Value_Change (Setting value change command) Setting value change request (YC) i_Write_Offset (User range write command) User range write request...
  • Page 28 Error codes Error code list Error code Description 10 (Decimal) The specified target channel is not valid. The target channel is not within the range of the number of channels of the mounted module. Please try again after confirming the setting. Labels Input labels Name (Comment)
  • Page 29 Output labels Name (Comment) Label name Data Initial Description type value Execution status FB_ENO ON: Execution command is ON. OFF: Execution command is OFF. Completed without FB_OK When ON, it indicates that the offset setting of the error specified channel is completed. Error flag FB_ERROR When ON, it indicates that an error has occurred.
  • Page 30: M+Q64Da_Setgainval (Gain Setting)

    2.7. M+Q64DA_SetGainVal (Gain setting) FB Name M+Q64DA_SetGainVal Function Overview Item Description Function overview Performs gain setting of a specified channel. M+Q64DA_SetGainVal Symbol Execution command B : FB_EN FB_ENO : B Execution status Module start XY address W : i_Start_IO_No FB_OK : B Completed without error Channel No.
  • Page 31 Item Description Function description 1) By turning ON FB_EN (Execution command), the gain value of the specified channel is set. 2) To adjust the D/A output, set i_Adjust_Amount (Offset/gain adjustment amount) and turn OFF i_Value_Change (Setting value change command) and then ON while FB_EN (Execution command) is ON.
  • Page 32 Item Description Timing chart [When operation completes without error] FB_EN(Execution command) FB_ENO(Execution status) Operation mode Normal mode Offset/gain setting mode Normal mode CH offset command Channel change request (YB) i_Value_Change (Setting value change command) Setting value change request (YC) i_Write_Gain (User range write command) User range write request (YA)
  • Page 33 Item Description •Digital-Analog Converter Module User's Manual Relevant manual •QCPU User's Manual (Hardware Design, Maintenance and Inspection) •GX Works2 Version 1 Operating Manual (Common) •GX Works2 Version 1 Operating Manual (Simple Project, Function Block) Error codes Error code list Error code Description 10 (Decimal) The specified target channel is not valid.
  • Page 34 Output labels Name (Comment) Label name Data Initial Description type value Execution status FB_ENO ON: Execution command is ON. OFF: Execution command is OFF. Completed without FB_OK When ON, it indicates that the gain setting of the error specified channel is completed. Error flag FB_ERROR When ON, it indicates that an error has occurred.
  • Page 35: M+Q64Da_Erroroperation (Error Operation)

    2.8. M+Q64DA_ErrorOperation (Error operation) FB Name M+Q64DA_ErrorOperation Function Overview Item Description Function overview Monitors error codes and performs error reset. Symbol M+Q64DA_ErrorOperation Execution command B : FB_EN FB_ENO : B Execution status Module start XY address W : i_Start_IO_No FB_OK : B Completed without error Error reset request B : i_ErrorReset...
  • Page 36 Item Description Number of steps 185 steps (for MELSEC-Q series universal model CPU) * The number of steps of the FB in a program depends on the CPU model that is used and input and output definition. Function description 1) By turning ON FB_EN (Execution command), error information is read. 2) When the error reset request is ON, error clear is performed.
  • Page 37 Item Description •Digital-Analog Converter Module User's Manual Relevant manual •QCPU User's Manual (Hardware Design, Maintenance and Inspection) •GX Works2 Version 1 Operating Manual (Common) •GX Works2 Version 1 Operating Manual (Simple Project, Function Block) Error codes Error code list Error code Description None No errors are stored for this FB.
  • Page 38 FB Version Upgrade History Version Date Description 1.00A 2010/12/10 First edition Note This chapter includes information related to the M+Q64DA_ErrorOperation function block. It does not include information on restrictions of use such as combination with digital-analog converter modules or programmable controller CPUs. Before using any Mitsubishi products, please read all the relevant manuals.
  • Page 39: Appendix 1. Fb Library Application Examples

    Appendix 1. FB Library Application Examples Q64DA FB application examples are as follows. 1) System configuration D/A converter module (Q64DA) CPU module (QCPU) Input module (QX40) Power supply module Output module (QY40) X/Y00 X/Y0F Reminder • Every input must be provided with a value for proper FB operation. If not set, the values will be unspecified.
  • Page 40 2) List of devices External input (commands) Relay Device FB function name Application (ON details) Device FB function name Application (ON details) Error operation Error reset request DA conversion data write request DA conversion data write DA conversion data write FB ready External output (checks) DA conversion data write complete Device...
  • Page 41 3) Global label setting None 4) Application example settings a) Common setting Input and output item Value Description Module start XY address Specify the starting XY address where the Q64DA is mounted. MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual FBM-M042-B 41/49...
  • Page 42 5) Programs M+Q64DA_WriteDAVal (DA conversion data write) MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual FBM-M042-B 42/49...
  • Page 43 M+Q64DA_WriteAllDAVal (DA conversion data write (All CHs)) MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual FBM-M042-B 43/49...
  • Page 44 M+Q64DA_SetDAConversion (DA conversion enable/disable setting) MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual FBM-M042-B 44/49...
  • Page 45 M+Q64DA_SetDAOutput (DA output enable/disable setting) MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual FBM-M042-B 45/49...
  • Page 46 M+Q64DA_RequestSetting (Operating condition setting request operation) MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual FBM-M042-B 46/49...
  • Page 47 M+Q64DA_SetOffsetVal (Offset setting) MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual FBM-M042-B 47/49...
  • Page 48 M+Q64DA_SetGainVal (Gain setting) MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual FBM-M042-B 48/49...
  • Page 49 M+Q64DA_ErrorOperation (Error operation) MELSEC-Q Digital-Analog Converter Module FB Library Reference Manual FBM-M042-B 49/49...

This manual is also suitable for:

Melsec-q64dan

Table of Contents