Home

MELSEC iQ-R Analog-Digital Converter Module

image

Contents

1. Execution command orr ON o bENO Execution status orr Buffer memory update Update stopped processing o bOK Normal completion o bErr Error completion o uErrid Error code Error code Restrictions and precautions This FB takes some time to complete the processing because a large number of scans is necessary until the completion of the processing Thus the recommended use is to execute the FB during a warm up of the R60DA4 R60DAV8 or R60DAIB8 This FB does not include the error recovery processing Prepare the error recovery processing separately to suit the user s system and the expected operation The FB cannot be used in an interrupt program Using the FB in a program that is to be executed only once such as a subroutine program or a FOR NEXT loop has a problem that i bEN execution command can no longer be turned off and normal operation is not possible Always use the FB in a program that is capable of turning off the execution command If more than one of this FB is used simultaneous execution is not possible The FB requires the configuration of the ladder for every input label Putting the R60DA4 R60DAVS or R60DAI8 into operation requires the output range to be set according to the connected devices and the system in use Set up the module parameters of GX Works3 according to the application For how to set up the module parameters refer to the MELSEC iQ R Digital Anal
2. Timing chart of I O signals i_bEN Execution command o_bENO Execution status i_bErrorReset Error reset request Error clear request Y signal Error flag X signal o_bUnitErr Module error flag o_uUnitErrCode Module error code o_uUnitAlarmCode Module alarm code o_bOK Normal completion o bErr Error completion o uErrid Error code ON OFF ON OFF ON Module error code 0 0 em alarm m 0 N OFF OFF 2 ANALOG DIGITAL CONVERTER MODULE FB 2 2 M R60AD G _OperateError Restrictions and precautions This FB does not include the error recovery processing Prepare the error recovery processing separately to suit the user s System and the expected operation The FB cannot be used in an interrupt program Putting an analog digital converter module into operation requires the input range to be set according to the connected devices and the system in use Set up the module parameters of GX Works3 according to the application For how to set up the module parameters refer to the user s manual Application of the analog digital converter module used None None None input labels Execution i bEN Bit On or off On The FB is activated command Off The FB is not activated Module label i stModule Structure The scope differs Specifies a module label of the analog digital con
3. To use more than one of this FB care must be taken to avoid duplication of the target channel The FB requires the configuration of the ladder for every input label If the parameters are set by means of the configuration function of GX Works3 this FB is not required Putting an analog digital converter module into operation requires the input range to be set according to the connected devices and the system in use Set up the module parameters of GX Works3 according to the application For how to set up the module parameters refer to the user s manual Application of the analog digital converter module used 100H WR60AD4 R60ADV8 R60ADI8 Review and correct the settings and then execute the FB again The target channel is out of the setting range Set the target channel within the following range R60AD4 1 to 4 R60ADV8 R60ADIE 1 to 8 MRG6OAD8 G R60AD16 G The target channel is set out of the range Set the target channel within the following range R60AD8 G 1 to 8 R60AD16 G 1 to 16 102H WR60AD4 R60ADV8 R60ADI8 Review and correct the settings and then execute the FB again The module type is set out of the range Set the module type to the following values R60AD4 0 R60ADV8 1 R60ADI8 2 BR6OADS G R60AD16 G The module type is set out of the range Set the module type to the following values R60AD8 G 0 R60AD16 G 1 2 ANALOG DIGITAL CONVERTER MODULE FB 9
4. HR60AD4 R60ADV8 R60ADI8 M R60AD SaveLogging HMRG60AD8 G R60AD16 G M R60ADG_SaveLogging B details Functional overview Saves the logging data of a specified channel into a file Symbol M R60AD SaveLogging Execution command B i bEN o bNO B Execution status Module label J i stModule obOK B Normal completion Target CH UW i uCH o_bMakingFile Creating a file Maximum number of save files UW i uMaxNumber o bExceedNumber Maximum number exceeded flag Overwrite save command B 1 bOverWrite Error completion Module type UW i uUnitType o_uErrld UW Error code Relevant devices Relevant modules R60AD4 R60ADV8 R60ADI8 R60AD8 G R60AD16 G Relevant CPU modules MELSEC iQ R series CPU modules Relevant engineering tool GX Works3 Language to use Ladder diagram Number of basic steps 2309 steps The number of steps of the FB embedded in a program depends on the CPU model used and the input output definitions 12 2 ANALOG DIGITAL CONVERTER MODULE FB 2 4 M R60AD G SaveLogging Item Description Functional description Asi bEN execution command turns on and the logging hold flag turns on the FB sorts the logging data the number of which is equal to the number of logging points in a chronological order from the head pointer and saves the data along with the trigger generation information in the SD memory card inserted into the CPU module in a CSV format
5. CSV file name The number of characters of the CSV file name must be 64 or less including the extension CSV Ex R60DA_1 csv wd000001 csv WAVEdata csv Contents of rows and columns in a CSV file The following figure is an example of how a CSV file contains data in its rows and columns This example assumes that the number of wave data points is a maximum of 80000 points CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8 l 1 1 l l 1 1 l l 1 1 l 1 l 1 l Column 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 No 1 Output setting during wave 1 1 1 1 1 1 1 1 1 output stop No 2 Output value during wave 2 0 0 0 0 0 0 0 0 output stop 1 No 3 Wave pattern start address 3 0 10000 0 20000 0 30000 0 40000 0 50000 0 60000 1 4464 1 14464 setting t No 4 Wave pattern points setting 4 0 10000 0 10000 0 10000 0 10000 0 10000 0 10000 0 10000 0 10000 No 5 Wave pattern output repetition 5 1 10000 20000 32767 1 10000 20000 32767 setting 2 No 6 Constant for wave output 6 1 1 15 1 1 1 1 1 conversion cycle No 7 Number of wave data No 8 Wave data 1 No 1 to No 8 correspond to the No 1 to No 8 described in the following page For details on each item refer to the following Page 36 Storage Source Parameter Data of Waveform Output Function and Storage Destination Buffer Memory 2 Always make settings for eight channels regardless of the number of channels of th
6. Page 9 Error codes FB compilation method Macro type FB operation Pulse execution type single scan execution type 2 ANALOG DIGITAL CONVERTER MODULE FB 2 3 M R60AD G _SetLoggingParam Timing chart of I O signals WWhen the operation is completed successfully ON i bEN Execution command bENO Execution status Logging function parameter setting write processing Unexecuted Write x Unexecuted ON o Normal completion oFF o bErr Error completion OFF o_uErrld Error code 0 MWhen the operation is completed with an error ON i Execution command orr bENO Execution status oFF Logging function parameter Unexecuted setting write processing o_bOK Normal completion o_bErr Error completion o_uErrld Error code Error code Restrictions and precautions This FB does not include the error recovery processing Prepare the error recovery processing separately to suit the user s system and the expected operation The FB cannot be used in an interrupt program Using the FB in a program that is to be executed only once such as a subroutine program or a FOR NEXT loop has a problem that i bEN execution command can no longer be turned off and normal operation is not possible Always use the FB in a program that is capable of turning off the execution command
7. Provided that i_bEN execution command is on this FB starts the save processing of logging data every time the logging hold flag turns on It takes multiple scans to complete the save processing of logging data Check o bOK normal completion to see that the processing is complete When this FB saves data in an SD memory card the file name is given as follows AD Middle two digits of the four digits representing the start I O number of the analog digital converter module Target channel Consecutive number CSV The maximum number of consecutive number varies with i uMaxNumber maximum number of save files Turning off i execution command results in the consecutive number being reset and thereafter a consecutive number is given from 1 again Suppose that the I O number of the analog digital converter module is H0450 the target channel is 3 uMaxNumber maximum number of save files is 30 and the number of file creation by this FB is 6th For the R60AD4 R60ADV8 and R60ADIS the file name is AD453006 CSV for the R60AD8 G and R60AD16 G AD4503006 CSV When this FB creates a CSV file in an SD memory card a file of the same name if already exists in the SD memory card is replaced with the newly created file Ifi bOverWrite overwrite save command is on and the number of files that this FB has saved in an SD memory card exceeds i uMaxNumber maximum number of save files the consecutive number returns
8. MITSUBISHI ELECTRIC Mitsubishi Programmable Controller series MELSEC iQ R Analog Digital Converter Module Digital Analog Converter Module Function Block Reference CONTENTS CHAPTER 1 FUNCTION BLOCK FB LIST 2 CHAPTER 2 ANALOG DIGITAL CONVERTER MODULE FB 4 2 1 M R60AD G Req estSetting m ce na 4 2 2 M R60AD G Operate Efor eo Ru I ERR ee a 6 2 3 M R60AD G SetLoggingParam re terrm en 8 2 4 M R60AD G SaveLogging seleeeeee RR IRI Ih n 12 CHAPTER 3 DIGITAL ANALOG CONVERTER MODULE FB 17 3 1 M R60DA G 16 _RequestSetting 0 ccc cece nnn 17 3 2 M R60DA G 16 _OperateError 0 6 ccc cece ene eet nennen nenn 19 3 3 M R60DA_WaveOutputSetting 0 cece eee eee eee seen 21 3 4 M R60DA_WaveDataStoreCsv 0 ccc eee eee hne 24 3 5 M R60DA_WaveDataStoreDev 0 0 ccc ee eee eee 27 3 6 M R60DA WaveOutputReqSetting 6 2 0 0 cee ee eee nh hh 30 APPENDICES 34 Appendix 1 CSV File Output Format of the FB for Saving Logging 34 Appendix 2 Storage Source Parameter Data of Waveform Output Function and Storage Destination Buffer Memory ie eae ina ears aos aco acie cm aca am C RP c ama el c 36 Appendix 3 CSV File Format of the FB for Reading Wave Data CSV 38 INSTRUCTION INDEX 40 REVISIONS EE 42 2 1 FUNCTION BLOCK FB LIST This FB list is intended for thos
9. 3 DIGITAL ANALOG CONVERTER MODULE FB 3 1 M R60DA G 16 _RequestSetting 3 2 Name IR60DA4 R60DAV8 R60DAI8 M R60DA_OperateError HR60DA3 G M R60DAG_OperateError MR60DA16 G M R60DAG16_OperateError FB details M R60DA G 16 _OperateError Item Description Functional overview Monitors error codes and resets errors Symbol Execution command B Module label Error reset request B i bEN i stModule i_bErrReset M R60DA_OperateError o bENO o bOK o bUnitErm o uUnitErrCode o bErm o uErrld B Execution status B L Normal completion B Module error flag uw L Module error code B L Error completion uw Error code Relevant devices Relevant modules R60DA4 R60DAV8 R60DAI8 R60DA8 G R60DA16 G Relevant CPU modules MELSEC iQ R series CPU modules Relevant engineering tool GX Works3 Language to use Ladder diagram Number of basic steps 45 steps The number of steps of the FB embedded in a program depends on the CPU model used and the input output definitions Functional description Asi bEN execution command turns on the error information in the target module is monitored Afteri bEN execution command turns on turning on i bErrReset error reset request during an error allows the error to be reset FB compilation method Macro type FB operation
10. Arbitrary execution type Timing chart of I O signals i_bEN Execution command o_bENO Execution status i_bErrorReset Error reset request Error clear request Y signal Error flag X signal o_bUnitErr Module error flag o_uUnitErrCode Module error code o_bOK Normal completion o bErr Error completion o uErrid Error code OFF OFF ON ON OFF OFF OFF OFF 0 OFF OFF 3 DIGITAL ANALOG CONVERTER MODULE FB 19 3 2 M R60DA G 16 _OperateError 20 Restrictions and precautions This FB does not include the error recovery processing Prepare the error recovery processing separately to suit the user s system and the expected operation The FB cannot be used in an interrupt program Putting a digital analog converter module into operation requires the output range and operation mode to be set according to the connected devices and the system in use Set up the module parameters of GX Works3 according to the application For how to set up the module parameters refer to the user s manual of the digital analog converter module Application None None None input labels Execution i_bEN Bit On or off On The FB is activated command Off The FB is not activated Module label i_stModule Structure The scope differs Specifies a module label of the digital analog conv
11. Converter output status Module User s Manual Application monitor CH5 Waveform o_uWaveStatusCH5 Word unsigned 0 output status monitor CH6 Waveform o_uWaveStatusCH6 Word unsigned 0 output status monitor CH7 Waveform o_uWaveStatusCH7 Word unsigned 0 output status monitor CH8 Waveform o_uWaveStatusCH8 Word unsigned 0 output status monitor Error completion o_bErr Bit Off The on state indicates that an error has occurred in the FB Error code o uErrid Word unsigned 0 The error code of an error occurred in the FB is stored 32 3 DIGITAL ANALOG CONVERTER MODULE FB 3 6 M R60DA_WaveOutputReqSetting MEMO 3 DIGITAL ANALOG CONVERTER MODULE FB 3 6 M R60DA_WaveOutputReqSetting 33 APPENDICES Appendix 1 CSV File Output Format of the FB for Saving Logging Data The format specifications of CSV files that M R60AD_SaveLogging logging data save outputs are shown below Item Description Delimiter Comma Line feed code CRLF OAH Character code ASCII File size WR60AD4 R60ADV8 R60ADI8 80130 bytes at maximum MR60AD8 G R60AD16 G 8130 bytes at maximum 1 When the number of logging data is 10000 and all the logging data are negative numbers with five digits the file size reaches the maximum 2 When the number of logging data is 1000 and all the logging data are negative numbers with five digits the file size reaches the maximum The followi
12. R60ADG_RequestSetting FB details Item Description Functional overview Enables the settings of each function Symbol M R60AD_Request Setting Execution command B i bEN o bENO B Execution status Module label DUT i stModule o bOK B Normal completion o_bErr Error completion o uErrld UW Error code Relevant devices Relevant modules R60AD4 R60ADV8 R60ADI8 R60AD8 G R60AD16 G Relevant CPU modules MELSEC iQ R series CPU modules Relevant engineering tool GX Works3 Language to use Ladder diagram Number of basic steps 25 steps The number of steps of the FB embedded in a program depends on the CPU model used and the input output definitions Functional description Turning on i bEN execution command allows the settings of all channels to be enabled For what settings are enabled refer to the user s manual Application of the analog digital converter module used This FB continues its execution until the completion of the settings of each function after i_bEN execution command turns on FB compilation method Macro type FB operation Pulse execution type multiple scan execution type Timing chart of I O signals ON i bEN Execution command bENO Execution status Operating condition setting request Y signal Operating condition setting completed flag X signal o
13. WR60AD4 R60ADV8 R60ADI8 Specifies the number of data to be logged after a points 1 to 10000 hold trigger occurs WR60AD8 G R60AD16 G 1 to 1000 Level trigger i uLogTrigCond Word unsigned 0 Disable Sets the condition in which a level trigger is to be condition setting 1 Rise used 2 Fall Set 0 if using no lever trigger 3 Rise and fall Trigger data i uLogTrigData Word unsigned WR60AD4 R60ADV8 R60ADI8 Specifies a buffer memory address to be 0 to 4999 monitored by level trigger HR6OADS G R60AD16 G 0 to 11999 Trigger setting value i wLogTrigValue Word signed 32768 to 32767 Sets the level at which a level trigger is generated Module type i uUnitType Word unsigned WR60AD4 R60ADV8 R60ADI8 Specifies a module type 0 R60AD4 1 R60ADV8 2 R60ADI8 WR60AD8 G R60AD16 G 0 R60AD8 G 1 R60AD16 G 2 ANALOG DIGITAL CONVERTER MODULE FB 2 3 M R60AD G _SetLoggingParam Output labels Execution status o_bENO Bit Off On The execution command is on Off The execution command is off Normal completion o bOK Bit Off The on state indicates that the setting of the logging function parameters is completed Error completion o bErr Bit Off The on state indicates that an error has occurred in the FB Error code o uErrid Word unsigned 0 The error code of an error occurred in the FB is stored 2 ANALOG DIGITAL CONVERTER MODULE FB 1 1 2 3 M R60AD G _SetLoggingParam 2 4 M R60AD G SaveLogging
14. 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 2014 MITSUBISHI ELECTRIC CORPORATION 42 BCN P5999 0375 B BCN P5999 0375 B 1501 MEE MITSUBISHI ELECTRIC CORPORATION 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
15. that an error has occurred in the FB Error code o uErrid Word unsigned 0 The error code of an error occurred in the FB is stored 3 DIGITAL ANALOG CONVERTER MODULE FB 3 4 M R60DA_WaveDataStoreCsv 3 5 _M R60DA_WaveDataStoreDev Name M R60DA_WaveDataStoreDev FB details Item Description Functional overview Reads out data from the file register ZR that holds the parameters and the waveform data number of waveform data points and waveform data of the waveform output function and writes the data to the buffer memory of the digital analog converter module Symbol M R60DA_WaveDateStoreDev Execution command B i o bENO B H Execution status Module label DUT i stModule o bOK B H Normal completion Read start address j UD i udReadDataAddr o_bErr Error completion Module type UW i uUnitType o uErld UW Error code Relevant devices Relevant modules R60DA4 R60DAV8 R60DAI8 Relevant CPU modules MELSEC iQ R series CPU modules Relevant engineering tool GX Works3 Language to use Ladder diagram Number of basic steps 668 steps The number of steps of the FB embedded in a program depends on the CPU model used and the input output definitions Functional description Asi bEN execution command turns on the FB reads the parameters and waveform data of the waveform output function from the file register in the serial number acces
16. 0DA4 For the R60DA4 1104 15 1 to 4 The corresponding channel number is specified For the R60DAV8 and 15 All channels are specified R60DAI8 For the R60DAV8 and R60DAI8 1108 15 1to 8 The corresponding channel number is specified 15 All channels are specified Waveform output i uStartStopReq Word unsigned 0 Waveform output stop Specifies a start or stop request for the waveform output start stop request request 1 Waveform output start request 2 Waveform output pause request Module type i uUnitType Word unsigned 0 R60DA4 Specifies a module type 1 R60DAV8 2 R60DAI8 HOutput labels Execution status o_bENO Bit Off On The execution command is on Off The execution command is off Normal completion o bOK Bit Off The on state indicates that the execution of the FB is normal CH1 Waveform o uWaveStatusCH1 Word unsigned 0 Outputs the value of the waveform output status stopped output output status or paused monitor 0 Waveform output stopped CH2 Waveform o uWaveStatusCH2 Word unsigned 0 1 Waveform output output status 2 Waveform output paused monitor 3 Waveform output step execution The FB is not capable of executing the waveform output step CH3 Waveform o_uWaveStatusCH3 Word unsigned 0 execution function ouput status To execute the function use the device buffer memory batch monitor monitor of GX Works3 CH4 Waveform o_uWaveStatusCH4 Word unsigned 0 For details refer to the MELSEC iQ R Digital Analog
17. 2 3 M R60AD G _SetLoggingParam Labels to use input labels Execution i_bEN On or off On The FB is activated command Off The FB is not activated Module label i_stModule Structure The scope differs depending on the Specifies a module label of the analog digital module label converter module Target channel i_uCH Word unsigned WR60AD4 R60ADV8 R60ADI8 Specifies a channel number R60AD4 1 to 4 R60ADV8 R60ADIS 1 to 8 WR60AD8 G R60AD16 G R60AD8 G 1 to 8 R60AD16 G 1 to 16 Logging enable i bLogEnable Bit On or off On Enables the logging function disable setting Off Disables the logging function Logging data setting i uLogData Word unsigned 0 Digital output value Sets the data to be logged 1 Digital operation value Logging cycle i uLogCycleVal Word unsigned WR60AD4 R60ADV8 R60ADI8 Sets the interval of cycles at which data is stored setting value When the logging cycle unit setting is 0 80 to 32767 When the logging cycle unit setting is 1 1 to 32767 When the logging cycle unit setting is 2 1 to 3600 WR60AD8 G R60AD16 G When the logging cycle unit setting is 1 10 to 32767 When the logging cycle unit setting is 2 1 to 3600 Logging cycle unit i uLogCycleUnit Word unsigned WR60AD4 R60ADV8 R60ADI8 Specifies the unit of cycles at which data is setting 0 us stored 1 ms 2 8 MR60AD8 G R60AD16 G 1 ms 2 8 Post trigger logging i uLogPoints Word unsigned
18. 56 Un G531 eyel constant 2 6 2 ZR m 57 Un G731 Set the constant used to determine the conversion cycle 3 6 3 ZR m 58 Un G931 for each channel Specify a 4 6 4 ZR m 59 Un G1131 multiple of the conversion speed 5 6 5 ZR m 60 Un G1331 6 6 6 ZR m 61 Un G1531 T 6 7 ZR m 62 Un G1731 8 6 8 ZR m 63 Un G1931 7 Number of waveform data points 80000 point E 100 1 2 ZR m 98 99 Set the total number of the waveform data points 8 Waveform data 32768 to 32767 101 to 1 ZR m 100 to ZR Un G10000 to practical range 80100 m 80099 Un G89999 32000 to 32000 1 No 1 to No 8 correspond to the No 1 to No 8 described in the following page For details on each item refer to the following Page 38 Contents of rows and columns in a CSV file 2 When a digital analog converter module has an output range of 0 to 5V 1 to 5V 0 to 20mA or 4 to 20mA 3 When a digital analog converter module has an output range of 10 to 10V APPENDICES APPENDIX 37 Appendix 2 Storage Source Parameter Data of Waveform Output Function and Storage Destination Buffer Memory 38 Appendix 3 CSV File Format of the FB for Reading Wave Data CSV File This section describes the CSV file format that M R60DA_WaveDataStoreCsv Wave data read CSV File can handle Specifications of CSV format Item Description Delimiter Comma Line feed code CRLF OAH Character code ASCII or Shift JIS
19. 727 Set the start address of the waveform pattern to be output for 3 3 5 6 ZR m 20 21 Un G926 Un G927 each channel 4 3 7 8 ZR m 22 23 Un G1126 Un G1127 5 3 9 10 ZR m 24 25 Un G1326 Un G1327 6 3 11 12 ZR m 26 27 Un G1526 Un G1527 7 3 13 14 ZR m 28 29 Un G1726 Un G1727 8 3 15 16 ZR m 30 31 Un G1926 Un G1927 4 Number of waveform pattern 1 to 80000 point 1 4 1 2 ZR m 32 33 Un G528 Un G529 points setting 2 4 3 4 ZR m 34 35 Un G728 Un G729 Set the number of data points of the waveform pattern to be output 3 4 5 6 ZR m 36 37 Un G928 Un G929 for each channel 4 4 7 8 ZR m 38 39 Un G1128 Un G1129 5 4 9 10 ZR m 40 41 Un G1328 Un G1329 6 4 11 12 ZR m 42 43 Un G1528 Un G1529 7 4 13 14 ZR m 44 45 Un G1728 Un G1729 8 4 15 16 ZR m 46 47 Un G1928 Un G1929 36 APPENDICES APPENDIX Appendix 2 Storage Source Parameter Data of Waveform Output Function and Storage Destination Buffer Memory 5 Number of waveform outputs 1 Infinite repetition 1 5 1 ZR m 48 Un G530 setting output 2 5 2 ZR m 49 Un G730 Set the number of output times of 1 to 32767 the waveform pattern for each Specified number of 3 5 3 ZR m 50 Un G930 channel times output 4 5 4 ZR m 51 Un G1130 5 5 5 ZR m 52 Un G1330 6 5 6 ZR m 53 Un G1530 7 5 7 ZR m 54 Un G1730 8 5 8 ZR m 55 Un G1930 6 Waveform output conversion 1 to 5000 1 6 1 ZR m
20. B operation Arbitrary execution type 3 DIGITAL ANALOG CONVERTER MODULE FB 3 6 M R60DA_WaveOutputRegSetting Timing chart of I O signals WWhen the operation is completed successfully ON i bEN Execution command OFF ON o_bENO Execution status OFF Wave output start stop request i_uStartStopReg 0 Write 0 CH1 to 8 Wave output status monitor o_uWaveStatus CH1 to 8 0 Update in progress 0 ON o_bOK Normal completion OFF o_bErr Error completion OFF o_uErrld Error code 0 When the operation is completed with an error ON i_bEN Execution command OFF ON o_bENO Execution status OFF Wave output start stop request 0 i_uStartStopReq CH1 to 8 Wave output status monitor 0 o uWaveStatus CH1 to 8 o bOK Normal completion OFF ON o_bErr Error completion OFF o uErrld Error code 0 Error code 0 Restrictions and precautions This FB does not include the error recovery processing Prepare the error recovery processing separately to suit the user s system and the expected operation The FB cannot be used in an interrupt program Using the FB in a program that is to be executed only once such as a subroutine program or a FOR NEXT loop has a problem thati bEN execution command can no longer be turned off and normal operation is not possible Always use the FB in a program that is
21. Dev 29 30 3 6 _M R60DA_WaveOutputRegSetting Name M R60DA_WaveOutputReqSetting FB details Item Description Functional overview Specifies whether to start stop or pause the waveform output of a specified channel or all channels Symbol M R60DA_WaveOutRegsetting Execution command B i bEN o bENO B Execution status Module label DUT i stModule o bOK B j Normal completion Target CH UW i uCH o uWaveSatusCHI UW H CH1 Wave output status monitor Wave output start stop request UW i uSartStopReq o_uWaveStatuscH2 UW CH2 Wave output status monitor Module type UW i uUnitType o_uWaveStatuscH3 UW CH3 Wave output status monitor o_uWaveStatusCH4 UW CHA Wave output status monitor o_uWaveStatusCHS UW CH5 Wave output status monitor o_uWaveStatusCH6 UW CH6 Wave output status monitor o_uWaveStatusCH7 UW CH7 Wave output status monitor o_uWaveStatusCH8 UW CH8 Wave output status monitor o bEr B H Error completion o_uErrld UW H Error code Relevant devices Relevant modules R60DA4 R60DAV8 R60DAI8 Relevant CPU modules MELSEC iQ R series CPU modules Relevant engineering tool GX Works3 Language to use Ladder diagram Number of basic steps 587 steps The number of steps of the FB embedded in a program depends on the CPU model used and the input output definitions Functional description Asi
22. Error completion o bErr Bit Off Always off Error code o uErrid Word unsigned 0 Always 0 2 ANALOG DIGITAL CONVERTER MODULE FB 2 1 M R60AD G RequestSetting 5 2 2 M R60AD G OperateError Name HR60AD4 R60ADV8 R60ADI8 M R60AD OperateError HMR60AD8 G R60AD16 G M R60ADG_OperateError FB details Functional overview Monitors error codes and resets errors Symbol M R60AD_OperateError Execution command B i bEN o bENO B Execution status Module label DUT i stModule obOK H Normal completion Error reset request B i_bErrReset o_bUnitErr B Module error flag o uUnitErrCode UW H Module error code o uUnitAlarmCode UW Module alarm code obEr j Error completion o uErld uw Error code Relevant devices Relevant modules R60AD4 R60ADV8 R60ADI8 R60AD8 G R60AD16 G Relevant CPU modules MELSEC iQ R series CPU modules Relevant engineering tool GX Works3 Language to use Ladder diagram Number of basic steps 61 steps The number of steps of the FB embedded in a program depends on the CPU model used and the input output definitions Functional description Asi bEN execution command turns on errors in the target module are monitored After i bEN execution command turns on turning on i bErrReset error reset request during an error allows the error to be reset FB compilation method Macro type FB operation Arbitrary execution type
23. OG CONVERTER MODULE FB 17 3 1 M R60DA G 16 RequestSetting 18 Restrictions and precautions This FB does not include the error recovery processing Prepare the error recovery processing separately to suit the user s system and the expected operation The FB cannot be used in an interrupt program This FB turns on or off Operating condition setting request Yn9 While this FB is in execution be careful that the D A conversion stops Putting a digital analog converter module into operation requires the output range and operation mode to be set according to the connected devices and the system in use Set up the module parameters of GX Works3 according to the application For how to set up the module parameters refer to the user s manual of the digital analog converter module Application None None None input labels Execution i_bEN Bit On or off On The FB is activated command Off The FB is not activated Module label i_stModule Structure The scope differs Specifies a module label of the digital analog converter module depending on the module label Output labels Execution status o bENO Bit Off On The execution command is on Off The execution command is off Normal completion o bOK Bit Off The on state indicates that the operation to enable each setting is complete Error completion o bErr Bit Off Always off Error code o uErrid Word unsigned 0 Always 0
24. arameter File Register Setting of File setting For the file registers ZR to be used reserve the number of points no less than the number of waveform data points plus 100 points Under the condition that the number of points of the file register ZR specified by i udReadDataAddr read start address is less than the number of waveform data points of ZR m 98 99 plus 100 points an execution of the FB results in the file register ZR exceeding the allowable range causing a CPU error error code 4101H Before processing of the FB is complete turning off i BEN execution command results in the processing being interrupted In this case the data that is already stored in the buffer memory is not cleared Executing the FB once again allows read processing to start from the beginning FB compilation method Macro type FB operation Pulse execution type multiple scan execution type 3 DIGITAL ANALOG CONVERTER MODULE FB 27 3 5 M R60DA_WaveDataStoreDev 28 Timing chart of I O signals WWhen the operation is completed successfully ON i_bEN Execution command OFF ON o_bENO Execution status OFF Buffer memory update Update stopped Update in progress Update stopped processing o Normal completion oFF o bErr Error completion OFF o_uErrld Error code 0 When the operation is completed with an error ON i
25. ation of the ladder for every input label Putting the R60DA4 R60DAV8 or R60DAIB8 into operation requires the output range to be set according to the connected devices and the system in use Set up the module parameters of GX Works3 according to the application For how to set up the module parameters refer to the MELSEC iQ R Digital Analog Converter Module User s Manual Application 100H The target channel is set out of the range Review and correct the settings and then execute the FB again Set the target channel within the following range R60DA4 1 to 4 15 Re0DAV8 R60DAIB 1 to 8 15 102H The module type is set out of the range Set the module type to the following values R60DA4 0 R60DAV8 1 R60DAI8 2 Review and correct the settings and then execute the FB again 22 3 DIGITAL ANALOG CONVERTER MODULE FB 3 3 M R60DA_WaveOutputSetting to use input labels Execution i bEN Bit On or off On The FB is activated command Off The FB is not activated Module label i stModule Structure The scope differs depending on the Specifies a module label of the digital analog module label converter module Target channel i uCH Word unsigned For the R60DA4 For the R60DA4 1t04 15 1 to 4 The corresponding channel number For the R60DAV8 and R60DAI8 is specified 1t08 15 15 All channels are specified For the R60DAV8 and R60DAI8 1t0 8 The corresponding channel n
26. ation row The data type of each column is written in the order shown in the following table The data type of each column is output in the format of Data type Added information Column 1 Data column SHORT signed 16 bit DEC 0 decimal format integer specification specification Trigger generation TRIGGER specification of the use information column of as a generated character Column 2 llData name row The title of each column is written in the order shown in the following table The data name of each column is output in the format of Data name Added information The information written in the data column is shown as a title when the logging data appears on GX LogViewer Column 1 Data column DATE 1 5 Hold trigger generation 23 time 23 yo 1 4 XY address numbers ofthe 4 module from which logging data is acquired 4 CH 1 3 Target channel 1 CYCLE 1 6 Logging cycle 3 to 17 Column 2 Trigger generation Trigger 7 7 information column __ NULL 11015 1 single width space is inserted between each output item in the data column 2 The time is output in the format of YYYY MM DD hh mm ss mmm 3 The hold trigger generation time and the logging cycle would have the values of Trigger generation time and Logging cycle monitor value of the target channel respectively A single width space is inserted between s and ms and ms and
27. bEN execution command turns on a start or stop request for the waveform output of a specified channel or all channels is written to the buffer memory Asi bEN execution command turns on the FB outputs the values of CHO Waveform output status monitor Un G401 Un G601 Un G801 Un G1001 Un G1201 Un G1401 Un G1601 Un G1801 When an individual channel is specified in the input label only this specified channel updates a waveform output status monitor value and the other channels output 0 When all channels are specified in the input label all the channels output waveform output status monitor values The number of channels with all channels specified depends on the module type Asi bEN execution command turns on the FB always starts its execution To start waveform output once again after the waveform output ends change i uStartStopReq waveform output start stop request from 1 waveform output start request to 0 waveform output stop request and then set 1 waveform output start request again The waveform output setting is enabled only when the output mode setting is set to the waveform output mode If the set value of the target channel is out of the range o bErr error completion turns on and the processing of the FB is interrupted In addition the error code is stored in o uErrld error code For the error code refer to the list of error codes 127 Page 31 Error code FB compilation method Macro type F
28. bOK Normal completion OFF o bErr Error completion OFF o uErrid Error code 0 Restrictions and precautions This FB does not include the error recovery processing Prepare the error recovery processing separately to suit the user s system and the expected operation The FB cannot be used in an interrupt program As this FB is executed the A D conversion processing stops and thereafter when o bOK normal completion turns on the conversion processing resumes Putting an analog digital converter module into operation requires the input range to be set according to the connected devices and the system in use Set up the module parameters of GX Works3 according to the application For how to set up the module parameters refer to the user s manual Application of the analog digital converter module used 4 2 ANALOG DIGITAL CONVERTER MODULE FB 2 1 M R60AD G _RequestSetting None None None input labels Execution i_bEN Bit On or off On The FB is activated command Off The FB is not activated Module label i_stModule Structure The scope differs Specifies a module label of the analog digital converter module depending on the module label Output labels Execution status o_bENO Bit Off On The execution command is on Off The execution command is off Normal completion o bOK Bit Off The on state indicates that the operation to enable each setting is complete
29. back to 1 and the save processing of logging data continues Ifi bOverWrite overwrite save command is off and the number of files that this FB has saved an SD memory card reaches i uMaxNumber maximum number of save files the save processing of logging data stops If the number of files that this FB has saved in an SD memory card reaches i uMaxNumber maximum number of save files o bExceedNumber maximum number reach flag turns on regardless of the on or off state of i bOverWrite overwrite save command If an incorrect value is set in i_uCH target channel ori uMaxNumber maximum number of save files o bErr error completion turns on and the processing of the FB is interrupted In addition the error code is stored in o_uErrld error code A CPU error occurs in the following cases when this FB has been executed with no SD memory card inserted into the CPU module when the inserted SD memory card has no sufficient free space or when the number of files stored exceeds the limit In the event of an error if the CPU module is in a stop error state o bErr error completion and o uErrld error code are not updated In the event of an error if the CPU module is in a continuation error state o bErr error completion turns on and the error code is stored in o uErrld error code For the capacity of SD memory cards and the number of files stored refer to the MELSEC iQ R Module Configuration Manual The operating status continue o
30. capable of turning off the execution command To use more than one of this FB care must be taken to avoid duplication of the target channel The FB requires the configuration of the ladder for every input label Putting the R60DA4 R60DAV8 or R60DAI8 into operation requires the output range to be set according to the connected devices and the system in use Set up the module parameters of GX Works3 according to the application For how to set up the module parameters refer to the MELSEC iQ R Digital Analog Converter Module User s Manual Application 100H The target channel is set out of the range Review and correct the settings and then execute the FB again Set the target channel within the following range R6ODA4 1 to 4 15 Re0DAV8 R60DAIB 1 to 8 15 102H The module type is set out of the range Review and correct the settings and then execute the FB again Set the module type to the following values R60DA4 0 R60DAV8 1 R60DAI8 2 3 DIGITAL ANALOG CONVERTER MODULE FB 31 3 6 M R60DA WaveOutputReqsSetting to use input labels Execution i bEN Bit On or off On The FB is activated command Off The FB is not activated Module label i stModule Structure The scope differs depending Specifies a module label of the digital analog converter on the module label module Target channel i uCH Word unsigned For the R6
31. cuting the FB once again allows read processing to start from the beginning Do not remove the SD memory card while this FB is being executed For how to insert and remove an SD memory card refer to the MELSEC iQ R CPU Module User s Manual Startup FB compilation method Macro type FB operation Pulse execution type multiple scan execution type 3 DIGITAL ANALOG CONVERTER MODULE FB 3 4 M R60DA_WaveDataStoreCsv Timing chart of I O signals MWhen the operation is completed successfully ON i Execution command off ON o_bENO Execution status oFF Reading a CSV file Unexecuted Executing SP FREAD x Unexecuted in the SD memory card Buffer memory update Update stopped Update in progress Update stopped processing o Normal completion oFF o bErr Error completion OFF o uErrid Error code 0 WWhen the operation is completed with an error ON i bEN Execution command OFF ON bENO Execution status OFF Reading a CSV file in the SD memory card Unexecuted Buffer memory update processing Update stopped o Normal completion oFF ON o bErr Error completion OFF o uErrid Error code 0 Error code 0 Restrictions and precautions This FB takes some time to complete the processing because a large number of scans is necessary until the com
32. e digital analog converter module APPENDICES APPENDIX Appendix 3 CSV File Format of the FB for Reading Wave Data CSV File MEMO APPENDICES APPENDIX 39 Appendix 3 CSV File Format of the FB for Reading Wave Data CSV File 40 INSTRUCTION INDEX M R60ADG_OperateError 6 M R60ADG_RequestSetting 4 M R60ADG_SaveLogging 12 M R60ADG_SetLoggingParam 8 M R60AD_OperateError 6 M R60AD_RequestSetting 4 M R60AD_SaveLogging 12 M R60AD_SetLoggingParam 8 M R60DAG16_OperateError 19 M R60DAG16_RequestSetting 17 M R60DAG_OperateError 19 M R60DAG_RequestSetting 17 M R60DA_OperateError 19 M R60DA_RequestSetting 17 M R60DA_WaveDataStoreCsv 24 M R60DA_WaveDataStoreDev 27 M R60DA_WaveOutputReqSetting 30 M R60DA_WaveOutputSetting 21 MEMO 41 REVISIONS The manual number is given on the bottom left of the back cover June 2014 BCN P5999 0375 A First edition January 2015 BCN P5999 0375 B Added models R60AD8 G R60AD16 G R60DA8 G R60DA16 G Added or modified parts Chapter 1 Section 2 1 2 2 2 3 2 4 3 1 3 2 3 3 Appendix 1 2 Japanese manual number BCN P5999 0365 B This manual confers no industrial property
33. e who use the MELSEC iQ R series analog digital converter module and digital analog converter module Ar C verter module FB BRG60AD4 R60ADV8 R60ADI8 M R60AD_RequestSetting Enables the settings of each function M R60AD_OperateError Monitors error codes and resets errors M R60AD_SetLoggingParam Sets up the logging function of a specified channel M R60AD_SaveLogging Saves the logging data of a specified channel into a file 1 FB name ends in the FB version information such as 00A however this reference manual leaves out it IR60AD8 G R60AD16 G M R60ADG RequestSetting Enables the settings of each function M R60ADG OperateError Monitors error codes and resets errors M R60ADG SetLoggingParam Sets up the logging function of a specified channel M R60ADG SaveLogging Saves the logging data of a specified channel into a file 1 AnFB name ends in the FB version information such as 00A however this reference manual leaves out it K erter module FB IR60DA4 R60DAV8 R60DAI8 M R60DA RequestSetting Enables the settings of each function M R60DA OperateError Monitors error codes and resets errors M R60DA_WaveOutputSetting Sets the waveform output of a specified channel or all channels M R60DA_WaveDataStoreCsv Reads out data from the CSV file that holds the parameters and the waveform data number of waveform data po
34. ends on the CPU model used and the input output definitions Functional description Asi bEN execution command turns on the FB reads out the parameters and waveform data of the waveform output function from the CSV file which is stored in the SD memory card inserted in the CPU module and stores the data to the buffer memory of the digital analog converter module For the waveform output function refer to the MELSEC iQ R Digital Analog Converter Module User s Manual Application For the parameters and data of the waveform output function and the buffer memory address of storage destination which are related to this FB refer to Storage Source Parameter Data of Waveform Output Function and Storage Destination Buffer Memory Page 36 Storage Source Parameter Data of Waveform Output Function and Storage Destination Buffer Memory At first the FB reads all the parameters of the waveform output function from the CSV file and stores them in the buffer memory Next the FB reads the waveform data the number of which is specified by the number of waveform data points in the row 100 in the CSV file in the order starting from the row 101 and stores the data in the order from the start address Un G10000 of the waveform data registration area in the buffer memory The CSV file has the settings for eight channels The number of channels to be used depends on the module type Note that the waveform output data creation tool of GX Works3 makes
35. erter module depending on the module label Error reset request i_bErrReset Bit On or off Turn on this label to reset the errors Turn off this label after the error reset Output labels Execution status o_bENO Bit Off On The execution command is on Module errors are being monitored Off The execution command is off Normal completion o bOK Bit Off The on state indicates that executing the error reset instruction has been completed Module error flag o bUnitErr Bit Off The on state indicates that a module error has occurred Module error code o uUnitErrCode Word unsigned 0 The error code of an error occurred is stored Error completion o bErr Bit Off Always off Error code o uErrid Word unsigned 0 Always 0 3 DIGITAL ANALOG CONVERTER MODULE FB 3 2 M R60DA G 16 _OperateError 3 3 M R60DA WaveOutputSetting Name M R60DA_WaveOutputSetting FB details Functional overview Sets the waveform output of a specified channel or all channels Symbol M R60DA_WaveOutputSetting Execution command B i bEN o bENO B Execution status Module label DUT i stModule o bOK B c Normal completion Target CH UW i uCH obEr H Error completion Output setting during wave output stop UW i uOutputSelect o_uErrld UW Error code Output value during wave output stop W i wOutputValue Wave pattern start address setting UD i udS
36. f the access to the SD memory card 205H Because SM601 Memory card protect flag is on write inhibited data cannot be written to the SD memory card Turn off write enabled the protect switch on the SD memory card check that SM601 is off and execute the FB again Error codes other than the above Error codes related to the SP FWRITE instruction executed when logging data is written to an SD memory card For details on the error code that has occurred refer to the description of the SP FWRITE instruction Q1 MELSEC iQ R Programming Manual Instructions Standard Functions Function Blocks 2 ANALOG DIGITAL CONVERTER MODULE FB 1 2 4 M R60AD G SaveLogging 5 16 Execution i bEN Bit On or off On The FB is activated command Off The FB is not activated Module label i stModule Structure The scope differs depending on Specifies a module label of the analog digital the module label converter module Target channel i uCH Word unsigned HR6OADA R60ADV8 R60ADI8 Specifies a channel number R60AD4 1 to 4 R60ADV8 R60ADIE 1 to 8 HR60AD8 G R60AD16 G R60AD8 G 1 to 8 R60AD16 G 1 to 16 Maximum number i uMaxNumber Word unsigned 1to 999 Specifies the maximum number of CSV files that this of save files FB saves Overwrite save i bOverWrite Bit On or off Specify whether or not to overwrite the CSV files command having smaller consecutive numbers when the number
37. form output function and the storage destination buffer memory both of which are handled by M R60DA_WaveDataStoreCsv wave data read CSV File and M R60DA_WaveDataStoreDev wave data read device Save the parameter data in the table to the file register ZR shown in the storage source in advance The number of channels to be used depends on the module type 1 Output selection during waveform 0 OV OmA 1 1 1 ZR m 0 Un G524 output stop 1 Offset value 2 1 2 ZR m 1 Un G724 Select the output during waveform 2 Output setting output stop for each channel value during 3 1 3 ZR m 2 Un G924 waveform output 4 1 4 ZR m 3 Un G1124 stop 5 1 5 ZR m 4 Un G1324 6 1 6 ZR m 5 Un G1524 7 1 7 ZR m 6 Un G1724 8 1 8 ZR m 7 Un G1924 2 Output setting value during 0 to 32767 1 2 1 ZR m 8 Un G525 waveform output stop practical range 0 2 2 2 ZR m 9 Un G725 When Output selection during to 32000 waveform output stop is set to 2 3 2 3 ZR m 10 Un G925 Output setting value during 4 2 4 ZR m 11 Un G1125 en en id the 32768 to 32767 5 2 5 ZR m 12 Un G1325 value to be output for RR practical range 6 ZR m 13 Un G1525 i 32000 to 32000 7 2 7 ZR m 14 Un G1725 8 2 8 ZR m 15 Un G1925 3 Waveform pattern start address 10000 to 89999 1 3 1 2 ZR m 16 17 Un G526 Un G527 setting 2 3 4 ZR m 18 19 Un G726 Un G
38. ints and waveform data of the waveform output function and writes the data to the buffer memory of the digital analog converter module M R60DA_WaveDataStoreDev Reads out data from the file register ZR that holds the parameters and the waveform data number of waveform data points and waveform data of the waveform output function and writes the data to the buffer memory of the digital analog converter module M R60DA_WaveOutputReqSetting Specifies whether to start stop or pause the waveform output of a specified channel or all channels 1 An FB name ends in the FB version information such as 00A however this reference manual leaves out it HR60DA8 G M R60DAG_RequestSetting Enables the settings of each function M R60DAG_OperateError Monitors error codes and resets errors 1 FB name ends the FB version information such as 00A however this reference manual leaves out it MR60DA16 G M R60DAG16_RequestSetting Enables the settings of each function M R60DAG16_OperateError Monitors error codes and resets errors 1 FB name ends in the FB version information such as 00A however this reference manual leaves out it 1 FUNCTION BLOCK FB LIST MEMO 1 FUNCTION BLOCK FB LIST 3 2 ANALOG DIGITAL CONVERTER MODULE FB 2 1 Name M R60AD G RequestSetting HR60ADA4 R60ADV8 R60ADI8 M R60AD_RequestSetting HRG60AD8 G R60AD16 G M
39. is FB does not include the error recovery processing Prepare the error recovery processing separately to suit the user s system and the expected operation The FB cannot be used in an interrupt program Using the FB in a program that is to be executed only once such as a subroutine program or a FOR NEXT loop has a problem that i_bEN execution command can no longer be turned off and normal operation is not possible Always use the FB ina program that is capable of turning off the execution command This FB cannot save logging data in a medium other than an SD memory card This FB makes use of the SP FWRITE instruction and thus if an error occurs in the execution of the SP FWRITE instruction a CPU error occurs To use more than one of this FB create an interlock to avoid simultaneous execution When saving logging data of channel 1 and channel 2 first check that o bOK normal completion of the FB on channel 1 is on and turn on i bEN execution command of the FB on channel 2 If SM606 SD memory card forced disable instruction is on at the time of saving logging data the SP FWRITE instruction is not processed resulting in the logging data not being saved In this case o bErr error completion turns on and the error code is stored in o uErrld error code The FB requires the configuration of the ladder for every input label Seti uMaxNumber maximum number of save files with consideration for the capacity of the SD memo
40. is easy to create the CSV file of the waveform output function If this FB is executed with no SD memory card inserted into the CPU module o bErr error completion turns on and the processing of the FB is interrupted In addition the error code 202H is stored in o uErrld error code For the error code refer to the list of error codes Page 26 Error code If this FB is executed with the special relay SM606 SD memory card forced disable instruction turning on o bErr error completion turns on and the processing of the FB is interrupted In addition the error code 201H is stored in o uErrld error code For the error code refer to the list of error codes 27 Page 26 Error code If a CSV file specified by i sFileName CSV file name does not exist in the SD memory card inserted into the CPU module a CPU error error code 8002H occurs A setting that the CPU module enters a stop error state during a CPU error does not allow o bErr error completion and o uErrid error code to be updated The operating status continue stop of the CPU module that results from a CPU error can be set in RAS Setting File Name Specification Incorrect in CPU Module Operation Setting at Error Detected from CPU Parameter RAS Setting Before processing of the FB is complete turning off i execution command results in the processing being interrupted In this case the data that is already stored in the buffer memory is not cleared Exe
41. ng figure is an example of how output contents are arranged in the rows and columns after a write to a CSV file LOGGING RAD1 Header lt SHORT DEC O TRIGGER rows DATE 2014 06 3014 23 51 1231 0 0330CH 1CYCLE 320us Data lt rows Data at the time of a hold trigger vy v Data column Trigger data column Header row The header row contains necessary information used for display on GX LogViewer do not make any changes The file size of the header row is as follows For the R60AD4 R60ADV8 and R6OADIS8 128 bytes fixed For the R60AD8 G and R60AD16 G 130 bytes fixed information row Information related to the CSV file is described in the order shown in the following table Column No Item Output content Size byte Column 1 File type LOGGING 9 Column 2 File version RAD1 number indicating the file version WR60AD4 R60ADV8 R60ADI8 4 MIR60AD8 G R60AD16 G 10 Column 3 Data type information row number 2 number indicating the row number of the data type information 1 row Column 4 Data name row number 3 number indicating the row number of the data name row 1 Column 5 Data start row number 4 number indicating the row number of the data row 11 1 Atthe end of column 5 4 bytes of NULL are added 34 APPENDICES APPENDIX Appendix 1 CSV File Output Format of the FB for Saving Logging Data llData type inform
42. nverter Module User s Manual Application 3 DIGITAL ANALOG CONVERTER MODULE FB 3 4 M R60DA_WaveDataStoreCsv 25 102H The module type is set out of the range Review and correct the settings and then execute the FB again Set the module type to the following values R60DA4 0 R6ODAVS8 1 R60DAI8 2 201H An access to the SD memory card has Turn off SM606 and check that SM607 SD memory card forced failed because SM606 SD memory card stop status flag is turned off then execute the FB again forced disable instruction is turned on 202H Execution of this FB has been attempted Insert an SD memory card that has the target CSV files into the without inserting an SD memory card into CPU module and execute the FB again the CPU module Insert a usable SD memory card in the CPU module and save the target CSV file with the PLC user data write function of GX Works3 Then execute the FB again 203H An access to the SD memory card has Turn on removal inhibited SM605 Memory card insertion failed because SM605 Memory card removal inhibit flag and execute the FB again insertion removal inhibit flag is off removal allowed 204H The SD memory card is frequently Reduce the frequency of the access to the SD memory card accessed from programs in addition to this FB and a timeout has occurred in the waveform data reading processing Error codes other than the above Error codes related to the SP FREAD ins
43. of CSV files that this FB has saved reaches the maximum number of save files If the setting is off the save processing of logging data stops Module type i uUnitType Word unsigned MR60AD4 R60ADV8 R60ADI8 Specifies a module type that is to be written to the file 0 R60AD4 version of the CSV file that this FB saves 1 R6OADV8 2 R60ADI8 WR 60AD8 G R60AD16 G 0 R60AD8 G 1 R60AD16 G Output labels Execution status o bENO Bit Off On The execution command is on Off The execution command is off Normal completion o bOK Bit Off The on state indicates that the file save is complete This label turns off as logging resumes Creating file o bMakingFile Bit Off The on state indicates that files are being created Maximum number o bExceedNumber Bit Off The on state indicates that the number of CSV files that this FB reach flag has saved has reached the maximum number of save files Error completion o bErr Bit Off The on state indicates that an error has occurred in the FB Error code o uErrid Word unsigned 0 The error code of an error occurred in the FB is stored 2 ANALOG DIGITAL CONVERTER MODULE FB 2 4 M R60AD G SaveLogging 3 DIGITAL ANALOG CONVERTER MODULE FB 3 1 M R60DA G 16 RequestSetting Name HR60DAA4A R60DAV8 R60DAI8 M R60DA_RequestSetting HR60DA3 G M R60DAG_RequestSetting HR60DA 16 G M R60DAG16_RequestSetting FB details Item Description Functi
44. og Converter Module User s Manual Application 102H The module type is set out of the range Set the module type to the following values R60DA4 0 R60DAV8 1 R60DAI8 2 Review and correct the settings and then execute the FB again 3 DIGITAL ANALOG CONVERTER MODULE FB 3 5 M R60DA_WaveDataStoreDev input labels Execution i_bEN Bit On or off On The FB is activated command Off The FB is not activated Module label i_stModule Structure The scope differs Specifies a module label of the digital analog converter module depending on the module label Reading start i_udReadDataAddr Double Word Valid device range Specifies the start address of the file register ZR in which the address unsigned parameters and waveform data of the waveform output function are stored Module type i_uUnitType Word unsigned 0 R60DA4 Specifies a module type 1 R60DAV8 2 R60DAI8 Output labels Execution status o bENO Bit Off On The execution command is on Off The execution command is off Normal completion o bOK Bit Off The on state indicates that writing the parameters and waveform data of the waveform output function in the file register ZR to the buffer memory of the digital analog converter module is complete Error completion o bErr Bit Off Always off Error code o uErrid Word unsigned 0 Always 0 3 DIGITAL ANALOG CONVERTER MODULE FB 3 5 M R60DA_WaveDataStore
45. onal overview Enables the settings of each function Symbol M R60DA RequestSetting Execution command B i bEN o bENO B Execution status Module label i stModule B Normal completion bEr Error completion o uErid UW Error code Relevant devices Relevant modules R60DA4 R60DAV8 R60DAI8 R60DA8 G R60DA16 G Relevant CPU modules MELSEC iQ R series CPU modules Relevant engineering tool GX Works3 Language to use Ladder diagram Number of basic steps 24 steps The number of steps of the FB embedded in a program depends on the CPU model used and the input output definitions Functional description Turning on i bEN execution command allows the settings of all channels to be enabled For what settings are enabled refer to the user s manual Application of the digital analog converter module used This FB continues its execution until the completion of the settings of each function after i execution command turns on FB compilation method Macro type FB operation Pulse execution type multiple scan execution type Timing chart of I O signals ON i Execution command ofF o_bENO Execution status Operating condition setting request Y signal Operating condition setting completed flag X signal o_bOK Normal completion o_bErr Error completion OFF o_uErrld Error code 0 3 DIGITAL ANAL
46. pletion of the processing Thus the recommended use is to execute the FB during a warm up of the R60DA4 R60DAV8 or R60DAIB8 This FB does not include the error recovery processing Prepare the error recovery processing separately to suit the user s system and the expected operation The FB cannot be used in an interrupt program Using the FB in a program that is to be executed only once such as a subroutine program or a FOR NEXT loop has a problem that i bEN execution command can no longer be turned off and normal operation is not possible Always use the FB in a program that is capable of turning off the execution command This FB makes use of the SP FREAD instruction and so an error in the execution of the SP FREAD instruction causes a CPU error When processing that accesses the SD memory card such as the data logging function of the CPU module is executed together with this FB the time to complete the execution of the FB may be extended or the error 204H timeout may occur If more than one of this FB is used simultaneous execution is not possible The FB requires the configuration of the ladder for every input label Putting the R60DA4 R60DAVS or R60DAI8 into operation requires the output range to be set according to the connected devices and the system in use Set up the module parameters of GX Works3 according to the application For how to set up the module parameters refer to the MELSEC iQ R Digital Analog Co
47. r stop of the CPU module at the time of the failure of access to the SD memory card can be set with the parameter For the format of CSV files that this FB creates refer to CSV File Output Format of the FB for Saving Logging Data Page 34 CSV File Output Format of the FB for Saving Logging Data The specified module type is reflected in the file version of the CSV file FB compilation method Macro type FB operation Pulse execution type multiple scan execution type 2 ANALOG DIGITAL CONVERTER MODULE FB 1 3 2 4 M R60AD G _SaveLogging 14 Timing chart of I O signals MWhen the operation is completed successfully ON i_bEN Execution command OFF ON o_bENO Execution status OFF ON Logging hold flag OFF ON o bMakingFile Creating a file OFF ON o_bOK Normal completion OFF ON o_bExceedNumber m Maximum number exceeded flag OFF o bErr Error completion OFF o uErrid Error code 0 W When the operation is completed with an error ON i bEN Execution command OFF ON bENO Execution status OFF ON Logging hold flag OFF m m o bMakingFile Creating a file OFF o bOK Normal completion OFF o_bExceedNumber Maximum number exceeded flag OFF ON o_bErr Error completion OFF o uErrid Error code 0 Se code 0 Restrictions and precautions Th
48. ry card and the number of files stored If the capacity of the SD memory card or the number of files stored is exceeded as a result of execution of this FB a CPU error occurs For the capacity of SD memory cards and the number of files stored refer to the MELSEC iQ R Module Configuration Manual Putting an analog digital converter module into operation requires the input range to be set according to the connected devices and the system in use Set up the module parameters of GX Works3 according to the application For how to set up the module parameters refer to the user s manual Application of the analog digital converter module used 2 ANALOG DIGITAL CONVERTER MODULE FB 2 4 M R60AD G _SaveLogging Error code 100H WR60AD4 R60ADV8 R60ADI8 The target channel is set out of the range Set the target channel within the following range R60AD4 1 to 4 R60ADV8 R60ADIE 1 to 8 WR60AD8 G R60AD16 G The target channel is set out of the range Set the target channel within the following range R60AD8 G 1 to 8 R60AD16 G 1 to 16 Review and correct the settings and then execute the FB again 101H The maximum number of save files is set out of the range The maximum number of save files is set out of the range of 1 to 999 Review and correct the settings and then execute the FB again 102H WR60AD4 R60ADV8 R60ADI8 The module type is set out of the range Set the module type to the following val
49. s method ZR and stores them in the buffer memory of the digital analog converter module For the waveform output function refer to the MELSEC iQ R Digital Analog Converter Module User s Manual Application For the parameters and data of the waveform output function and the buffer memory address of storage destination which are related to this FB refer to Storage Source Parameter Data of Waveform Output Function and Storage Destination Buffer Memory Page 36 Storage Source Parameter Data of Waveform Output Function and Storage Destination Buffer Memory This FB reads the parameters of the waveform output function from ZR m 0 specified by i udReadDataAddr read start address and stores them in the buffer memory Next the FB reads the waveform data the number of which is specified by the number of waveform data points in ZR m 98 99 in the order starting from ZR m 100 and stores the data in the order from the start address Un G10000 of the waveform data registration area in the buffer memory Note that the waveform output data creation tool of GX Works3 makes it easy to create the data of the file register ZR of the wave output function The character m is the read start address of the file register ZR Specifying the number of points to be used in File Setting allows the reservation of file registers for any desired number and the distribution of data at any desired address Parameter Model of the CPU module CPU p
50. single scan execution type 3 DIGITAL ANALOG CONVERTER MODULE FB 3 3 M R60DA_WaveOutputSetting 21 WWhen the operation is completed successfully ON Timing chart of O signals Restrictions and precautions i_bEN Execution command o_bENO Execution status Faen d ting vale Wine Unexecuted Write lUnexecuted processing o Normal completion oFF o bErr Error completion OFF o_uErrld Error code 0 WWhen the operation is completed with an error ON i Execution command ON o bENO Execution status orr Each setting value write Uh xecuted processing o Normal completion oFF Nu OFF o bErr Error completion o uErrld Error code Error code This FB does not include the error recovery processing Prepare the error recovery processing separately to suit the user s system and the expected operation The FB cannot be used in an interrupt program Using the FB in a program that is to be executed only once such as a subroutine program or a FOR NEXT loop has a problem that i_bEN execution command can no longer be turned off and normal operation is not possible Always use the FB in a program that is capable of turning off the execution command To use more than one of this FB care must be taken to avoid duplication of the target channel The FB requires the configur
51. status o_bENO Bit Off On The execution command is on Off The execution command is off Normal completion o bOK Bit Off The on state indicates that setting the waveform output has been completed Error completion o bErr Bit Off The on state indicates that an error has occurred in the FB Error code o uErrid Word unsigned 0 The error code of an error occurred in the FB is stored 3 DIGITAL ANALOG CONVERTER MODULE FB 3 3 M R60DA_WaveOutputSetting 23 24 3 4 Name FB details M R60DA_WaveDataStoreCsv M R60DA_WaveDataStoreCsv Item Description Functional overview Reads out data from the CSV file that holds the parameters and the waveform data number of waveform data points and waveform data of the waveform output function and writes the data to the buffer memory of the digital analog converter module Symbol M R60DA_WaveDateStoreCsv Execution command B i bEN o bENO B Execution status Module label DUT i stModule o bOK Normal completion CSV file name 5 i sFileName obEr Error completion Module type UW i uUnitType o uErrld UW Error code Relevant devices Relevant modules R60DA4 R60DAV8 R60DAI8 Relevant CPU modules MELSEC iQ R series CPU modules Relevant engineering tool GX Works3 Language to use Ladder diagram Number of basic steps 660 steps The number of steps of the FB embedded in a program dep
52. tartingAddr Wave pattern data points setting UD i udPointsSetting Wave pattern output repetition setting W i wFrequency Constant for wave output conversion cycle UW i uConvSpeed Module type UW i uUnitType Relevant devices Relevant modules R60DA4 R60DAV8 R60DAI8 Relevant CPU modules MELSEC iQ R series CPU modules Relevant engineering tool GX Works3 Language to use Ladder diagram Number of basic steps 862 steps The number of steps of the FB embedded in a program depends on the CPU model used and the input output definitions Functional description Asi bEN execution command turns on the waveform output settings of a specified channel or all channels are written The waveform output setting is enabled only when the output mode setting is set to the waveform output mode The waveform data for analog output is required to be set in advance The set values are enabled by turning on and off Operating condition setting request Yn9 or executing the operating condition setting request FB M R60DA_RequestSetting If the set value of the target channel is out of the range o bErr error completion turns on and the processing of the FB is interrupted In addition the error code is stored in o uErrld error code For the error code refer to the list of error codes Page 22 Error code FB compilation method Macro type FB operation Pulse execution type
53. truction executed when the parameter and waveform data of the waveform output function are read from the SD memory card For details on the error code that has occurred refer to the description of the SP FREAD instruction MELSEC iQ R Programming Manual Instructions Standard Functions Function Blocks input labels Execution i bEN Bit On or off On The FB is activated command Off The FB is not activated Module label i stModule Structure The scope differs Specifies a module label of the digital analog converter module depending on the module label CSV file name i sFileName Character string Within 64 Specifies a name of the CSV file in which the parameters and unicode characters waveform data of the waveform output function are stored Only the file attribute CSV is valid For details on the CSV file format refer to the following I Page 38 CSV File Format of the FB for Reading Wave Data CSV File Module type i uUnitType Word unsigned 0 R60DA4 Specifies a module type 1 R60DAV8 2 R60DAI8 Output labels Execution status o bENO Bit Off On The execution command is on Off The execution command is off Normal completion o bOK Bit Off The on state indicates that writing the parameters and waveform data of the waveform output function in the CSV file to the buffer memory of the digital analog converter module is complete Error completion o bErr Bit Off The on state indicates
54. ues R60AD4 0 R60ADV8 1 R60ADI8 2 WIR60AD8 G R60AD16 G The module type is set out of the range Set the module type to the following values R60AD8 G 0 R60AD16 G 1 Review and correct the settings and then execute the FB again 200H The processing is interrupted because the logging hold flag turns off while logging data is being saved The partially created CSV file is saved in the SD memory card 201H An access to the SD memory card has failed because SM606 SD memory card forced disable instruction is turned on While logging data is being saved turning on SM606 SD memory card forced disable instruction results in the partially created CSV file being saved in the SD memory card Turn off SM606 and check that SM607 SD memory card forced stop status flag is turned off then execute the FB again 202H Execution of this FB has been attempted without inserting an SD memory card into the CPU module Insert an SD memory card for saving the target CSV files into the CPU module and then execute the FB again 203H An access to the SD memory card has failed because SM600 Memory card available flag is off unavailable Make the SD memory card an available state and then execute the FB again 204H The SD memory card is frequently accessed from programs in addition to this FB and a timeout has occurred in the logging data write processing Reduce the frequency o
55. umber is specified 15 All channels are specified Output selection i uOutputSelect Word unsigned 0 0OV OmA Specifies the output value during waveform during waveform output stop 1 Offset value 2 Output setting value during waveform output stop output stop Output setting value during waveform output stop i wOutputValue Word signed For a range of 0 to 5V 1 to 5V 0 to 20mA or 4 to 20mA 0 to 32767 For a range of 10 to 10V 32768 to 32767 Sets the value to be output when 2 Output setting value during waveform output stop is selected in the output selection during waveform output stop Waveform pattern i_udStartingAddr Double Word 10000 to 89999 Sets the start address of a waveform pattern start address setting unsigned to be output Number of i_udPointsSetting Double Word 1 to 80000 point Sets the number of data points of a waveform pattern unsigned waveform pattern to be output points setting Number of i wFrequency Word signed 1 Infinite repetition output Sets the number of output times of a waveform outputs 1 to 32767 Specified number of times waveform pattern setting output Waveform output i uConvSpeed Word unsigned 1 to 5000 Sets the constant that defines the conversion cycle conversion cycle of waveform output constant Module type i uUnitType Word unsigned 0 R60DA4 Specifies a module type 1 Re0DAV8 2 R60DAI8 Output labels Execution
56. us in the data of CHO Logging cycle monitor respectively For example if either of the R60AD4 R60ADV8 or R60ADI8 has a logging cycle of 3599 seconds with a target of channel logging the logging cycle is 3598 seconds 999ms 920us which is displayed as 3599s 999ms 920us 4 XY address numbers and the target channel are the values specified as arguments to the FB for saving logging data 5 the size of the header row 128 bytes for the R60AD4 R60ADV8 and R60ADI8 130 bytes for the R60AD8 G and R60AD16 G 1 to 15 bytes of NULL are added at the end of the trigger generation information column Data is written in the order shown in the following table This data is the information displayed on GX LogViewer Data column Logging data stored in the buffer memory of the 106 analog digital converter module Trigger generation information column output only to the row of the logging data to which to 1 the trigger pointer points 1 If the logging data of the data row to which the trigger pointer points has a size of less than 6 bytes NULL is output at the end of the logging data to fix the size to 6 bytes APPENDICES APPENDIX 35 Appendix 1 CSV File Output Format of the FB for Saving Logging Data Appendix 2 Storage Source Parameter Data of Waveform Output Function and Storage Destination Buffer Memory The following table lists the relationship between the storage source Parameter data of the wave
57. value Module type B DUT UW B UW UW UW w UW d bEN i stModule i_uCH i_bLogEnable MHR60AD SetLoggingParam i_uLogData i_uLogCycleVal i_uLogCycleUnit i_uLogPoints i_uLogTrigCond i_uLogTrigData i wLogTrigValue i uUnitType o bENO o bErm o uErrld UW Execution status Normal completion Error completion Error code Relevant devices Relevant modules R60AD4 R60ADV8 R60ADI8 R60AD8 G R60AD16 G Relevant CPU modules MELSEC iQ R series CPU modules Relevant engineering tool GX Works3 Language to use Ladder diagram Number of basic steps 437 steps The number of steps of the FB embedded in a program depends on the CPU model used and the input output definitions Functional description Turning on i bEN execution command allows the logging function of a specified channel to be set This FB works for only one shot as i bEN execution command turns on The set values are enabled by turning on and off Operating condition setting request Yn9 or executing the operating condition setting request FB M R60AD G RequestSetting If the set value of the target channel is out of the range o bErr error completion turns on and the processing of the FB is interrupted In addition the error code is stored in o uErrld error code For the error code refer to the list of error codes
58. verter module depending on the module label Error reset request i bErrReset Bit On or off Turn on this label to reset errors After completion of the error reset turn off the label Output labels Execution status o_bENO Bit Off On The execution command is on Off The execution command is off Normal completion o bOK Bit Off The on state indicates that the error reset is complete Module error flag o bUnitErr Bit Off The on state indicates that a module error has occurred Module error code o uUnitErrCode Word unsigned 0 The error code of an error occurred is stored Module alarm code o uUnitAlarmCode Word unsigned 0 The alarm code of an alarm occurred is stored Error completion o bErr Bit Off Always off Error code o uErrid Word unsigned 0 Always 0 2 ANALOG DIGITAL CONVERTER MODULE FB 7 2 2 M R60AD G OperateError 8 2 3 Name HR60ADA4 R60ADV8 R60ADI8 M R60AD_SetLoggingParam HR60ADS G R60AD16 G M R60ADG_SetLoggingParam FB details M R60AD G _SetLoggingParam Item Description Functional overview Sets up the logging function of a specified channel Symbol Execution command Module label Target CH Logging enable disable setting Logging data setting Logging cycle setting value Logging cycle unit setting Post trigger logging points Level trigger condition setting Trigger data Trigger setting

Download Pdf Manuals

image

Related Search

Related Contents

ASUS USB 3.1 TYPE-C CARD  医療関連企業のポートアイランドへの進出について  VENTILCONVETTORI FAN COILS  Orange  Troubleshooting: Building GeoX on Unix/Linux Platforms  Invacare® S385  Security ceremony design and analysis.  Qualidade - Dispositivo Móvel  Samsung CE2727N Наръчник за потребителя  Artisan Technology Group is your source for quality new and  

Copyright © All rights reserved.
Failed to retrieve file