Home
R-IN32M3 Series CC-Link IE Field
Contents
1. Function Function Function Name Overview Category Type gerR_IN32_SetLERR1LED ERRCODE Sets the LED L ER port 1 gerR_IN32_SetLERR2LED ERRCODE Sets the LED L ER port 2 gerR_IN32_SetERRLED ERRCODE _ Sets the LED ERR gerR_IN32_SetDLINKLED ERRCODE _ Sets the LED D LINK LED control gerR_IN32_SetUSER1LED ERRCODE Sets the LED User LED 1 gerR_IN32_SetUSER2LED ERRCODE Sets the LED User LED 2 gerR_IN32_SetRUNLED ERRCODE _ Sets the LED RUN gerR_IN32_DisableLED ERRCODE Disables the LED function gerR_IN32_EnableLED ERRCODE Enables the LED function gerR_IN32_GetNetworkTime ERRCODE Acquires the network time serial value gerR_IN32_SetNetworkTime ERRCODE Sets the network time serial value Changes the network time serial value to clock Network time gerR_IN32_NetworkTimeToDate ERRCODE information Changes the clock information to the network gerR_IN32_DateToNetworkTime ERRCODE j time serial value gerR_IN32_EnableMACIPAccess ERRCODE Enables MAC IP access MDIO gerR_IN32_DisableMACIPAccess ERRCODE Disables MAC IP access access gerR_IN32_WritePHY ERRCODE Writes to the PHY internal register gerR_IN32_ReadPHY ERRCODE Reads the PHY internal register gerR_IN32_MainReceiveTransient 1 ERRCODE Main transient reception processing 1 gerR_IN32_MainReceiveTransient2 ERRCODE Main transient reception processing 2 ieni gerR_IN32_EnableReceiveTransient ERRCODE Enables transient re
2. Figure 3 3 Transient2 Request Procedure 1 2 3 4 5 6 The intelligent device station creates a Transient2 request frame See Section 4 2 30 The intelligent device station sends the Transient2 request frame See Section 4 2 16 The intelligent device station receives a TransientAck frame See Section 4 2 15 The intelligent device station receives a Transient2 response frame See Sections 4 2 15 and 4 2 33 The intelligent device station creates a TransientAck frame See Section 4 2 29 e e e The intelligent device station sends the TransientAck frame See Section 4 2 16 R18UZ0015EJ0200 stENESAS Page 11 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD 3 3 Frame Format Overview for Transient Communication The frame format of transient communication complies with the Ethernet frames of IEEE802 3 An Ethernet frame has a frame size of 64 to 1518 bytes from the MAC header to FCS This section describes the frames below which require format awareness in user programs Transientl frame TransientAck frame Transient2 frame R18UZ0015EJ0200 stENESAS Page 12 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD 3 3 1 Transient frame format The table below provides an overview of the Transient frame format Table 3 2 Transient1 Frame Format Overview Item T
3. Call format UCHAR uchSendBuffNo ERRCODE erSendStatus Name Variable Name Description V O UCHAR uchSendBuffNo Transient transmission buffer number Input Status of target transient transmission buffer transmission result Arguments ERRCODE erSendStatus R_IN82_OK Input Transient transmission normal completion R_IN32_ERR Transient transmission abnormal completion Return value R_IN32_OK Normal end This function acquires the transmission status transmission result of the transient transmission buffer Description i O The R IN32M3 CL driver calls this function when transmission of a transient frame ends Function internal processing is freely implemented by the vendor R18UZ0015EJ0200 stENESAS Page 149 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field REVISION HISTORY REVISION R IN32M3 Series CC Link IE Field Intelligent device station HISTORY Rev Date Description Page Summary 1 00 Jul 26 2013 First edition issued 2 00 Dec 25 2014 2 Modification of PHY address 2 of Table 1 2 Circuit Design Check Sheet Modification of product name of Figure 2 1 External AND Logic for Turning L ERR On 9 Modification of product name Figure 3 1 Transient Response Procedure Request Source Master Station 10 Modification of product name Figure 3 2 Transient2 Response Procedure 140 Modification of header file name and R IN32M3 CL head address of 4 6 1 Changing the header
4. Stopped Implement Hold Clear Device processing as necessary a Error occurred Application error status AA No error Implement Hold Clear Device processing as necessary End Figure 4 11 Receive MyStatus from Master Station and Cyclic Data Processing Flowchart R18UZ0015EJ0200 stENESAS Dec 25 2014 Page 61 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 10 Send MyStatus processing Send MyStatus processing sets its own station status in R IN32M3 CL and sets the MyStatus transmission data UserSendMyStatus Send MyStatus processing y gerR_IN32M3_SetNodeStatus l Set host station status This function sets the following statuses Detailed application operating status Detailed application error status Error code y Vendor specific node information gerR_IN32M3 SetMySt tus J Set the MyStatus transmission data y End Figure 4 12 Send MyStatus Processing Flowchart 4 2 11 Send Cyclic Data processing Send Cyclic Data processing sends cyclic transmission data RX and RWr UserSendCyclic Send Cyclic Data processing AA gerR_IN32_SetSendCyclicData set the cyclic transmission data Set the cyclic transmission data RX and RWr stored in the address specified in the argument y End Figure 4 13 Send Cyclic Data Processing Flowchart R18UZ0015EJ0200 stENESAS Page 62
5. Output Return value R_IN32_OK Normal end Description This function acquires the PHY link status R18UZ0015EJ0200 Dec 25 2014 ztENESAS Page 119 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 5 gerR_IN32_GetCyclicStatus Function Gets cyclic communication status Call format ULONG gerR_IN32_GetCyclicStatus R_IN32_CYCLIC_STA_T pstCyclicStatus Name Variable Name Description VO Cyclic communication status Bits 2 0 Cyclic communication parameter hold status 001b Parameter normally received 010b Not received or ID mismatch 011b Checking 100b Parameter abnormally received Bit 3 Cyclic communication parameter check status 0 Checked 1 Checking Bit 4 Node number invalid setting status 0 In range 1 Out of range Bit 5 Reserved node setting status 0 Non reserved node 1 Reserved node Bit 6 Cyclic communication implementation instruction batch setting status 0 Run 1 Stop Bit 7 Cyclic communication implementation instruction Arguments R_IN32_CYC individual setting status ostCyclicStatus LIC_STA_T 0 Run 1 Stop Bit 8 Reserved Bit 9 Cyclic communication continuation not possible error status 0 No error Output 1 Cyclic communication not possible error Bit 10 Node number duplication status 0 No duplication 1 Duplication Bit 11 Reserved Bit 12 Node type invalid Specified size invalid status 0 Normal 1 Invalid Bit 13 Reserved Bit 1
6. End This flowchart uses the Transient2 Get Memory request as an example Implement processing as necessary Figure 4 18 Create Transient2 Request Frame Processing Flowchart R18UZ0015EJ0200 stENESAS Page 69 of 149 Dec 25 2014 4 3BDEVELOPING FIRMWARE R IN32M3 Series CC Link IE Field 4 2 16 Send Transient1 Transient2 and TransientAck processing Send Transient Transient2 and TransientAck processing sends Transient1 Transient2 and TransientAck frames UserSendTransient a Send Transient1 Transient2 and TransientAck processing ae ieee ON ___ Transient transmission in progress flag ee i there ______No v Yes End Acquire the following of the transient frame to be sent Address of transmission frame Transmission data size Transmission startup flag of transient frame to be sent OFF Get transient transmission buffer gerR_IN32_GetSendTransientBuffer Istherea Yes transient transmission buffer acquisition error No Transient transmission normal AA processing Specify the connection information in the transmission fame Implement as necessary AA Store the transmission frame in the acquired transient transmission buffer AA gerR_IN32_RequestSendingTransient Request transient transmission N Se ieee aes Error Did th
7. ULONG b1ZChangeStNoNetNo 1 b4 Change node number and network number ULONG b1ZChangeActCommand 1 b5 Change run command ULONG b1ZPrmFrmRev_Ok 1 b6 Parameter frame reception ULONG b1ZReserve 1 b7 Reserved ULONG b1ZPrmChkFrmRev_OK 1 b8 ParamCheck frame reception when parameters match ULONG b3ZReserve2 3 b9 11 Reserved ULONG b1ZRecvNonCyclic 1 b12 Transient reception ULONG b1ZSendFinNonCyclic 1 b13 Transient transmission complete ULONG b7ZReserve3 7 614 20 Reserved ULONG b1ZMasterWatchTimeout 1 b21 Master watchdog timer timeout occurred ULONG bAZReserve4 10 622 31 Reserved stBit uniFlag R_IN32_EVTPRM_INTERRUPT_T R18UZ0015EJ0200 stENESAS Page 111 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 2 gerR_IN32_Main Function Main R IN32M3 CL event detection processing Call format ERRCODE gerR_IN32_Main const R_IN32_EVTPRM_INTERRUPT_T pstEvent Variable i Name Description 1 0 Name Arguments const R_IN32_EVTPRM_ pstEvent Interrupt cause Input INTERRUPT_T Return value R_IN32_OK Normal end R_IN32_ERR Abnormal end status error in library Description This function performs processing in response to a R IN32M3 CL event This function needs to be called after the processing described in Section 4 2 2 Initialization processing and Secti
8. Japanese sample include user s code header files SIC user s code files and callback code files obj makefile for building the user s application driver include R IN32M3 driver code header files SIC R IN32M8 driver code files obj makefile 4 3 2 File list The following presents the sample code file list root driver obj Src root Japanese readme_e txt Help file English version include R IN32M3Driver h R IN32M3Function h R IN32M3Types h makefile R_IN32 h R IN32M3 h R IN32M3_0 h R IN32M3_1 h R IN32M3_2 h R IN32M3_3 h R_IN32C h R_IN32C_R_IN32DInterface c R_IN32C_Cyclic c R_IN32C_Data c R_IN32C_Indication c R_IN82C_Init c R_IN32C_l h R_IN32C_Library c R_IN32C_MainState c R_IN32C_PortState c R_IN32C_Time c R_IN32D h L_version txt ccc Version information R IN32M8 driver header Header file change to target dependent function group for R IN32M8 driver See Section 4 6 1 Definitions described in Section 1 2 and 3 of Section 4 5 A file that requires customization by vendor R18UZ0015EJ0200 Dec 25 2014 2tENESAS Page 96 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE R_IN32D_cyc c R_IN32D_cyc_l h R_IN32D_ihnd c R_IN32D_ini c R_IN32D_intr c R_IN32D_intr_I h R_IN32D_led c R_IN32D_phy c R_IN32D_phy_I h R_IN32D_RevCnt c R_IN32D_RevCnt_l h R_IN382D_RevPrm c R_IN82D_RevPrm_l
9. Unavailable access code 0b Available access code 1b Figure 3 19 Data Area of Get Memory Access Information Response 7 6 5 4 3 2 1 0 Bit dat Hold Status Link Counter Timer Word data i gata Output Input Type Function Figure 3 20 Access Code R18UZ0015EJ0200 stENESAS Page 40 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field Table 3 20 Access Code List Example Mitsubishi Product 3 2BDATA COMMUNICATION METHOD i RN Access Device Number Device Number and Access Type Device Description Name Code Radix Range Bit Word Input X 0x01 Hexadecimal O Output Y 0x02 Hexadecimal O Internal relay M 0x03 Decimal O Latch relay L 0x83 Decimal O Link relay B Hexadecimal O Timer contact T 0x09 Decimal O Timer coil T Ox0A Decimal O Timer present value T 0x0C Decimal O Accumulation timer contact ST 0x89 Decimal O Accumulation timer coil ST 0x8A Decimal O T The device number and Accumulation timer present i O ST 0x8C Decimal access range differ for each value PLC Counter contact C 0x11 Decimal O Counter coil C 0x12 Decimal O Counter present value C 0x14 Decimal O Data register D 0x04 Decimal O Link register W 0x24 Hexadecimal O File register R 0x84 Decimal O Link special relay SB
10. gerk INE GetNodeAndNetworkNumber i Get the node number and network number Check the following Destination node number Is the value its own node number Destination network number Is the value its own network number y Check the destination node number and destination network number estination node number Error Destination network number Details are described in Section 4 2 26 Arguments 1 Address of sent frame Implement Error 2 Address of received data storage area processing as 3 Source node MAC address necessary Return value Sent data size excluding DCS FCS Create Get Detailed Node Information Response Frame processing Transient1 response frame transmission data size lt Return value of Create Get Detailed Node Information Response Frame processing Transient response frame transmission startup flag ON End Figure 4 28 Received Detailed Node Information Request Frame Processing Flowchart R18UZ0015EJ0200 2tENESAS Page 79 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 25 Create Get Detailed Node Information Response Frame processing Create Get Detailed Node Information Response Frame processing creates a Get Detailed Node Information response frame ulUserSetUnitInfo_Response Create Get Detailed Node Information Response Frame processing Arguments 1
11. R18UZ0015EJ0200 stENESAS Page 80 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Format of Get Detailed Node Information data area Frame format of Get Detailed Node Information response MAC header Destination address Source address Type CC Link IE header Frame type HEC 14 bytes Not used H 0x00000000 Sequential number Identification number Any 0 255 Entire size of H message data L HI Offset address _ 0x00000000 Transient data H size inside frameL Data sub type 0x0002 System specific Command g Sub command Logical sum of sub command inside received data storage area and 0x80 Return value Reserved 0x00 Destination network number Destination nodeH number TI Reserved H 0x0000 Reserved 0x0000 I Reserved 0x00 Source network number Source node H Get Detailed Node Information data area DCS 4 bytes FCS 4 bytes 0x0000 ___ Source network number inside received data storage area Source node number inside received data storage area Own network number m Own node number number LI Reserved H 0x0000 T Reserved H 0x0000 T Data length lt _____________ a Data length lt _ 0x80 Final frame bit
12. Return value Description R_IN32_OK Normal end R_IN32_ERR Abnormal end This function specifies the waveform output for test mode in PHY in accordance with the IEEE 802 3ab compliance test mode of the argument The processing differs according to PHY Implement the function after verifying the specification of the PHY used R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 144 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 7 Customizing the Call Back Function Group for the R IN32M3 CL Driver The internal processing of the call back function group for the R IN32M3 CL driver needs to be customized by the vendor The following lists the call back functions to be called by the R IN32M3 CL driver Table 4 12 List of Call Back Functions Used by R IN32M3 CL Driver Function Category Function Name Function Type Overview Acquires R IN32M3 CL fatal errors Error processing gR_IN32_CallbackFatalError VOID Acquires commands from the gerR_IN32_CallbackCommandFromMaster ERRCODE master station Own station status acquisition gerR_IN32_CallbackNodeAndNetwork Number Changes the node number and ERRCODE network number from the master station Acquires received transient Transient gerR_IN32_CallbackReceivedTransient ERRCODE HAPSI IN R_IN32_CallbackT ientSendi Acquires the t ient er allbackTransientSendin cquires the transien reception cies g ERRCODE q noe Complete transmission
13. T Identification number Entire size of transient data Offset address 0x00000000 Transient data size inside frame Data sub type EOT r L HI m 14 bytes 14 bytes 0x80 Final frame bit 7 1 No 1 bits 6 0 0x00 Any 0 255 Data length lt Data length iam 0x0002 System specific Command Sub command Return value L Reserved 0x00 Destination network number Destination node number H Reserved 0x0000 Reserved 0x0000 E HI L HI L Reserved 0x00 Source network number Source node number Reserved 0x0000 Reserved 0x0000 ETTE PI area Get Statistical Information data H ox0000 aan Logical sum of sub command inside received data storage area and 0x80 Source network number inside received data storage area Source node number inside received data storage area Command inside received data storage area ssi Own network number Own node number DCS 4 bytes FCS 4 bytes pani LY Transmission data size of statistical information acquisition response 4 3BDEVELOPING FIRMWARE Format of Get Statistical Information data area H No of port 1 HEC error frames im HI No of port 1 DCS FCS error frames m HI No of port 1 undersize error frames
14. This function updates the MIB information When the return value of this function is a value other than R_IN32_ OK the function calls the Description function below created by the vendor Be sure to execute error processing in accordance with the error code gR_IN32_CallbackFatalError Return value R18UZ0015EJ0200 stENESAS Page 113 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 4 Cyclic communication 1 gerR_IN32_SetCyclicStop Function Stops cyclic communication for device side reasons Call format ERRCODE gerR_IN32_SetCyclicStop VOID Name Variable Name Description 1 O Arguments None Return value R_IN32_OK Normal end ue This function stops cyclic communication for device side reasons Description If you want to clear the stop status call the function gerR_IN32_ClearCyclicStop 2 ger R_IN32_ClearCyclicStop Function Clears cyclic communication stop for device side reasons Call format ERRCODE gerR_IN32_ClearCyclicStop VOID Variable Name Description Arguments Return value R_IN32_OK Normal end This function clears cyclic communication stop that was called by the function gerR_IN32_SetCyclicStop Description 3 ger R_IN32_GetReceivedCyclicData Function Gets received cyclic data Call format ERRCODE gerR_IN32_GetReceivedCyclicData VOID pRyDst VOID pRWwDst BOOL blEnable Name Variable Name Description O VOID
15. 0 59 USHORT usMsec l lt Microsecond 0 999 USHORT usWday l lt Weekday 0 Sunday 6 Saturday R_IN32_TIMEINFO_T 4 gerR_IN32_DateToNetworkTime Function Convertsclock information Network time serial value ERRCODE gerR_IN32_DateToNetworkTime Call format const R_IN32_TIMEINFO_T pstTimelnfo USHORT pusSerial Name Variable Name Description O const R_IN32 TIMEINFO_T pstTimelnfo Clock information Input Arguments Network time pusSerial 0 Network time bits 15 0 pusSerial 1 Network time bits 31 16 pusSerial 2 Network time bits 47 32 R_IN32_OK Normal end R_IN32_ERR Abnormal end USHORT pusSerial Output Return value This function converts clock information year month day hour minute second to network time serial value in increments of seconds given a starting point of January 1 2000 00 00 00 ausSerial 0 Network time bits 15 0 is fixed to 0 A year other than 2000 2136 results in a R_IN32_ERR The R IN32M3 CL driver does not check for any errors other than the above Implement error processing in the user program to ensure that there are no leap year or date errors Description R18UZ0015EJ0200 stENESAS Page 128 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 9 MDIO access 1 gerR_IN32_EnableMACIPAccess Function Enables MAC IP access Call format ERRCODE gerR_IN32_Ena
16. Figure 4 44 Hardware Test Loop back Communication Test Flowchart You can troubleshoot ports that you suspect to have failed based on the hardware test communication test result Table 4 7 Troubleshooting Based on Hardware Test Target Port Resulting in R_LIN32_ERR by Internal Loop Back Communication Test gerR_IN32_InternalLoopBackTest Source Port Resulting in R_IN832_ERR by External Loop Back Communication Test gerR_IN32_ExternalLoopBackTest Port Suspected of Failure R18UZ0015EJ0200 Dec 25 2014 stENESAS Port 1 Port 1 XMIT Port 1 Port 2 Port 1 RECV Port 1 Port 2 RECV Port 2 Port 2 Port 2 XMIT Page 94 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Ethernet port 1 CP220 Port 1 Pulse RJ 45 Ethernet port 2 Port 2 Pulse RJ 45 ag port g m Figure 4 45 Port Schematic View R18UZ0015EJ0200 stENESAS Page 95 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 3 Sample Code File List The sample code provided with this reference manual has been verified as free of compilation errors based on GCC GNU C Compiler Version 4 3 4 The sample code is neither operating system nor MPU dependent Customize the code in accordance with the vendor environment 4 3 1 Folder configuration The following shows the folder configuration of the sample code Contents root
17. Reserved 0x00 Source network number Source node H number Li Reserved H 0x0000 T Reserved H 0x0000 T Figure 3 14 Transient Data Area Get Detailed Node Information Request For the details of each item in the figure above see Table 3 7Extension Header Items in Section 3 Transient data area in Section 3 3 1 Transient1 frame format R18UZ0015EJ0200 stENESAS Page 29 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD The following shows the frame format of the Get Detailed Node Information response Frame format of Get Detailed Node Information response Data area format of Get Detailed Node Information response Command ps 0x04 Get Detailed Node Information Fa RY size H Sub command 0x80 Response Bytes octets L H RWw size H Return value T Words Reserved 0x00 RX size H Destination network Bytes octets T Destination nodeH RWr size H number T Words L Reserved H aa l Reserved 0x00 ea i 0x0000 L 2 a No of own station ports gt H ern 4 of Token hold time 7 7 Reserved 0x00 a Sana Source network number ra l Frame transmission 7 Source node H wf l Reseved number L g No of token transmission x i n Bits 1 0 I O type Reserved H a Node information Bits 7 2 Reserved
18. communication 1 Specified size invalid Bits 31 18 Reserved Return value R_IN32_OK Normal end This function acquires the command by parameter frame reception from the master station Description The R IN32M3 CL driver calls this function when a parameter frame is received from the master station Function internal processing is freely implemented by the vendor R18UZ0015EJ0200 stENESAS Page 147 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 3 gerR_IN32_CallbackNodeAndNetworkNumber Function Changes node number and network number from master station ERRCODE gerR_IN32_CallbackNodeAndNetworkNumber Call format UCHAR uchNetworkNumber USHORT usNodeNumber Name Variable Name Description O Arguments UCHAR uchNetworkNumber Network number value range 1 239 Input USHORT usNodeNumber Node number value range 1 120 Input Return value R_IN32_OK Normal end This function issues a notification of a change in the node number and network number by reception of a parameter frame from the master station The R IN32M3 CL driver calls this function when it receives a parameter frame from the master station and the node number and network number are changed Description Function internal processing is freely implemented by the vendor When g Enable node number and network number setting from master station of B R_IN32_UNITINIT_T init
19. 0x0000 Ll z Firmware version of ji i network Reserved HY l Model type of H 0x0000 L Se f network L HI Get Detailed i Node Information Mode code of data area i T Vendor code of H network L Reserved H 0x0000 T Model name of network 20 bytes Vendor name of network 32 bytes Control information status flag Firmware version of controller Model type of H controller L Model code of controller imal Vendor code of controller I Reserved H 0x0000 L Model name of controller 20 bytes Vendor name of controller 32 bytes HI Vendor specific _ device information T Figure 3 15 Transient Data Area Get Detailed Node Information Response R18UZ0015EJ0200 stENESAS Page 30 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD Table 3 14 Data Area Items of Get Detailed Node Information Response 1 2 station ports No of ports of host station Item Description Value Remarks RY size Minimum value 0 RY size acquired by the function RY size of host station 2 LINE Bytes octets Maximum value 256 gerR_IN32_GetUnitInformation RWw size Minimum value 0 RWw size acquired by the function RWw size of host station lt No Words Maximum value 1024 gerR_IN32_GetUnitInformation RX size Minimum value 0 RX size acquired by the function RX
20. Address of assembly information a y ves Details are described in Section 8 2 19 Start Making Received Transient Arguments Data processing 1 Address of received frame 2 Address of assembly information ia Details are described in Section 8 2 20 Arguments Y 1 Address of received frame Make Received Transient 2 Storage area size of received data Daa pessing 3 Address of assembly data storage area 4 Address of assembly information Return value Assembly result hd o es _ _Isthe return _ value of Make Received Transient Data processing Assembly complete Yes Other e No v Data typ 0x07 CC Link IE field specific transient communication a ee Other oe 0x0002 System specific lt lt Implement processing for each data type Implement processing for each data sub type Other 0x04 Acquire detailed node Implement y 0x01 Distribute node information 0x03 Acquire statistic information information processing for each SN command Yes ee om 5 1 Response e 1 Response Niode information distribution Bit 7 of sub command Bit 7 of sub command not required 0 Request 0 Request No Details are described in Section 8 2 23 Arguments Details are described in Section 8 2 25 Details are described in Received Node Section 8 2 21 Received St
21. HI No of porti forwarded frames m x No of port 1 upper layer transmission frames H No of port1 discarded frames due to full forward buffer No of port 1 H discarded frames due to full upper layer transmission buffer T HI Reserved H No of port 2 HEC error frames L HI No of port 2 DCS FCS error frames L H No of port 2 undersize error frames HI No of port2 forwarded frames L x No of port 2 upper layer transmission frames H No of port 2 discarded frames due to full forward buffer No of port 2 H discarded frames due to full upper layer transmission buffer T HI No of integrity Fixed to status data items 900000000 L Figure 4 27 Frame Format of Get Statistical Information Response R18UZ0015EJ0200 Dec 25 2014 ztENESAS Page 78 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 24 Received Detailed Node Information Request Frame processing Received Detailed Node Information Request Frame processing is executed when a Get Detailed Node Information request frame is received UserHandleReceivedUnitInfoRequest Received Detailed Node Information Request Frame processing Arguments 1 Address of received data storage area 2 Received data size 3 Source node MAC address y
22. MAC IP area counter value port 1 lt MAC IP area counter value port 2 lt Ring control area counter value port 1 l lt Ring control area counter value port 2 l lt Link down counter port 1 lt Link down counter port 2 lt Master watchdog timer error counter The following describes the configuration of the tags included in R_IN32_MIB_T MIB information counter typedef struct R_IN32_MIBSDRD_TAG ULONG ulCyclicRecNomalFrameCnt ULONG ulNonCyclicRecValidCnt ULONG ulNonCyclicRecRejectCnt R_IN32_MIBSDRD_T MIB information ring control area typedef struct R_IN32_MIBRGCNT_TAG lt Received cyclic frame counter l lt Received transient frame counter lt Received transient frame discarded counter ULONG ulHecErr ULONG ulDcsFesErr ULONG ulUnderErr ULONG ulRpt ULONG ulUp ULONG ulRptFullDrop ULONG ulUpFullDrop lt MIB1 No lt MIB2 No lt MIB3 No lt MIB4 No lt MIB5 No lt MIB6 No lt MIB7 No of HEC error frames of DCS FCS error frames of undersize error frames of forwarded frames of upper layer transmission frames of discarded frames due to full forward buffer of discarded frames due to full upper layer R_IN32_MIBRGCNT_T MIB information MAC IP typedef struct R_IN32_MIBMACIP_TAG ULONG ulRFrm ULONG ulTFrm ULONG ulRUnd ULONG ulROvr ULONG ulRF
23. Name Variable Name Description 1 O Arguments None Return value R_IN32_OK Normal end R_IN32_ERR Abnormal end Description This function performs initialization for executing the internal loop back external loop back communication test When the return value of this function is a value other than R_IN32_OK the function calls the function below created by the vendor Be sure to execute error processing in accordance with the error code gR_IN32_CallbackFatalError R18UZ0015EJ0200 stENESAS Page 138 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 3 gerR_IN32_InternalLoopBackTest Function Internal loop back communication test Call format ERRCODE gerR_IN32_InternalLoopBackTest ULONG ulPort Name Variable Name Description O Test target port Arguments ULONG ulPort R_IN32_PORT1 0 Port 1 Input R_IN32_PORT2 1 Port 2 R_IN32_OK Normal end R_IN32_ERR Abnormal end This function sends a frame from the test target port specified in the argument and verifies the received result by internal loop back Return value Description When the return value of this function is a value other than R_IN32_OK the function calls the function below created by the vendor Be sure to execute error processing in accordance with the error code gR_IN32_CallbackFatalError 4 gerR_IN32_ExternalLoopBackTest Function External loop back communicat
24. R_IN32_OK Normal end This function enables or disables transient reception for vendor reasons When the return value of the function below created by the vendor is R_IN32_ERR the transient reception for vendor reasons status is set to disabled Be sure to set this function to Reception enabled if reception becomes enabled gerR_IN32_CallbackReceivedTransient Description R18UZ0015EJ0200 stENESAS Page 131 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 gbIR_IN32_GetReceiveTransientStatus Function Gets enabled disabled status of transient reception for vendor reasons Call format BOOL gbIR_IN32_GetReceiveTransientStatus VOID Name Variable Name Description O Arguments Reception enabled disabled status Return value R_IN32_TRUE Reception enabled R_IN32_FALSE Reception disabled Description This function acquires the enabled disabled status of transient reception for vendor reasons 5 gerR_IN32_SetWMACAddressTableData Function Sets node information distribution data MAC address table ERRCODE gerR_IN32_SetMACAddressTableData UCHAR uchSeqNumber R_IN82_MACADDRESSDATA_T pstMacAddrDat Variable Name Description Call format Sequential distribution number UCHAR uchSeqNumber Arguments value range 1 7 R_IN32_MACADDRESSDATA Information such as MAC address pstMacAddrDat T MAC address table R_IN32_OK Normal end Retur
25. Sets the time at which the R IN32M3 CL driver is to assert the PHY reset signal in units of us The assertion time varies according to the PHY used See the manual of your PHY define R_IN32_WAITUS_ PHYRESET_ASSERT 10000UL PHY reset assertion time 2 Time after PHY reset clear to normal operation Specifies the time after PHY reset is cleared by the R IN32M3 CL driver to normal PHY operation in units of ps The time after reset clear to normal PHY operation varies according to the PHY used See the manual of your PHY define R_IN832_WAITUS_PHYRESET_END 5000UL Time after PHY reset clear to normal operation 3 No of transient reception buffers Defines the number of transient reception buffers The R IN32M3 CL driver uses an area memory equivalent to R_IN82_TRANSIENT_BUFFER_NUM x 1 520 bytes Set a value greater than or equal to 2 define R_IN32_TRANSIENT_BUFFER_NUM 64 No of transient reception buffers R18UZ0015EJ0200 stENESAS Page 140 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 6 2 Creating a target dependent function group for the R IN32M3 CL driver Be sure to implement the target dependent function group in Table 4 11Target Dependent Function Group for R IN32M3 CL Driver The target dependent function group for the R IN32M3 CL driver must be customized in accordance with the target hardware environment The following lists the functions to be customize
26. gerR_IN32 If a fatal error occurs in R IN32M3 CL the function gerR_IN32_UpdateMIB calls the function below created by the vendor Be sure to execute error processing in accordance with the error code gR_IN32_CallbackFatalError Yes Did a fatal error occur i Implement Error processing as necessary End iReturn Normal end End iReturn Abnormal end Figure 4 10 Event Processing Flowchart R18UZ0015EJ0200 stENESAS Page 60 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 9 Receive MyStatus from Master Station and Cyclic Data processing Receive MyStatus from Master Station and Cyclic Data processing acquires the status of the master station from the received MyStatus frame and acquires cyclic data RY and RWw from the received cyclic frame When the master station is stopped or an error has occurred perform Hold Clear Device processing hold or clear the data RY or RWw received up to that time according to device specifications UserReceiveCyclic Receive MyStatus from Master Station and Cyclic Data processing AA gerR_IN32_GetReceivedCyclicData jee received cyclic data Store the cyclic data RY and RWw received from the master station in the address specified in the argument y serP _na2_GetMasterNodestatus Jj IN32_GetMasterNodeStatus Get the master station status Application run status Running
27. gerR_IN32_Enablelnterrupt Function Enables interrupts Call format ERRCODE gerR_IN32_Enablelnterrupt VOID Name Variable Name Description Arguments None Return value R_IN32_OK Normal end Description This function enables interrupts R18UZ0015EJ0200 stENESAS Page 137 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 13 Hardware tests 1 gerR_IN32_IEEETest Function IEEE 802 3ab compliance test Call format ERRCODE gerR_IN32_IEEETest USHORT usMode Name Variable Name Description V O IEEE 802 3ab compliance test mode R_IN32_IEEE_MODE1 1 MODE1 Arguments R_IN32_IEEE_MODE2 2 MODE2 USHORT usMode Input 2 R_IN32_IEEE_MODE3 3 MODE3 R_IN32_IEEE_MODE4 4 MODE4 R_IN32_IEEE_END 5 Test end Return value R_IN32_OK Normal end R_IN32_ERR Abnormal end Description This function sets the waveform output for test mode in PHY in accordance with the IEEE 802 3ab compliance test mode of the argument When the return value of this function is a value other than R_IN32_OK the function calls the function below created by the vendor Be sure to execute error processing in accordance with the error code gR_IN32_CallbackFatalError 2 gerR_IN32_InitializeLoopBackTest Function Initializes internal loop back external loop back communication test Call format ERRCODE gerR_IN32_InitializeLoopBackTest VOID
28. gusR_IN32_GetNodelD 4 system nh PS This information is for Connection Transient identification Acquired by function i S f i i identifying the transient frame information information gerR_IN32_GetSendTransientBuffer sent during a single token hold Reserved Reserved Fixed value 0x00 Own node number Own node number 1 to 120 meee Protocol version Protocol version Fixed value 0x00 Protocol type Protocol type CC Link IE Field Network 0x1 Automatically calculated by R IN32M3 CL Header Error Control Note 1 See Section 2 of Section 4 5 11 Transient transmission processing 2 See Section 5 of Section 4 5 11 Transient transmission processing 3 Set using big endian Table 3 5 Frame Type and Data Type List Frame Type Data Type Transient1 frame Transient communication specific to CC Link IE TransientAck frame Field Network Transient2 frame CC Link compatible transient communication R18UZ0015EJ0200 stENESAS Page 15 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD 2 Transienti header Transientl header is a header added to a Transient frame Transienti header frame format 2 HI Reserved 0x00000000 L Sequential number Identification Any 0x00 to OxFF Transientdata H Big endian eres L 2 bytes octets Transient header Hl i Offset address _ Bit endian from 0 4 bytes octets L T
29. pRyDst RY area Output VOID pRWwDst RWw area Output Enables Disables copying BOOL blEnable R_IN32_TRUE Enable Input R_IN32_FALSE Disable R_IN32_OK Normal end received data present R_IN32_ERR Abnormal end no received data This function stores cyclic data received from the master station in the addresses indicated by pRyDst and pRWwbDst Note however that when blEnable is set to R_IN32_FALSE the received cyclic data is discarded The return value changes to R_IN32_ERR R_IN32_ERR Abnormal end no received data While a R_IN32_ERR occurs when no cyclic communication is received from the previous call of the Arguments Return value Description function gerR_IN32_GetReceivedCyclicData to the current call of the function gerR_IN32_GetReceivedCyclicData this does not indicate an error 1 Set the head address of the RWw area in increments of 4 bytes 0 or multiple of 4 R18UZ0015EJ0200 stENESAS Page 114 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 ger R_IN32_GetMasterNodeStatus 4 3BDEVELOPING FIRMWARE Function Gets master station status ERRCODE gerR_IN32_GetMasterNodeStatus Call format BOOL pblRunSts BOOL pblErrSts ULONG pulErrCode Name Variable Name Description O Application run status BOOL pblRunSts R_IN82_TRUE Running Output R_IN32_FALSE Stopped Arguments EEF Application error status BOOL pblErrSts R_IN32_TRUE Error
30. 2 21 4 2 22 4 2 23 4 2 24 4 2 25 4 2 26 4 2 27 4 2 28 4 2 29 4 2 30 4 2 31 4 2 32 4 2 33 4 2 34 4 2 35 4 3 4 3 1 4 3 2 4 4 4 5 4 5 1 4 5 2 4 5 3 4 5 4 4 5 5 4 5 6 4 5 7 4 5 8 4 5 9 4 5 10 Update Communication Status processing eseseeeseeeseseeesrsrtetestrrrsrestesteseerenserreststentesrentsseeresserresresreet 63 Update Cyclic Communication Status processing eeseesseeseseeesrsreesstrestertsstrrststeereseeetesrerrsresrenresreet 64 Get MIB Information processing cece eseeseeeeeeeeeeeeeesecesecsecaecsaecsacsaecsaecaaecaeeeseseaeseaeseseesesseeseenas 65 Receive Transient Transient2 and TransientAck processing esescesecesecseeeeeeeeeeeeeeeeeeeeeseenseenaes 68 Send Transient1 Transient2 and TransientAck processing 0 cceseesecseeseeeeeeeeeeeceeseeecesecesecseeaeenaes 70 Received Transient Data processing ninesini erni r e e a ETEA AEE EEEE 71 Start Making Received Transient Data processing s seessssesesseesssrrersreerrsreetsresresresteeresrerrsseerreresreeresee 72 Make Received Transient Data processing 0 eee eeeeeeeceeseeeeceseceseceseceaecaaecaeeeseseaeseaeeeeesenseenseenaes 73 Received Node Information Distribution Frame processing ssccessscesececsseceeeeeceaeceeeeecsaeceeeeeenaeeeeees 74 Check Node Information Distribution Frame processing ceseeseceseeseceseceeeceeeeneeeeeeeeeeseeeseenseeeseenaes 75 Received Statistical Information Reque
31. 3 10 Distribute Node Information Header Items 3 2BDATA COMMUNICATION METHOD Item Description Value Remarks PEENE aa gt OREN When the distribution sequential Distribution sequential Distribution sequential 1to7 numbers are the same the node number number i o information is the same Discard it Master station network Network number of 1 to 239 number master station Master station model type Master station model code Model type of master station Model code of master station 0x0001 to OxFFFF 0x00000000 to OxFFFFFFFF Model type managed by CC Link Partner Association Model code of network that is unique within the same vendor code Master station vendor code Vendor code of master station 0x0000 to OxFFFF Vendor code vendor ID managed by CC Link Partner Association Master station node type Reserved Node type of master station Reserved See Table 3 12 Fixed value 0 Master station MAC address MAC address of master station 6 byte MAC address Reserved Reserved Fixed value 0 No of distributions No of distributions of node information Table 3 11 Node Information Data Area Items Node number Description Node number 1 to 120 1 to 120 Remarks Reserved Reserved Fixed value 0 Function status Transient reception function status Yes 0x01 No 0x00 Reserved Reserved Fixed value
32. 4 y y gbIR_IN32_GetReceiveTransientStatus j Get transient reception enable status for vendor reasons y Reception enabled s Transient reception enable status Reception disabled Is the reason transient reception was disabled for vendor reasons cleared gerR_IN32_EnableReceiveTransient Enable transient reception for vendor reasons End Figure 4 17 Receive Transient1 Transient2 and TransientAck Processing Flowchart R18UZ0015EJ0200 stENESAS Page 68 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Create Transient2 Request Frame processing Create Transient2 Request Frame processing creates a Transient2 request frame for the Get Memory command UserSetTransient_Request Create Transient2 Request Frame processing Is the transient2 request frame transmission startup flag ON Yes Details are described in Section 4 2 32 Arguments 1 Address of Transient2 transmission frame Return value Transmission data size excluding DCS FCS Create Transient2 Get Memory Request Frame processing Is there transmission data Is the return value of Create Transient2 Get Memory Request Frame a value other than 0 Transient2 request frame transmission data size Return value of Create Transient2 Get Memory Request Frame Transient2 request frame transmission startup flag ON
33. 7 1 No 1 bits 6 0 0x00 Get Detailed Node Information response transmission data size RY size H bytes octets L RWw size H words L RX size HJ bytes octets L RWr size H words G Reserved 0x00 No of own station ports Token hold timeH No of transmissions during token hold time Frame transmission interval Reserved No of token transmissions Node information Network firmware version Network H model type L HI Network model _ code Network H vendor code L Reserved H 0x0000 C Network model name 20 bytes Network vendor name 32 bytes Controller information status flag Controller firmware version Controller H model type L HI Controller model code Controller H vendor code L Reserved 0x0000 I Controller model name 20 bytes Controller vendor name 32 bytes H Vendor specific device information T Bits 1 0 I O type Bits 7 2 Reserved Figure 4 30 Frame Format of Get Detailed Node Information Response R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 81 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 26 Received Transient2 Data processing Received Transient2 Data processing analyzes a received Transient2 frame and creates or receives a response frame in accordance w
34. Disables update BOOL blEnable R_IN32_TRUE Enable Input R_IN32_FALSE Disable Return value Description R_IN32_OK Normal end This function sets the cyclic transmission data stored in the addresses indicated in pRxSrc and pRWwsSrc in R IN32M3 CL Now however that when blEnable is set to R_IN32_FALSE cyclic transmission data is not set The return value changes to R_IN32_ERR 1 Set the head address of the RWw area in increments of 4 bytes 0 or multiple of 4 R18UZ0015EJ0200 stENESAS Page 116 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 5 Own station status setup 1 gerR_IN32_SetNodeStatus Function Sets its own station status ERRCODE gerR_IN32_SetNodeStatus ULONG ulRunSts ULONG ulErrSts ULONG ulErrCode ULONG ulUserlnformation Name Variable Name Description O Call format Detailed application run status R_IN32_RUNSTS_UNSUPPORTED 0 Detailed application run status notification not ULONG ulRunSts supeedey Input R_IN32_RUNSTS_STOP 1 Application stopped R_IN382_RUNSTS_RUN 2 Application running R_IN382_RUNSTS_NOTEXIST 3 Arguments ee 9 Application user does not exist Application error status R_IN32_ERRSTS_NONE 0 No error ULONG ulErrSts R_IN32_ERRSTS_WARNING 1 Minor error Input R_IN32_ERRSTS_ERROR 2 Intermediate error R_IN32_ERRSTS_FATALERROR 8 Fatal error ULONG ulErrCode Error code Input ULONG ulUserInformation Vendor spec
35. Information Request Frame Processing Flowchatt eccesceseeeeeeseereeeeeeeeees 76 Create Get Statistical Information Response Frame Flowchart sseeesseseesesessrereseersrerrsserereresreeres 77 Frame Format of Get Statistical Information Response ee eeeecceeceseceseceseceseceaecaeeeseeeneeeeeeeens 78 Received Detailed Node Information Request Frame Processing Flowchart cc ceeeeeeeereeeeees 79 Create Get Detailed Node Information Response Frame Processing Flowchartt eeeeseeeseseeeeeeees 80 Frame Format of Get Detailed Node Information Response seessessseesseesesesrsererrsreeresrerrsserreeresreerss 81 Received Transient2 Data Processing Flowchatt ce ceeeseesseeeeesceeeceecesecssecaecsaecseeeaeseseeeeeensens 82 Check Received Transient2 Data Processing Flowchart cceeeeeseesscesecesecesecesecaecseesseeeeeeeeeeneees 83 Received TransientAck Data Processing Flowchart 00 0 0 ec eceeccesseesceeecesecesecesecsecsaecseeeaeseneeeeeeaeens 83 Create TransientAck Frame Processing Flowchart cece eeeeceesceescesecesecesecssecsecssecaeeeaeseneeeeeesens 84 VG Bitarna i e a TA E E A E athegdl aasd E N R teensy 84 Frame Format of TransientA CK onns r cesses di cs3ess hissessceaseescie oa sdk E E eE EEEE CEREA SERES STEE DER TEEI EPRE TERESE 85 Create Transient2 Response Frame Processing Flowchart eseesssssseesssreseesesreresreeresrerreserreeresreness 86 Frame Format of Transient
36. Make Received Transient1 Data processing Section 4 2 19 Received Node Information Distribution Frame f 21 Section 4 2 20 O processing Check Node Information Distribution Frame 22 Section 4 2 21 O processing Received Statistical Information Request Frame F _ 23 Section 4 2 22 processing Create Get Statistical Information Response Frame z 24 Section 4 2 23 processing Remark Required O Required with Transient2 implementation A Optional R18UZ0015EJ0200 stENESAS Page 52 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Table 4 2 List of Sample Flowcharts 2 2 Implementation No Function Refer to Remarks by Vendor Received Detailed Node Information Request Frame i 25 Section 4 2 24 processing Create Get Detailed Node Information Response i i 26 Section 4 2 25 Frame processing 27 Received Transient2 Data processing Section 4 2 26 O 28 Check Received Transient2 Data processing Section 4 2 27 O 29 Received TransientAck Data processing Section 4 2 28 30 Create TransientAck Frame processing Section 4 2 29 31 Create Transient2 Response Frame processing Section 4 2 30 O Create Transient2 Get Memory Request Frame 32 Section 4 2 31 O processing 33 Received Transient2 Set Memory Request processing Section 4 2 32 O Received Transient2 Set Memory Response 34 ne S
37. Output R_IN32_FALSE No error ULONG pulErrCode Master station error code Output Return value R_IN32_OK Normal end MyStatus frame received from master station R_IN32_ERR Abnormal end MyStatus frame not received from master station due to no data link data link disconnected Description This function acquires the status of the master station from the MyStatus frame received from the master station When the MyStatus frame is not received from the master station due to no data link data link disconnected the arguments are as follows pblRunStsR_IN32_FALSE pblErrStsR_IN32_FALSE pulErrCodeO 5 ger R_IN32_SetMyStatus Sets MyStatus transmission data Function Call format Arguments ERRCODE gerR_IN32_SetMyStatus VOID Name Variable Name Description None Return value R_IN32_OK Normal end Description This function sets its own station status specified by the function gerR_IN32_SetNodeStatus in R IN32M3 CL R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 115 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 6 ger R_IN32_SetSendCyclicData Function Sets cyclic transmission data ERRCODE gerR_IN32_SetSendCyclicData Call format const VOID pRxSrc const VOID pRWwSrc BOOL blEnable Name Variable Name Description I O const VOID pRxSrc RX area Input const VOID pRWwSrc RWw area Input Arguments Enables
38. Page 82 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 27 Check Received Transient2 Data processing Check Received Transient2 Data processing checks if the received Transient2 frame is addressed to its own station and checks the destination node number DA Destination Address and DS Destination Station No and destination network number DNA Destination Network Address erUserCheckReceivedTransient2 Argument Check Received Transient2 Data processing 1 Address of received frame Return value Check result gerR_IN32_GetNodeAndNetworkNumber Get the node number and network number o DA and DS Own node number and does DNA Own network number No erResult Normal y erResulte Error Not addressed to own station End erResult Figure 4 32 Check Received Transient2 Data Processing Flowchart 4 2 28 Received TransientAck Data processing Received TransientAck Data processing processes a received TransientAck frame UserHandleReceivedTransientAck Received TransientAck Data Arguments processing 1 Address of received frame 2 Received data size excluding FCS Check the following as necessary 1 Is there a TransientAck in response to the transient frame received by its own station 2 Is the reception result normal End Figure 4 33 Received TransientAck Data Processi
39. Procedure Request Source Master Station cece cece cee cseeeneeeeeeeeeeeeeenees 9 Transient2 Response Procedure Request Source Other than Master Station eee eeeeeeeeeee 10 Transient Request Procedures onesie a E EENT EAEE EE E NE E S EERE A 11 Transient Frame Common Header on eeeeeeescesecesecesecesceseeesecsecsaecsaecsaecaeecaeseaeseeseseeseeeneenseenaes 14 Transient LHe ad et ise nrinn a ierse E EE E las sa EE EE AET E E EEE EE echoed fobs 16 Transient Header Relationship between Sequential No and Identification No of Transient Data 17 Transient Data Areas sie ccisieiie eatin Gat er aie he BR as Raises AB RA Ge el eee 18 Transient Data Area Frames When Distribute Node Information Request Is Divided 20 Transient Data Area Distribute Node Information Request essceseceeseeceereeeneeceereeeeecesreeeneeees 21 Transient Data Area Distribute Node Information Request Frame 1 00 cece eeeceeeeeeeteceeeeeeneeeeeee 22 Transient Data Area Distribute Node Information Request Frame 2 000 0 eee eee eeeeeeeereeeeeeeees 23 Transient Data Area Get Statistical Information Request ee eeceeeceseceseceseceeceeeeeeeeeeeeeenens 26 Transient Data Area Get Statistical Information Response 0 cceeceeceseceseceseceseceeeneeeeeeeeeeeees 27 Transient Data Area Get Detailed Node Information Request 0 0 cece eeeeeeesceseeeseeeeeeseenaeenaes 29 Transient Data Area Get Detailed No
40. SAT DAT inside received frame 10 DMF SMF inside received frame 11 SMF DMF inside received frame 12 DNA SNA inside received frame 13 DS SS inside received frame 14 DID SID inside received frame 15 SNA Own network number 16 SS lt Own node number lower 8 bits 17 SID lt 0x03FF 18 L1 lt Size from 19 CT to 22 RSTS 19 CT Logical sum of CT inside received frame and 0x80 bit 7 response ON 20 RSV 0x00 21 APS APS inside received frame RSTS Argument 3 error code Speos jF Zz O ulSize Transient2 Set Memory response transmission data size excluding DCS FCS End ulSize Figure 4 37 Create Transient2 Response Frame Processing Flowchart R18UZ0015EJ0200 stENESAS Page 86 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Frame format of Transient2 response frame MAC header i Destination i address 14 bytes Source address Type CC Link IE header 14 Frame type pyles HEC L L H Data length a RSV 0x00 TP SF TP SF inside received frame FNO FNO inside received frame A DT e DT inside received frame DA YH SA inside of received frame SA fe Own node number lower 8 bits DAT SAT inside received frame SAT O e DAT inside received frame E DMF sift SMF inside received frame Tran
41. Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 DEVELOPING FIRMWARE 4 1 Development Procedure This section describes the procedure for developing firmware that uses the sample code The sample code comprises the program elements described in Table 4 1 While customization of the R IN32M3 CL driver main unit is not required other program elements need to be customized in accordance with the hardware of the device target to be developed Table 4 1 List of Program Elements Included in Sample Code ee Customization by Program Element Name Description Vendor User program A program for mounting device functions The sample code describes only the section related to communication Create a new program while referring to Section 4 2 R IN32M3 CL driver main unit Comprises functions that are called from the user program The user program can call the R IN32M3 CL driver interface functions described in Sections 4 2 and 4 5 enabling use of X R IN32M3 CL functions Customization of the R IN32M3 CL driver main unit is not required Target dependent function A function group that requires customization in accordance group for R IN32M3 CL driver with the hardware developed by the vendor For target O dependent function group details see Section 4 6 Call back function group for A function group called from the driver when an event occurs R IN32M3 CL driver requiring customization by the vendor For call back fu
42. This processing is optional When the intelligent device station is forcibly stopped R IN32M3 CL changes to bypass mode Communication frames are neither transmitted nor received Received frames are forwarded as is to the other port To clear a forced stop power ON reset or system reset is required UserForceStop Force Stop processing Do you want to forcibly No stop the station for device side reasons gerR_IN32_ForceStop Set up Force Stop End Figure 4 8 Force Stop Processing Flowchart 4 2 7 Stop Cyclic Communication processing Stop Cyclic Communication processing allows you to control the stopping and restarting of cyclic communication for device side reasons This processing is optional Even if you stop cyclic communication token passing continues UserStopCyclic Stop Cyclic Communication processing Do you want to stop cyclic communication for device side reasons No v gerR_IN32_ClearCyclicStop gerR_IN32_SetCyclicStop Stop cyclic communication for device side reasons Clear cyclic communication stop for device side reasons End Figure 4 9 Stop Cyclic Communication Processing Flowchart R18UZ0015EJ0200 stENESAS Page 59 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 8 Event processing Event processing detects MPU interrupts R IN32M3 CL events process
43. _ERR that occurred multiple times in an idle state RECV_ _DV 1 as one error 1 The asterisk indicates a wild character A Port 1 B Port 2 No of received invalid carrier errors Counts the number of invalid carriers that occurred in an idle state Counts multiple invalid carriers that occurred in an idle state as one error No of received invalid carrier extension errors Counts the number of invalid carrier extensions that occurred in an idle state Counts multiple invalid carrier extensions that occurred in an idle state as one error R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 66 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 3 List of Other MIB Information Table 4 5 List of Other MIB Information No MIB Information Description No of link downs port 1 Counts the number of link downs of port 1 1 2 No of link downs port 2 Counts the number of link downs of port 2 3 No of master watchdog timer errors Counts the number of timeouts of the watchdog timer No of received cyclic frames Counts the number of cyclic frames received by R IN32M3 CL No of received transient frames Counts the number of transient frames received by R IN32M3 CL No of received transient frames Counts the number of received transient frames discarded by discarded R IN32M3 CL R18UZ0015EJ0200 stENESAS Page 67 of 149 Dec 25 2014 R IN32M3 Series CC L
44. by the device to be developed For details see Section 4 7 Customizing the Call Back Function Group for the R IN382M3 CL Driver Step 4 Creating the R IN32M3 CL library Once the R IN32M3 CL driver main unit and target dependent function group for the R IN32M3 CL driver are compiled execute the librarian and create a library file Step 5 Connecting the user program and library file Connect the user program the customized call back function group for the R IN32M3 CL driver and the library file and create a load module file Step 6 Load the load module file to the device target to be developed R18UZ0015EJ0200 stENESAS Page 50 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Call back function group for R 32M3 CL drive Object module file User program C compiler Object Library file module file Linkage editor Load module file Device target to be developed R IN32M3 CL driver main body Target dependent function group for R IN32M3 CL Object Object module file module file Librarian Program created by customizing sample code g SS Newly created program Figure 4 2 Firmware Development Procedure R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 51 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 Sample Flowcharts of User Program This section presents
45. completion status frames 1 gR_IN32_CallbackFatalError Function Gets R IN32M3 CL fatal errors Call format VOID gR_IN32_CallbackFatalError ULONG ulErrorCode ULONG ulErrorlnfo Variable Name Description ulErrorCode Fatal error code Arguments Fatal error information ulErrorInfo Address of function when error occurred Return value This function acquires R IN32M3 CL fatal errors Description The R IN32M3 CL driver calls this function when a R IN32M3 CL fatal error is detected Function internal processing is freely implemented by the vendor R18UZ0015EJ0200 stENESAS Page 145 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Table 4 13 List of Fatal Error Codes of gR_IN32_CallbackFatalError Function Fatal Error s Fatal Error Information Fatal Error Code ae Processing ulErrorInfo Description ulErrorCode Driver internal startup source function a The error is most likely a malfunction Communicatio D529 Address of the function n EST error caused by noise etc Check the gerR_IN32D_ClearTxRxRAM distance between lines and cables as Driver internal startup source function _ 7 well as device grounding and Communicatio D52A Address of the function LSI implement noise countermeasures n error i erR_IN32D_MDIO_WaitCommandComplete accordingly Driver internal startup source function o Implement a m
46. data MAC address table Information of master station Vv 1 Sequential distribution number gerR_IN32_SetMACAddressTableData H 2 Information such as MAC address MAC address table wal F Node number 0x7D Paar eT Transient reception function status ON MAC address Master station MAC address AA AA Get slave station information Implement Error Normal processing as necessary Is the node number 120 or less No ani Does the network number equal its owh network number Set up node information distribution data MAC address table Information of slave station y es 1 Sequential distribution number gerR_IN32_SetMACAddressTableData I 2 Information such as MAC address MAC address table Node number Transient reception function status MAC address lt No of distributions e End Figure 4 23 Received Node Information Distribution Frame Processing Flowchart R18UZ0015EJ0200 stENESAS Page 74 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 2 21 4 3BDEVELOPING FIRMWARE Check Node Information Distribution Frame processing Check Node Information Distribution Frame processing checks the data inside the node information distribution frame erUserCheckMACAddressData Arguments Check Node Information Distribution Frame processing storage area 2 Received data size Return v
47. described in this document you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations 10 It is the responsibility of the buyer or distributor of Renesas Electronics products who distributes disposes of or otherwise places the product with a third party to notify such third party in advance of the contents and conditions set forth in this document Renesas Electronics assumes no responsibility for any losses incurred by you or third parties as a result of unauthorized use of Renesas Electronics products 11 This document may not be reproduced or duplicated in any form in whole or in part without prior written consent of Renesas Electronics 12 Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products or if you have any other inquiries Note 1 Renesas Electronics as used in this document means Renesas Electronics Corporation and also includes its majority owned subsidiaries Note 2 Renesas Electronics product s means any product developed or manufactured by or for Renesas Electronics Instructions for the use of product In this section the precautions are described for over whole of CMOS device Please refer to this manual about individual precaution When there is a mention unlike the text of this manual a mention of the text takes first priorit
48. execute error processing in accordance with the error code gR_IN32_CallbackFatalError 2tENESAS Page 108 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 2 Watchdog timer 1 gerR_IN32_ResetWDT Function jeso R IN32M3 CL internal WDT Call format ULONG gerR_IN32_ResetWDT VOID Name Variable name Description 0 Arguments None Return value R_IN32_OK Normal end This function resets the R IN32M3 CL internal WDT Description If you want to call a function within Section 4 5 2 Watchdog timer after this function is called wait 1 032 us or longer 2 gerR_IN32_DisableWDT Function Disables R IN32M3 CL internal WDT Call format ULONG gerR_IN32_DisableWDT VOID Name Variable name Description Arguments None Return value R_IN32_OK Normal end This function disables the R_IN32M3 CL internal WDT If you want to call a function within Section 4 5 2 Watchdog timer after this function is called wait 1 032 us or longer R IN32M3 CL enables the R IN32M3 CL internal WDT immediately after reset Initial value of R IN32M3 CL internal WDT time limit setting 3 2 s Description The R IN32M3 CL internal WDT is disabled when the function gerR_IN32_Initialize is called Implement one of the following when startup of the function gerR_IN32_Initialize takes time Call this function to disable the R IN32M3 CL internal WDT Call the function gerR_IN32_ResetWDT to reset the R IN3
49. file Memo 7tENESAS SALES OFFICES Renesas Electronics Corporation http Avwww renesas com Renesas Electronics America Inc 2880 Scott Boulevard Santa Clara CA 95050 2554 U S A Tel 1 408 588 6000 Fax 1 408 588 6130 Renesas Electronics Canada Limited 1101 Nicholson Road Newmarket Ontario L3Y 9C3 Canada Tel 1 905 898 5441 Fax 1 905 898 3220 Renesas Electronics Europe Limited Dukes Meadow Millboard Road Bourne End Buckinghamshire SL8 5FH U K Tel 44 1628 651 700 Fax 44 1628 651 804 Renesas Electronics Europe GmbH Arcadiastrasse 10 40472 D sseldorf Germany Tel 49 211 65030 Fax 49 21 1 6503 1327 Renesas Electronics China Co Ltd 7th Floor Quantum Plaza No 27 ZhiChunLu Haidian District Beijing 100083 P R China Tel 86 10 8235 1155 Fax 86 10 8235 7679 Renesas Electronics Shanghai Co Ltd Unit 204 205 AZIA Center No 1233 Lujiazui Ring Rd Pudong District Shanghai 200120 China Tel 86 21 5877 1818 Fax 86 21 6887 7858 7898 Renesas Electronics Hong Kong Limited Unit 1601 1613 16 F Tower 2 Grand Century Place 193 Prince Edward Road West Mongkok Kowloon Hong Kong Tel 852 2886 9318 Fax 852 2886 9022 9044 Renesas Electronics Taiwan Co Ltd 13F No 363 Fu Shing North Road Taipei Taiwan Tel 886 2 8175 9600 Fax 886 2 8175 9670 Renesas Electronics Singapore Pte Ltd 80 Bendemeer Road Unit 06 02 Hyflux Innovation Centre Singapore 339949 T
50. full forward buffer forward buffer buffer No of port 1 discarded No of port 1 discarded f Counts the number of frames discarded due frames due to full upper frames due to full upper 0 to 4294967295 to a full upper layer transmission buffer Reserved No of port 2 HEC error frames Reserved No of HEC error frames of port 2 Fixed value 0 0 to 4294967295 Counts the number of HEC errors in received frames No of port 2 DCS FCS error frames No of DCS FCS error frames of port 2 0 to 4294967295 Counts the number of DCS FCS errors in received frames No of port 2 undersize error frames No of port 2 forward frames No of undersize error frames of port 2 No of forwad frames of port 2 0 to 4294967295 0 to 4294967295 Counts the number of cases in which the received frame size is less than 28 bytes Counts the number of forwarded frames No of port 2 upper layer transmission frames No of upper layer transmission frames of port 2 0 to 4294967295 Counts the number of frames transmitted to the upper layer No of port 2 discarded frames due to full forward buffer No of port 2 discarded frames due to full forward buffer 0 to 4294967295 Counts the number of frames discarded due to a full forward buffer No of port 2 discarded No of port 2 discarded Counts the number of frames discarded due frames due to full upper f
51. h R_IN32D_reg c R_IN32D_reg_I h R_IN32D_sub c R_IN382D_sub_I h R_IN32D_tran c R_IN32D_tran_l h R_IN32R c R_IN32R h R_IN32S c R_IN32S h R_IN32T h R_IN32T_ASIC c R_IN32T_ASIC h R_IN32T_Cmu h R_IN32T_CmuNCycRcv c R_IN32T_CmuOutLpBak c R_IN32T_CmuSub h R_IN32T_CmuSub3 c R_IN32T_Com c R_IN32T_Com h R_IN32T_Data c R_IN32T_Data h R_IN32T_FrmForm h R_IN32T_MACIP c R_IN32T_MACIP h R_IN32T_RegChk c R_IN32T_RegChk h R_IN32T_RINGc R_IN32T_RING h R_IN32T_TxFrame c R_IN32T_TxFrame h R_IN32U h R_IN32U_Init c R_IN32_Frame h R_IN32_Interface c sample include obj Src R IN32M3Callback h makefile R IN32M3_Callback c R IN32M3_HW Test c R IN32M3_HW Test h R IN32M3_sample c R IN32M3_sample h R IN32M3_Transient c R IN32M3_Transient h Function used by driver of target dependent function group for R IN32M3 driver See Section 4 6 2 Declaration of function used by driver of target dependent function group for R IN32M3 driver See Section 4 6 2 Interface function group for R IN32M3 driver See Section 4 4 Declaration of callback function group for R IN32M3 driver See Section 4 7 A file that requires customization by vendor Call back function group for R IN32M3 driver See Section 4 7 A file that needs to be created by vendor A file that needs to be created by vendor A file that needs to be created by vendor A file that needs to be created by vendor A file that needs to be created by vendor A fi
52. implantations etc or may cause serious property damages nuclear reactor control systems military equipment etc You must check the quality grade of each Renesas Electronics product before using it in a particular application You may not use any Renesas Electronics product for any application for which it is not intended Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for which the product is not intended by Renesas Electronics You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics especially with respect to the maximum rating operating supply voltage range movement power voltage range heat radiation characteristics installation and other product characteristics Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges Although Renesas Electronics endeavors to improve the quality and reliability of its products semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions Further Renesas Electronics products are not subject to radiation resistance design Please be sure to implement safety measures to guard them against the possibility of physical injury and injury or dam
53. layer and signal line thickness for the signal GMII which GMII wiring connects R IN32M3 CL and PHY been determined to achieve shortest pattern wiring and 50 Q impedance When a pattern is bent is it always bent at 45 degrees as shown below OK 45 Not acceptable 45 Signal pattern bending Power supply GND Is the power supply GND pattern wired using the thickest pattern pattern possible R18UZ0015EJ0200 stENESAS Page 2 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 2 1BSTATUS DISPLAY FUNCTIONS 2 STATUS DISPLAY FUNCTIONS 2 1 LED Based Status Displays For an intelligent device station developed using R IN32M3 CL mount the LEDs for indicating the status of port 1 port 2 and its host station as indicated in the table below For LED control see Section 2 2 Table 2 1 LED Name LED Status Display List Function LED Status LED Off Status display of host station PW Power supply status Power supply ON Power supply OFF RUN Operating status Normal Not normal RD Data reception status Receiving data Not receiving data SD Data transmission status Sending data Not sending data Disconnected excluding cases ERR Error status where cyclic communication has Other than the left never been implemented ee Cyclic communication D LINK Data link status Cyclic communication in progress stopped User LED 1 User LED 1N _
54. lower 8 bits CC Link compatible transient communication CC Link compatible transient communication ee Destination network number Destination node number pana Source network number Source node number lower 8 bits L1 CT RSV 0x00 APS Application side identification number DATA 0 to 968 bytes r Transient2 header e 3 2BDATA COMMUNICATION METHOD Transient2 data area ASTE E EAE i SO ET Figure 3 17 Transient2 Header R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 36 of 149 R IN32M3 Series CC Link IE Field Table 3 18 Transient2 Header Items Item L Length Item Name Description Length bytes from FNO to DATA 3 2BDATA COMMUNICATION METHOD Value 22 to 990 Remarks RSV ReSerVe Reserved Fixed value 0x00 TP SF TyPe SequenceFlag Not used type sequence number Fixed value 0x00 FNO Frame Sequence Not used divided frame number Fixed value 0x00 DT Data frameType Not used data frame type Fixed value 0x00 DA Destination Address SA Source Address Destination node number Source node number 1 to 120 master station Ox7D 0 to 120 Same value as DS DAT Destination Application Type Application type Fixed value 0x22 CC Link compatible transient communication SAT Source Application Type Application type Fixed v
55. of received frame A5 there a response Return value Processing result ae to the Get Memory _ No request requested by own station SON reiia value ot Revelved Tendra Sar E Memory Request processing Yes Implement Error processing as Implement Error Normal pre processing as necessary necessary ss Other Bits 0 6 of CT 0x10 Get memory No f DT off Implement the processing of each command Response frame gt Response frame not required required ves Details are described in Section 8 2 31 Received Transient2 Arguments Get Memory n 1 Address of sent frame gien Transient2 Response 51 Address of received frame rame processing B Error code Return value Details are described in Section 8 2 34 Argument 1 Address of data area of received frame R nse processi Return value esponse processing Processing resuit Sent data size excluding DCS FCS aoo furn value of Received Transient Error et Memory Response processin Transient2 response frame transmission data size Return value of Create Transient2 Response Frame processing Transient2 response frame transmission Implement Error startup flag ON processini necessary End End Figure 4 31 Received Transient2 Data Processing Flowchart R18UZ0015EJ0200 stENESAS Dec 25 2014
56. received frame 3 Entire size Entire size of transient data of received frame 4 Assembled size 0 Figure 4 21 Start Making Received Transient1 Data Processing Flowchart R18UZ0015EJ0200 stENESAS Page 72 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 19 Make Received Transient Data processing Make Received Transient Data processing assembles the data of the Transient1 frame Arguments 1 Address of received frame A 2 Storage area size of assembled data S eee a 3 Storage area of assembled data 4 Address of assembly information Return value Assembly result Get offset address of received frame j Get data size of received frame and calculate the size after assembly offset address of the received frame match the assembled size of the assembl information blComplete Assembly not complete End blComplete Does the data after assembly fit in the storage area blComplete Assembly not complete End blComplete Copy the data area of the received frame to the storage area y Update assembly information 1 Assembled size Size after assembly Does the Entire size of the assembly information equal the Assembled size of the assembly information No y blComplete Assembly not complete blComplete lt Assembly complete Rese
57. sample flowcharts of a user program that uses driver interface functions Write your user program based on the sample flowcharts Table 4 2 List of Sample Flowcharts 1 2 Implementation Function Refer to by Vendor Remarks 1 General flow Section 4 2 1 2 Initialization processing Section 4 2 2 3 Start Communication processing Section 4 2 3 4 Check PHY processing Section 4 2 4 A Necessity of i implementation varies 5 Change PHY Setting processing Section 4 2 5 A according to PHY 6 Force Stop processing Section 4 2 6 A Stop Cyclic Communication processing Section 4 2 7 A 8 Event processing Section 4 2 8 Receive MyStatus from Master Station and Cyclic 9 f Section 4 2 9 Data processing 10 Send MyStatus processing Section 4 2 10 11 Send Cyclic Data processing Section 4 2 11 12 Update Communication Status processing Section 4 2 12 13 Update Cyclic Communication Status processing Section 4 2 13 A 14 Get MIB Information processing Section 4 2 14 A Receive Transient1 Transient2 and TransientAck i 15 Section 4 2 15 processing 16 Create Transient2 Request Frame processing Section 0 O Send Transient1 Transient2 and TransientAck _ 17 Section 4 2 16 processing 18 Received Transient Data processing Section 0 19 Start Making Received Transient1 Data processing Section 4 2 18 20
58. setting is changed by this function while the R IN32M3 CL internal WDT is running after the function gerR_IN32_EnableWDT is called the R IN32M3 CL internal WDT runs using the new time limit setting after the function gerR_IN32_ResetWDT is called Until the function gerR_IN32_ResetWDT is called the R IN832M3 CL internal WDT runs using the R IN32M3 CL internal WDT time limit setting prior to the change R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 110 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 3 Event 1 gerR_IN32_GetEvent Function Detects R IN32M3 CL events Call format ERRCODE gerR_IN32_GetEvent R_IN832_EVTPRM_INTERRUPT_T pstEvent Name Variable name Description VO Arguments R_IN382_EVTPRM_INTERRUPT_T pstEvent Interrupt cause Output Return value R_IN32_OK Normal end This function detects R IN32M3 CL events Arguments of gerR_IN32_GetEvent The following describes the configuration of R_IN32_EVTPRM_INTERRUPT_T based on the sample code Interrupt cause typedef struct R_IN832_EVTPRM_INTERRUPT_TAG union ULONG ulAll struct ULONG b1ZCommConnect 1 b0 Connect communication ULONG b1ZCommDisconnect 1 b1 Disconnect communication ULONG b1ZCommConnectToDisconnect 1 b2 Connect communication Disconnect communication ULONG b1ZCommDisconnectToConnect 1 b3 Disconnect communication Connect communication
59. size of host station cc NGtE Bytes octets Maximum value 256 gerR_IN32_GetUnitInformation RWr size Minimum value 0 RWr size acquired by the function RWr size of host station i aan Nole Words Maximum value 1024 gerR_IN32_GetUnitInformation Reserved Reserved Fixed value 0 No of ports of host station acquired by No of host Fixed value 2 the function gerR_IN32_GetUnitInformation Maximum value us of Token hold time acquired by the function Token hold time token hold time of host 1 to 32767 gerR_IN32_GetUnitInformation station Number of frame No of a No of transmissions during token hold a transmissions other than f transmissions a 1 to 255 acquired by the function token frame transmission f Note during token hold i gerR_IN32_GetUnitInformation during token hold Frame Frame interval after token Frame transmission interval acquired by transmission frame reception to MyStatus 1 to 255 the function transmission frame transmitted during token hold interval frame transmission gerR_IN32_GetUnitInformation Reserved Reserved Fixed value 0 No of repeated f P No of token transmissions acquired by No of token transmissions of token 1 to 255 the function gerR_IN32_GetUnitInformation Front Back mixed 0x00 Node information I O type acquired by of network network Node information VOt Input 0x01 meind ype e function I O type Outp
60. third parties by or arising from the use of Renesas Electronics products or technical information described in this document No license express implied or otherwise is granted hereby under any patents copyrights or other intellectual property rights of Renesas Electronics or others You should not alter modify copy or otherwise misappropriate any Renesas Electronics product whether in whole or in part Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from such alteration modification copy or otherwise misappropriation of Renesas Electronics product Renesas Electronics products are classified according to the following two quality grades Standard and High Quality The recommended applications for each Renesas Electronics product depends on the product s quality grade as indicated below Standard Computers office equipment communications equipment test and measurement equipment audio and visual equipment home electronic appliances machine tools personal electronic equipment and industrial robots etc High Quality Transportation equipment automobiles trains ships etc traffic control systems anti disaster systems anti crime systems and safety equipment etc Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to human life or bodily injury artificial life support devices or systems surgical
61. 0 Network number Network number of node 1 to 239 Model type Model type of node 0x0001to OxFFFF Model type managed by CC Link Partner Association Model code Model code of node 0x00000000 to OxFFFFFFFF Model code of network that is unique within the same vendor code Vendor code Vendor code 0x0000 to OxFFFF Vendor code vendor ID managed by CC Link Partner Association Node type Node type See Table 3 12 Reserved Reserved Fixed value 0 MAC address MAC address 6 byte MAC address Reserved R18UZ0015EJ0200 Dec 25 2014 Reserved Fixed value 0 stENESAS Page 24 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD Table 3 12 Node Type List Node Type Description Remarks Master station 0x31 Reserved 0x32 Local station 0x33 Intelligent device station 0x34 Remote device station 0x35 Remote I O station R18UZ0015EJ0200 stENESAS Page 25 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field b Get statistical information 3 2BDATA COMMUNICATION METHOD The Get Statistical Information command is used by the master station to collect the statistical information of a slave station The master station sends the request to a slave station and the slave station sends a response to the master station The intelligent device station slave station sends a TransientAck fra
62. 00 j Master station Slave station Information request Get Detailed Node 0x04 0x80 i Master station Slave station Information response R18UZ0015EJ0200 stENESAS Page 19 of 149 Dec 25 2014 Remarks R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD Distribute node information a The Distribute Node Information command is used by the intelligent device station to find a destination MAC address from a destination node number The intelligent device station sends a TransientAck frame in response to a Distribute Node Information request frame received from the master station Transmission of a Transient response frame response to a Distribute Node Information request is not required If the number of sets of distributed node information is 60 or more the frame is divided into two frames since the frame size exceeds 1518 bytes which is the maximum number of an Ethernet frame In such a case the Transient1 reception data needs to be assembled by firmware Transientl data area Distribute Node ransientl data area Distribute Node Information request data information request Frame 1 Extension header Extension header Distribute Node Distribute Node Information Information header header No 1 No 1 No 2 No 2 a a No 58 Node information No 58 data area No 59 l No 59 No 60 No 60 firs
63. 0x63 Hexadecimal O Link special register SW 0x64 Hexadecimal O Special relay SM 0x43 Decimal O Special register SD 0x44 Decimal O R18UZ0015EJ0200 stENESAS Page 41 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD c RUN Request The RUN request sets the master station to a RUN state CT 0x08 Mode UE H Clear mode Signal flow mode Figure 3 21 RUN Request Data Area Table 3 21 RUN Request Setting List Item Setting Value Normal RUN 0x0003 Mode Forced RUN 0x0001 Clear all 0x02 Clear mode Clear all areas other than latch range 0x01 Do not clear device 0x00 Signal flow mode Fixed value 0x00 Response The RUN response sends the result of the RUN request CT 0x88 RSTS xlr Figure 3 22 RUN Response Data Area For RSTS see Section 3 a Return code of Section 3 3 3 Transient2 frame format R18UZ0015EJ0200 stENESAS Page 42 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD d STOP Request The STOP request sets the master station to a STOP state CT 0x09 Mode L Figure 3 23 STOP Request Data Area Table 3 22 STOP Request Setting List Setting Normal STOP 0x0003 Mode Forced STOP 0x0001 e Response The STOP response sends the result of the STOP request CT 0x89 RSTS aie Figure
64. 1 reception LER P LERR1LEDL Firmware R IN32M3 CL Off Off data error status Status display of port 2 option PHY Wire the LED so that it LINK Port 2 link status turns on when the PHY link is up Port 2 reception LER LERR2LEDL Firmware R IN32M3 CL Off Off data error status Note 1 An error that occurs when firmware calls the function gerR_IN32_ForceStop For details of the function gerR_IN32_ForceStop see Section 4 2 6 Force Stop processing and Section 4 5 5 Own station status setup 2 The LED names are provisional names Vendors can assign any name to these LEDs and use the LEDs to implement a function User LED 1 and User LED 2 3 For L ERR LED control see Section 2 2 3 Controlling the L ERR LED R18UZ0015EJ0200 Dec 25 2014 stENESAS For user LED control see Section 2 2 2 Controlling Page 5 of 149 R IN32M3 Series CC Link IE Field 2 1BSTATUS DISPLAY FUNCTIONS 2 2 2 Controlling User LED 1 and User LED 2 R IN32M3 CL provides two user LEDs User LED 1 and User LED 2 where the user can assign desired functions You can control the on off status of User LED 1 and User LED 2 using the functions gerR_IN32_SetUSERILED and ger R_IN32_SetUSER2LED 2 2 3 Controlling the L ERR LED For the L ERR LED signal set up the external AND logic for LERRILEDL and LERR2LEDL in accordance with the figure below R IN32M3 CL External AND logic LERR1LEDL LERR2LEDL L E
65. 18UZ0015EJ0200 stENESAS Page 100 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 1 Initial setup 1 gulR_IN32_GetResetStatus Function Gets reset status Call format ULONG gulR_IN32_GetResetStatus VOID Name Variable name Description V O Arguments None R_IN32_RESET_PWRON 1 Power ON reset R_IN32_RESET_SYSTEM 2 System reset Description This function gets the reset status Call this function before the function gerR_IN32_Initialize Return value 2 gerR_IN32_Initialize Function Initializes R IN32M3 CL ERRCODE gerR_IN32_Initialize const UCHAR puchMACAddr const R_IN32_UNITINFO_T pstUnitInfo const R_IN32_UNITINIT_T pstUnitInit Variable name Description Host station MAC address Set as follows for 12 34 56 78 90 AB puchMACAdar 0 0x12 puchMACAdadr 1 0x34 puchMACAdadr 2 0x56 puchMACAdar 3 0x78 Arguments puchMACAdar 4 0x90 puchMACAdadr 5 0xAB R IN32M3 CL unit information initial setup pstUnitInfo For details refer to Section A R_IN32_UNITINFO_T initial setup R IN32M3 CL initial setup ostUnitlnit For details refer to Section B R_IN32_UNITINIT_T initial setup Call format const UCHAR puchMACAddr const R_IN32_UNITINFO_T const R_IN32_UNITINIT_T Return value R_IN32_OK Normal end This function performs R IN32M3 CL initialization and PHY reset only at system reset and link down Cal
66. 18UZ0015EJ0200 stENESAS Page 103 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 9 Node information I O type Specifies the I O type 00b 0x0 indicates front back mixed 01b 0x1 indicates input 10b 0x2 indicates output and 11b 0x3 indicates mixed Front Back mixed is used in a case when the input and output are mixed and the input and output use the same address Mixed is used in a case where the input and output are mixed and the input and output do not use the same address Network firmware version Specifies the firmware version of the network Network model type Specifies the model type specified by the CC Link Partner Association Network model code Specifies the model code of the network The model code is any code defined by the vendor Manage the code so that it is unique within the same vendor code Network vendor code Specifies the vendor code acquired when the vendor became a member of the CC Link Partner Association in BCD If the vendor code is 5678 0x5678 is specified Network model name Specifies the model name of the network in 20 byte character string ASCII code The model name is any name defined by the vendor Manage the name so that it is unique within the same vendor code Network vendor name Specifies the vendor name of the network in 32 byte character string ASCII code The vendor name is any name defined by the vendor Controller informati
67. 2 Response ssai ia ee a e EE EE NES SERES EEES 87 Create Transient2 Get Memory Request Frame Processing Flowchart sesesssessseeesssreeresrserererreees 88 Frame Format of Transient2 Get Memory Request 0 0 0 0 ecceeceesceseeeeeeeeeesecesecesecesecsaecaeeeaeseneeneeeaeens 89 Received Transient2 Set Memory Request Processing Flowchatt ceceeeesseeceeeceseceseceseesseesaes 90 Received Transient2 Get Memory Response Processing Flowchart eeeceseesecsecseeereeeeeeeeeeeees 91 Hardware Test IEEE 802 3ab Compliance Test FlOWchart escescecsseceeeeecsseceeeeeceaeceeeeessaeeeeee 92 Hardware Test Loop back Communication Test Flowchart esscceseceesceceeeeeeneeceeeeseneeceeeeeeneeeees 94 Port Schematic ViCW ei 3 ss sose2ss5sssessesdes sashes aaron aaea EEEa enes aa TEE EESE oa oae SE RETETE Ee TEE ESEE SEa TE SERTE 95 Contents 5 Table 1 1 Table 1 2 Table 1 3 Table 2 1 Table 2 2 Table 2 3 Table 3 1 Table 3 2 Table 3 3 Table 3 4 Table 3 5 Table 3 6 Table 3 7 Table 3 8 Table 3 9 Table 3 10 Table 3 11 Table 3 12 Table 3 13 Table 3 14 Table 3 15 Table 3 16 Table 3 17 Table 3 18 Table 3 19 Table 3 20 Table 3 21 Table 3 22 Table 3 23 Table 3 24 Table 4 1 Table 4 2 Table 4 3 Table 4 4 Table 4 5 Table 4 6 Table 4 7 Table 4 8 Table 4 9 Table 4 10 Contents of Tables Component Selection Check Sheet issiria ene aeea reer S res 1 Circuit Design Check Sheet niir innn g BAUS eos BEA AE RA e
68. 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 35 Hardware test loop back communication test The loop back communication test involves the test items below Implement the test in accordance with the precautions of each test item Table 4 6 Test Item Precautions No Test Item Precaution 1 Internal loop back When the internal loop back communication test is implemented the PHY link communication test is disconnected It takes 3 or more seconds for the PHY link to go up again Be sure to execute reset processing so that WDT does not time out When you want to use an internal R IN832M3 CL WDT start the function gerR_IN32_ResetWDT 2 External loop back p Connect port 1 and port 2 using an Ethernet cable communication test R18UZ0015EJ0200 stENESAS Page 93 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE UserLoopBackTest i f Hardware test loop back communication test v Details are described in Section 4 2 2 Initialization Initialization processing H processing Return value Processing result v her than 0 Error End fe lt Return value of In d Abnormal end processing ___ p 0 Normal AA gerR_IN32_InitializeLoopBackTest Jiniiaize internal loop back external loop back test When a fatal error occurs in R IN32M3 the function gerR_IN32_InitializeLoopBackTest calls the function below created b
69. 2CENESAS C A D mr Cp lt C J R IN32M3 Series User s Manual CC Link IE Field Intelligent device station R IN32M3 CL All information of mention is things at the time of this document publication and Renesas Electronics may change the product or specifications that are listed in this document without a notice Please confirm the latest information such as shown by website of Renesas Document number R18UZ0015EJ0200 Issue date Dec 25 2014 Renesas Electronics A RM www renesas com Notice Descriptions of circuits software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples You are fully responsible for the incorporation of these circuits software and information in the design of your equipment Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits software or information Renesas Electronics has used reasonable care in preparing the information included in this document but Renesas Electronics does not warrant that such information is error free Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein Renesas Electronics does not assume any liability for infringement of patents copyrights or other intellectual property rights of
70. 2M3 CL internal WDT Make sure that the R IN32M3 CL internal WDT does not time out 3 gerR_IN32_EnableWDT Function Enables R IN32M3 CL internal WDT Call format ULONG gerR_IN32_EnableWDT VOID Name Variable name Description Arguments None Return value R_IN32_OK Normal end This function enables the R_IN32M3 CL internal WDT If you want to call a function within Section 4 5 2 Watchdog timer after this function is called wait Description 1 032 us or longer R IN32M3 CL disables the R IN32M3 CL internal WDT when the function gerR_IN32_Initialize is called Be sure to implement this function when you want to use the R IN32M3 CL internal WDT R18UZ0015EJ0200 stENESAS Page 109 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 gerR_IN32_SetWDT Sets R IN32M3 CL internal WDT time limit Function Call format ULONG gerR_IN32_SetWDT USHORT usWDTCOUNT Arguments Name USHORT Variable name usWDTCOUNT Description Sets the R IN32M3 CL internal WDT time limit 0x0000 100ms 0x0000 100ms 0x0002 300ms Ox001F 3 2 s 1 0 Return value R_IN32_OK Normal end Description This function sets the R IN32M3 CL internal WDT time limit If you want to call a function within Section 4 5 2 Watchdog timer after this function is called wait 1 032 us or longer If the R IN32M3 CL internal WDT time limit
71. 2M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 34 Hardware test IEEE 802 3ab compliance test The hardware test performs an IEEE 802 3ab compliance test UserlEEETest Hardware test IEEE 802 3ab compliance test y Details are described in Section 4 2 2 Initialization Initialization processing H processing Return value Processing result Other than 0 Error Return value of Initialization processing 0 Normal gt Abnormal end y gerR_IN32_IEEETest j IEEE 802 3ab compliance test Specify test mode When a fatal error occurs in R IN32M3 the gerR_IN32_IEEETest function calls the function below created by the vendor Be sure to execute error processing in accordance with the error code gR_IN32_CallbackFatalError Yes Did a fatal error occur t Implement Error processing as necessary Measure the waveform outputted by PHY using an oscilloscope End Abnormal end S the measuremen No result normal End Abnormal end you want to implem No the next test Y End Normal end Figure 4 43 Hardware Test IEEE 802 3ab Compliance Test Flowchart Precaution To implement the tests described in the CC Link IE Field Network Intelligent Device Station Conformance Test Specification BAP C0401 037 this function needs to be implemented R18UZ0015EJ0200 stENESAS Page 92 of 149 Dec
72. 3 24 STOP Response Data Area For RSTS see Section 3 a Return code of Section 3 3 3 Transient2 frame format R18UZ0015EJ0200 stENESAS Page 43 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field e Get memory Request CT 0x10 No of blocks L H Attribute Access code Address L H Read size L H 3 2BDATA COMMUNICATION METHOD Figure 3 25 Get Memory Request Table 3 23 Get Memory Request No of blocks Setting No of blocks from Attribute to Read Size Fixed to 0x0001 Attribute External information unit words Fixed to 5 Access code Address Access code Address of device 0 to 7664 Read size Unit Words 1 to 480 Note 1 See Figure 3 26 Attributes 2 See Table 3 20 Access Code List Example Mitsubishi Product 7 6 210 lt gt Internal information Ob External information controller 1b Access unit Bit 00b Byte 01b Word 10b Double word 11b Figure 3 26 Attributes R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 44 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD e Response The Get Memory response sends the read results of the Get Memory request CT 0x90 Data area Example of read data area little endian RSTS L Attribute Fixed to5 L H Read data area read size x 2 bytes 960 b
73. 32M3 CL driver interface functions are used to read and write RX RY RWr and RWw R18UZ0015EJ0200 stENESAS Page 7 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD 3 2 Procedure for Transient Communication Process In transient communication data is transmitted and received between its host station and another station on a one to one basis Transient communication involves Transient communication which is required by the system and Transient2 communication which can be freely implemented by the vendor Transient and Transient2 each involve requests and responses and any station that receives a request or response sends TransientAck as a response in acknowledgement Table 3 1 Transient Communication List bat i Intelligent Device Frame Type Transmission Reception Master Station Local Station Station Transmission O x x Transienti request Reception x O O Transmission x O O Transient response f Reception O x x T ient ck Transmission O O O ransientAc Reception O O O Transmission A A A Transient2 request Reception A A A Transmission A A A Transient2 response Reception A A A Remark O Required A Optional x Not required To transmit and receive transient communication firmware starts a R IN32M3 CL driver interface function In transient communication the request source sends a request frame and the request d
74. 32M3 Series CC Link IE Field Table 3 7 Extension Header Items Command Sub command Description Command Sub command 3 2BDATA COMMUNICATION METHOD See Table 3 8 Return value Return value in response to request Request 0x0000 Fixed Response 0x0000 Normal 0x0001 to OxFFFF Abnormal Note Reserved Destination network number Destination node number Reserved Destination network number Destination node number Fixed value 0 Broadcast 0 Destination network 1 to 239 1 to 120 Master station 0x007D Broadcast OxFFFF Note Reserved Reserved Fixed value 0 Reserved Reserved Fixed value 0 Reserved Reserved Fixed value 0 Source network number Source node number Network number of transmission source Node number of transmission source 1 to 239 1 to 120 Note Reserved Reserved Fixed value 0 Reserved Reserved Note Set in big endian format Table 3 8 Transient1 Command List Fixed value 0 Command Sub Command Command Type Transmission Direction Remarks Distribute Node Information Response not 0x01 0x00 Master station Slave station request required Get Statistical Information 0x03 0x00 Master station Slave station request Get Statistical Information 0x03 0x80 Master station Slave station response Get Detailed Node i 0x04 0x
75. 4 Disconnection status 0 Cyclic communication in progress or token passing in progress 1 Disconnected Bit 15 Stop status due to own reasons 0 Not stopped 1 Cyclic communication stopped due to reason other than the above Return value R_IN32_OK Normal end Description This function acquires the cyclic communication status R18UZ0015EJ0200 stENESAS Page 120 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Arguments of gerR_IN32_GetCyclicStatus The following describes the structure of R_IN32_CYCLIC_STA_T based on the sample code Cyclic communication status typedef struct R_LIN32_CYCLIC_STA_TAG union USHORT usAIl struct USHORT b3ZComonParamkeepCond 3 b2 0 Cyclic communication parameter hold status USHORT _b1ZParamCheckCond 1 b3 Cyclic communication parameter check status USHORT b1ZMyNodeNoRangeOut 1 b4 Node number invalid setting status USHORT _b1ZMyNodeReserveSetup 1 b5 Reserved node setting status USHORT _b1ZCyclicOpelnstructPackage 1 b6 Cyclic communication implementation instruction batch setting status USHORT b1ZCyclicOpelnstructVarious 1 b7 Cyclic communication implementation instruction individual setting status USHORT b1ZReserved1 1 b8 Reserved USHORT b1ZMyMpuAbnomal 1 b9 Cyclic communication continuation not possible error status USHORT b1ZMyNodeNumberD
76. Address of sent frame 2 Address of received data storage area 3 Source node MAC address Return value Sent data size excluding DCS FCS Create Transient1 frame MAC header 1 Destination address Source node MAC address 2 Source address Own MAC address 3 Types Fixed to 0x890F big endian Create Transient1 frame CC Link IE header Frame type__ Fixed to 0x22 Transient1 Datatype 0x07 CC Link IE field specific transient communication Node ID Node ID acquired by gusR_IN32_GetNodelD function big endian Connection information _0 separately set using gerR_IN32_GetSendTransientBuffer nction Node number Qwn node number big endian Protocol version 0x0 Protocol type 0x1 CC Link IE Field Network Reserved 0x00 OANOOaC AUN Create Transient1 frame Transient1 header Sequential number 0x80 Final frame bit 7 1b No 1 bits 6 0 0x00 Identification number Any 0 255 value changed for each Transient1 transmission Entire size of transient data No of bytes big endian of Transient1 frame data area Offset address 0x00000000 head address big endian Transient data size inside frame No of bytes big endian of Transient1 frame data area Data sub type lt 0x0002 system specific big endian Oahwn Create Transient1 frame data area 1 Command Command inside received data storage area 2 _Sub c
77. CC Link IE header Figure 3 4 Transient Frame Common Header R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 14 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD Table 3 3 MAC Header Items Item Description Value Remarks Destination address Destination MAC 0x0123 when the MAC address is 0x0000 to OxFFFF octets 1 and 2 address 01 23 45 67 89 AB Destinati dd Destination MAC 4567 when the MA i estination address estination 0x0000 to OxFFEF 0x4567 when the C address is octets 3 and 4 address 01 23 45 67 89 AB Destination address Destination MAC 0x89AB when the MAC address is 0x0000 to OxFFFF octets 5 and 6 address 01 23 45 67 89 AB Source address OxFO2E when the MAC address is Source MAC address 0x0000 to OxFFFF octets 1 and 2 F0 2E 15 6C 77 9B Source address 0x156C when the MAC address is Source MAC address 0x0000 to OxFFFF octets 3 and 4 F0 2E 15 6C 77 9B Source address 0x779B when the MAC add i Source MAC address 0x0000 to OxFFFF 5 EAS renee octets 5 and 6 F0 2E 15 6C 77 9B Type Upper layer packet type Fixed value 0x890F Note All items in this table are set using big endian Table 3 4 CC Link IE Header Items Description Remarks Frame type Type of frame See Table 3 5 Data type Type of data This value is used in the Acquired by function Node ID Node identifier 0 to 255 4 CC Link IE Field Network
78. Counts the number of frames discarded due to a full forward buffer 2 No of discarded frames due to full upper layer transmission buffer Counts the number of frames discarded due to a full upper layer transmission buffer List of MIB Information of MAC IP Area Table 4 4 List of MIB Information of MAC IP Area MIB Information of received frames Description Counts all frame receptions including error frames Error frames FCS error undersized oversized frames of sent frames No of received undersized frames Counts the number of sent frames Counts the number of received frames with a size less than 64 bytes No of received oversized frames Counts the number of received frames with a size exceeding 1 518 bytes No of received frame FCS errors Counts the number of received frames with an FCS error No of received frame fragment errors Counts the number of received frames with fragment errors Fragment error A frame with less than 64 bytes and an FCS error No of frames detected within minimum IFG Counts the number of frames detected within the minimum inter frame gap IFG No of received frames with SFD or less No of reception code errors Counts the number of received frames that ended at a field up to SFD and were not recognized as a valid frame Counts the number of GMII reception data errors detected RECV_ ERR 1 Counts a RECV_
79. D ERR End Figure 4 14 Update Communication Status Processing Flowchart R18UZ0015EJ0200 stENESAS Page 63 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 13 Update Cyclic Communication Status processing Update Cyclic Communication Status processing allows you to acquire the cyclic communication size specified by the master station and the cyclic communication status Cyclic communication is processed by R IN32M3 CL As a result the user program does not need to acquire the cyclic communication size or cyclic communication status This processing is optional UserGetCyclicStatus Update Cyclic Communication Status processing Cyclic communication is performed by R IN32M3 CL based on the cyclic communication size specified by the master station If you want to identify only the cyclic communication size specified by the master station acquire the size information using the function gerR_IN32_GetCurrentCyclicSize y gerR_IN32_GetCurrentCyclicSize Get cyclic communication size specified by master station Cyclic communication is processed by R IN32M3 CL Firmware does not need to acquire the cyclic communication status Firmware does not need to perform acquisition If you want to identify the cyclic communication status only acquire the information using the function gerR_IN32_GetCyclicStatus y gerR_IN32_GetCyclicStatus j Get the cyclic comm
80. EN_PASS 1 Data link in progress cyclic communication stopped R_IN32_COMMSTS_DISCONNECT 0 No data link disconnected 1 0 Return value Description R_IN32_OK Normal end This function acquires the data link status Turn the D LINK LED on off according to the data link status R_IN382_COMMSTS_CYC_DLINK LED on Other LED off For D LINK LED on off control see Section 4 2 12 Update Communication Status processing 4 gerR_IN32_GetPortStatus Function Gets PHY link status Call format ERRCODE gerR_IN32_GetPortStatus ULONG ulPort ULONG pulLinkStatus ULONG pulSpeed ULONG pulDuplex Arguments Name ULONG Variable Name ulPort Description Port specification R_IN32_PORT1 0 Port 1 R_IN32_PORT2 1 Port 2 Input ULONG pulLinkStatus Link status R_IN32_LINKUP 1 Link up R_IN32_LINKDOWN 0 Link down Output ULONG pulSpeed Speed R_IN382_SPEED_1G 0 1 Gbps R_IN382_SPEED_100M 1 100 Mbps R_IN382_SPEED_10M 2 10 Mbps This is enabled when the second argument pulLinkStatus is set to R_IN32_LINKUP 1 Do not use when the argument is set to R_IN32_LINKDOWN 0 Output ULONG pulDuplex Full duplex Half duplex R_IN32_DUPLEX_FULL 0 Full duplex R_IN382_DUPLEX_HALF 1 Half duplex This is enabled when the second argument pulLinkStatus is set to R_IN32_LINKUP 1 Do not use when the argument is set to R_LIN32_LINKDOWN 0
81. ESEE Oore OE SRO EEN E SEOSE ES 3 2 2 Controlling the EDs sist acesscchik Seseshs steshigteste caechsd shaaseehchye haphantsees apes cide ap E a SE EEE or ETES hayes i Sess 4 2 2 1 LED Control overview eeen tia e E ey edev ach des EE bvaceuh teh dns ov babi cvodote cased E E dese 4 2 2 2 Controlling User LED 1 and User LED 2 00 eaa e E EEE A EE S E 6 2 2 3 Controlling the L ERR LED ia nicesine iieri eieaa neesan ET Se AA EAE EE rE SE Ter EE ESS 6 2 2 4 Enabling Disabling LEDS ireniece ninni i i EE E EE E E E benders 6 3 DATA COMMUNICATION METHOD 00 0c ccccceeeeeeeeeneeeeeaeeeeeeeseeeecaaeeesaaeeneneescaeeesaaeeseaaeeeeeeeseeeesaeeseaeseeeees 7 3 1 Procedure for Cyclic Communication Process cccesccessecesreesseeceseeeescceeneecsaeceneecsaeceeeeecsaeceeneecaeceeneeenaeeenees 7 3 2 Procedure for Transient Communication Process scccescesseecsseceeceecsseceeceecsaeceeceecaeeeeececsaeceeeeecsaeeeeneecaeessaees 8 3 3 Frame Format Overview for Transient COMMUNICATION ce eeseeceseeeenceeseeesseceeeeecsaeceeeeecsaeceeeecnaeceeeeeeaeeeeee 12 3 3 1 Transient frame format asiitoe n e O E o ENE eoveusleosee ARE ET ii 13 3 3 2 TransientAck frame formatis pnan irie es E E EE A E EA EER doupsae sveeeseeies 33 3 3 3 Transient2 frame form atsessionrir na i e a E E EE R E R Aa ER N 35 4 DEVELOPING FIRMWARE aiga erei eanna aae reaa a a aea aa e E A aa aTa A E A 48 4 1 Development Procedure sic 0 sscesscesegssctesssssasscteses
82. Flowchart aneas eene s E E AEE E E EEE E R A EES 54 Initialization Processing Flowchartt sesseseesseeesesreeeseeerssrrresesreeresrerrssrernsestesrententesenersserrrsresreeresre 55 Start Communication Processing Flowchart cee ceeeesecesecsecesecssecseecseecseeeeeceeeeseeeseceseeseeseesaeesaeesaes 56 Check PHY Processing Flowchart cecsesessseeseeeseeeecesscesecesecesecaecsaecsaecaaecseecseseaeseeeeeeseenseeeseenaes 57 Change PHY Setting Flowchart siinseist eneses rinrire isnie reor ienr iki neie i e eSEE Eris 58 Force Stop Processing Flowchart secreet eneren oreet eere ENEEK Se or esT erea EEEN 59 Stop Cyclic Communication Processing Flowchart sseeseeessesesseesssreeresesrrertsrenresreeresrerreserrenresreeens 59 Event Processing Flowchart orisiirisii iriiri erisia Ea E rE enr reS Enr E EERE EE 60 Contents 4 Figure 4 11 Figure 4 12 Figure 4 13 Figure 4 14 Figure 4 15 Figure 4 16 Figure 4 17 Figure 4 18 Figure 4 19 Figure 4 20 Figure 4 21 Figure 4 22 Figure 4 23 Figure 4 24 Figure 4 25 Figure 4 26 Figure 4 27 Figure 4 28 Figure 4 29 Figure 4 30 Figure 4 31 Figure 4 32 Figure 4 33 Figure 4 34 Figure 4 35 Figure 4 36 Figure 4 37 Figure 4 38 Figure 4 39 Figure 4 40 Figure 4 41 Figure 4 42 Figure 4 43 Figure 4 44 Figure 4 45 Receive MyStatus from Master Station and Cyclic Data Processing Flowchart 00 0 0 cee eee 61 Send MyStatus Processing FlOWchart a cece eseeseeeeeeeeceseeeeecesece
83. Get Statistical Information Data Items cee eesceceseceeneeceseeeenceceeeeeneeceseeeeneeceeesenaeceeeeeneeceereeeneeens 28 Data Area Items of Get Detailed Node Information Response 1 2 eeceessceeeceeseeceereeeneecetreeeneeees 31 Overview of TransientAck Frame Format 00 cccceeesceseecsecesececaeceeneeceaeceseeeceaceseaeecsaeeeeaeecsaeeeeeeeee 33 Transient Ack Data Ems ainni eese o i E O E EE E S E E TEENE E 34 Overview of Transient2 Frame Format eseesceceseceesceceseceenceceseeeeneecaeeceneeceeeesenaeceeeeeneeceneesenaeess 35 Transient Header TIENS a coat ub sets E a e a E T O E EE S ES EE 37 Transient Comm nd Types isnie iori eripi r ai renr T Eer o Ea S E ear i ir Se 38 Access Code List Example Mitsubishi Product esseeseeeeeeseesesesesessseseseessersseessresseseeeseeeseessreeseess 41 RUN Request Setting DIStri ene siene n EREE E E E NE EE E EEE EAS 42 STOP Request Setting List ois sicssstsces savessessbsass steve dicubacd sous cess sonesbod snes EE EE a EEE EREE E EE EET 43 Get Memory Request 3 6 sie nor nie keith binging aie a keisha ies 44 Set Memory Request Setting List c cscs sissies ceiecess eetsieek see dessnectcbnteveas actevect sebeebes copsceebevboeseneseoneebensoese 46 List of Program Elements Included in Sample Code o00 eee ee ee ceseceseceeceseceeecaeeeneeeeeeeeeeeeeseenseesseenaes 48 List of Sample Flowcharts 1 2 s c c cccsc cuvssceseceevsceseveeeedsoventesinscuecbecestocences
84. ICATION METHOD Request source Request destination CC Link IE Field Network Intelligent device station compatible station like a developed using R IN32M3 CL programmable controller 1 p 3 2 ANN a R IN32M3 Firmware CL 6 4 5 7 Figure 3 2 Transient2 Response Procedure lt R gt 1 The intelligent device station receives a Transient2 request frame See Section 4 2 15 2 The intelligent device station creates a TransientAck frame See Section 4 2 29 3 The intelligent device station sends the TransientAck frame See Section 4 2 16 4 The intelligent device station analyzes the command of the Transient2 request frame See Section 4 2 32 5 The intelligent device station creates a Transient2 response frame in accordance with the command See Section 4 2 30 6 The intelligent device station sends the Transient2 response frame See Section 4 2 16 7 The intelligent device station receives a TransientAck frame See Section 4 2 15 R18UZ0015EJ0200 stENESAS Page 10 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD Request source Request source Intelligent device station CC Link IE Field Network developed using R IN32M3 CL compatible station like a programmable controller 1 2 Bl R IN32M3 Firmware 4 CL n ne 5 6
85. MWARE The R IN32M3 CL driver interface functions are called from a user program written in C language This section describes how to use the R IN32M3 CL driver interface functions and the details of related functions This section uses the definitions below based on the sample code 1 Parameter data type and size The R IN32M3 CL driver interface function uses the parameter data and types below define VOID void typedef char CHAR typedef unsigned char UCHAR typedef short SHORT typedef unsigned short USHORT typedef int INT typedef unsigned int UINT typedef long LONG typedef unsigned long ULONG typedef int ERRCODE typedef int BOOL 2 Error code definitions The R IN32M3 CL driver interface function uses the error codes returned as return values below define R_IN32_OK define R_IN32_ERR define R_IN32_ERR_OTHER 0 1 2 r lt Normal lt Abnormal end lt Abnormal end Error occurred in library internal driver i define R_IN32_ERR_OUTOFRANGE 3 lt Out of range define R_IN32_ERR_EMPTY 4 lt Empty define R_IN32_ERR_OVERFLOW 5 l lt Overflow define R_IN32_ERR_NOENTRY 6 lt No entry define R_IN32_ERR_NOPERMIT 7 lt Not permitted define R_IN32_ERR_NODATA 8 l lt No data define R_IN832_ERR_NOMYSTATUS 9 lt Valid MyStatus non existent 3 Other definitions define R_IN32_TRUE 1 define R_IN32_ FALSE 0 R
86. NESAS Page 85 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 30 Create Transient2 Response Frame processing Create Transient2 Response Frame processing creates a Transient2 response frame ulUserSetTransient2_Response Arguments 1 Address of sent frame 2 Address of received frame 3 Error code Return value Sent data size excluding DCS FCS Create Transient2 Response Frame processing Create Transient2 frame MAC header 1 Destination address Source node MAC address inside received frame 2 Source address Own MAC address 3 Type Fixed to 0x890F big endian Create Transient2 frame CC Link IE header Frame type P Fixed to 0x25 Transient2 Data type _ 0x04 CC Link compatible transient communication Node ID Node ID acquired by gusR_IN32_GetNodelD function big endian Connection information 0 separately set using gerR_IN32_GetSendTransientBuffer nction Node number Own node number big endian Protocol version oxo Protocol type 0x1 CC Link IE Field Network Reserved 0x00 ONDUEN Create Transient2 frame data area L lt Size number of bytes from 4 FNO to 22 RSTS RSV lt 0x00 TP SF lt TP SF inside received frame lt FNO inside received frame DT lt DT inside received frame DA lt SA inside received frame SA lt Own node number lower 8 bits DAT SAT inside received frame
87. ONG usBitPattern Input Bit 6 Enable D LINK LED Bit 8 Enable ERR LED Bit10 Enable port 1 L ER LED Bit11 Enable port 2 L ER LED Bits 1 3 5 7 9 and 12 15 Not used Return value R_IN32_OK Normal end Description This function enables the LED function R18UZ0015EJ0200 stENESAS Page 126 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 8 Network time 1 gerR_IN32_GetNetworkTime Function Acquires network time serial value Call format ERRCODE gerR_IN32_GetNetworkTime USHORT pusSerial Name Variable Name Description V O Network time Arguments pusSerial 0 Network time bits 15 0 USHORT pusSerial Output pusSerial 1 Network time bits 31 16 pusSerial 2 Network time bits 47 32 Return value R_IN32_OK Normal end Description This function acquires the network time serial value in increments of 15 2587890625 us given a starting point of January 1 2000 00 00 00 2 gerR_IN32_SetNetworkTime Function Sets network time serial value Call format ERRCODE gerR_IN32_SetNetworkTime const USHORT pusSerial Arguments Name Variable Name Description const USHORT pusSerial Network time pusSerial 0 Network time bits 15 0 pusSerial 1 Network time bits 31 16 pusSerial 2 Network time bits 47 32 Return value R_IN32_OK Normal end This functi
88. R IN32M3 Series Proguraming Manual Driver edition R18UZ0009EJ R IN32M3 Series User s Manual CC Link IE Intelligent device station This manual 2 Notation of Numbers and Symbols Weight in data notation Left is high order column right is low order column Active low notation xxxZ_ capital letter Z after pin name or signal name or xxx_N capital letter _N after pin name or signal name or xxnx pin name or signal name contains small letter n Note explanation of Note in the text Caution Item deserving extra attention Remark Supplementary explanation to the text Numeric notation Binary XXXX XxxxB or n bxxxx n bits Decimal xxxx Hexadecimal xxxxH or n hxxxx n bits Prefixes representing powers of 2 address space memory capacity K kilo 2 1024 M mega 2 1024 G giga 2 1024 Data Type Double word 32 bits Word 16 bits Byte 8 bits Contents ls Basic Design Precautions is i ccc ieee iat he ih e E nie ad aude 1 1 1 Component selection ta eene e E ves cece cate redeqecwends E AE E dbvubenbescebechcboweseban seve cacoubbeyechonseteescebdubens 1 1 2 CUPCUIE desto nni T A TA N A A RA 2 1 3 Pattern Desig a a Aaaa a A aao EE aAA AA EAEE EE ae OVRE E e RERE 2 2 STATUS DISPLAY FUNCTIONS 00 cccccccccceeeece cece eee aeeeeeaeeeeeee eae aaa da enea beiei iaeo araa daia heraa hiaan 3 2 1 LED Based Status Display Soses spree peser sese eap a ea E nE ESHE O aeaee NEIS
89. RR LED signal Figure 2 1 External AND Logic for Turning L ERR On lt R gt 2 2 4 Enabling Disabling LEDs You can enable and disable the LEDs listed in the table below Switch the LED enable disable setting as necessary as shown in the following example Example Disable the L ER LEDs of port and port 2 in a link down state since the LED light sometimes stays on when the link is down To disable an LED display use the function gerR_IN32_DisableLED To enable an LED display use the function gerR_IN32_EnableLED For LED display enable disable functions see Section 4 5 7 LED control Table 2 3 LEDs that Can Be Enabled Disabled LED Name Function Status display of host station RUN Operating status ERR Error status D LINK Data link status User LED 1 User LED 1 User LED 2 User LED 2 Status display of port 1 LER Port 1 reception data error status Status display of port 2 LER Port 2 reception data error status R18UZ0015EJ0200 stENESAS Page 6 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD 3 DATA COMMUNICATION METHOD CC Link IE Field Network has two types of communication methods cyclic communication and transient communication 3 1 Procedure for Cyclic Communication Process Simply starting a R IN32M3 CL driver interface function according to Section 4 2 1 General flowchart executes the cyclic communication process The R IN
90. R_IN32_LED_OFFLED off R_IN32_LED_ONLED on Call format Arguments Return value R_IN32_OK Normal end This function turns on and off the RUN LED Description The LED cannot be turned on when a R IN32M3 CL internal WDT external WDT or forced stop occurs 8 gerR_IN32_DisableLED Function Disables LED function Call format ERRCODE gerR_IN32_DisableLED USHORT usBitPattern Name Variable Name Description O Disables the LED function ON Disable OFF Hold previous vale Bit 0 Disable RUN LED Bit 2 Disable User LED 2 Arguments Bit 4 Disable User LED 1 usBitPattern j Bit 6 Disable D LINK LED Bit 8 Disable ERR LED Bit10 Disable port 1 L ER LED Bit11 Disable port 2 L ER LED Bits 1 3 5 7 9 and 12 15 Not used Return value R_IN32_OK Normal end This function disables the LED function Description The function cannot be disabled when a R IN32M3 CL internal WDT external WDT or forced stop occurs R18UZ0015EJ0200 stENESAS Page 125 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 9 gerR_IN32_EnableLED Function Enables LED function Call format ERRCODE gerR_IN32_EnableLED USHORT usBitPattern Name Variable Name Description O Enables the LED function ON Enable OFF Hold previous vale Bit 0 Enable RUN LED Bit 2 Enable User LED 2 Arguments Bit 4 Enable User LED 1 UL
91. TransientAck data area TransientAck data area format No of Acks Shel make oe ta este eg ee 0x00000001 0X0000000 t The H Node number Te Node number of received frame Transient ck Reserved 0x00 0x00 dalaaied Connection information Connection information loop back value of received frame Data sub type a f Data sub type of received frame Reception result T penne Transient reception result oran ee aa a vv Padding 16 bytes Figure 3 16 TransientAck Data Area Table 3 16 TransientAck Data Items Item Description Value Remarks No of Acks from node number to _ No of Acks i Fixed value 0x00000001 reception result Source node number of Node number of TransientAck i Node number MON er received Transient1 or frame transmission destination Transient2 Reserved Reserved Fixed value 0x00 Connection information loopback Connection information of Connection i l value Connection Information of received Transient1 or information oo Ack transmission target frame Transient2 Transient2 does not require Data Data sub type of received Transient1 0x0002 sous specification of a data sub type Fixed sub type Transient frame Transient2 0x0000 value 0x0000 Reception result RET of Normal 0x0000 Reception it Transient frame or Transient2 Abnormal resu frame Other than 0x0000 Automatical
92. _Note1 User LED 2 User LED 2Ne __Note1 L ERR Reception data error line error status Status display of port 1 option Error frame reception Turns on based on L ER signal of each port Normal frame reception Turns off based on L ER signal of each port LINK LER Port 1 link statusN Port 1 reception data error status Error frame reception Link down Normal frame reception Status display of port 2 option LINK Port 2 link status Link up Link down L ER Note 1 Port 2 reception data error status The LED names are provisional names the LEDs to implement a desired function Error frame reception Controlling User LED 1 and User LED 2 2 The mounting of this LED is optional Normal frame reception Users can assign any name to these LEDs and use For user LED control see Section 2 2 2 3 The mounting of this LED is optional bus recommended R18UZ0015EJ0200 stENESAS Page 3 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 2 1BSTATUS DISPLAY FUNCTIONS 2 2 Controlling the LEDs 2 2 1 LED control overview Some LEDs are controlled by hardware R IN32M3 CL PHY and power check circuits and some LEDs are controlled by firmware The LEDs controlled by R IN32M3 CL automatically turn on in accordance with the status of its host station Wire the LED LINK LED controlled by PHY so that t
93. able Name Description O Function Call format Multicast address When 13 34 56 78 90 AB is set the following addresses are returned puchMACAdadr 0 0x13 puchMACAddr puchMACAddr 1 0x34 Output puchMACAddr 2 0x56 puchMACAdadr 3 0x78 puchMACAddr 4 0x90 puchMACAdadr 5 0xAB Arguments R_IN32_OK Normal end Return value R_IN32_ERR Abnormal end The multicast MAC address cannot be acquired due to no data link data link disconnected This function acquires the multicast MAC address The acquired multicast MAC address is used as the destination address when transient transmission is performed to all nodes connected to the network Description 4 gerR_IN32_GetUnicastMACAddress Function Gets unicast MAC address Call format ERRCODE gerR_IN32_GetUnicastMACAddress USHORT usNodeNumber UCHAR puchMACAddr Name Variable Name Description USHORT usNodeNumber eee value range 1 120 master station 0x7D Unicast address When 13 34 56 78 90 AB is set the following addresses are returned Arguments puchMACAdadr 0 0x12 puchMACAddr puchMACAddr 1 0x34 Output puchMACAddr 2 0x56 puchMACAddr 3 0x78 puchMACAddr 4 0x90 puchMACAdadr 5 0xAB R_IN32_OK Normal end Return value R_IN82_ERR_NOENTRY No entry R_IN32_ERR_OUTOFRANGE Node number out of range This function acquires the unicast MAC address corresponding to the node number from the node information distribution re
94. age caused by fire in the event of the failure of a Renesas Electronics product such as safety design for hardware and software including but not limited to redundancy fire control and malfunction prevention appropriate treatment for aging degradation or any other appropriate measures Because the evaluation of microcomputer software alone is very difficult please evaluate the safety of the final products or systems manufactured by you Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances including without limitation the EU RoHS Directive Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture use or sale is prohibited under any applicable domestic or foreign laws or regulations You should not use Renesas Electronics products or technology described in this document for any purpose relating to military applications or use by the military including but not limited to the development of weapons of mass destruction When exporting the Renesas Electronics products or technology
95. ait error Arguments Return value This function writes to the PHY internal register in MDIO Use this function during the period from MAC IP access enable function gerR_IN32_EnableMACIPAccess to MAC IP access disable function Description gerR_IN32_DisableMACIPAccess When the return value of this function is a value other than R_IN32_OK the function calls the function below created by the vendor Be sure to execute error processing in accordance with the error code gR_IN32_CallbackFatalError R18UZ0015EJ0200 stENESAS Page 129 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 gerR_IN32_ReadPHY Reads PHY internal register ERRCODE gerR_IN32_ReadPHY ULONG ulPort ULONG ulAddr ULONG ulData Name Variable Name Description O Function Call format Port subject to register reading ULONG ulPort R_IN32_PORT1 0 Port 1 R_IN32_PORT2 1 Port 2 ULONG ulAddr PHY register address ULONG ulData Data read from PHY R_IN32_OK Normal end R_IN32_ERR Abnormal end MDIO command end wait error Arguments Return value This function reads the PHY internal register in MDIO Use this function during the period from MAC IP access enable function gerR_IN32_EnableMACIPAccess to MAC IP access disable function Description gerR_IN32_DisableMACIPAccess When the return value of this function is a value other than R_IN32_OK the functi
96. alue Is the erResult Normal sequential distribution number from 1 to 7 Check result No AA 1 Address of received data Is the from 1 to 23 master station network number No 9 vy erResult Error Is the number of distributions rom 1 to 120 No v erResult Error Yes Is the received data size correct v erResult Error End erResult erResult Error Figure 4 24 Check Node Information Distribution Frame Processing Flowchart R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 75 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 22 Received Statistical Information Request Frame processing Received Statistical Information Request Frame processing is executed when a Get Statistical Information request frame is received Received Statistical Information Request Frame processing y UserHandleReceivedStatisticlnfoRequest Arguments 2 Received data size 3 Source node MAC address gerR_IN32_GetNodeAndNetworkNumber I Get the node number and network number y Check destination node number and destination network number Destination node number Destination network number Create Get Statistical Information Response Frame processing Check the following Destinatio
97. alue 0x22 CC Link compatible transient communication DMF Destination Module Flag Not used target destination module flag Fixed value 0x00 SMF Source Module Flag Not used startup source module flag Fixed value 0x00 DNA Destination Network Address Destination network number 1 to 239 DS Destination Station no Destination node number 1 to 120 master station Ox7D Same value as DA DID DestinationID Destination identification number Fixed value OxOSFF Ss Source Station no SNA Source Network Address Startup source network number Startup source node number 1 to 239 1 to 120 SID SourcelD Transmission source identification number Fixed value OxOSFF L1 Length1 Length bytes from CT to DATA 4 to 972 CT Command Type Command type Note RSV ReSerVe Reserved Fixed value 0x00 APS Application Sequence Application number Note See Table 3 19 Transient2 Command Types R18UZ0015EJ0200 Dec 25 2014 stENESAS 0 to 255 Startup source identification number Set any value Page 37 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD Table 3 19 Transient2 Command Types CT Command type 0x04 Get Memory Access Information request 0x84 Get Memory Access Information response 0x08 RUN request 0x88 RUN response 0x09 STOP request 0x89 STOP
98. atistical Information Distribution Frame processing dil Arguments 1 Address of received data storage area 2 Size of received data Information Request Frame processing 1 Address of received data storage area 2 Size of received data 3 Source node MAC address Received Detailed Node Information Request Frame processing Arguments 1 Address of received data storage area 2 Size of received data 3 Source node MAC address End Figure 4 20 Received Transient Data Processing Flowchart R18UZ0015EJ0200 Dec 25 2014 stENESAS 1 Node information distribution is not required when R_IN32_FALSE is specified in the h Distribute Node Information request of B R_IN32_UNITINIT_T initial setup of the function gerR_IN32_Initialize Page 71 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 18 Start Making Received Transient Data processing Start Making Received Transient Data processing starts the data assembly process of the Transient frame UserStartMakingReceivedTransient1 Arguments Start Making Received Transient1 Data processing 1 Address of received frame 2 Address of assembly information Get entire size of transient data l Set up assembly information 1 Assembly in progress assessment flag Assembly in progress 2 Identification number Identification number in
99. bleMACIPAccess VOID Name Variable Name Description O Arguments None R_IN32_OK Normal end R_IN32_ERR Abnormal end MDIO command end wait error This function enables MAC IP access Shorten the period from MAC IP access enable function gerR_IN32_EnableMACIPAccess to MAC IP access disable function gerR_IN32_DisableMACIPAccess to the extent possible If the vendor uses Return value Description interrupts disable the interrupts from MAC IP access enable to MAC IP access disable When the return value of this function is a value other than R_IN32_OK the function calls the function below created by the vendor Be sure to execute error processing in accordance with the error code gR_IN32_CallbackFatalError 2 gerR_IN32_DisableMACIPAccess Disables MAC IP access Call format ERRCODE gerR_IN32_DisableMACIPAccess VOID Name Variable Name Description Arguments None Return value R_IN32_OK Normal end Description This function disables MAC IP access 3 gerR_IN32_WritePHY Function Writes to PHY internal register Call format ERRCODE gerR_IN32_WritePHY ULONG ulPort ULONG ulAddr ULONG ulData Name Variable Name Description Port subject to register writing ULONG ulPort R_IN32_PORT1 0 Port 1 R_IN32_PORT2 1 Port 2 ULONG ulAddr PHY register address ULONG ulData Data to be written to PHY R_IN32_OK Normal end R_IN32_ERR Abnormal end MDIO command end w
100. c Design Precautions 1 2 Circuit design Design the peripheral circuits of R IN32M3 CL taking into consideration the information provided in the table below Table 1 2 Circuit Design Check Sheet No Item Description Check 1 GMII wiri Is a damping resistor installed for the GMII signal to supress wirin overshooting undershooting The signal lines between PHY and RJ45 connector mus be connected in PHY RJ45 connctor i 2 f side and side of each terminal side and side of each terminal connection f Otherwise 1000BASE T compliance test fails Are pull up resistors installed for the data signals D15 to D00 10 kO 3 Data signal wane pull up resistors are used in the circuit diagram examples PHY address must be same as the port number of R IN32M3 CL 4 PHY address PHY address 1 must be connected to MAC port 1 PHY address 2 must be connected to MAC port 2 lt R gt 1 3 Pattern design Design the pattern wiring of the R IN32M3 CL periphery taking into consideration the information provided in the table below Table 1 3 Pattern Design Check Sheet Description When connecting a 2 097152 MHz crystal oscillator to R IN32M3 CL place the oscillator near R IN32M3 CL Is the pattern length to the the CLK 2_097M pin shortest as possible Is the pattern to the CLK 2_097M pin shielded by SG patterns 2 097152 MHz crystal oscillator connected to R IN32M3 CL Has the wiring
101. cal Information Response R18UZ0015EJ0200 Dec 25 2014 ztENESAS Page 27 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD Each of the items of the Get Statistical Information data area shown in the table below is acquired by the function gerR_IN32_GetMIB For item details see Section 6 of Section 4 5 6 Host station status acquisition Table 3 13 Get Statistical Information Data Items layer transmission buffer layer transmission buffer Item Description Value Remarks No of port 1 HEC error No of HEC error frames Counts the number of HEC errors in received 0 to 4294967295 frames of port 1 frames No of port 1 DCS FCS No of DCS FCS error Counts the number of DCS FCS errors in p 0 to 4294967295 i error frames frames of port 1 received frames No of port 1 undersize No of undersize error Counts the number of cases in which the 0 to 4294967295 n error frames frames of port 1 received frame size is less than 28 bytes No of port 1 forward No of forward frames of 0 to 4294967295 Counts the number of forwarded frames frames port 1 No of upper layer No of port 1 upper layer i Counts the number of frames transmitted to pe transmission frames of 0 to 4294967295 transmission frames the upper layer port 1 No of port 1 discarded No of port 1 discarded f Counts the number of frames discarded due frames due to full frames due to full forward O to 4294967295 to a
102. cannot be turned on when a R IN32M3 CL internal WDT external WDT or forced stop occurs 2 gerR_IN32_SetLERR2LED Function Sets LED L ER port 2 Call format ERRCODE gerR_IN32_SetLERR2LED ULONG ulCtrl Name Variable Name Description VO LED control Arguments ULONG ulCtrl R_IN32_LED_OFFLED off Input R_IN82_LED_ONLED on Return value R_IN32_OK Normal end This function turns on and off the L ER LED of port 2 Description The LED cannot be turned on when a R IN32M3 CL internal WDT external WDT or forced stop occurs 3 gerR_IN32_SetERRLED Function Sets LED ERR Call format ERRCODE gerR_IN32_SetERRLED ULONG ulCtrl Variable Name Description LED control Arguments net R_IN382_LED_OFFLED off R_IN32_LED_ONLED on R_IN32_LED_BLINKLED blinking Return value R_IN32_OK Normal end This function turns on and off the ERR LED Description The LED cannot be turned off or set to blinking when a R IN32M3 CL internal WDT external WDT or forced stop occurs R18UZ0015EJ0200 stENESAS Page 123 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 gerR_IN32_SetDLINKLED Function Sets LED D LINK Call format ERRCODE gerR_IN32_SetDLINKLED ULONG ulCtrl Name Variable Name Description O LED control Arguments R_IN82_LED_OFFLED off ULONG ulCtrl Input R_IN32_LED_ONLED on R_IN32_LED_BLINKLED blinking Ret
103. ceived from the master station Description f When there is no data link data link disconnected the unicast MAC address cannot be acquired the return value becomes R_IN32_ERR_NOENTRY Be sure to set the node number of the master station to 0x7D R18UZ0015EJ0200 stENESAS Page 134 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 5 gerR_IN32_GetSendTransientBuffer Function Gets transient transmission buffer CalliTriat ERRCODE gerR_IN32_GetSendTransientBuffer USHORT usSize VOID ppvSendBuffAddr UCHAR puchSendBuffNo UCHAR puchConnectionInfo Name Variable Name Description O USHORT usSize Transmission data size excluding DCS FCS Input Arguments VOID ppvSendBuffAddr Transient transmission buffer address Output UCHAR puchSendBuffNo Transient transmission buffer number Output UCHAR puchConnectionInfo Transient connection information Output Return value R_IN32_OK Normal end transient transmission buffer acquired R_IN32_ERR Abnormal end transient transmission buffer acquisition error Description This function inquires whether or not there is space in the transient transmission area for transmission of the transmission data size and returns the following information if there is space Transient transmission buffer address Transient transmission buffer number Transient connection information In the following cases tra
104. ception for vendor reasons ransien gbIR_IN32_GetReceiveTransientSta Acquires the transient reception enable status reception BOOL tus for vendor reasons gerR_IN32_SetWMACAddressTableD Sets the node information distribution data ERRCODE ata MAC address table gerR_IN32_GetUnitInformation ERRCODE Acquires unit information gusR_IN32_GetNodelD USHORT Acquires the node ID gerR_IN32_GetMulticastMACAddre Acquires the multicast MAC address ERRCODE ss Transient i i E gerR_IN32_GetUnicastMACAddress ERRCODE Acquires the unicast MAC address ransmission gerR_IN32_GetSendTransientBuffer ERRCODE Acquires the transient transmission buffer R_IN32_R tSendingTransie Requests transient transmission gerR_ RequestSending ERRCODE q nt gerR_IN32_MainSendTransient ERRCODE Main transient transmission processing int f gerR_IN32_Disablelnterrupt ERRCODE Disables interrupts nterru P gerR_IN32_Enablelnterrupt ERRCODE Enables interrupts gerR_IN32_IEEETest ERRCODE IEEE 802 3ab compliance test ee Initializes the internal loop back external gerR_IN32_InitializeLoopBackTest ERRCODE ees Hardware test loop back communication test gerR_IN32_InternalLoopBackTest ERRCODE Internal loop back communication test gerR_IN32_ExternalloopBackTest ERRCODE External loop back communication test R18UZ0015EJ0200 stENESAS Page 99 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 5 R IN32M8 CL Driver Interface Function Details 4 3BDEVELOPING FIR
105. cs ULONG ulRFgm ULONG ulRIFGErr ULONG ulREps ULONG ulRCde ULONG ulRFce ULONG ulRCEE R_IN32_MIBMACIP_T 7 gerR_IN32_ClearMIB Function Clears MIB information transmission buffer lt Received frame counter lt Sent frame counter lt Received undersized frame counter lt Received oversized frame counter lt Received frame FCS error counter lt Received frame fragment error counter lt Minimum IFG frame detection counter lt Received frame SFD or less detection counter lt Received code error counter lt Received invalid carrier error counter lt Received carrier extension error counter Call format ERRCODE gerR_IN32_ClearMIB VOID Name Variable Name Description Arguments None Return value R_IN32_OK Normal end Description This function clears the MIB information R18UZ0015EJ0200 Dec 25 2014 ztENESAS Page 122 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 7 LED control 1 gerR_IN32_SetLERR1LED Function Sets LED L ER port 1 Call format ERRCODE gerR_IN32_SetLERR1LED ULONG ulCtrl Name Variable Name Description 0 LED control Arguments ULONG ulCtrl R_IN32_LED_OFFLED off Input R_IN32_LED_ONLED on Return value R_IN32_OK Normal end This function turns on and off the L ER LED of port 1 Description The LED
106. d by the vendor Table 4 11 Target Dependent Function Group for R IN32M3 CL Driver Function Function Category Function Name Tee Overview Wait processing gR_IN32R_WaitUS VOID Waits a period of time f gR_IN32R_StartStopwatchTimer VOID Starts time measurement Time measurement 7 7 gR_IN32R_GetElapsedTime VOID Acquires the elapsed time in i gR_IN32R_Disablelnt VOID Disables interrupts nterru p gR_IN32R_Enablelnt VOID Enables interrupts Hardware test gerR_IN32R_IEEETest ERRCODE IEEE 802 3ab compliance test 1 gR_IN32R_WaitUS Function Waits a certain period of time Call format VOID gR_IN32R_WaitUS ULONG ulWaitTime Name Variable Name Description ULONG ulWaitTime Wait time us Return value None Arguments This function waits for the wait time specified in the argument to elapse The maximum wait time used by the R IN32M3 CL driver is 10 ms 10000 UL If the assertion time of Description the used PHY is longer than 10 ms 10000 UL change the value below so that that value can be counted define R_IN832_WAITUS_PHYRESET_ASSERT 10000UL PHY reset assertion time For details see Section 2 of Section 4 6 1 PHY reset setting R18UZ0015EJ0200 stENESAS Page 141 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 2 gR_IN32R_StartStopwatchTimer Function Starts time measurement Call format VOID
107. ddress 0 26 Read size 64 A ISize Transient2 Get M tt ission data si i ulSize ransient2 Get Memory request transmission data size ulSize 0 excluding DCS FCS ulSize The flow above describes the following processes of the Get Memory function 1 Destination node number 0x7D Master station 2 Access code 0x04 Data register 3 Attribute 0x05 Word access external information 4 Address 0 5 Read size 64 Figure 4 39 Create Transient2 Get Memory Request Frame Processing Flowchart R18UZ0015EJ0200 stENESAS Page 88 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field Frame format of Transient2 Get Memory request frame MAC header Destination address Source address 14 bytes Type CC Link IE header 14 bytes Frame type x HEC L L qe Data length ae RSV fe 0x00 TP SF FNO DT 2 O e 0x00 Destination node DAR ale number SA es Own node number lower 8 bits 0x22 CC Link compatible transient DAT j pornmunicaton j p sr o l 0x22 CC Link compatible transient communication DMF 0x00 Transient2 Get Memory o request transmission data SMF sf 0x00 oe size DNA O he Own network number E DS O O e Destination node number DID L Target destination input output number H Ox03FF SNA e Own network number SS Own node number lower 8 bits SID bye Star
108. de Information Response uu ee ee ees eeee esse cneeeeeeeeeeeeeeeees 30 TransientAck Data Area i255 seas A ee Sete LAS a Sh pee ee ee E 34 Transient Header opre dees Sees ctenes oneer ao a EEE EE EA e a doses OEE Seve eN ENSE EE EETA EEES 36 R a Code RO G e a ea Re AA aes ine r E 39 Data Area of Get Memory Access Information Response esssseessseeesseeerresrsrreresreeresrerreserrenrerreetss 40 ACCESS Codeine nea espesas oaa SeS E aaeeea E Aaa anevada aE KE ENEE ESE S 40 RUN Request Data Area oinin eraros ar aE E iE EE EE Tr ETE E EEA SES EE E 42 RUN Response Data Area aior aL A I a A n 42 STOP Request Data Aredia e eE E EEE seewiedegeesiebsanescob sabes cube e E E EE SENES 43 STOP Response Data Are disrsps siiret nren reorient EE a E EE Eea rE ET E E Ea 43 Get Memory Request scien sie E R E BEA A BAUS REER S 44 ATED ULES ine edad FNS teed eed E ROUTES cated es Taha gab cba EE EET E pesbdubuateds EES 44 Get Memory Response iiss s ccss cicssetseesesassepebsassspcavedcebaed sbeesben io E EE EE enr EEE EREE EERE ET 45 Set Memory Request nennen a oe AIR a E ee ae ie 46 Set Memory Response lt csiciesoicceed esteits Seascucbiedeuses sohessebentdubis EEr EESE E EOE EIEE SEI ENTORSES E OESE eS 47 Configuration Of Firmware sses onres bias siessdeuseuseevesscavdee sueeobeesecovessecpebsusedevieinessheesaasebeaees 49 Firmware Development Procedure eis cece cseeseeeeceeeceeeeesecesecesecsaecsaecsaecaeecaeseaeseeeeseeeeeeseeaeenaes 51 General
109. distributions Transient1 data area Distribute Node Information request format frame 1 Command Sub command Return value H Reserved 0x00 Destination network Destination node number Reserved 0x0000 HI Reserved 0x0000 Reserved 0x00 I Source network number Source node H number L Reserved H 0x0000 L Reserved H 0x0000 L Distribute Node Information header PLA EAR NIEA ST DENNES D Koo 0x01 0x00 Own network number or broadcas Own node number or broadcast Master station network number Master station node number Distribute Node Information Request Distribute Node Information data area Nos 1 to 59 Node information data area No 60 a Extension header Data length Transient data size in frame of Transient1 header Distribute Node Information header format Distribution sequential number Master station network number Master station model H type L H Master station model code Pd T Master station H vendor code T Master station node type Reserved H Master station MAC address TI Reserved H Number of distributions T Format of node information data area Nos 1 to 59 Node number H Reserved Function status Reserved Network number Model ty
110. e 2 Pattern Design Check Sheet c sis cctides eee ere celles cob sevens vansvacesonsues oponlenud opushouneniebvobessuge deusuensebene 2 LED Stat s Display Lists sci esses s3ieds shes caps seaeheasvcd ara r ee E EOE E EEE EE eaa EE DEEE REA EREE ETS 3 LED Control Listean i a E E E E E A E A a 5 LEDs that Can Be Enabled Disabled isisi ninien iaae ea iaaa a e aen E a E E 6 Transient Communication LiStessccsscchsessccseaeeesesack Seve ssersevnshihaveuebnnsednesk dats TA E A E EE sous 8 Transient Frame Format Overview csccesssecesseeeseeceseceeseceeeeecsaeceeeeecsaeceneecsaeceneeenaeceeesenaeceeneeenaeees 13 MAC Header Items ririn ra E T E E EE AE E tatoos 15 GC Eink TE Header HEMS renne EE AEAEE A E a a E EE E EE 15 Frame Type and Data Type List eenei e ee E E E eeN E N e EE SE 15 Tr nsientl Header eM eetere a e ae E E E EEEE EE nE a 16 Extension Header Items ienien nrar S E E E A A E Povapsptatoepaetes 19 Transient Command List 22 me e i E E E E E A E E 19 Frame Format for Distribute Node Information Request essssessseeessseesssrserssrsrreresrerresrerrsserrrsresresese 20 Distribute Node Information Header Items eee ceeeeesceceseceececeseeesnceceseeceneeceeeceneeceeeeeneecenreseneeees 24 Node Information Data Area Items ees eescceenceceseceencecseceeneecsaeeeaeeceaeeeeaeecaeeeeaeeceaeeeeneecsaeeeeeeeee 24 Node Py per B E e EEA EATE ET dubs cones feegustee vip sanguedeseg dubeds copa eve tpentaeetpanpavece EE 25
111. e Variable Name Description VO R_IN32_UNITINFO_T pstUnitlnfo Unit information Output Arguments R_IN32_UNITNETWORK pstUnitNetworkSetting Network operation setting Output SETTING_T Return value R_IN32_OK Normal end This function acquires the setting information of its own station The acquired setting information is used when creating a Get Detailed Node Information response Description Arguments of getR_IN32_GetUnitInformation The following describes the structure of R_IN32_UNITNETWORKSETTING _T based on the sample code Network operation setting typedef struct R_IN32_UNITNETWORKSETTING_TAG ULONG ulFrameSendCount lt No of transmissions during token hold ULONG ulFrameSendinterval lt Frame transmission interval ULONG ulTokenSendCount l lt No of token transmissions R_IN832_UNITNETWORKSETTING_T 2 gusR_IN32_GetNodelD Function Gets node ID Call format USHORT gusR_IN32_GetNodelD VOID Name Variable Name Description O Arguments None Return value Node ID This function acquires the node ID The acquired node ID is used when performing transient Description transmission R18UZ0015EJ0200 stENESAS Page 133 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 3 gerR_IN32_GetMulticastWACAddress Gets multicast MAC address ERRCODE gerR_IN32_GetMulticastMACAddress UCHAR puchMACAddr Name Vari
112. e correct operation of LSI is not guaranteed if they are accessed 4 Clock Signals After applying a reset only release the reset line after the operating clock signal has become stable When switching the clock signal during program execution wait until the target clock signal has stabilized When the clock signal is generated with an external resonator or from an external oscillator during a reset ensure that the reset line is only released after full stabilization of the clock signal Moreover when switching to a clock signal produced with an external resonator or by an external oscillator while program execution is in progress wait until the target clock signal is stable ARM AMBA ARM Cortex Thumb and ARM Cortex M3 are a trademark or a registered trademark of ARM Limited in EU and other countries Ethernet is a registered trademark of Fuji Zerox Limited IEEE is a registered trademark of the Institute of Electrical and Electronics Engineers Inc EtherCAT is a registered trademark of Beckhoff Automation GmbH Germany CC Link and CC Link IE Field are a registered trademark of CC Link Partner Association CLPA Additionally all product names and service names in this document are a trademark or a registered trademark which belongs to the respective owners Real Time OS Accelerator and Hardware Real Time OS is based on Hardware Real Time OS of ARTESSO made in KERNELON SILICON Inc How to use this man
113. e transient transmission request end normally y Normal Transient transmission in progress flag lt ON l gt Not completed ie Transient transmission result Completed ee Bee Error Transient transmission completion status Normal y ormai y AA Transient transmission normal processing Transient transmission error processing Transient transmission error processing Implement as necessary Implement as necessary Implement as necessary 4 AA Transient transmission in progress flag OFF gt lt y End Figure 4 19 Send Transient1 Transient2 and TransientAck Processing Flowchart Page 70 of 149 R18UZ0015EJ0200 ztENESAS Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 17 Received Transient1 Data processing Received Transient Data processing analyzes a received Transient frame and performs processing in accordance with the analysis result In addition the processing assembles data when a Transient frame is received in fragments UserHandleReceivedTransient1 Arguments Received Transient1 Data processing 7 1 Address of received frame 2 Received data size excluding FCS ae No S data assembly in progress z oe SS A Y Details are described in Section 8 2 19 Yes Start Making Received Transient Arguments v ata pocessng 1 Address of received frame _ Did the identification ___ N 2
114. e vendor want to set up the node number and network number gerR_IN32_SetNodeAndNetworkNumber Set up the node number and network number End iReturn Normal end Figure 4 4 Initialization Processing Flowchart R18UZ0015EJ0200 stENESAS Dec 25 2014 Page 55 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 3 Start Communication processing Start Communication processing provides instructions for starting R IN32M3 CL communication iUserStart Start Communication s processing j Return value Processing result gerR_IN32_Start Start R IN32M3 communication When a fatal error occurs in R IN32M3 the function gerR_IN32_Start calls the following function created by the vendor gR_IN32_CallbackFatalError Yes Did a fatal error occur Implement Error processing as necessary End iReturn Abnormal end Vv gerR_IN32_SetRUNLED set LED RUN Turn on the RUN LED Vv End iReturn Normal end Figure 4 5 Start Communication Processing Flowchart R18UZ0015EJ0200 stENESAS Page 56 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 4 Check PHY processing The intelligent device station requires 1 Gbps fullduplex linkup Check PHY processing checks if PHY is linked under settings other than 1 Gbps full duplex If PHY is linked under settings other than 1 Gbps full duplex Ch
115. eck PHY processing changes the PHY setup UserCheckPHY Check PHY processing y gerR_IN32_GetPortStatus Get the PHY link status R IN32M3 enables communication only with 1 Gbps full duplex linkup Communication is not possible with any other setting Is PHY linkup based on settings No other than 1 Gbps full duplex Yes Details are described in Section 4 2 5 AA Change PHY setup j oe Setting processing 1 Port specification If a fatal error occurs in R IN32M8 the functions below called within Change PHY Setting call the function gR_IN32_CallbackFatalError created by the vendor gerR_IN32_EnableMACIPAccess gerR_IN32_ReadPHY gerR_IN32_WritePHY Yes Did a fatal error occur t Implement Error processing as necessary End Figure 4 6 Check PHY Processing Flowchart Implement the above processing on both port 1 and port 2 Implementation is not required if the PHY used permits linkup fixed to 1 Gbps full duplex according to hardware settings R18UZ0015EJ0200 stENESAS Page 57 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 5 Change PHY Setting processing The Change PHY Setting processing sets PHY so that it only permits linkup under 1 Gbps full duplex settings UserChangePHY Setting Change PHY Setting processing Argument 1 Port specification gerR_IN32_DisableInterr
116. ection 4 2 33 O processing 35 Hardware test IEEE 802 3ab compliance test Section 4 2 34 a f Implementation 36 Hardware test loop back communication test Section 4 2 35 A recommended Remark Required O Required with Transient2 implementation A Optional R18UZ0015EJ0200 Dec 25 2014 2tENESAS Page 53 of 149 R IN32M3 Series CC Link IE Field 4 2 1 Other than 0 Error Return value of Start J Communication processing E e AA General flowchart iUserMainRoutine 4 3BDEVELOPING FIRMWARE Main processing J Initialization processing Other than 0 Error Return value of Initialization processing 0 Normal Communication start processing 0 Normal Return value Processing result Details are described in Section 4 2 2 Initialization processing Return value Processing result iReturn Abnormal end Details are described in Section 4 2 3 Start Communication processing Return value Processing result iReturn Abnormal end Check PHY processing H Details are described in Section 4 2 4 Check PHY processing AA Force Stop processing H v Details are described in Section 4 2 6 Force Stop processing Stop Cyclic Communication processing H y Event processing H Other than 0 Error Return value of Event processing C En yo Normal Receive MyStatus from Master Statio
117. el 65 6213 0200 Fax 65 6213 0300 Renesas Electronics Malaysia Sdn Bhd Unit 906 Block B Menara Amcorp Amcorp Trade Centre No 18 Jin Persiaran Barat 46050 Petaling Jaya Selangor Darul Ehsan Malaysia Tel 60 3 7955 9390 Fax 60 3 7955 9510 Renesas Electronics Korea Co Ltd 11F Samik Lavied or Bldg 720 2 Yeoksam Dong Kangnam Ku Seoul 135 080 Korea Tel 82 2 558 3737 Fax 82 2 558 5141 2013 2014 Renesas Electronics Corporation All rights reserved R IN32M3 Series User s Manual CC Link IE Network Field RENESAS Renesas Electronics Corporation
118. ers EE E EE EE AE RE 127 AVIDI LO ACCESS ETE 129 Transient reception Processing ee eecesceseceecnseceecaeecseeeseseeeeeceeeseeseesecssecsaecsaecaaecaaecsaseaeseaeeeneeseens 131 Contents 2 4 5 11 Transient transmission Proce ssin ginsis iea e RE E E RESE 133 4 5 12 JELES nah eA E E E R E ET 137 4 5 13 Hatd ware ES S isdn este aegis E peg ate ose ates eet eos 138 4 6 Customizing the Target Dependent Function Group for the R IN32M3 CL Driver eee eee eee eeeeeee 140 4 6 1 Changing the Reader filee eenean e oe E ei arie SET E NEE Eeo SE APE o EES AE ERTER 140 4 6 2 Creating a target dependent function group for the R IN32M3 CL driver seseeeseeeseeeeerserrererrereeesee 141 4 7 Customizing the Call Back Function Group for the R IN32M3 CL Driver eeeeeeeeeecesecesecnseeneeeeeens 145 Contents 3 Figure 2 1 Figure 3 1 Figure 3 2 Figure 3 3 Figure 3 4 Figure 3 5 Figure 3 6 Figure 3 7 Figure 3 8 Figure 3 9 Figure 3 10 Figure 3 11 Figure 3 12 Figure 3 13 Figure 3 14 Figure 3 15 Figure 3 16 Figure 3 17 Figure 3 18 Figure 3 19 Figure 3 20 Figure 3 21 Figure 3 22 Figure 3 23 Figure 3 24 Figure 3 25 Figure 3 26 Figure 3 27 Figure 3 28 Figure 3 29 Figure 4 1 Figure 4 2 Figure 4 3 Figure 4 4 Figure 4 5 Figure 4 6 Figure 4 7 Figure 4 8 Figure 4 9 Figure 4 10 Contents of Figures External AND Logic for Turning L ERR O11 eee ce ecceeeeeeceeeceeeeeseceseceseceaecsaecsaecaeecaeseaeseeeeeeeenees 6 Transient Response
119. es the event and updates MIB information iUserExecuteMain Event processing gt Return value Processing result gerR_IN32_GetEvent Detect R IN32M3 CL event Assess based on the return value of function gerR_IN32_GetEvent Assess with b13 Transient transmission complete Did transient frame transmission end y Yes This function calls the following function Main transient transmission created by the vendor and issues a notification gerR_IN32_MainSendTransient n hi a _ sense Mainsenctransion J processing regarding the status of the target transmission descriptor transmission result A gerR_IN32_CallbackTransientSendingComplet gerR_IN32_Main JP N32ms cL event detection proceesing When a command is received from the master station the function gerR_IN32_Main calls the following function created by the vendor Be sure to get the command gerR_IN32_CallbackCommandFromMaster gt When a node number and network number change is received from the master station the function gerR_IN32_Main calls the function below created by the vendor Be sure to get the node number and network number gerR_IN32_CallbackNodeAndNetworkNumber Vv gerR_IN32_RestartEvent Pestart R IN32M3 CL event y gerR_IN32_UpdatePortStatus Jurdate PHY link status port 1 y gerR_IN32_UpdatePortStatus Jurdate PHY link status port 2 Vv __UpdateMIB Update MIB information
120. esseceeeeeesseeeececeaeceeaeeceaeeeeneecaeeeeaeecsaeeesaees 92 Hardware test loop back COMMUNICATION test eee esseceeeeeesseceeeeeesseeeeeecaeeeeaeecsaeeeeaeecsaeeeeaeectaeeeaees 93 Sample Code Pues Listiy sts x sissctetieecn a a a eavunv ae Sasa aires aeev dete atone eENES 96 Polder COMPS Ura tron tse 05 5 ssc sche scess codssesces cechabestenecestessecesetanesdeasavnet se shge svete ESE T docasces see oboe bisesestuseeseesdansess 96 File UStestsceciieed ee ete sie R ee ie et 96 Interface Function List for R IN32M3 CL Driver eee eceeccesscesecesecesecnecsaecseecaeecseseneseeeeseeseeeeeeseenseenaes 98 R IN32M3 CL Driver Interface Function Details cies cee cseeeneeeeceeeeeeseeeeeeeeeeeeaeeesecaeseaeenaeenaeeaeeees 100 Jpitial Setup iieiea e r E E E E E EE EE r r EERE 101 Watchdog timer noice sik ices Bee SAA e es Be a a es TES 109 BCD Socio ses e e ibe wider E E EEEE TEE AE shies E EN shot died mb eee Blade ee uot eidel eatin aiieles 111 Cyclic COMMUNICATION soene a este etovnes E E E nea cado Side rteunee E EE 114 Own station status S tup rscssce sce iceskcstsesscessscisk dete ts ccescsbesedoksve sted avhsetedavessvsesvessqetbee sbebesebsededoensceetsoessgn ties 117 Host station status ACQUISITION eee ee cee cesecesecnseceeecseecaeeeseseeeeeeeeseeesecssecssecsaecsaecsaecaaecaeseaeseneeeneenens 118 LED control oenina stilton Audie ok Ai Whoa ies ae et ae eae A thea ek atid ated 123 NGtWOrk CIM ass css cc E EEE EE EEEE sudeds cu v
121. estination sends a TransientAck frame and response frame The following shows an image of transient communication R18UZ0015EJ0200 stENESAS Page 8 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD Request source master station Request destination CC Link IE Field Network Intelligent device station compatible station like a developed using R IN32M3 CL programmable controller 1 tH S B FA R IN32M3 Firmware CL 6 4 5 e o 7 Figure 3 1 Transienti Response Procedure Request Source Master Station lt R gt 1 The intelligent device station receives a Transient1 request frame See Section 4 2 15 2 The intelligent device station creates a TransientAck frame See Section 4 2 29 3 The intelligent device station sends the TransientAck frame See Section 4 2 16 4 The intelligent device station analyzes the command of the Transient request frame See Sections 0 and 4 2 20 5 The intelligent device station creates a Transientl response frame in accordance with the command See Sections 4 2 23 and 4 2 24 6 The intelligent device station sends the Transient response frame See Section 4 2 16 7 The intelligent device station receives a TransientAck frame See Section 4 2 15 R18UZ0015EJ0200 stENESAS Page 9 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUN
122. gR_IN32R_StartStopwatchTimer R_IN832R_STOPWATCH_T pstStopWatch ULONG ulUnit Name Variable Name Description VO Arguments R_IN832R_STOPWATCH_T pstStopWatch Stopwatch work area Input Output ULONG ulUnit Measurement unit 1 us Input Return value None Description This function starts time measurement Arguments of gR_IN32R_StartStopwatchTimer The following describes the configuration of R_IN32R_STOPWATCH_T based on the sample code typedef struct _R_IN32R_STOPWATCH_TAG ULONG ulUnit Unit of measured time ULONG ulFirstTmr1 Cnt General purpose timer 1 counter value at startup ULONG ulLastTmr1 Cnt General purpose timer 1 counter value previous value R_LIN32R_STOPWATCH_T R18UZ0015EJ0200 stENESAS Page 142 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 3 gR_IN32R_GetElapsedTime Function Gets elapsed time VOID gR_IN32R_GetElapsedTime R_IN832R_STOPWATCH_T pstStopWatch ULONG Call format pulElapsedTime Name Variable Name Description I O R_IN32R_STOPWATCH T pstStopWatch Stopwatch work area Input Output Arguments Elapsed time Unit The unit specified by ULONG pulElapsedTime the function Output gR_IN32R_StartStopwatchTimer Return value None This function acquires the elapsed time after the time measurement startup function gR_IN32R_StartStopwatchTimer is called The R IN32M3 CL driver monitor
123. he LED turns on when the PHY link is up The LEDs controlled by firmware are controlled by LED on off control functions See Section 4 5 7 LED control R18UZ0015EJ0200 stENESAS Page 4 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field Table 2 2 LED Control List LED Name Function Status display of host station Power supply R IN32M3 C L Output Signal Name 2 1BSTATUS DISPLAY FUNCTIONS Control Source Power ON Reset Output at Reset Error System Reset Note3 Internal WDT External WDT Host Station ErrorNotel status PW Power supply check circuit status RUN Operating status RUNLEDL Firmware R IN32M3 CL Off Off Data reception RD p RDLEDL R IN32M3 CL Off status Data SD transmission SDLEDL R IN32M3 CL Off Reception data L ERR error line error status Turns on according to LERR1LEDL and LERR2LEDL signal statuses external AND logic required ERR Error status ERRLEDL Firmware R IN32M3 CL Off Off On D LINK Data link status DLINKLEDL Firmware R IN32M3 CL Off Off Off User LED 1M2 User LED 1 USERILEDL Firmware R IN32M3 CL Off Off Off User Note2 f LED 2M te2 User LED 2 USER2LEDL Firmware R IN32M3 CL Off Off Off Status display of port 1 option PHY Wire the LED so that it LINK Port 1 link status turns on when the PHY link is up Port
124. ial setup of the function gerR_IN32_Initialize is set to R_IN32_FALSE no function the master station does not change the node number or network number In such a case this function does not need to be processed 4 gerR_IN32_CallbackReceivedTransient Function Gets received transient frames Call format ERRCODE gerR_IN32_CallbackReceivedTransient VOID pvRcv USHORT usFrameSize Name Variable Name Description Arguments VOID pvRcv Reception buffer USHORT usFrameSize Frame size excluding FCS R_IN32_OK Normal end R_IN32_ERR Abnormal end This function acquires received transient frames Return value The R IN32M3 CL driver calls this function when a transient frame is received Function internal processing is freely implemented by the vendor Description 1 Set the head address of the reception buffer in increments of 4 bytes 0 or multiple of 4 If the return value is a value other than R_IN32_OK the transient reception enable status for vendor reasons is set to reception disabled Be sure to set it to Reception enabled by calling the function gerR_IN32_EnableReceiveTransient after it becomes to be able to receive R18UZ0015EJ0200 stENESAS Page 148 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 5 gerR_IN32_CallbackTransientSendingComplete Function Gets transient transmission completion status ERRCODE gerR_IN32_CallbackTransientSendingComplete
125. ific node information Input Return value R_IN32_OK Normal end Description This function sets its own station status as information to be sent in a MyStatus frame 2 gerR_IN32_ForceStop Function Sets a forced stop Call format ERRCODE gerR_IN32_ForceStop VOID Name Variable Name Description Arguments None Return value R_IN32_OK Normal end This function forcibly stops R IN32M3 CL Description To clear the forced stop power ON reset or system reset is required R18UZ0015EJ0200 stENESAS Page 117 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 6 Host station status acquisition 1 gerR_IN32_GetNodeAndNetworkNumber Function Gets node number and network number Call format ERRCODE gerR_IN32_GetNodeAndNetworkNumber USHORT pusNodeNumber UCHAR puchNetworkNumber Name Variable Name Description O0 Arguments USHORT pusNodeNumber Node number Output UCHAR puchNetworkNumber Network number Output Return value R_IN32_OK Normal end Description This function acquires the node number and network number 2 gerR_IN32_GetCurrentCyclicSize Function Gets specified cyclic communication size from master station Call format ERRCODE gerR_IN32_GetCurrentCyclicSize R_IN32_CYCLIC_SIZE_T pstCyclicSize Name Variable Name Description 1 O Cyclic communication size ulRySize RY size bytes octet
126. in Section 8 2 30 trame y A akese f sent T Ack fi Create i 3 ress of sent TransientAck frame TransientAck 2 eee Create TransientAck f 2 Address of received transient frame 3 Reception result frame 3 Reception result Normal 0 frame N PI 1 0 Return value ome hether TransientAct transmission is hether TransientAct transmission is required fequired or not or not N s TransientAc Is TransientAck o transmission required transmission required Create 3 Return value of Return value of Create TransientAck Frame TransientAck Frame processing processing Y vy es TransientAck transmission data size TransientAck transmission data size No of TransientAck transmission data bytes No of TransientAck transmission data bytes AA TransientAck transmission startup flag ON j TransientAck transmission startup flag ON nd Details are described in Section 8 2 18 Details are described in Section 8 2 27 bse eon Transient1 Arguments Transient12 rguments TransientAck arguments 1 Address of received transient 1 Address of received transient 7 P reception data tame reception data tame reception data 1 Address of received transient j j f i frame processing 2 Received transient data size processing 2 Received transient data size processing 2 Received transient data excluding FCS excluding FCS size excluding FCS gt
127. ink IE Field 4 3BDEVELOPING FIRMWARE 4 2 15 Receive Transient1 Transient2 and TransientAck processing Receive Transient1 Transient2 and TransientAck processing receives Transient1 Transient2 and TransientAck frames and processes the data UserReceiveTransient Receive Transient1 Transient2 and TransientAck processing v gerR_IN32_MainReceiveTransient1 Mein transient reception processing 1 v gerR_IN32_MainReceiveTransient2 Mein transient reception processing 2 The following function created by the vendor is called by the function gerR_IN32_MainReceiveTransient2 when Transient1 Transient2 and TransientAck are received Be sure to get the received data gerR_IN32_CallbackReceivedTransient Note that when the return value of the above function is a value other than R_IN32_OK the transient reception enable status for vendor reasons is set to Reception disabled When the status changes to reception enabled set the status to Reception enabled by calling function gerR_IN32_EnableReceiveTransient Be No ae Ss PR lS there transient reception gt The function gerR_IN32_CallbackReceivedTransient is called Detect whether or not transient reception occurred 0x22 Transient1 reception 0x25 Transient2 reception 0x23 TransientAck reception Details are described in Section 8 2 30 Arguments P j A 4 Address of sent TransientAck Petails are described
128. ion defined by the vendor Arguments of gerR_IN32_Initialize The following describes the structure of R_IN32_UNITINIT_T based on the sample code R IN32M3 CL initial setup typedef struct R_IN32_UNITINIT_TAG BOOL bINMIUse BOOL _ bilnterruptUse BOOL blFailedProcess1 BOOL blFailedProcess2 ULONG ulNodeType BOOL blTransientReceiveEnable lt NMI interrupt use lt MPU interrupt function use lt Failed process setting 1 lt Failed process setting 2 lt Node type l lt Transient reception function BOOL blINodeAndNetworkNumberFromMasterPermission l lt Enable node number and network number setting from master station BOOL bIMACAddressTableRequest ULONG ulRunStatus ULONG ulErrorStatus ULONG ulErrorCode ULONG ulUserlInformation R_INS2_UNITINIT_T R18UZ0015EJ0200 Dec 25 2014 lt Request node information distribution lt Initial value of detailed application run status lt Initial value of error detection status lt Initial value of error code lt Initial value of vendor specific node information 2tENESAS Page 105 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE B R_IN32_UNITINIT_T initial setup The contents initially set by R_LIN82_UNITINIT_T are as follows a NMI interrupt use Only when you want to use the R IN32M3 CL internal WDT function R_IN32_TRUE Use R_IN32_FALSE Do not use S
129. ion test Call format ERRCODE gerR_IN32_ExternalLoopBackTest ULONG ulPort Name Variable Name Description Source port ULONG ulPort R_IN32_PORT1 0 Port 1 Input R_IN32_PORT2 1 Port 2 Arguments R_IN32_OK Normal end R_IN32_ERR Abnormal end This function sends a frame from the test target port specified in the argument and verifies the received result using the other port Return value _ When implementing this test connect port 1 and port 2 using an Ethernet cable Description When the return value of this function is a value other than R_IN382_OK the function calls the function below created by the vendor Be sure to execute error processing in accordance with the error code gR_IN32_CallbackFatalError R18UZ0015EJ0200 stENESAS Page 139 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 6 Customizing the Target Dependent Function Group for the R IN32M3 CL Driver 4 6 1 Changing the header file Change each item defined in the header file R_IN32M3Function h lt R gt in accordance with the system environment of the vendor 1 R IN382M3 CL address setting 1 R IN32M3 CL head address Specifies the address for R IN32M3 CL access by the R IN32M3 CL driver define R_IN32_BASE_ADR 0x40100000 lt R gt R IN32M3 CL head address 2 PHY reset setting Defines the setup for resetting PHY during initialization 1 PHY reset assert time setting
130. ired transient transmission buffer Request transient transmission using this function Description In the following case transient transmission cannot be performed and the process ends in error R_IN32_ERR Abnormal end When there is no data link data link disconnected Any error that occurs after transmission is requested by this function is notified by the return value of the function gerR_IN32_MainSendTransient Set the transmission size to the same size as the value specified in gerR_IN32_GetSendTransientBuffer 7 gerR_IN32_MainSendTransient Function Main transient transmission processing Call format ULONG gerR_IN32_MainSendTransient VOID Name Variable Name Description Arguments None Return value R_IN32_OK Normal end This function acquires the transient transmission end result Description This function calls the function gerR_IN32_CallbackTransientSendingComplete to issue a notification regarding the status transmission result of the target transmission descriptor R18UZ0015EJ0200 stENESAS Page 136 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 12 Interrupts 1 gerR_IN32_Disablelnterrupt Function Disables interrupts Call format ERRCODE gerR_IN32_Disablelnterrupt VOID Name Variable Name Description O Arguments None Return value R_IN32_OK Normal end This function disables interrupts 2
131. istribution sequential number Sub command 0x00 Request Master station network number H Master station H Return value T model type L Reserved 0x00 H Destination network Own network number number g or broadcast Master station _ m model code Destination nodd 4 Own node number _ number L or broadcast L Reserved H Master station H 0x0000 T vendor code L Reserved H Master station node type 0x0000 L Extension header Reserved Reserved 0x00 H Bs irssineiwene number Master station network number Data length F H Master stati sourco node w Master station node number Transient data size in MAC adaress frame of Transient1 E Reserved H header K 0x0000 T L Reserved H Reserved 0x0000 L HI Number of distributions Distribute Node Information L header Format of node information d Node information H data area Node number Nos 1 to 59 L Reserved cen EE L ES A Function status Reserved Network number Model type H Vendor code H Node type Reserved H MAC address LI H Reserved T Distribute Node Information header format ata area Nos 1 to 59 Figure 3 9 Transient1 Data Area Distribute Node Information Request R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 21 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD The following shows the frame format frame 1 for a Distribute Node Information request involving 60 or more
132. ith the analysis results UserHandleReceivedTransient2 i Receiv Arguments 1 Address of received frame 2 Received data size excluding FCS g 7 Details are described in Section 8 2 28 n Arguments Check Received Transient2 Data processing 1 Address of received frame Return value Check result ed Transient2 Data processing a Return value of Transient2 Da Check Recei ta processing Normal Yes Response frame Request framel No a N Discard received data Implement Error processing as necessary Response frame not required Response frame required Yes Details are described in Section 8 2 31 Arguments Create Transient2 Response J 1 Address of sent frame Frame processing 2 Address of received frame 3 Error code Return value Sent data size excluding DCS FCS v Transient2 response frame transmission data size Return value of Create Transient2 Response Frame processing Transient2 response frame transmission startup flag ON a Yes Response frame Request frame No AA r Other UA Check the response to the Get Memory request requested by own station i of CT 0x12 Set Memory Implement the processing of each Details are described in Section 8 2 33 command po em Received Transient2 Set Arguments pe Sg Memory Request processing 1 Address of data area
133. le that needs to be created by vendor R18UZ0015EJ0200 Dec 25 2014 2tENESAS Page 97 of 149 R IN32M3 Series CC Link IE Field 4 4 Interface Function List for R IN32M3 CL Driver 4 3BDEVELOPING FIRMWARE The following lists the interface functions of the R IN32M3 CL driver Table 4 8 R IN32M3 CL Driver Interface Function List Function Function Function Name Overview Category Type gulR_IN32_GetResetStatus ULONG Acquires the reset status E gerR_IN32_Initialize ERRCODE Initializes R IN82M3 CL mnersetuep gerR_IN32_SetNodeAndNetworkNumber ERRCODE Sets the node number and network number gerR_IN32_ Start ERRCODE Starts R IN32M3 CL communication gerR_IN32_ResetWDT ERRCODE Resets the R IN32M3 CL internal WDT Watchdog timer gerR_IN32_DisableWDT ERRCODE Disables the R IN32M3 CL internal WDT gerR_IN32_EnableWDT ERRCODE Enables the R IN32M3 CL internal WDT gerR_IN32_SetWDT ERRCODE Sets the R IN32M3 CL internal WDT time limit gerR_IN32_GetEvent ERRCODE Detects R IN32M3 CL events Performs the main processing of R IN32M3 CL gerR_IN32_Main ERRCODE f Event event detection ven gerR_IN32_RestartEvent ERRCODE Restarts the R IN32M3 CL event gerR_IN32_UpdatePortStatus ERRCODE Updates the PHY link status gerR_IN32_UpdateMIB ERRCODE Updates MIB information Stops cyclic communication for device side gerR_IN32_SetCyclicS
134. ling this function disables the R IN32M3 CL internal WDT When you want to use the R IN32M3 CL internal WDT be sure to start the function gerR_IN32_EnableWDT For Description details see Section 4 5 2 Watchdog timer When a fatal error occurs in R IN32M3 CL this function calls the function below created by the vendor Be sure to execute error processing in accordance with the error code gR_IN32_CallbackFatalError R18UZ0015EJ0200 stENESAS Page 101 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Arguments of gerR_IN32_Initialize The following describes the structure of R_IN32_UNITINFO_T based on the sample code R IN32M3 CL unit information typedef struct R_IN32_UNITINFO_TAG Cyclic communication size maximum value ULONG ulMaxRySize lt RY size bytes octets ULONG ulMaxRWwSize lt RWw size words ULONG ulMaxRxSize lt RX size bytes octets ULONG ulMaxRWrSize lt RWr size words Station information 1 ULONG ulMyStationPortTotalNumber ULONG ulTokenHoldTime Station information 2 ULONG ullOType Network information ULONG ulNetVersion ULONG ulNetModelType ULONG ulNetUnitModelCode ULONG ulNetVendorCode UCHAR auchNetUnitModelName 20 UCHAR auchNetVendorName 32 Controller information BOOL _ bllnfomationFlag ULONG ulCtrlVersion ULONG ulCtrlModelType ULONG ulCtrlUnitModelCode ULONG ulCtrlVendo
135. ly padded by R IN32M3 CL Padding Padding 16 bytes to satisfy the minimum Ethernet frame size of 64 bytes R18UZ0015EJ0200 stENESAS Page 34 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD 3 3 3 Transient2 frame format The following table provides an overview of the format of a Transient2 frame Table 3 17 Overview of Transient2 Frame Format Item Transient frame common header Size Bytes 28 Sub ltem MAC header Size Bytes 14 Remarks CC Link IE header 14 Transient2 header 26 26 From L to APS in Figure 3 17 Transient2 Header Transient2 data area 0 to 968 0 to 968 Note Data Check Sequence Note Automatically calculated and added by R IN32M3 CL 1 Transient frame common header Frame Check Sequence See Section 1 Transient frame common header of Section 3 3 1 Transient frame format R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 35 of 149 R IN32M3 Series CC Link IE Field 2 Transient2 header Transient2 header frame format L L H RSV 0x00 TP 0x0 SF 0x0 Datalength lt FNO 0x00 DT 0x00 DA SA DAT 0x22 SAT 0x22 DMF 0x00 SMF 0x00 DNA DS DID Ox03FF xr SNA SS SID 0x03FF xr eee Destination node number lower 8 bits bm Source node number
136. me and a Transient response frame Get Statistical Information response in response to the Transient request frame Get Statistical Information request sent by the master station In response to the response frame the master station sends a TransientAck frame Reception processing is therefore required Figure 3 12 Transient1 Data Area Get Statistical Information Request Frame format of Command Sub command Return value CI Reserved 0x00 Destination network number Destination nodeH number E Reserved H 0x0000 L Reserved H 0x0000 L Reserved 0x00 Source network number Source node H number L Reserved H 0x0000 L Reserved H 0x0000 L Get Statistical Information request 0x03 Get Statistical Information 0x00 Request Data length Transient data size in frame of Transient1 header For each item in the figure above see Table 3 7 Extension Header Items in Section 3 Transient data area in Section 3 3 1 Transient frame format R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 26 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD The following shows the frame format of the Get Statistical Information response Frame format of Get Stati 0x03 Get Statistical Information H Command Sub command Return value H Reserved 0x00 Destination ne
137. ments of 1 byte multiple of 1 The maximum value for an intelligent device station is 256 bytes RWr size words Specifies the RWr size words communicable by its own station in 2 word boundary multiple of 2 The maximum value for an intelligent device station is 1 024 words No of own station ports Specifies the number of physical communication ports of its own station Set 2 if the station is an intelligent device station developed using R IN32M3 CL Token hold time Specifies the maximum time its own station holds a token after token passing begins in ps The token hold time is the time that results when the transmission time of the transient communication frame Transient1 TransientAck Transient2 etc is subtracted from the time from receipt of a token frame addressed to its own station to the time of transmission of the token frame addressed to the next node When you want the RX RWr size to be the maximum size set 23 us 23 The calculation method is as follows n RWr transmission size 1 024 words maximum m RX transmission size 256 bytes maximum i No of sent RWr frames RWr size 3 words l 0 0 0 734 7 735 1024 2 j No of sent RX frames l RX size bytes j _ 2344 nx16 mx8 672x i j 7 5 oken hold imes C m Me o 0 Example When RWr 1 024 words and RX 256 bytes 2344 1024x16 256x8 672x 2 1 Token hold time 1000 22 792 23 us R
138. missions are actively sent the MAC address table is used The MAC address table is created using the Distribute Node Information request frame Transient1 frame distributed from the master station i Initial value of detailed application run status Specifies the initial value of the detailed application run status within nodeStatus of the MyStatus frame Table 4 10 List of Initial Values of Detailed Application Run Status Value Communication Operation R_IN32_RUNSTS_ UNSUPPORTED Detailed application run status notification not supported R_IN32_RUNSTS_STOP Application stopped R_IN32_RUNSTS_RUN Application running R_IN32_RUNSTS_NOTEXIST Application user does not exist j Initial value of error detection status Specifies the initial value of the error detection status within nodeStatus of the MyStatus frame Value Communication Operation R_IN32_ERRSTS_NONE No error R_IN32_ERRSTS_WARNING Minor error R_IN32_ERRSTS_ERROR Intermediate error R_IN32_ERRSTS_FATALERROR Fatal error k Initial value of error code Specifies the initial value of the errorCode of the MyStatus frame l Initial value of vendor specific node information Specifies the initial value of vendorSpfNodelInfo of the MyStatus frame R18UZ0015EJ0200 stENESAS Page 107 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 3 gerR_IN32_SetNodeAndNetworkNumber Function Sets node number a
139. n and Cyclic Data processing y Main device processing Details are described in Section 4 2 7 Stop Cyclic Communication processing Details are described in Section 4 2 8 Event processing Return value Processing result iReturn Abnormal end Details are described in Section 4 2 9 Receive MyStatus from Master Station and Cyclic Data processing v Send MyStatus processing H Details are described in Section 4 2 10 Send MyStatus processing y Send CyclicData processing H Details are described in Section 4 2 11 Send CyclicData processing AA Update Communication Status processing AA Update Cyclic Communication Status processing AA Details are described in Section 4 2 12 Update Communication Status processing Details are described in Section 4 2 13 Update Cyclic Communication Status processing Get MIB Information processing H y Receive Transient processing H y Create TransientRequest Frame processing Send Transient processing H Details are described in Section 4 2 14 Get MIB Information processing Implement this processing when a transient communication function is present Details are described in Section 4 2 15 Receive Transient1 Transient2 and TransientAck processing Implement this processing when a transient communication function is present and Transient frames are actively sent from host station Detail
140. n node number Is the value its own node number Destination network number Is the value its own network number Error 1 Address of received data storage area 2 Address of received data storage area 8 Source node MAC address Return value Sent data size excluding DCS FCS Return value of Create Get Statistical Informa ion Response Frame processing Transient response frame transmission startup flag ON Transient response frame transmission data size Details are described in Section 4 2 24 Arguments 1 Address of sent frame Implement Error processing as necessary End Figure 4 25 Received Statistical Information Request Frame Processing Flowchart R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 76 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 23 Create Get Statistical Information Response Frame processing Create Get Statistical Information Response Frame processing creates a Get Statistical Information response frame ulUserSetStatisticInfo_Response Arguments Create Get Statistical 1 Aadress or sent frame Information 2 Address of received data storage area esponse Frame processin 3 Source node MAC address Return value 4 Sent data size excluding DCS FCS Create Transient1 frame MAC header 1 Destination address Source node MAC address 2 Source add
141. n value ATERI R_IN32_ERR_OUTOFRANGE Node number out of range or sequential distribution number out of range This function sets the information MAC address table such as the MAC address acquired by node information distribution from the master station and the sequential distribution number Register the node number of the master station as 0x7D Description If R_IN32_FALSE is set as a result of a h Distribute Node Information request in B R_IN32_UNITINIT_T initial setup of the function gerR_IN32_Initialize this function does not need to be called Arguments of gerR_IN32_SetMACAddressTableData The following describes the structure of RLIN32_ MACADDRESSDATA_T based on the sample code Information MAC address table such as MAC address typedef struct _R_IN32_MACADDRESSDATA_TAG USHORT usNodeNumber lt Node number 1 120 master station 0x7d UCHAR uchTransientReceiveEnable lt Transient reception function R_IN382_ENABLE R_IN32_DISABLE UCHAR auchMacAddress 6 l lt MAC address R_IN32_ MACADDRESSDATA _T R18UZ0015EJ0200 stENESAS Page 132 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 11 Transient transmission processing 1 gerR_IN32_GetUnitInformation Function Gets unit information ERRCODE gerR_IN32_GetUnitInformation R_IN32_UNITINFO_T pstUnitInfo R_IN32_UNITNETWORKSETTING_T pstUnitNetworkSetting Call format Nam
142. nction O group details see Section 4 7 Remark Required must be produced newly O Required x Not required R18UZ0015EJ0200 ztENESAS Page 48 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Call back function group or R IN32M3 CL driver User program Target dependent unction group for CP220 driver CP220 driver main unit Figure 4 1 Configuration of Firmware Be sure to implement the processing described in Section 4 6 2 Creating a target dependent function group for he R IN32M38 CL driver R18UZ0015EJ0200 stENESAS Page 49 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE The following describes the procedure for developing firmware See Figure 4 2 Stepl Creating the user program The vendor creates the user program while referring to Section 4 2 1 General flowchart Step 2 Customizing the target dependent function group for the R IN32M3 CL driver The vendor customizes the target dependent function group for the R IN82M3 CL driver in accordance with the hardware of the device to be developed For details see Section 4 6 Customizing the Target Dependent Function Group for the R IN382M3 CL Driver Step 3 Customizing the call back function group for the R IN32M38 CL driver The vendor customizes the call back function group for the R IN32M3 CL driver in accordance with the functions to be achieved
143. nd network number Call format ERRCODE gerR_IN32_SetNodeAndNetworkNumber UCHAR uchNetworkNumber USHORT usNodeNumber Name Variable name Description I O Arguments UCHAR uchNetworkNumber Network number value range 1 239 Input USHORT usNodeNumber Node number value range 1 120 Input Return value R_IN32_OK Normal end R_IN32_ERR Abnormal error error status in library R_IN32_ERR_OUTOFRANGE Node number out of range or network number out of range Description This function sets the node number and network number in R IN32M3 CL When the return value is R_IN32_ERR_OUTOFRANGE the node number and network number are not set This function needs to be called before the function gerR_IN32_ Start in Section 4 2 3 Start Communication processing after Section 4 2 2 Initialization processing When this function is executed before the above processing a R_IN32_ERR abnormal end status error in library occurs 4 ger R_IN32_ Start Function Starts R IN32M3 CL communication Call format ERRCODE gerR_IN32_Start VOID Arguments Name Variable name Description None Return value R_IN32_OK Normal end R_IN32_ERR Abnormal end Description R18UZ0015EJ0200 Dec 25 2014 This function provides instructions to start communication to R IN32M3 CL When a fatal error occurs in R IN32M3 CL this function calls the function below created by the vendor Be sure to
144. network acquired by the Vendor name of network Note network 32 bytes function gerR_IN32_GetUnitInformation Controller information from Firmware version Controller information of controller to Vendor Disable 0 Controller information status flag acquired by status flag specific device Enable 1 the function gerR_IN32_GetUnitInformation information of controller status flag Firmware version of Firmware version of 010 255 Firmware version of controller acquired by controller controller the function gerR_IN32_GetUnitInformation Model type of controller acquired by the Note Model type of controller Model code of controller Model type of controller Model code of controller 0x0001 to OxFFFF 0x00000000 to OxFFFFFFFF function gerR_IN32_GetUnitInformation Model type managed by CC Link Partner Association Model code of controller acquired by the function gerR_IN32_GetUnitInformation Model code of controller that is unique within the same vendor code Vendor code of controller Vendor code of controller 0x0000 to OxFFFF Vendor code of controller acquired by the function gerR_IN32_GetUnitInformation Vendor code vendor ID managed by CC Link Partner Association Reserved Reserved Fixed value 0 Model name of controller Vendor name of controller Model name of controller Vendor name of controller Model name 20 bytes Vendor name 32 b
145. ng Flowchart R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 83 of 149 R IN32M3 Series CC Link IE Field 4 2 29 Create TransientAck Frame processing Create TransientAck Frame processing creates a TransientAck frame 4 3BDEVELOPING FIRMWARE blUserSetTransientAck Arguments Create TransientAck Frame processing Return value Check I G bit of source MAC jap ier 1 Address of sent frame 2 Address of received frame 3 Reception result Whether TransientAck transmission is required or not address 0 Unicast Create TransientAck frame MAC header 1 Destination address Source node MAC address inside received frame 2 Source address lt Own MAC address 3 Type lt Fixed to 0x890F big endian Create TransientAck frame CC Link IE header Frame type Fixed to 0x23 TransientAck Data type lt Data type inside received frame Node ID Node ID acquired by gusR_IN32_GetNodelD function big endian Connection information 0 separately set using gerR_IN32_GetSendTransientBuffer function Node number Own node number big endian Protocol version 0x0 Protocol type 0x1 CC Link IE Field Network Reserved lt 0x00 Create TransientAck frame data area No of Acks 1 big endian Node number Node number inside received frame big endian Connection information Connection information inside received frame a ree rame
146. nsient transmission cannot be performed and the process ends in error R_IN32_ERR abnormal end When there is no data link data link disconnected When the transmission data size is greater than 1 510 bytes When you want to perform transient transmission execute the following Acquire the transient transmission buffer number using this function Store the transmission data in the acquired transient transmission buffer Request transient transmission using the function gerR_IN32_RequestSendingTransient R18UZ0015EJ0200 stENESAS Page 135 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 6 gerR_IN32_RequestSendingTransient Function Requests transient transmission Call format ERRCODE gerR_IN32_RequestSending Transient UCHAR uchSendBuffNo USHORT usSize Name Variable Name Description O Arguments UCHAR uchSendBuffNo Transient transmission buffer number Input USHORT usSize Transmission data size excluding DCS FCS Input R_IN32_OK Normal end R_IN32_ERR Abnormal end transient transmission request error Return value This function specifies transmission to the transient transmission buffer number acquired by the function gerR_IN32_GetSendTransientBuffer If you want to perform transient transmission execute the following Acquire the transient transmission buffer using the function gerR_IN32_GetSendTransientBuffer Store the transmission data in the acqu
147. odule unit test If the Communicatio D52B Address of the function error occurs again most likely the n LSI error erR_IN32D_ResetMAC hardware of the module is faulty Driver internal startup source function eae Communicatio D52C Address of the function i n LSI error gerR_IN32D_StartRing R18UZ0015EJ0200 stENESAS Page 146 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 2 gerR_IN32_CallbackCommandFromMaster Gets command from master station ERRCODE gerR_IN32_CallbackCommandFromMaster ULONG pulCommand Name Variable Name Description O Function Call format Command status from master module ulCommand Bit 0 Stop cyclic communication instruction node number out of range 1 Stop instruction Bit 1 Stop cyclic communication instruction reserved node setting 1 Stop instruction Bit 2 Stop cyclic communication instruction master station instruction 1 Stop instruction Bit 3 Stop cyclic communication instruction node number duplication Arguments F ULONG pulCommand 1 Stop instruction Input Bits 15 4 Reserved Bit 16 Node type invalid own station node type does not match node type specified by master station 1 Node type invalid Bit 17 Specified size invalid The cyclic communication size specified by the master station is greater than the allowable maximum size size specified by the function gerR_IN32_initialize for own station cyclic
148. of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 12 Update Communication Status processing Update Communication Status processing acquires the R IN32M3 CL data link status and controls the on off status of the D LINK LED and ERR LED When there is no data link when the data link is disconnected perform Hold Clear Device processing hold or clear the data RY and RWw received up to that time according to device specifications UserUpdateStatus Update Communication Status processing gerR_IN32_GetCommumicationStatus Get the data link status No data link Data link in progress disconnected cyclic communication in progress Data link status 1 After startup of the function Data link in progress gerR_IN32_Start cyclic communication stopped Did data link in progress cyclic communication in progress occur one or more times after startup Yes y y D LINK LED off ERR LED on D LINK LED off ERR LED off D LINK LED on D LINK LED off ERR LED off ERR LED off y When the data link in progress cyclic Implement Hold Clear communication is progress has not Device processing as occurred for a certain period of time implement Hold Clear Device processing as necessary necessary rid y gerR_IN32_SetDLINKLED jse LED D LINK y gerR_IN32_SetERRLED se LE
149. ommand e Logical sum of sub command inside received data storage area and 0x80 response frame 3 Return value 0 big endian 4 Destination network number Source network number inside received data storage area 5 Destination node number Source node number big endian inside received data storage area 6 Source network number Own network number 7 Source node number Own node number big endian Set all reserved areas to 0 Get unit information using the function gerR_IN32_GetUnitInformation 1 RY RWw RX RWr size big endian 2 No of own station ports 3 Token hold time big endian 4 Network operation setup number of transmissions during token hold time frame transmission interval number of token transmissions 5 Node information I O type 6 Network information a Firmware version b Model type big endian c Model code big endian d Vendor code big endian e Model name f Vendor name 7 Controller information status flag 8 Controller information a Firmware version b Model type big endian c Model code big endian d Vendor code big endian e Model name f Vendor name g Vendor specific device information big endian Set all reserved areas to 0 ulSize lt Get Detailed Node Information response transmission data size excluding DCS FCS ulSize Figure 4 29 Create Get Detailed Node Information Response Frame Processing Flowchart
150. on 4 2 3 Start Communication processing Calling this function before executing this processing results in a R_IN32_ERR abnormal end status error in library 3 gerR_IN32_RestartEvent Function Restarts R IN32M3 CL events Call format ERRCODE gerR_IN32_RestartEvent VOID Arguments Name Variable Name Description None Return value R_IN32_OK Normal end Description This function restarts events stopped by R IN32M3 CL event detection the function gerR_IN32_GetEvent 4 gerR_IN32_UpdatePortStatus Function Updates PHY link status Call format ERRCODE gerR_IN32_UpdatePortStatus ULONG ulPort Arguments Name Variable Name Description Port specification R_IN32_PORT1 0 Port 1 R_IN32_PORT2 1 Port 2 ULONG ulPort Return value R_IN32_OK Normal end Description This function updates the PHY link status R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 112 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 5 gerR_IN32_UpdateMIB Function Updates MIB information Call format ERRCODE gerR_IN32_UpdateMIB VOID Name Variable Name Description O Arguments None R_IN32_OK Normal end R_IN82_ERR Abnormal end MIB information collection error status error in library mismatch R_IN32_ERR_OTHER Abnormal end MIB information collection error error occurred in driver inside library
151. on calls the function below created by the vendor Be sure to execute error processing in accordance with the error code gR_IN32_CallbackFatalError R18UZ0015EJ0200 stENESAS Page 130 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 5 10 Transient reception processing 1 gerR_IN32_MainReceiveTransient1 Function Main transient reception processing 1 Call format ERRCODE gerR_IN32_MainReceiveTransient1 VOID Name Variable Name Description O Arguments None Return value R_IN32_OK Normal end This function acquires the transient frames received by R IN32M3 CL 2 gerR_IN32_MainReceiveTransient2 Function Main transient reception processing 2 Call format ERRCODE gerR_IN32_MainReceiveTransient2 VOID Name Variable Name Description Arguments None Return value R_IN32_OK Normal end This function delivers the received transient frames acquired by the function Description gerR_IN32_MainReceiveTransient1 to the user program using the call back function gerR_IN32_CallbackReceivedTransient 3 gerR_IN32_EnableReceiveTransient Function Enables transient reception for vendor reasons Call format ULONG gerR_IN32_EnableReceiveTransient BOOL blEnable Name Variable Name Description Enables reception BOOL blEnable R_IN82_TRUE Enable reception R_IN32_FALSE Disable reception Arguments Return value
152. on sets the network time serial value in increments of 15 2587890625 us given a starting point of January 1 2000 00 00 00 3 gerR_IN32_NetworkTimeToDate Function Converts network time serial value Clock information Call format ERRCODE gerR_IN32_NetworkTimeToDate R_IN32_TIMEINFO_T pstTimelnfo const USHORT pusSerial Arguments Name R_IN32_TIMEINFO_T pstTimelnfo Variable Name Description Clock information Output const USHORT pusSerial Network time pusSerial 0 Network time bits 31 16 pusSerial 1 Network time bits 47 32 Input Return value R_IN32_OK Normal end Description This function converts the network time serial value in increments of seconds given a starting point of January 1 2000 00 00 00 to clock information year month day hour minute second microsecond fixed to 0 day of the week R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 127 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Arguments of gerR_IN32_NetworkTimeToDate The following describes the structure of R_IN32_TIMEINFO_T based on the sample code Clock information typedef struct R_IN32_TIMEINFO_TAG USHORT us Year l lt Year 2000 2136 USHORT usMonth l lt Month 1 12 USHORT usDay l lt Day 1 31 USHORT usHour l lt Hour 0 23 USHORT usMin l lt Minute 0 59 USHORT usSec l lt Second
153. on status flag Enables Disables controller information 0 Controller firmware version to u Controller vendor device specific information R_IN32_FALSE indicates disabled and R_IN32_TRUE indicates enabled Controller firmware version Specifies the firmware version of the controller Controller model type Specifies the model type specified by the CC Link Partner Association Controller model name Specifies the model name of the controller in 20 byte character string ASCII code The model name is any name defined by the vendor Manage the name so that it is unique within the vendor code R18UZ0015EJ0200 stENESAS Page 104 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field r Controller vendor code 4 3BDEVELOPING FIRMWARE Specifies the vendor code acquired when the vendor became a member of the CC Link Partner Association in BCD If the vendor code is 5678 0x5678 is specified s Controller model code Specifies the model code of the controller The model code is any code defined by the vendor Manage the code so that it is unique within the same vendor code t Controller vendor name Specifies the vendor name of the controller in 32 byte character string ASCII code The vendor name is any name defined by the vendor u Controller vendor device specific information Specifies the vendor device specific information of the controller The vendor device specific information is any informat
154. pe H Vendor code Node type Reserved H MAC address T Reserved L Format of node information data area first half of No 60 Node number H L Reserved Function status Reserved Network number Figure 3 10 Transienti Data Area Distribute Node Information Request Frame 1 R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 22 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD Frame format of Distribute Node Information request frame 2 Node information data area No 60 Node information data area No 61 Node information data area Nos 62 to 120 Data length Transient data size in frame of Transient header Format of node information data area second half of No 60 Model type H Vendor code H Node type Reserved H MAC address L Sai i San Reserved T Format of node information data area Nos 61 to 120 Node number H L Reserved Function status Reserved Network number Model type H Vendor code La Node type Reserved H Z y MAC address R _ N pre L N k is Reserved H Figure 3 11 Transienti Data Area Distribute Node Information Request Frame 2 R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 23 of 149 R IN32M3 Series CC Link IE Field Table
155. pecify R_IN32_TRUE when you want to use the R IN32M3 CL internal WDT function and R_IN382_FALSE when you do not Specifying R_IN32_TRUE changes the terminal NMIL to Low when the R IN32M3 CL internal WDT overflows MPU interrupt function use Specify R_IN382_TRUE when you want to use the R IN32M3 CL MPU interrupt function and R_IN32_FALSE when you do not Specifying R_IN32_TRUE changes the terminal INTL to Low when a R IN32M3 CL interrupt occurs Failed process setting 1 Specify R_IN32_TRUE When any of the signals below are true R IN32M3 CL changes to bypass mode Communication frames are neither sent nor received A received frame is forwarded as is to the other port 1 When the WDTIL terminal setting is True Low 2 When the R IN32M3 CL internal WDT times out When you want to clear bypass mode power ON reset or system reset is required Failed process setting 2 Specify R_IN32_TRUE When a forced stop is executed gerR_IN32_ForceStop function is called R IN32M3 CL changes to bypass mode Communication frames are neither sent nor received A received frame is forwarded as is to the other port When you want to clear a forced stop power ON reset or system reset is required For gerR_IN32_ForceStop function details see Section 0 of Section 4 5 5 Own station status setup Node type Specifies the node type of its own station Specify intelligent device station 0x33 Transien
156. rCode UCHAR auchCirlUnitModelName 20 UCHAR auchCirlVendorName 32 ULONG ulVendorlInformation R_IN32_UNITINFO_T R18UZ0015EJ0200 Dec 25 2014 stENESAS lt No of host station ports lt Token hold time l lt Node information I O type l lt Network firmware version lt Network model type lt Network model code lt Network vendor code l lt Network model name l lt Network vendor name lt Controller information status flag lt Controller firmware version lt Controller model type lt Controller model code l lt Controller vendor code l lt Controller model name l lt Controller vendor name lt Controller vendor device specific information Page 102 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE A R_IN382_UNITINFO_T initial setup The contents initially set up by R_LIN32_UNITINFO_T are as follows a RY size bytes octets Specifies the RY size bytes communicable by its own station in increments of 1 byte multiple of 1 The maximum value for an intelligent device station is 256 bytes RWw size words Specifies the RWw size words communicable by its own station in 2 word boundary multiple of 2 The maximum value for an intelligent device station is 1 024 words RX size bytes octets Specifies the RX size bytes communicable by its own station in incre
157. rames due to full upper 0 to 4294967295 we a o to a full upper layer transmission buffer layer transmission buffer layer transmission buffer No of integrity status No of integrity status data Fixed value data items items 0x00000000 R18UZ0015EJ0200 stENESAS Page 28 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD c Get Detailed Node Information The Get Detailed Node Information command is used by the master station to collect the detailed node information of a slave station The master station sends the request to a slave station and the slave station sends a response to the master station The intelligent device station slave station sends a TransientAck frame and Transient response frame Get Detailed Node Information response in response to a Transient request frame Get Detailed Node Information request sent by the master station In response to the response frame the master station sends a TransientAck frame Reception processing is therefore required The following shows the frame format of a Get Detailed Node Information request Frame format of Get Detailed Node Information request 0x04 Get Detailed Node Information Command Sub command 0x00 Request Return value m ee Reserved 0x00 Destination network number Destination node H number E Reserved H 0x0000 T Data length Reserved H 0x0000 T
158. ransient data H Big endian size inside frame L 2 bytes octets H Big endian 2 bytes octets D AI NN ata sub type L 0x0002 System specific Figure 3 5 Transienti Header Table 3 6 Transienti Header Items Item Description Value Remarks Reserved Reserved Fixed value 0x00000000 Bit 7 Final frame 1b Sequential number of A Sequential number non final frame 0b Transient1 frame Bits 6 to 0 0x00 to 0x7F Identification Identification number of Set the same identification number for 0x00 to OxFF ie Note number transient data divided frames Transient data Number of bytes from The overall size of the transient data 20 and up overall size command to data prior to division Offset address from Offset address start command of 0 and up Fixed to 0 when not divided transient data in general Transient data size Size of Transient data n l Note vad 12 to 1466 Size of transient data after division inside frame area Data sub type System specific 0x0002 Note Note Set in big endian format R18UZ0015EJ0200 stENESAS Page 16 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD The following shows the relationship between the sequential number and identification number of transient data The examples shows the first transient data not divided the second transient data divided into three sections and the thi
159. ransient frame common header Size Bytes Sub ltem MAC header Size Bytes Remarks CC Link IE header Transient header Extension header 20 3 Transient1 data area 20 to 1466 Data 0 to 1446 DCS 4 4 Data Check Sequence FCS 4 4 Frame Check Sequence Note Automatically calculated and added by R IN32M3 CL R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 13 of 149 R IN32M3 Series CC Link IE Field 1 3 2BDATA COMMUNICATION METHOD Transient frame common header The transient frame common header is a header used in common by the Transient frame TransientAck frame and Transient2 frame The header comprises a MAC header which is an Ethernet frame header and a CC Link IE header Header format common to transient frames MAC header CC Link IE header MAC header 14 bytes i i ES ech aa dora ala aloe ae es at ooo H l a E LOO Big endian Destination address 6 bytes octets L H Big endian Source address 6 bytes octets L Type H 0x89 Hj Big endian i L 0x0F L 2 bytes octets v Frame type A Data type E Big endian Noce 9 pA 2 bytes octets Connection information Reserved 0x00 Own node number H Big endian 2 bytes octets Protocol version type Upper 4 bits Version Lower 4 bits Type 14 bytes Reserved 0x00 l ee Big endian HEG 4 bytes octets EE N E E A ENE EEE
160. rd transient data divided in half Transient Data Transient Data Transient Data No No 2 No 3 Item Sequential No 0x80 0x00 gt 0x01 0x82 0x00 gt 0x81 Identification No 0x01 0x02 0x02 0x02 0x03 0x03 Frame 1 Frame 1 Frame 2 Frame 3 Frame 1 Frame 2 Final frame Final frame Final frame Figure 3 6 Transient1 Header Relationship between Sequential No and Identification No of Transient Data R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 17 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD 3 Transienti data area The Transient data area is a data area for Transient frames and comprises an extension header and data Sub command Reserved 0x00 Destination network number Command L number L Reserved H 0x0000 T Reserved H 0x0000 T Reserved 0x00 Source network number Source node number Reserved H 0x0000 L Reserved 0x0000 Data 0 to 1446 bytes mE rir Return value Ll Destination nodeH Transient1 data area extension header frame format Big endian 2 bytes octets Big endian 2 bytes octets l Extension header 20 bytes octets Big endian 2 bytes octets l Transienti data area 20 to 1466 bytes octets Figure 3 7 Transient1 Data Area R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 18 of 149 R IN
161. response 0x10 Get Memory request 0x90 Get Memory response 0x12 Set Memory request 0x92 Set Memory response 0x60 to Ox7F Vendor specific R18UZ0015EJ0200 stENESAS Page 38 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD 3 Transient2 data area a Return code The return code RSTS format is common to the Transient2 response frame 0x0000 indicates normal 15 1110 8 76 0 gt Error location Error code RSTS L H No error Ob Error vendor defined Other than Ob Warning error Ob Fatal error 1b Classification for each network layer Assigns data link layer or application layer Vendor definition Figure 3 18 Return Code RSTS R18UZ0015EJ0200 stENESAS Page 39 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD b Get memory access information Request The Get Memory Access Information acquires the memory access information of the master station CT 0x04 Data area not required 0 bytes Response CT 0x84 RSTS 4 See Section 3 A Return code of Section 7 3 3 Transient2 frame format Available Bit Configuration access code E 0 list Access 32 octets OF 60 10 Device name 20 4 octets 30 40 Size L 5 H 60 f N n v m 80 90 evice name 4 octets BO CO Size Li DO H E0 FA FO
162. ress Own MAC address 3 Type Fixed to 0x890F big endian Create Transient1 frame CC Link IE header 1 Frame type Fixed to 0x22 Transient1 2 Data type 0x07 CC Link IE field specific transient communication 3 Node ID Node ID acquired by gusR_IN32_GetNodelD function big endian 4 Connection information 0 separately set using gerR_IN32_GetSendTransientBuffer function 5 Node number Own node number big endian 6 Protocol version 0x0 7 Protocol type 0x 1 CC Link IE Field Network Reserved 0x00 Create Transient1 frame Transient1 header 1 Sequential number 0x80 Final frame bit 7 1b No 1 bits 6 0 0x00 2 Identification number Any 0 255 value changed for each Transient1 transmission 3 Entire size of transient data No of bytes big endian of Transient1 frame data area 4 Offset address lt 0x00000000 head address big endian 5 Transient data size in frame No of bytes big endian of Transient1 frame data area 6 Data sub type 0x0002 system specific big endian Create Transient1 frame data area 1 Command Command inside received data storage area 2 Sub command lt Logical sum of sub command inside received data storage area and 0x80 response frame 3 Return value lt 0 big endian 4 Destination network number Source network number inside received data storage area 5 De
163. ress 2 Source address Own MAC address 3 Fixed to 0x890F big endian Create Transient2 frame CC Link IE header Type 1 Frame type lt Fixed to 0x25 Transient2 2 Data type lt 0x04 CC Link compatible transient communication 3 Node ID lt Node ID acquired by gusR_IN32_GetNodelD function big endian 4 Connection information lt 0 separately set using gerR_IN32_GetSendTransientBuffer function 5 Node number lt Own node number big endian 6 Protocol version lt 0x0 7 Protocol type lt 0x1 CC Link IE field network Reserved 1 L No of bytes from 4 FNO to 26 Read size 2 RSV 0 3 TP SF 0 4 FNO 0 5 DT lt 0 6 DA lt Destination node number 7 SA lt Own node number lower 8 bits 8 DAT lt 0x22 CC Link compatible transient communication 9 SAT 0x22 CC Link compatible transient communication 10 DMF 0 11 SMF 0 12 DNA lt Own network number 13 DS lt Destination node number master station 0x7D 14 DID lt 0x03FF 15 SNA lt Own network number 16 SS lt Own node number lower 8 bits 17 SID lt 0x03FF 18 L1 lt No of bytes from 19 CT to 26 Read size 19 CT lt 0x10 Get Memory 20 RSV 0 21 APS lt Application side identification number Set any value 22 Quantity 1 23 Attribute lt 0x05 Word access external information 24 Access code lt 0x04 Data register 25 A
164. rovided in the table below Table 1 1 Component Selection Check Sheet Description Did you select an MPU that satisfies the following specifications 1 Data width 16 bits or higher 2 Address width 17 bits or higher 3 Endian Little endian 4 Timing indicated in Chapter 4 1 MPU selection RJ 45 connector 2 Is the connector an 8 pin ANSI TIA EIA 568 B shielded connector selection Pulse transformer 3 selection Did you select an IEEE 802 3 1000BASE T compatible component Did you select a component that satisfies the following specifications 1 IEEE 802 3 1000BASE T full duplex compatible component 2 Component having an auto negotiation function 4 PHY selection 3 Component having a GMII interface 4 Component having an auto MDI MDIX negotiation function 5 Component capable of operating at an MDC clock frequency of 7 812 MHz 125 MHz crystal oscillator ae 5 Did you select a component having a frequency deviation within 50 ppm selection 2 097152 MHz crystal ar 6 Did you select a component having a frequency deviation with 50 ppm oscillator selection Did you select a PHY clock crystal oscillator in accordance with the PHY clock crystal required specifications of the PHY used oscillator selection Frequency of crystal oscillator Total jitter of crystal oscillator R18UZ0015EJ0200 stENESAS Page of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 1 OBBasi
165. s R_IN32_CYCLIC_SIZE_T pstCyclicSize ulRWwSize RWw size bytes octets Output ulRxSize RX size bytes octets ulRWrSize RWr size bytes octets Arguments Return value R_IN32_OK Normal end This function acquires the specified cyclic communication from the master station in the parameter frame The functions gerR_IN32_GetReceivedCyclicData and gerR_IN32_SetSendCyclicData input and output cyclic transmission and reception data in the size acquired by this function Description Arguments of gerR_IN32_GetCurrentCyclicSize The following describes the structure of R_IN32_CYCLIC_SIZE_T based on the sample code Cyclic communication size typedef struct R_IN82_CYCLIC_SIZE_TAG ULONG ulRySize lt RY size bytes octets ULONG ulRWwSize lt RWw size bytes octets ULONG ulRxSize lt RX size bytes octets ULONG ulRWrSize lt RWr size bytes octets R_IN82_CYCLIC_SIZE_T R18UZ0015EJ0200 stENESAS Page 118 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 3 gerR_IN32_GetCommumicationStatus Gets data link status Function Call format ERRCODE gerR_IN32_GetCommumicationStatus ULONG pulCommSts Arguments Name Variable Name pulCommSts Description Data link status R_IN32_COMMSTS_CYC_DLINK 2 Data link in progress cyclic communication in progress R_IN32_COMMSTS_TOK
166. s are described in Section 4 2 16 Create Transient2 Request Frame processing Implement this processing when a transient communication function is present Details are described in Section 4 2 17 Send Transient1 Transient2 and TransientAck processing Figure 4 3 General Flowchart R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 54 of 149 R IN32M3 Series CC Link IE Field 4 2 2 Initialization processing iUserlnitialization initialization processing i Return value Processing result z Get the reset status gulR_IN32_GetResetStatus SMG TESGE Sla Get the reset status if necessary y gerR_IN32_Initialize Jintiaize R IN32M3 following function created by the vendor gR_IN32_CallbackFatalError pe Soe se SRS Yes lt Did a fatal error occur Z No Implement Error processing as necessary End Do you want to use the No If a fatal error occurs in R IN32M3 the function gerR_IN32_Initialize calls the iReturn Abnormal end IN32M3 internal WDT 4 3BDEVELOPING FIRMWARE gerR_IN32_ResetWDT Reset the R IN32M3 internal WDT Hereafter periodically call the function Yes y i en Y gerR_IN32_SetWDT Feary Tea raion gerR_IN32_DisableWDT J Disable the R IN32M3 internal WDT v Enable the R IN32M3 internal gerR_IN32_EnablewDT WDT v gerR_IN32_ResetWDT before the internal WDT times out No Does th
167. s timeouts using the functions gR_IN32R_StartStopwatchTimer and Description gR_IN32R_GetElapsedTime Implement the function so that Unsigned Long 0 4294967295 can be counted If timeout monitoring is not required set ulElapsedTime to 0 elapsed time 0 us 4 gR_IN32R_Disablelnt Function Disables interrupts Call format VOID gR_IN32R_Disablelnt VOID Name Variable Name Description Arguments None Return value None This function disables interrupts Description This function is a dummy function Regard the processing as no processing 5 gR_IN32R_Enablelnt Enables interrupts Call format VOID gR_IN32R_Enablelnt VOID Name Variable Name Description Arguments None Return value None This function enables interrupts Description This function is a dummy function Regard the processing as no processing R18UZ0015EJ0200 stENESAS Page 143 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 6 gerR_IN32R_IEEETest Function IEEE 802 3ab compliance test Call format ERRCODE gerR_IN32R_IEEETest USHORT usIEEETestMode Arguments Name USHORT Variable Name usIEEETestMode Description IEEE 802 3ab compliance test mode R_IN32R_IEEE_MODE1 1 MODE1 R_IN32R_IEEE_MODE2 2 MODE2 R_IN32R_IEEE_MODE3 3 MODE3 R_IN32R_IEEE_MODE4 4 MODE4 R_IN32R_IEEE_END 5 Test end 1 0
168. secesecsaecsaecseecaeeeaeseeeseeeeeeeeereeeeens 62 Send Cyclic Data Processing Flowchart 00 0 0 c cc eeceeceescsescessceseceeceseeecssecssecsaecsaecsaecaaecaeseaeseneeneeeaeens 62 Update Communication Status Processing Flowchart 0 0 0 0 ce ceeceseeceeeceseceeceseceseceaecseeeseseaeeeeeeeeens 63 Update Cyclic Communication Status Processing Flowchart eceeeecesecssecsseceseceeeseeeeeeeeeeeeens 64 Get MIB Information Processing FloWchart eee cece cseceeeeeeeeeeeeeeeeeesecesecsaecnaecsaecseeeaeseneeeeeeeens 65 Receive Transient1 Transient2 and TransientAck Processing Flowchart sscceeccessseceeeeeeneeeeeee 68 Create Transient2 Request Frame Processing Flowchart cee eeeeceecesecesecesecnsecsecseeeaeeeeeeeeeeeeees 69 Send Transient1 Transient2 and TransientAck Processing Flowchatt csesccessceceeeeeeeeceeeeeenees 70 Received Transient Data Processing Flowchart sseeseseseseesseessressressrsereserssersserssressressreeeeseesseessee 71 Start Making Received Transient Data Processing Flowchart eseseesserseesesreesrseeerrsreersrerrreresrees 72 Make Received Transient Data Processing Flowchatt ececeeeeceeecesecesecesecesecseeceeeseseeeeeeeeeees 73 Received Node Information Distribution Frame Processing Flowchart ccssscceeeeeeneeceereeeneeeeees 74 Check Node Information Distribution Frame Processing Flowchart cceceseeseceesseeeneeereeeeeeeeees 75 Received Statistical
169. sient2 Set Memory aha i response transmission SMF e DMF inside received frame data size DNA SNA inside received frame DS sf SS inside received frame DID A pa SID inside received frame SNA e Own network number SS fe Own node number lower 8 bits SID U Startup source input output number H 0x03FF L L1 wW ll CT Logical sum of CT inside received frame and 0x80 bit 7 response ON RSV sf 0x00 APS A poses APS inside received frame RSTS H soe Return code nt ole E Res SA ATE EU E A ee ee y DCS 4 bytes FCS 4 bytes Figure 4 38 Frame Format of Transient2 Response R18UZ0015EJ0200 stENESAS Page 87 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 31 Create Transient2 Get Memory Request Frame processing Create Transient2 Get Memory Request Frame processing creates a Transient2 Get Memory request frame ulUserSetTransient2_RequestGetMemory Create Transient2 Get Memory Request Frame processing Argument 1 Address of sent frame Return value Sent data size excluding DCS FCS gerR_IN32_GetUnicastMACAddress Joe unicast MAC address y _ No ee Mas a _ __ Was the destination MAC address acquired by the es function gerR_IN32_GetUnicastMACAddress Create Transient2 frame MAC header y es 1 Destination address MAC address of destination node acquired by the function gerR_IN32_GetUnicastMAC dd
170. sssgececbohscvetavbsasdoreeceuatvesoesv esas 52 List of MIB Information of Ring Control Area eee ee ceceeceseceseceseceseceaecaeecaeeeaeseaeseeseeeeseenseenseenaes 66 List of MIB Information of MAC IP Area ceeeeeeseceseeeesseceeneecaecesneecsaeceseeeenaecesneeeaaeceeeeeaaecseeeenaeees 66 List of Other MIB Information erene E KE EE EE EE E a 67 Test Item Preca tioiSi nanne a a a a a a a E E a E 93 Troubleshooting Based on Hardware Testu ceeeceesseeccesscesecesecesecesecsaecsaecseecseeeseseaeeeeeeesessseeseenseenaes 94 R IN32M3 CL Driver Interface Function List cee cesscesseceeececsseceseeecaeceseeeenaecseneeeaaeceeeeeaaeceeeeeenaeees 98 R IN32M3 CL Driver Interface Function List Continued 0 cccseccccsesceceeseececeenececseeeeeessseeeenenaeees 99 List of Initial Values of Detailed Application Run Status ee eeeesecesecsseceseceeceeesereeeeeeeeeeens 107 Contents 6 Table 4 11 Target Dependent Function Group for R IN32M3 CL Driver 0 0 0 cece ceeeeceesceeecesecesecnseseeeneeees 141 Table 4 12 List of Call Back Functions Used by R IN32M3 CL Driver eeeesseeeceeeceseceeeesecnsecseeneeees 145 Table 4 13 List of Fatal Error Codes of gR_IN32_CallbackFatalError Function 0 cecceeeceeeneeceeeceeeeecseeenees 146 Contents 7 2tENESAS R18UZ0015EJ0200 R IN32M3 Series CC Link IE Field Dec 25 2014 1 Basic Design Precautions 1 1 Component selection Select components taking into consideration the information p
171. st Frame processing eeseseesecesecseecseeeseeeeeeeeeeeseeeseeseenseesaes 76 Create Get Statistical Information Response Frame processing seeeseseeesserseresrsrreresreeresrerrsserrreresreee 77 Received Detailed Node Information Request Frame processing ccceesseeseeeeeeeeeeeeceseceseeeseesaeenaes 79 Create Get Detailed Node Information Response Frame processing essersereerseresrsreeresrrrrssesrereresreee 80 Received Transient2 Data processing eeeeseerseresesrreresreerssrrrrsrerrrstesteetesetrtsertestesteetesrerteseerrsrertenresreet 82 Check Received Transient2 Data processing cece ceeeeeeceescesecesecesecaeceaecsaecaeeeseseaeseeeeeseeeeesseenseenaes 83 Received TransientAck Data processing sansin ae e E E RES E E 83 Create TransientAck Frame processing sssri isseies oireet isset ste othoi T sesi sbaen SEEE Eher b eSEE DESS Ee p Parei E aiie 84 Create Transient2 Response Frame processing eeeseerseresesreesrsreersserrsrertsstrtreresrentesrertesreersresrenresreet 86 Create Transient2 Get Memory Request Frame processing ceceeceseesecesecseecseeeseeeeeeeseeeseeseeeeenseenaes 88 Received Transient2 Set Memory Request processing eeeeeecesecesecssecseecseeceeeeeeeeeeeeeeeceseesseeaeesaes 90 Received Transient2 Get Memory Response processing cesccescesecesecesecseecaeeeseeeeeeeeeeeeeeseeseenseenaes 91 Hardware test IEEE 802 3ab compliance test 0 0 ceeeeesseceseee
172. stination node number Source node number big endian inside received data storage area 6 Source network number Own network number 7 Source node number lt Own node number big endian Set all reserved areas to 0 Get the MIB information of port 1 and port 2 using the function gerR_IN32_GetMIB Set up the MIB information of port 1 port 2 in the Get Statistical Information request response frame 1 No of HEC error frames big endian 2 No of DCS FCS error frames big endian 3 No of undersize error frames big endian 4 No of forwarded frames big endian 5 No of upper layer transmission frames big endian 6 No of discarded frames due to full forward buffer big endian 7 No of discarded frames due to full upper layer transmission buffer big endian Set up the integrity status 1 No of integrity status data items 0x00000000 big endian Set all reserved areas to 0 ulSizeGet Statistical Information response transmission data size excluding DCS FCS ulSize Figure 4 26 Create Get Statistical Information Response Frame Flowchart R18UZ0015EJ0200 stENESAS Page 77 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field Frame format of Get Statistical Information response MAC header Destination address Source address Type CC Link IE header Frame type HEC Not used Sequential number HI 0x00000000
173. t assembly information 1 Assembly in progress assessment flag Assembly not in progress y End blComplete Figure 4 22 Make Received Transient1 Data Processing Flowchart R18UZ0015EJ0200 ztENESAS Dec 25 2014 Page 73 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 20 Received Node Information Distribution Frame processing Received Node Information Distribution Frame processing receives a node information distribution frame and registers the information of each node UserHandleReceivedMACAddressData Arguments 1 Address of received data storage area 2 Received data size Received Node Information Distribution Frame processing Details are described in Section 4 2 22 Arguments 1 Address of received frame data storage area 2 Received data size Return value Check result Check Node Information Distribution Frame processing gerR_IN32_GetNodeAndNetworkNumber Get the node number and network number Check the following Destination node number Is the value its own node number or broadcast Destination network number Is the value its own network number or broadcast Check the destination node number and destination network number Return value of Check Node Information Distribution Frame processing Destination node number Destination network number Abnormal Set up node information distribution
174. t half No 61 7 Transientl data area Distribute Node __ Information request Frame 2 A CT No 60 second half No 119 No 61 No 120 a ee No 119 No 120 Figure 3 8 Transient Data Area Frames When Distribute Node Information Request Is Divided For the frame format see Table 3 9 Table 3 10 and Table 3 11 in accordance with the table below Table 3 9 Frame Format for Distribute Node Information Request Number of Distributions Less than 60 Reference Figure 3 9 Transient1 Data Area Distribute Node Information Request Figure 3 10 Transient Data Area Distribute Node Information Request Frame 1 Figure 3 11 Transient Data Area Distribute Node Information Request Frame 2 60 or more For details on assembling the Transient1 reception data see Section 4 2 18 Start Making Received Transient Data processing and Section 4 2 19 Make Received Transient Data processing R18UZ0015EJ0200 Dec 25 2014 2tENESAS Page 20 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD The following shows the frame format for a Distribute Node Information request involving less than 60 distributions Transient1 data area Distribute Node Information request format Command 0x01 Distribute Node Information D
175. t reception function Specifies whether or not the transient reception function is present R_IN32_FALSE indicates the function is not present and R_IN32_TRUE indicates the function is present Enable node number and network number setting from master station Specifies whether or not the node number and network number setting from the parameter frame is enabled R_IN32_TRUE enables the node number and network number setting from the master station R_IN32_FALSE causes the master station not to set the node number and network number R18UZ0015EJ0200 stENESAS Page 106 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE h Request node information distribution Node information is information indicating the correspondence between the node number and MAC address and is distributed to the master station Setting this to R_IN32_TRUE distributes the node information from the master station 1 1 If f Transient reception function is set to R_IN32_FALSE be sure to set this setting to R_IN32_FALSE The master station distributes node information to all slave stations using a Transient frame When f Transient reception function is set to R_IN32_FALSE discard the node information distributions Transient frames received from the master station using the user program When Transient2 frames are transmitted A response returned to the source can be returned using the source MAC address When trans
176. thes detnzesdessveassebave E aeae REPERE o Pas a dees stebesshsegedssesdevasossegecanscss 48 4 2 Sample Flowcharts of User Program ceescescssecssecseecseeeeeeeeeeecceeeeseceseseeeeeeseessecsaecsaecsaecsaecaeeeseseaeeeneetens 52 4 2 1 General MOW CHALE son sec casases eve cvbued e E e e E oteceb A seb T EAEE EE E AE vac EEE 54 4 2 2 Initialization Processing isre ae ear are en ee E EES ERE E eS ANE ENEE E SE SRE E ENESE EEES ENa 55 4 2 3 Start Communication PLOCESSING ce scsseeseeeseecnevsnesensvonseensessevssensecssenssessecsserneesneescevsnsvenssrserssesnens 56 4 2 4 Check PHY processing cisin icine wh ke Relies n BA tn A chee nts os Goth Ries 57 4 2 5 Change PHY Setting processing n aeiiae eieo ees eoe eE ESO TEE E EE r ESTEE EKET EE EEES 58 4 2 6 Force Stop processing sisi a een s A toms S A S E N EEEE 59 4 2 7 Stop Cyclic Communication Processing ee escessceseceseceeeceecseeeeeseeeeeeeesecesecsecsaecsaecsaecsaeeneseneeeaeenens 59 4 2 8 Event processing Weis Sin Gdn tins ile Moai eth it eee ee eens 60 4 2 9 Receive MyStatus from Master Station and Cyclic Data processing eee eee eeeeeeeeeeeeeeeereeseeeseenaes 61 4 2 10 Send MyStatus process Esos eies aipee een aeeie E pE sree aras pE ees ty setae SE Eose E pees 62 4 2 11 Send Cyclic Data processing so cssesiceesstbecs os pcsseteasi eroi rris eiee r e Er T SEE EE E i E sE E Sr oT 62 Contents 1 4 2 12 4 2 13 4 2 14 4 2 15 4 2 16 4 2 17 4 2 18 4 2 19 4 2 20 4
177. top ERRCODE pS ey reasons Clears cyclic communication stop for Cyclic gerR_IN32_ClearCyclicStop ERRCODE 92S cy P ai device side reasons P gerR_IN32_GetReceivedCyclicData ERRCODE Acquires received cyclic data ion gerR_IN32_GetMasterNodeStatus ERRCODE Acquires the master station status gerR_IN32_SetMyStatus ERRCODE Sets MyStatus transmission data gerR_IN32_SetSendCyclicData ERRCODE Sets cyclic transmission data Host station gerR_IN32_SetNodeStatus ERRCODE Sets its host station status status setup gerR_IN32_ForceStop ERRCODE Sets a forced stop Host station status acquisition R18UZ0015EJ0200 Dec 25 2014 gerR_IN32_GetNodeAndNetworkNumber ERRCODE Acquires the node number and network number gerR_IN32_GetCurrentCyclicSize ERRCODE Acquires the cyclic communication size specified from the master station gerR_IN32_GetCommumicationStatus ERRCODE Acquires the data link status gerR_IN32_GetPortStatus ERRCODE Acquires the PHY link status gerR_IN32_GetCyclicStatus ERRCODE Acquires the cyclic communication status gerR_IN32_GetMIB ERRCODE Acquires MIB information gerR_IN32_ClearMIB ERRCODE stENESAS Clears MIB information Page 98 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Table 4 9 R IN32M3 CL Driver Interface Function List Continued
178. tup source input output number H 0x03FF L L1 Meo A CT 0x10 Get Memory RSV fe 0x00 L Application side APS H identification number L Quantity qe 0x0001 Attribute Access code L Address H Read size Lj words H l PENE EE We peg Feat en Maal DCS 4 bytes FCS 4 bytes 4 3BDEVELOPING FIRMWARE Figure 4 40 Frame Format of Transient2 Get Memory Request R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 89 of 149 R IN32M3 Series CC Link IE Field 4 2 32 4 3BDEVELOPING FIRMWARE Received Transient2 Set Memory Request processing Received Transient2 Set Memory Request processing is performed when a Transient2 Set Memory request frame is received erUserHandleReceivedTransient2_RequestSetMemory Argument Received Transient2 Set Memory Request processing Return value Access code 1 Address of data area of received frame Processing result 0x04 Data register 0x05 Word access external inform Is the address within range 0 63 Import write data erResult Normal Is the size within range 1 to 64 address Other erResult Error a erResult Error H ation erResult Error H erResult Error m Implement the processing of each access code With this sample code the code is an unsupported access code and therefore erResult Error End erResult The flo
179. twork number Destination nodeH number L Reserved H 0x0000 E Reserved H 0x0000 L Reserved 0x00 Source network number Source node H number L Reserved H 0x0000 L Reserved H 0x0000 LE Get Statistical Information data area 0x80 Response 7 t No of port 1 HEC error frames TI H No of port 1 DCS FCS error frames TI H No of port 1 undersize error frames TI HI No ofport1 forward frames TI H No of pot 1 upper layer transmission frames No of pot 1 discarded frames due to full forward buffer No of port 1 HI discarded frames due to full upper layer transmission buffer full T HI Reserved tical Information response Format of Get Statistical Information data area H No of port 2 HEC error frames L H No of port 2 DCS FCS error frames H No of port 2 undersize error frames HI No of port 2 forward frames H No of pot 2 upper layer transmission frames H No of pot 2 discarded frames due to full forward buffer full No of port 2 HI discarded frames due to full upper layer transmission buffer T HI No of integrity _ status data items TI Fixed to 0x00000000 Figure 3 13 Transienti Data Area Get Statisti
180. type inside received frame Other 0x22I Transient1 v AA 4 Data sub type Data sub type inside received frame 4 Data sub type 0x0000 4 y 5 Reception result Argument 3 reception result y blResult TransientAck frame transmission required l i AA blResult TransientAck frame transmission not required End blResult Figure 4 34 Create TransientAck Frame Processing Flowchart 1 The I G bit refers to the lowest bit of the first byte octet of the MAC address 1 2 3 4 5 6 V G bit Figure 4 35 I G Bit R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 84 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE Frame format of TransientAck MAC header 4 A a Destination i address 14 bytes Source address Type CC Link IE header 14 bytes Frame type y HEC Hi TransientAck transmission data size No of Acks OXO00 Taies Node number H p Node number inside received frame Reserved sf 0x00 Connection Connection information inside information received frame Data sub type H ba Data sub type inside received frame Reception result Transient reception result E a ashi Se eo Bde Se Bo ek WB WSS DCS 4 bytes FCS 4 bytes Figure 4 36 Frame Format of TransientAck R18UZ0015EJ0200 Dec 25 2014 stE
181. ual 1 Purpose and target readers This manual is intended for users who wish to understand the functions of CC Link IE Field Nework of intelligent device station for designing application of it It is assumed that the reader of this manual has general knowledge in the fields of electrical engineering logic circuits and microcontrollers Particular attention should be paid to the precautionary notes when using the manual These notes occur within the body of the text at the end of each section and in the Usage Notes section The revision history summarizes the locations of revisions and additions It does not list all revisions Refer to the text of the manual for details Related Literature may be preliminary versions Note however that the following descriptions do not indicate Documents Preliminary Some documents on cores were created when they were planned or still under development So they may be directed to specific customers Last four digits of document number described as indicate version information of each document Please download the latest document from our web site and refer to it The document related to CC Link IE Field Network Document name Document number R IN32M3 Series Datasheet R18DS0008EJ R IN32M3 CL User s Manual R18UZ0005EJ R IN32M8 series User s Manual Peripheral function R18UZ0007EJ R IN32M3 Series Proguraming Manual OS edition R18UZ0011EJ
182. unication status y End Figure 4 15 Update Cyclic Communication Status Processing Flowchart R18UZ0015EJ0200 stENESAS Page 64 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 14 Get MIB Information processing Get MIB Information processing acquires and or clears MIB information UserGetMIB Get MIB Information processing gerR_IN32_GetMIB Yes Do you want to clear MIB information v No gerR_IN32_ClearMIB rron MB information Get MIB information End Figure 4 16 Get MIB Information Processing Flowchart R18UZ0015EJ0200 stENESAS Page 65 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 1 List of MIB Information of Ring Control Area Table 4 3 List of MIB Information of Ring Control Area MIB Information of HEC error frames No of DCS FCS error frames Description Counts the number of HEC errors in received frames Counts the number of DCS FCS errors in received frames No of undersize error frames Counts the number of received error frames with a size less than 28 bytes No of forwarded frames Counts the number of forwarded frames No frames of upper layer transmission No of discarded frames due to full forward buffer Counts the number of frames transmitted to upper layers
183. uplicate 1 b10 Node number duplication status USHORT b1ZReserved2 1 b11 Reserved USHORT _b1ZNodeTypeWrong 1 b12 Node type invalid Specified size invalid status USHORT _ b1ZReserveds 1 b13 Reserved USHORT b1ZDLinkState 1 b14 Disconnection status USHORT _ b1ZCyclicState 1 b15 Stop status due to own reasons stBit uniCycSta R_IN32_CYCLIC_STA_T 6 gerR_IN32_GetMIB Gets MIB information Call format ERRCODE gerR_IN32_GetMIB R_IN32_MIB_T pstMIB Name Variable Name Description VO R_IN32_MIB_T pstMIB R IN32M3 CL MIB information Output Return value R_IN32_OK Normal end Arguments Description This function acquires MIB information Precaution MIB information is non disclosed information Regard this information as information deployed by the vendor only R18UZ0015EJ0200 stENESAS Page 121 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field Arguments of gerR_IN32_GetMIB 4 3BDEVELOPING FIRMWARE The following describes the structure of R_IN32_MIB_T based on the sample code MIB information typedef struct R_IN32_MIB_TAG R_IN32_MIBSDRD_T _ stSDRD R_IN32_MIBMACIP_T stMACIP1 R_IN32_MIBMACIP_T stMACIP2 R_IN32_MIBRGCNT_T stRING1 R_IN32_MIBRGCNT_T stRING2 ULONG ulP1 DownCounter ULONG ulP2DownCounter ULONG ulMasterWatchCount R_IN32_MIB_T lt Transmission Reception area counter value lt
184. upt B Disable interrupts B gerR_IN32_EnableMACIPAccess Enable MAC IP access Read the PHY internal register E gerRIN32_ReadPHY E Read Auto Negotiation advertisement register Register 4 Change the register value to XXXXXX00000XXXXX binary X Previous value held Lerm winery L Lermen L Change the register value to XXX0X110XXXXXXXX binary X Previous value held Lerm winery L Lerman L Change the register value to XXXXXX1XXXXXXXX binary X Previous value held Lerm weern L Auto Negotiation of target PHY restarts B gerR_IN32_DisableMACIPAccess gerR_IN32_EnableInterrupt _ Write to the PHY internal register Write to the Auto Negotiation advertisement register Register 4 Read the PHY internal register Read the 1000BASE T control register Register 9 Write to the PHY internal register Write to the 1000BASE T control register Register 9 Read the PHY internal register Read the control register Register 0 Write to the PHY internal register Write to the control register Register 0 Disable MAC IP access Enable interrupts Figure 4 7 Change PHY Setting Flowchart R18UZ0015EJ0200 stENESAS Page 58 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 6 Force Stop processing Force Stop processing allows you to forcibly stop the intelligent device station for device side reasons
185. urn value R_IN32_OK Normal end This function turns on and off the D LINK LED Description The LED cannot be turned on or set to blinking when a R IN32M3 CL internal WDT external WDT or forced stop occurs 5 gerR_IN32_SetUSER1LED Sets LED User LED 1 Call format ERRCODE gerR_IN32_SetUSER1LED ULONG ulCtrl Variable Name Description LED control Arguments R_IN82_LED_OFFLED off ulCtrl R_IN32_LED_ONLED on R_IN82_LED_BLINKLED blinking Return value R_IN32_OK Normal end This function turns on and off User LED 1 Description The LED cannot be turned on or set to blinking when a R IN32M3 CL internal WDT external WDT or forced stop occurs 6 gerR_IN32_SetUSER2LED Function Sets LED User LED 2 Call format ERRCODE gerR_IN32_SetUSER2LED ULONG ulCtrl Name Variable Name Description LED control Arguments R_IN382_LED_OFFLED off R_IN382_LED_ONLED on R_IN32_LED_BLINKLED blinking Return value R_IN32_OK Normal end This function turns on and off User LED 2 Description The LED cannot be turned on or set to blinking when a R IN32M3 CL internal WDT external WDT or forced stop occurs R18UZ0015EJ0200 stENESAS Page 124 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 7 gerR_IN32_SetRUNLED Function Sets LED RUN ERRCODE gerR_IN32_SetRUNLED ULONG ulCtrl Name Variable Name Description O LED control ulCtrl
186. ut 0x02 Uaa type p gerR_IN32_GetUnitInformation Mixed 0x03 Firmware version of network acquired by Firmware version Firmware version of i 0 to 255 the function gerR_IN32_GetUnitInformation Model type of network Model type of network 0x0001 to OxFFFF Model type of network acquired by the function gerR_IN32_GetUnitInformation Model type managed by CC Link Partner Association Model code of network Model code of network 0x00000000 to OxFFFFFFFF Note See Section 2 of Section 4 5 1 Initial setup R18UZ0015EJ0200 Dec 25 2014 ztENESAS Model code of network acquired by the function gerR_IN32_GetUnitInformation Model code of network that is unique within the same vendor code Page 31 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD Table 3 14 Data Area Items of Get Detailed Node Information Response 2 2 Vendor code of network Description Vendor code of network 0x0000 to OxFFFF Remarks Vendor code of network acquired by the function gerR_IN32_GetUnitInformation Vendor code vendor ID managed by CC Link Partner Association Reserved Reserved Fixed value 0 Model name of network Model name of network Model name 20 bytes Model name of network acquired by the function gerR_IN32_GetUnitInformation Vendor name of Vendor name Vendor name of
187. w above describes the processes Any other setup results in error 1 Batch set memory 2 Access code below of the Set Memory function 0x04 Data register external information 2 3 Attribute 0x05 Word access 4 Address 0 to 63 5 Write size 1 to 64 Address Figure 4 41 Received Transient2 Set Memory Request Processing Flowchart R18UZ0015EJ0200 Dec 25 2014 2tENESAS Page 90 of 149 R IN32M3 Series CC Link IE Field 4 3BDEVELOPING FIRMWARE 4 2 33 Received Transient2 Get Memory Response processing Received Transient2 Get Memory Response processing is performed when a Transient2 Get Memory response frame is received erUserHandleReceivedTransient2_ResponseGetMemory Argument 1 Address of data area of received frame Return value Processing result Received Transient2 Get Memory Response processing Other RSTS Return code Import read data 64 words erResult Normal AA erResult Error i erResult The flow above describes the reception processing for the following request of the Get Memory function 1 Destination node number 0x7D Master station 2 Access code 0x04 Data register 3 Attribute 0x05 Word access external information 4 Address 0 5 Read size 64 Figure 4 42 Received Transient2 Get Memory Response Processing Flowchart R18UZ0015EJ0200 stENESAS Page 91 of 149 Dec 25 2014 R IN3
188. y 1 Handling of Unused Pins Handle unused pins in accord with the directions given under Handling of Unused Pins in the manual The input pins of CMOS products are generally in the high impedance state In operation with an unused pin in the open circuit state extra electromagnetic noise is induced in the vicinity of LSI associated shoot through current flows internally and malfunctions occur due to the false recognition of the pin state as an input signal become possible Unused pins should be handled as described under Handling of Unused Pins in the manual 2 Processing at Power on The state of the product is undefined at the moment when power is supplied The states of internal circuits in the LSI are indeterminate and the states of register settings and pins are undefined at the moment when power is supplied In a finished product where the reset signal is applied to the external reset pin the states of pins are not guaranteed from the moment when power is supplied until the reset process is completed In a similar way the states of pins in a product that is reset by an on chip power on reset function are not guaranteed from the moment when power is supplied until the power reaches the level at which resetting has been specified 3 Prohibition of Access to Reserved Addresses Access to reserved addresses is prohibited The reserved addresses are provided for the possible future expansion of functions Do not access these addresses th
189. y the vendor Be sure to execute error processing in accordance with the error code gR_IN32_CallbackFatalError a Yes a Implement Error processing as When the previous test was an internal loop back test get the PHY link status using the function gerR_IN32_GetPortStatus and necessary a End i Abnormal end DAA ee External loop back communication test st implementation item gt wait until the link is disconnected y Wait until the port 1 and port 2 link is connected 1 See No 1 Internal loop back communication test in Table 4 2 36 1 Test Item Precautions Internal loop back communication test Internal loop back y v gerR_IN32_InternalLoopBackTest j communication test gerR_IN32_ExternalLoopBackTest External loop back communication test Specify the port subject to testing Specify the source port When a fatal error or communication test error occurs on R IN32M3 the function gerR_IN32_InternalLoopBackTest or gerR_IN32_ExternalLoopBackTest calls the function below created by the vendor Be sure to get the fatal error or communication test error of R IN32M3 gR_IN32_CallbackFatalError Normal Implement Error processing as necessary Implement Error processing as necessary End Abnormal end Abnormal end ee No Do you want to implemen l s Yes End X Normal end
190. ytes Model name of controller acquired by the function gerR_IN32_GetUnitInformation Vendor name of controller acquired by the function gerR_IN32_GetUnitInformation Vendor specific device information of controller Vendor specific device information of controller 0x00000000 to OxFFFFFFFF Note See Section 2 of Section 4 5 1 Initial setup R18UZ0015EJ0200 Dec 25 2014 stENESAS Vendor specific device information of controller acquired by the function gerR_IN32_GetUnitInformation Page 32 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD 3 3 2 TransientAck frame format The following table provides an overview of the format of a TransientAck frame Table 3 15 Overview of TransientAck Frame Format Size Size Item Sub Item Remarks Bytes Bytes Transient frame common MAC header header CC Link IE header No of Ack data items Fixed value 0x00000001 3 Ack data area 8 8 Automatically added by 4 Padding 16 16 R IN32M3 CL 5 DCS 4 4 Data Check Sequence 6 FCS 4 4 Frame Check Sequence Note Automatically calculated and added by R IN32M3 CL 1 Transient frame common header See Section 1 Transient frame common header of Section 3 3 1 Transient frame format R18UZ0015EJ0200 stENESAS Page 33 of 149 Dec 25 2014 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD 2
191. ytes maximum Figure 3 27 Get Memory Response For RSTS see Section 3 a Return code of Section 3 3 3 Transient2 frame format R18UZ0015EJ0200 Dec 25 2014 stENESAS Page 45 of 149 R IN32M3 Series CC Link IE Field f Set memory Request CT 0x12 Data area Example of write data area little endian No of blocks L Attribute L H Fixed to 5 H Attribute Access code Address L H Write size L H Write data area Write size x 2 bytes 960 bytes maximum 3 2BDATA COMMUNICATION METHOD Figure 3 28 Set Memory Request Table 3 24 Set Memory Request Setting List No of blocks Setting No of blocks from Attribute to Write Size Fixed to 0x0001 Attribute ees External information unit words Fixed to 5 Access code Access code Address Address of device 0 to 7664 Write size Unit Words Note 1 See Figure 3 26 Attributes 2 See Table 3 20 Access Code List Example Mitsubishi Product R18UZ0015EJ0200 Dec 25 2014 ztENESAS 1 to 480 Page 46 of 149 R IN32M3 Series CC Link IE Field 3 2BDATA COMMUNICATION METHOD e Response CT 0x92 Data area RSTS Ir Figure 3 29 Set Memory Response For RSTS see Section 3 a Return code of Section 3 3 3 Transient2 frame format R18UZ0015EJ0200 stENESAS Page 47 of 149 Dec 25 2014 R IN32M3
Download Pdf Manuals
Related Search
Related Contents
Installing Command View SDM - Bad Request Page 1 DE WARNUNG ч Vor der Benutzung dieses Geräts sollten Votre avantage Progress Lighting P4365-20EBWB Instructions / Assembly Pratiques d`allaitement simplifiées 取扱説明書 - シャープ Copyright © All rights reserved.
Failed to retrieve file