background image

46

7  OPERATION EXAMPLE
7.3  Program Example (Wave Output Mode)

Label setting

The following table lists the module labels and global labels used in the program example in this section.
The module label setting does not need to be changed here. For details on global labels, refer to the following.

 MELSEC iQ-R Programming Manual (Program Design)

Classification

Label name

Description

Device

Module label

R60DA_1.bModuleREADY

Module READY

X0

R60DA_1.bExternalPowerSupplyREADY_Flag

External power supply READY flag

X7

R60DA_1.bOperatingConditionSettingCompletedFlag

Operating condition setting completed flag

X9

R60DA_1.bCH1OutputEnableDisableFlag

CH1 Output enable/disable flag

Y1

R60DA_1.bOperatingConditionSettingRequest

Operating condition setting request

Y9

R60DA_1.stnControl_D[0].uWaveOutputStartStopRequest_D

CH1 Wave output start/stop request

U0\G462

R60DA_1.stnSetting_D[0].uD_A_conversionEnableDisableSetting
_D

CH1 D/A conversion enable/disable 
setting

U0\G500

R60DA_1

Target module

Labels to be 
defined

Define global labels as shown below:

Summary of Contents for MELSEC iQ-R60DA4

Page 1: ...MELSEC iQ R Digital Analog Converter Module User s Manual Startup R60DA4 R60DAV8 R60DAI8 ...

Page 2: ......

Page 3: ... R Module Configuration Manual 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...

Page 4: ...ime 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 t...

Page 5: ... 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 reset the CPU module while the setting values in the...

Page 6: ...tion 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 malfunction When using an SD memory card fully insert it into the SD memory card slot Check that it is inserted completely Poor contact may ...

Page 7: ...rectly 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 malfuncti...

Page 8: ...rt circuit solder or throw the battery into the fire Also do not expose it to liquid or strong shock Doing so will cause the battery to produce heat explode ignite or leak resulting in injury and 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...

Page 9: ...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 d...

Page 10: ...o the flash ROM again Doing so also can cause malfunction or failure of the module 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 When transporting lithium batteries fo...

Page 11: ... 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 ...

Page 12: ...nt certain measures may be necessary Please refer to one of the following manuals MELSEC iQ R Module Configuration Manual Safety Guidelines This manual is included with the base unit The CE mark on the side of the programmable controller indicates compliance with EMC and Low Voltage Directives Additional measures No additional measures are necessary for the compliance of this product with EMC and ...

Page 13: ... LIST 19 CHAPTER 4 PROCEDURES BEFORE OPERATION 21 CHAPTER 5 SYSTEM CONFIGURATION 23 CHAPTER 6 WIRING 25 6 1 Terminal Block 25 6 2 External Wiring 27 CHAPTER 7 OPERATION EXAMPLE 30 7 1 Programming Procedure 30 7 2 Program Example Normal Output Mode 31 7 3 Program Example Wave Output Mode 39 CHAPTER 8 OFFSET GAIN SETTING 51 8 1 Setting Procedure 51 APPENDICES 54 Appendix 1 I O Conversion Characteris...

Page 14: ...s manual Specifications procedures before operation wiring operation example and offset gain setting of the D A converter module Print book e Manual PDF MELSEC iQ R Module Configuration Manual SH 081262ENG Common information on the hardware configuration of all modules overview of each system configuration and specifications of the power supply module base unit SD memory card and battery Print boo...

Page 15: ... Module label A label that represents one of memory areas I O signals and buffer memory areas specific to each module in a given character string For the module used GX Works3 automatically generates this label which can be used as a global label Normal mode A mode used for normal D A conversion In the engineering tool the item name of the mode is displayed as Normal mode D A conversion process Of...

Page 16: ... 5V power supply interrupted watchdog timer error occurred or module replacement allowed in the process of the online module change 2 ERR LED Indicates the error status of the module 1 On Error occurred Off Normal operation 3 ALM LED Indicates the alarm status of the module 1 On Alert output occurred Off Normal operation 4 Terminal block 18 point screw terminal block for connecting output signal w...

Page 17: ...1 PART NAMES 15 1 MEMO ...

Page 18: ...000 350 9nA Accuracy accuracy for the maximum value of the analog output value 2 Ambient temperature 25 5 Within 0 1 Voltage 10mV current 20 A Ambient temperature 0 to 55 Within 0 3 Voltage 30mV current 60 A Conversion speed Normal output mode 80 s CH Wave output mode 80 s CH Number of offset gain settings 3 Up to 50000 times Output short protection Protected Isolation method Between I O terminals...

Page 19: ...ent temperature 0 to 55 Within 0 3 Voltage 30mV Conversion speed 80 s CH Number of offset gain settings 3 Up to 50000 times Output short protection Protected Isolation method Between I O terminals and programmable controller power supply Photocoupler Between output channels Non isolation Between the external power supply and analog outputs Transformer isolation Withstand voltage Between I O termin...

Page 20: ...urrent 60 A Conversion speed 80 s CH Number of offset gain settings 3 Up to 50000 times Output short protection Protected Isolation method Between I O terminals and programmable controller power supply Photocoupler Between output channels Non isolation Between the external power supply and analog outputs Transformer isolation Withstand voltage Between I O terminals and programmable controller powe...

Page 21: ...han the alert output lower limit value Rate control function Restricts the increasing decreasing amount of the analog output value per 80 s and prevents a sudden change of the value Interruption of external power supply detection function Detects that the external power supply 24VDC is not supplied or is shut off Disconnection detection function 1 Monitors the analog output value and detects a dis...

Page 22: ...20 3 FUNCTION LIST MEMO ...

Page 23: ...dule to a module configuration by using the engineering tool For details refer to the following GX Works3 Operating Manual 4 Parameter setting Set the parameters of the D A converter module by using the engineering tool For details refer to the following MELSEC iQ R Digital Analog Converter Module User s Manual Application 5 Offset gain setting Perform the offset gain setting to use a user range s...

Page 24: ...22 4 PROCEDURES BEFORE OPERATION MEMO ...

Page 25: ...M CONFIGURATION For system configurations using the MELSEC iQ R series modules CPU modules that can be used with the D A converter module and the number of mountable modules refer to the following MELSEC iQ R Module Configuration Manual ...

Page 26: ...24 5 SYSTEM CONFIGURATION MEMO ...

Page 27: ...ng use a tool recommended by their manufacturer Note that a solderless terminal with an insulation sleeve cannot be used Signal names of the terminal blocks The following table shows signal names of the terminal blocks R60DA4 Screw type Tightening torque range Module fixing screw M3 1 0 37 to 0 48N m Terminal screw M3 0 42 to 0 58N m Terminal block mounting screw M3 5 0 66 to 0 89N m Solderless te...

Page 28: ...nal block Terminal number Signal name 1 CH1 V 2 COM 3 CH2 V 4 COM 5 CH3 V 6 COM 7 CH4 V 8 COM 9 CH5 V 10 COM 11 CH6 V 12 COM 13 CH7 V 14 COM 15 CH8 V 16 COM 17 24V 18 24G Terminal block Terminal number Signal name 1 CH1 I 2 COM 3 CH2 I 4 COM 5 CH3 I 6 COM 7 CH4 I 8 COM 9 CH5 I 10 COM 11 CH6 I 12 COM 13 CH7 I 14 COM 15 CH8 I 16 COM 17 24V 18 24G CH1 COM CH1 V CH2 COM CH2 V CH3 COM CH4 COM CH3 V CH4...

Page 29: ... CH2 COM CH3 COM CH4 COM CH1 V CH1 I CH2 V CH2 I CH3 V CH3 I CH4 V CH4 I CH1 CH1 COM NC NC NC 24V 24G FG CH2 COM CH3 COM CH4 COM CH1 V CH1 I CH2 V CH2 I CH3 V CH3 I CH4 V CH4 I CH1 CH1 COM 24V 24G CH2 COM CH3 COM CH4 COM CH1 V CH2 V CH3 V CH4 V CH5 V CH6 V CH7 V CH8 V CH6 COM CH5 COM CH7 COM CH8 COM CH1 CH1 COM 24V 24G CH2 COM CH3 COM CH4 COM CH1 I CH2 I CH3 I CH4 I CH5 I CH6 I CH7 I CH8 I CH6 COM...

Page 30: ...60DAV8 1 For the wire use the 2 core twisted cable 2 If noise or ripple occurs for analog signals connect a capacitor with the value of 0 1 to 0 47 F withstand voltage 25V or higher to the input terminal of an external device 3 When the analog output range is 0 to 5V the external load resistance value should be 500 or more When the analog output range is 10 to 10V the external load resistance valu...

Page 31: ...e occurs for analog signals connect a capacitor with the value of 0 1 to 0 47 F withstand voltage 25V or higher to the input terminal of an external device Ground the FG terminal of the power supply module 1 2 GND AG 24VDC CH1 I COM 24V 24G GND 0Ω 600Ω Motor drive module or others D A conversion Filter to ...

Page 32: ... Normal output mode 1 Set module parameters Page 31 Module parameters 2 Create a program Page 36 Program examples Wave output mode 1 Set module parameters Page 40 Module parameters 2 Configure the initial setting of the wave output function Page 44 Initial setting of the wave output function 3 Create a program Page 47 Program examples Using function blocks FBs reduces load at programming and impro...

Page 33: ...ion mode setting function Drive mode setting Normal mode D A conversion process Output mode setting Normal output mode Output mode setting function Analog output HOLD CLEAR function setting HOLD CLEAR HOLD HOLD D A conversion enable disable setting function D A conversion enable disable setting D A conversion enabled D A conversion enabled D A conversion enabled D A conversion enabled Scaling func...

Page 34: ...he project Project New 2 Click the Setting Change button and set the module to use the module label 3 Click the OK button in the following window to add the module label of the CPU module 4 Add the D A converter module with the window set as follows Navigation window Parameter Module Information Right click Add New Module ...

Page 35: ...ode 33 7 5 Set the window as follows to add the module label of the D A converter module 6 Set Basic setting of Module Parameter of the D A converter module as shown below Navigation window Parameter Module Information R60DA4 Module Parameter Basic setting ...

Page 36: ...odule Parameter of the D A converter module as shown below Navigation window Parameter Module Information R60DA4 Module Parameter Application setting 8 Write the set parameters to the CPU module on the master station Then reset the CPU module or power off and on the system Online Write to PLC ...

Page 37: ...nal Alert output signal XE R60DA_1 bErrorFlag Error flag XF R60DA_1 bCH1OutputEnableDisableFlag CH1 Output enable disable flag Y1 R60DA_1 bCH2OutputEnableDisableFlag CH2 Output enable disable flag Y2 R60DA_1 bCH3OutputEnableDisableFlag CH3 Output enable disable flag Y3 R60DA_1 bCH4OutputEnableDisableFlag CH4 Output enable disable flag Y4 R60DA_1 bWarningOutputClearRequest Warning output clear requ...

Page 38: ...le 1 The following figure shows an example of a program that enables the analog output and starts the D A conversion after digital values for the D A conversion of CH1 to CH4 are set in the D A converter module 11 Sets CH1 Digital value to CH4 Digital value 95 Enables the output of CH1 to CH4 ...

Page 39: ... when an alert output occurs in the CH2 and the alert output in the D A converter module 10 At the time when an upper limit alert is issued in CH2 the processing is to be performed 30 At the time when a lower limit alert is issued in CH2 the processing is to be performed 50 Turns on Warning output clear request YE 69 Turns off Warning output clear request YE ...

Page 40: ...isplays the latest error code when a disconnection is detected in CH4 or an error occurs in the D A converter module After that the program clears the disconnection detection flag error flag and the stored error code 8 At the time when a disconnection is detected the processing is to be performed 38 Turns on Error manipulation start flag ...

Page 41: ...he programs for the wave output mode Execute the programs in the following order 1 Wave output data read processing program Page 47 Wave output data read processing program example 2 Operating condition setting request processing program Page 49 Operating condition setting request processing program example 3 Wave output start processing program Page 50 Wave output start processing program example...

Page 42: ... 20mA Operation mode setting function Operation mode setting Normal mode D A conversion process Output mode setting Wave output mode Output mode setting function Analog output HOLD CLEAR function setting HOLD CLEAR CLEAR CLEAR D A conversion enable disable setting function D A conversion enable disable setting D A conversion disabled D A conversion disabled D A conversion disabled D A conversion d...

Page 43: ...7 OPERATION EXAMPLE 7 3 Program Example Wave Output Mode 41 7 4 Add the D A converter module with the window set as follows Navigation window Parameter Module Information Right click Add New Module ...

Page 44: ...t Mode 5 Set the window as follows to add the module label of the D A converter module 6 Set Basic setting of Module Parameter of the D A converter module as shown below Navigation window Parameter Module Information R60DA4 Module Parameter Basic setting ...

Page 45: ...odule Parameter of the D A converter module as shown below Navigation window Parameter Module Information R60DA4 Module Parameter Application setting 8 Write the set parameters to the CPU module on the master station Then reset the CPU module or power off and on the system Online Write to PLC ...

Page 46: ...e wave output data creation tool For details refer to the following MELSEC iQ R Digital Analog Converter Module User s Manual Application 1 Set the file register of the CPU parameter as follows to enable the file register 2 Start Create Wave Output Data Tool Module Tool List Analog Output Create wave output data 3 Display the Register wave pattern window and set each item as follows ...

Page 47: ...7 OPERATION EXAMPLE 7 3 Program Example Wave Output Mode 45 7 4 Set the parameters in Wave output data setting as follows 5 Click the Write to Device Memory button to write the wave output data ...

Page 48: ...ule READY X0 R60DA_1 bExternalPowerSupplyREADY_Flag External power supply READY flag X7 R60DA_1 bOperatingConditionSettingCompletedFlag Operating condition setting completed flag X9 R60DA_1 bCH1OutputEnableDisableFlag CH1 Output enable disable flag Y1 R60DA_1 bOperatingConditionSettingRequest Operating condition setting request Y9 R60DA_1 stnControl_D 0 uWaveOutputStartStopRequest_D CH1 Wave outpu...

Page 49: ...ster the data to the buffer memory of the D A converter module After the reading of the wave output data is completed enable the settings with the operating condition setting request program Page 49 Operating condition setting request processing program example 0 Sets CH1 D A conversion enable disable setting to D A conversion enabled 32 Turns on Wave data read device FB start flag and registers t...

Page 50: ...ZR or a CSV file When no change is made this program is not required After changing the settings enable the settings with the operating condition setting request program Page 49 Operating condition setting request processing program example 647 Sets CH1 Wave output start stop request to Wave output stop request 0 674 Turns on Wave output setting FB start flag and changes the value of the wave outp...

Page 51: ...ram example After registering a new wave output parameter or changing the settings enable the settings with this program 1278 Turns on Operating condition setting request FB start flag 1298 Performs the operating condition setting request processing 1324 Turns off Operating condition setting request FB start flag ...

Page 52: ... Turns on CH1 Output enable disable flag 1343 Turns on Wave data output start stop request and sets Wave output start stop request to Wave output start request 1 1347 To stop the wave output turn off Wave data output start stop request and set Wave output start stop request to Wave output stop request 0 1351 Turns on Wave output start stop request FB start flag to start or stop the wave output ...

Page 53: ... gain setting of the D A converter module In wave output mode the offset gain setting cannot be accessed Change the mode to the normal output mode or the offset gain setting mode in advance Do not turn off the external power supply in the middle of the offset gain setting Otherwise the offset gain setting is not properly applied Tool Module Tool List 1 Select Analog Output Offset gain setting and ...

Page 54: ... setting 5 Use the radio button to specify whether to perform the offset setting or gain setting Step 6 and later describe the case when the offset setting is specified 6 The adjustment amount of the offset value or gain value can be selected from 1 100 500 1000 2000 and 3000 or it can be set by inputting any value 1 to 3000 ...

Page 55: ... voltage or analog output current value corresponding the set adjustment value 8 Check that the offset setting status in the selected channel has changed to Changed 9 To perform the gain setting repeat the procedure from step 5 10 After setting is completed click the Close button 11 Click the Yes button ...

Page 56: ... the offset value and the gain value at the time when a digital value written from the CPU module is converted to an analog output value voltage or current Offset value This analog output value voltage or current corresponds to a digital value of 0 that is set through the CPU module Gain value This analog output value voltage or current corresponds to a digital value of 32000 that is set through t...

Page 57: ...ution in the user range setting Set values within the practical range of the digital input and analog output at each output range If the values are out of the range the resolution and accuracy may not fall within the range of the performance specifications Do not use values in the dotted line region in the graph of voltage output characteristics digit Digital value V Analog output voltage V a Prac...

Page 58: ... 2 Maximum resolution in the user range setting Set values within the practical range of the digital input and analog output at each output range If the values are out of the range the resolution and accuracy may not fall within the range of the performance specifications Do not use values in the dotted line region in the graph of current output characteristics digit Digital value I Analog output ...

Page 59: ...ot sacrifice the accuracy which is maintained within the described range of the performance specifications The following graph shows the fluctuation range of accuracy when the range of 10 to 10V is selected The accuracy is 0 1 10mV at ambient temperature of 25 5 the accuracy is 0 3 30mV at ambient temperature of 0 to 55 except for the conditions under noise digit Digital value V Analog output valu...

Page 60: ...58 APPX Appendix 3 External Dimensions Appendix 3 External Dimensions The following figure shows the external dimensions of the D A converter module Unit mm 4 98 106 110 131 27 8 ...

Page 61: ...APPX Appendix 3 External Dimensions 59 A MEMO ...

Page 62: ... ERR LED 14 External dimensions 58 External wiring 27 F Function block FB 30 G Gain value 54 O Offset value 54 Offset gain setting 51 P Performance specifications 16 Program example normal output mode 31 R RUN LED 14 T Terminal block 25 V Voltage output characteristic 55 ...

Page 63: ...I 61 MEMO ...

Page 64: ...ts SAFETY PRECAUTIONS TERMS Section 2 1 Chapter 4 Section 6 2 Section 7 1 Appendix 1 May 2020 SH NA 081235ENG D Added function Firmware update function Added or modified parts SAFETY PRECAUTIONS RELEVANT MANUALS TERMS Section 2 1 Chapter 3 7 Addition of GENERIC TERMS AND ABBREVIATIONS and Chapter 5 This manual confers no industrial property rights or any rights of any other kind nor does it confer...

Page 65: ...been avoided if functions or structures judged as necessary in the legal safety measures the user s device is subject to or as necessary by industry standards had been provided 4 Failure that could have been avoided if consumable parts battery backlight fuse etc designated in the instruction manual had been correctly serviced or replaced 5 Failure caused by external irresistible forces such as fir...

Page 66: ...mes 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 SH NA 081235ENG D ...

Page 67: ......

Page 68: ...ithout notice When exported from Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission 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 ...

Reviews: