Home

using_rmc_with_iq_an.. - Delta Computer Systems

image

Contents

1. Cancel Help Welcome to the New Controller Wizard This wizard will guide you through adding a new RMC controller to your project Type in a name for the controller in the text box below The name is used throughout RMCTools to refer to the module but does not affect the controller functionality in any way Controller Manually Configure the Controller Information The Wizard will guide you through manually entering the basic controller information Use this method if the controller is not available New Controller Wizard 52 Auto Detect Communication Method Choose the method you want to connect to the new controller Select the method for RMCTools to use to find the new controller Serial Port 1 Ethernet Tips for connecting over USB Ensure that the controller is powered and the USB cable is plugged in Ensure that you have completed the Add New Hardware wizard which is shown the first time a new controller is plugged into your PC Ensure that no other applications are connected to this controller over USB lt next gt Chapter 2 Select the controller ad Do your prec 8 Choose your RMC from the list and click Next m Corner Rabe oe in Loe ings Al regard rirmi Fea bern gathered re vid veur Confirm ft you want m add the
2. DoRead ComBusy RMC_RD_1 B START DST ReadData K W CONN ComBusy K18 W RMC FILE DONE B KD W RMC ELEM ERROR B p Ko W NUM DW RD 1 DONE RST ComBusy RD 1 DoRead BMOV ReadData 2 StatusBits Chapter 9 5 Using the Read and RMC Write Function Blocks Structured Project The RMC Read and RMC Write function blocks are used to communicate with the RMC In this example the RMC IP Address is 192 168 1 102 using PLC Connection 4 TCP 51 Description of Function Blocks Structured Project The RMC Read function block inputs and outputs are as follows START Bit CONN Word RMC_FILE Word RMC_ELEMENT Word NUM_DW Word DST_DEV FLOAT 0 1023 ENABLED Bit Done Bit Error Bit The function block will perform one read for each rising edge of the Start bit The connection number 1 16 as defined in the CPU s Open Settings Specify the address in the RMC to read from The number of 32 bit registers that you wish to read from the RMC The maximum is 1024 The destination for the data in the PLC Set while the read is in progress When the read completes or has an error the Enabled bit will be cleared Set when the read successfully completes This bit is cleared when the function block starts Set if the read has an error This bit is cleared when the function block starts The RMC Write fu
3. ENABLED B DONE B ERROR B ReadData SET ComBusy RST ComBusy SET ComBusy ComBusy Doite SET ComBusy RST ComBusy RST DoCommand Ch apte P Communicating With Multiple RMC s When communicating with multiple RMC s use a separate Ethernet connection as defined in the Open Connection settings for each RMC Each connection must use a unique Host Station Port No In the ladder logic use a separate ComBusy bit for each connection Example An iQ CPU communicates with two RMC75E s called RMC1 and RMC2 1 uses Ethernet connection 1 and RMC2 uses Ethernet connection 2 defined in the CPU s Built in Ethernet Open Connection settings The bits ComBusy1 and ComBusy2 apply to the respective connections This example does the following For RMC1 continuously read 8 items from item 0 of the Indirect Data Map address MD18 0 e For RMC1 do a single write on demand to variable 5 address MD56 10 For RMC2 continuously read 8 items from item 0 of the Indirect Data Map address MD18 0 For RMC2 do a single write on demand to variable 5 address MD56 10 This example uses the labels Class Label Data Type VAR 1RMC1 RD 1 RMC RD VAR DoRead 1 Bit VAR ReadDate FLOAT Single Precision 0 10 VAR RMC WR VAR Bit VAR FLOAT Single Precision VAR RMC RD VAR Bit VAR FLOAT Single Precision 0 10 VAR RMC WR VAR
4. Read Function Block Continuous Reads Follow these steps to use the RMC Read function block to continuously read from the RMC 1 Open a ladder logic program In the Project tree click the RMC Read function block and drag it to the ladder GX Works 2 automatically assigns an instance name RMC_RD_1 which you can change if you wish Click OK 4 Create logic and add labels as shown below The ReadData length should be the number of registers to read The ComBusy bit prevents the function block from being triggered while the communication transaction 15 in progress and is very important for synchronizing multiple function blocks which will be demonstrated later 5 Compile the code and write it to the PLC The communications should start when the DoRead bit is set and continuously read as long as DoRead is set Example Ladder Logic Continuous Reads DoRead ComBusy HMC RD 1 B START DST DEVE ReadData K1 W CONN ENABLED B SET ComBusy K18 W RMC FILE K5 W NUM DW RMC RD 1 DONE HST ComBusy RD 1 ERROF The example uses these labels Class Label Name Data Type VAR 1 RMC RD VAR Bit VAR ReadData FLOAT Single Precision 10 VAR ComBusy Bit Explanation The function block uses Ethernet connection 1 and will read 5 registers from address 18 0 in the RMC placing the values in the ReadData label When the DoRead bit is on and communications are not in progress ComBusy
5. 5 Choose a connection for the RMC Set the following a Protocol UDP b Open System Socket Communication c Host Station Port No Set to a hexadecimal value within the range 1 1387 or 1392 FFFE For example 1000 d Destination IP Address The IP address of the RMC e Destination Port No 1324 IP Address Port No Input Format IDEC Andress 192 168 D 21 IP Address and Port will be displayed by the selected format Please enter the value according to the selected number 6 Click End then write the parameters to the PLC and reset the PLC to apply the parameter settings Chapter 3 3 2 Add the Read Write Function Blocks Simple Project 1 Onthe Project menu choose Library then click Install a b E ou In the Library List box choose Select Project Click Browse At the bottom of the Open dialog if the button says Open a Single File Format Project Click it Browse to Delta s RMC Ethernet FB gxw file Click Refresh FB List In the FB List check the RD and items Click Dependent Element Selection A and click OK Click OK Import Library to Project Select a library to install Library Selection r Libra jet Project C Users jacob Documents Mitsubishi RMCandMEAURMCandQCPU fev Explanation RMC Ethernet Function Blocks Refresh FB
6. and communications are not in progress ComBusy is off the function block starts While it is in progress the Enabled bit is set which will also set the ComBusy indicating the communication transaction is in progress When the transaction completes or has an error the ComBusy bit will be cleared At this point the function block is triggered again and the cycle will repeat continuously The reads will stop if the DoRead bit is reset 5 2 Chapter 9 5 3 RMC Read Function Block Single Read Using the RMC Read function block to perform a single read is nearly identical to the continuous reads method As compared to continuous reads the additional code is circled below The labels are all the same as for the continuous reads method Tuc 2 RMC RD 1 IE M NM DoRead ComBusy RMC_RD ep ee eee ee ae ee hee ee an ee START DST DEV ReadData 4 CONN ENABLED 16 FILE I iei EN 0 ERROR 1 M 2 S E E Ones 1556 22202 12 6 DW GIN ZEE Explanation This logic is identical to the previous example with the difference that when the when the transaction completes or has an error the DoRead bit is reset To perform another read the DoRead bit must be set 5 3 Chapter 5 54 Write Function Block Continuous Writes Follow these steps in a structured project to use the RMC Write function block to continuously write to
7. cnetreler tp your Controle RMCISEE 52 UD O on USH 9 Verify the controller image matches yours and click Finish RMCTools will connect to the controller and upload all the setting from the controller change the onntroller configuramon cick Back mki thet controler fo your project cick wv Upioad al Somn controller 2 2 Configuring the RMC s IP Address Project E Project4 RMC150 Controlleri 1 In the RMCTools Project pane expand the Modules folder and double click the RMC CPU aids gt 1815509 Ee Axes H A Programming 2 On the Ethernet page choose Use the Following IP Address and set the IP Address and Subnet Mask to values that are compatible with your PLC and network EUR _ Selecta method to assign an IP address PROFINET Obtain an IP address automatically using a DHCP server Contral Loop Firmware Use the following IP address 3 Click OK The changes will be applied SEM Subnet Mask hault Gateway 4 Onthe Controller menu click Update Flash This will save the changes in Flash memory so they will be saved even when power is removed 2 2 Ch apter 2 Setting Up the Indirect Data Map The RMC s Indirect Data is very useful for communications with a PLC Typically you will want the PLC to read from and write to a number of items 32 bit data registers in the RMC These data registers are u
8. always use single writes Commands are not intended to be sent continuously This example uses the labels Class Label Data Type VAR RMC RD 1 RMC RD VAR DoRead Bit VAR FLOAT Single 10 RMC WR VAR Bit VAR FLOAT Single Precision VAR WR 2 RMC WR VAR Bit VAR CommandData FLOAT Single Precision 0 4 VAR ComBusy Bit Explanation The RD 1 function block will continuously read when the DoRead bit is set After each read completes the ComBusy bit is reset so that if the DoWrite or DoCommand bits are set the corresponding WHR 1 WR 2 function block will start Once the write or command is complete the ComBusy is again reset and the logic continues its cycle Ladder Logic on next page gt 4 6 Chapter 4 Example Ladder Logic DoRead ComBusy K1 K18 KD kar RD 1 iir RD 1 ERRO ComBusy K1 Write Data K10 Ko 1 DOME RMC wR 1 ERRO DoCommand Com Busy K1 Command Data K25 KO Ko wR 2 DONE ET wR 2 ERRO RMC RD 1 B START W CONN W RMC FILE W RMC ELEM W NUM DW RMC WR 1 B START W CONN ESRC DEV W RMC FILE W RMC ELEM W NUM DW RMC WR 2 B START W CONN ESRC W RMC FILE W RMC ELEM W NUM DW 4 7 DST DEV E ENABLED B DONE B ERROR B ENABLED B DONE B ERROR B
9. 2 automatically assigns it an instance name WR 1 which you can change if you wish 2 Create logic and add labels as shown below The ComBusy bit prevents the function block from being triggered while the communication transaction is in progress and is very important for synchronizing multiple function blocks which will be demonstrated later Example Ladder Logic Continuous Writes DoWrite ComBusy WR 1 5 ENABLED B SET ComBusy WriteData E SRC_DEV ERROR B K56 W RMC FILE W RMC ELEM K5 W NUM DW HST ComBusy The example uses these labels Class Label Name Data Type VAR WHR 1 RMC WR VAR Bit VAR FLOAT Single Precision 0 4 Explanation The function block uses Ethernet connection 1 and will write 10 registers to address MD56 10 in the RMC The source data is in the WriteData array When the DoWrite bit is on and communications are not in progress ComBusy is off the function block starts While it is in progress the Enabled bit is set which will also set the ComBusy indicating the communication transaction is in progress When the transaction completes or has an error the ComBusy bit will be cleared At this point the function block is triggered again and the cycle will repeat continuously The reads will stop if the DoWrite bit is reset 4 4 Chapter 4 45 RMC Write Function Block Single Write Using the RMC Write fu
10. CambBusy 0 nue em M RMC RD we Eu ML EU M e ME ME e 5 c START DST_DEV headData d o qe ea fe ew MT 4 CONN ENABLED EN ENO ee ee m 16 FILE r ComBusy POR Ro gs ides eae 0 IRMCEEEM ERROR o INS 2 12 NUM DW RST oe ke M UM ee eee 2 2 ee nf eee ee ke oe EN ENO i E MEL I _ C 2120721 V TI MC d C ombBu Sy 15 E 5 B EN ENO See SU oe ee Se ae Ree LOREM ea ee 2S ae ee eee RNC WR T cR A ooo om wb OX EE BE xo BG Dro VV rite ComBusy Sm 000 Du WR a e a SET e fa 590 er 28 a gt 2VNN Ww E START ENABLED EN ENO m 29 2 2 29 9 1 22 VOIE 4 CONN DONE d gt c c ee ee eee WriteData SRC ERROR oe se ee ek ee ee ee ee a Performs a single write when 6 ARI DEED the DoWrite bitis set o 0 c 2 DW 4 my RR e UR amp Oo RR PLS RST k 2 A ee eS eee
11. List Select FB to install FB Selection FE List RMCandQCPU Ethemet Function Blocks Global Label Global RMC_RD RMC_WR 3 ir _52 507 Result RMC RD RCV SDT RD SND SDT RCV SDT enendent Element Selection A elect FB and structure used in FB local label and ii a Extended Setting Conversion Method Setting Select the conversion method when the instructions and 1 devices are invalid for the editing project in FB of the acquired ladder The Read and Write function blocks will now appear in the FB Pool in your project and some associated structured data types will have been added Chapter 3 3 3 Add the Read and Write Function Blocks Structured Project 1 In the Navigation panel choose User Library 2 Onthe Project menu choose Library then click Install a Browse to Delta s RMC FB Lib sul file b Click Open then OK Import Library to Project Library File C PlcIDeltaMoSonControlerIRMC FB Library Name OK The RMC FB Lib will now appear in the User Library list In the User Library list click on the Lock Symbol to Unlock the Library then expand RMC FB Lib then expand FB FUN You will see the RMC Read and R
12. ee EN ENO M EN ENO RR a 505 2 NI x11 4 d oW rite eee ae EM NE S ox EUR XE Ox A ORG Ex DoaGammand ComBusy moo Re ND WR M SET 08 E START ENABLED EN ENO PEU uu E ke 4 CONN DONE s 3 3 o o o n n eee ee ee ee CommandData SRC DEV ERROR ein we ew ae twee eee enews o4 RMC FILE 4 4 RST 2 0 RMC_ELEM RMC75E Axis 0 command ae area when the DoCommand 4 3 2 4 B we IEEE is set RST mo Ee EN E DO ele m RUE X e d UW d d H Ww d XqW W mw WW JU Ww X XJz WW 4 A W 5 7 Communicating With Multiple RMC s See Section 4 7 5 8 Mixing Data Types See Section 4 8 5 9 Device Usage when Using Multiple Function Blocks The structured RMC READ and RMC Write function blocks may use an unnecessarily large amount of device points when compiled This is because the ReadData output of the RMC Read and the WriteData input of the RMC Write are defined to be of arrays of length 256 The tags used with the function blocks must therefore also be of length 256
13. is off the function block starts While it is in progress the Enabled bit is set 4 2 Chapter 4 4 3 which will also set the ComBusy indicating the communication transaction is in progress When the transaction completes or has an error the ComBusy bit will be cleared At this point the function block is triggered again and the cycle will repeat continuously The reads will stop if the DoRead bit is reset RMC Read Function Block Single Read Using the RMC Read function block to perform a single read is nearly identical to the continuous reads method As compared to continuous reads the additional code is circled below The labels are all the same as for the continuous reads method RMC_RD_1 B S TART DST_DEV E ReadData DoRead ComBusy ENABLED B ComBusy uu W RMC ELEM ERROR B K5 W NUM DW HMC RD 1 DONE RST ComBusy RD 1 ERROF DoRead RST Explanation This logic is identical to the previous example with the difference that when the when the transaction completes or has an error the DoRead bit is reset To perform another read the DoRead bit must be set 4 3 Chapter 4 RMC Write Function Block Continuous Writes Follow these steps to use the RMC Write function block to continuously write to the RMC 1 Inthe Project tree click the RMC Write function block and drag it to the ladder GX Works
14. the RMC 1 In the User Library click the RMC Read function block and drag it to the ladder 2 GX Works 2 automatically assigns an instance name RMC_RD_1 which you can change if you wish Click Close 3 Create logic and add labels as shown below The ComBusy bit prevents the function block from being triggered while the communication transaction is in progress and is very important for synchronizing multiple function blocks which will be demonstrated later Example Ladder Logic Continuous Writes oo 52 g xe f 52 s o WR 1 Qo wt 5 20 4 Um XD cup owe cho x SET Eo W START ENABLED EN ENO eo eee T 4 CONN DONE d ComBusy 222000 3E 008 s W riteData SRC_DEV ERROR ee op die we eas OSS 56 FILE i PLS 2 9 cowmeousiywneswhenfie 1 EN ENO _ TETE 2 NUM DW 7 4 eee gt EN ENO 22 The example uses these labels Class Label Mame Data Type DoWrie Bit VAR VAR VAR VAR Explanation The example function block above uses Ethernet connection 4 and will write 2 registers to address MD56 10 in the RMC The source data is in the WriteData array When the DoWrite bit is on and communicatio
15. v Bit VAR Write Datz FLOAT Single Precision VAR v Bit VAR ComBsy2 Bit Explanation In the ladder logic the first two function blocks communicate with RMC1 and use the ComBsy1 bit The last two function blocks communicate with RMC2 and use ComBsy1 bit Ladder Logic on next page gt 4 8 anter 4 Example Ladder Logic DoReadl ComBsy1 K1 K18 KO KS RD 1 DOME 1_ RD 1 ERRC DoWrt1 ComBsyl K1 WriteData1 KS RMCI 1 DOME RMCI 1 ERRC DoRead ComBsy2 K18 KO KS RMC2 RD 1 RMC2 RD 1 ERRC Dorit ComBsy2 Write Data K56 KS RMC2 wR 1 DONE RMC2 1 ERRC 1 RD 1 B START DST DEV E ReadData ENABLED B ComBsy1 W RMC FILE W RMC ELEM W NUM DW RST ComBsy1 RMC1_WR_1 B START ENABLED B SET ComBsy1 E SRC_DEV W RMC FILE W RMC ELEM W NUM DW RST ComBsy1 RST DoWntl RMC2 RD 1 B START DST ReadData ENABLED B SET ComBsy2 W RMC FILE W RMC ELEM W NUM DW RST ComBsy2 RMC2 WR 1 B START ENABLED B 2 ESRC W RMC FILE W RMC ELEM W NUM DW RST ComBsy2 RST DoW int2 Chapter 4 4 8 Mixing Data Types When using a Mitsubishi PLC to communicate with an RMC the communicated data can be of type FLOAT Single Precision or Double Word It is possible
16. 0E hydraulic motion controller from Delta Computer Systems Inc Delta has created function blocks to make this process easy The iQ and L CPUs support up to 16 Ethernet connections and can therefore communicate with up to 16 RMCs although typically some of these connections will be needed for communications with other devices Other Mitsubishi modules such as the QJ71E71 100 and QJ71MT91 also support Ethernet communication with the RMC motion controllers However Delta recommends using the CPU s built in Ethernet port along with the provided RMC Read and RMC Write function blocks because this requires much less effort Requirements RMC and PLC must be connected an Ethernet network The RMC can communicate with iQ Universal CPUs or LCPUs with built in Ethernet The Serial Number of the iQ Universal CPU hardware must start with 11011 or later The PLC Programming software must be GX Works2 V1 31H or greater for iQ CPUs or V1 53F or greater for LCPUs Melsoft Navigator is not required It is assumed the user has basic knowledge of the motion controllers and RMCTools software Simple and Structured Projects This document includes instructions for a simple project with labels and for a structured project with structured ladder FBD Read the corresponding section for your project The setup procedure in the RMC setup is identical for either method Chapter 2 2 Configuration You must set up the RMC s IP ad
17. 5 6 7 8 9 2 3 Chapter 2 Understanding RMC Addresses The RMC s 32 bit data registers can be addressed in several different forms For the purposes of communications with Mitsubishi PLC s you should use the IEC form Wherever an address is displayed in RMCTools you can right click and choose the desired format Map To 54 MD8 8 Axis0 Actual Position pu Axis 1 Actual Position pu Target Position pu Description For example in the Indirect Data Map in the Reg column right click a cell point to Address Format and choose IEC Address LI Axis Actu 4 Axisl Actu The addresses will now be displayed in IEC format Axis2 Targi Comme 1 Param Mm Files and Elements The IEC address of an RMC register has two levels The first is called the file number the second is called the element number In the Mitsubishi PLC you will use the file and element numbers when communicating with the RMC Example The address for Indirect Data Item 0 in the RMC75 is MD18 0 The file is 18 The element is O Example The address for variable 7 in the RMC75 is MD56 7 The file is 56 The element is 7 Finding Addresses in the RMCTools Help You can use the RMCTools help to find the address for any register in the RMC 1 Onthe Help menu choose Help Topics 2 On the Index tab type Register Map then choose your controller type This topic list
18. Changes for the Better MITSUBISHI ELECTRIC DELTA COMPUTER SYSTEMS eee C ofa Motion Controller CPU LinkActp Out 0 Out 1 ini ec MDT SSI In Analog Out DELTA COMPUTER SYSTEMS Motion Control Ethernet 50 107100 eu his t in 1 Out 0 Out 0 001 C C 3 Out 1 Bet 1 E Res 3 a n 3 24 Cmn ast Input Cmn 3 Case gt DELTA DELTA DELTA DELTA DELTA COMPUTER SYSTEMS tne COMPUTER SYSTEMS INC SVETOME mc COMPUTER COMPUTER SYSTEMS SYSTEMS INC This book applies to the Mitsubishi Electric Corporation product components and to all subsequent releases and modifications until otherwise indicated in new editions Make sure you are using the correct edition for the level of the product MITSUBISHI ELECTRIC CORPORATION PROVIDES THIS BOOK AS IS WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE This book could contain technical inaccuracies or typographical errors Changes are made periodically to the information herein Mitsubishi Electric Corporation may make improvements and changes at any time to the product s and or program s described in this
19. For smaller reads and writes Delta recommends modifying the function blocks to use smaller ReadData and WriteData arrays If you need a combination of large and small reads and or writes you can duplicate the function blocks and rename them to indicate the size Using a function block with ReadData and or WriteData arrays that match you communications requirements will prevent wasting the device points in the PLC 5 7 Chapter 6 6 Troubleshooting the Communications This section provides some tips on troubleshooting the communications If an error occurs in the communications check the following 1 Are the PLC and RMC both connected to the network with correct IP addresses 2 Arethe PLC s Built in Ethernet Open Settings correct Is the function block s connection number CONN correct 4 Arethe function blocks RMC FILE RMC ELEMENT and NUM DW inputs correct 6 1 Event Log in RMCTools In RMCTools the primary troubleshooting tool for communications is the Event Log You can view basic information for each read or write that is performed via the communications You need to first enable this functionality in the Event Log as follows 1 In RMCTools in the Project pane double click Event Log 2 Inthe Event Log toolbar click the Properties 522 button 3 Expand Communications and click 10 100 Ethernet 4 Check the All Applications Transactions box then click OK Event Log Properties Filter Controller 10100 Eth
20. MC Write function blocks and associated SDTs The FBs are now directly available for using in your user program Do not copy and paste them into the FB FUN area of the users program this will duplicate the FBs User Library Element Selection 9 X Alpers _______ i ES a ooo T El T FB Lib 5 LI FB FUN gay RMC CLOSE RMC_RD Bp WR E HB Structured Data Types f RD 507 EE RD SND SDT 8 WR SDT H8 WR SND SDT 3 4 4 4 1 Chapter 4 Using the RMC Read and RMC Write Function Blocks Simple Project The RMC Read and RMC Write function blocks are used to communicate with the RMC In this example the RMC IP Address is 192 168 0 21 using PLC Connection 1 UDP Description of Function Blocks Simple Project The RMC Read function block inputs and outputs are as follows START Bit CONN Word RMC_FILE Word RMC_ELEMENT Word NUM_DW Word DST_DEV Word ENABLED Bit Done Bit Error Bit The function block will perform one read for each rising edge of the Start bit The connection number 1 16 as defined in the CPU s Open Settings Specify the address in the RMC to read from The number of 32 bit registers that you wish to read from the RMC The maximum is 256 The destination device for the data in the PLC Typically this is a FLOAT array Set
21. are any DMCP Errors The Read and Write function blocks use the SP SOCSEND and SP SOCROwV instructions to implement Delta s DMCP protocol The DMCP protocol itself may return an error that appears in the RCV S3 RESP CODE label For more details see the DMCP protocol UDP in the RMCTools help To see the internal errors 1 Open the function block program 2 Register the SND S2 label or ROV S2 label to the Watch window You will be able to see the errors if there are any 6 2 Revisions June 2014 Document Created and Published V1 0 oeptember 2014 Verified and updated by MEAU V1 10 Rev 1
22. book R72 149 SLSASG 001 Contents STO NIXON E iii Mitsubishi Further Reading Reference IV Delta Computer Systems Inc Further Reading Reference List essere IV Oo Mc IV Delta Computer Systems IV 1 S 1 1 1 1 simple arpd tt ctutecd 1 1 2 RMO 52 55 EL 2 1 2 1 Connecting to an with 5 2 1 2 2 Configuring the RMC s IP 0 2 2 2 3 Setting Up the Indirect Data 99 2 3 2 4 Understanding 2 4 3 FG m RI ends 3 1 3 1 Conngure the Nene dese 3 1 3 2 Add the Read and RMC Write Function Blocks Simple Project 3 3 3 3 Add the Read RMC Write Function Blocks Structured Project 3 4 4 Using the Read Write Function Blocks Simple 2 4 1 4 1 Descr
23. ch you can change if you wish Click Close 4 Create logic and add labels as shown below The ComBusy bit prevents the function block from being triggered while the communication transaction is in progress and is very important for synchronizing multiple function blocks which will be demonstrated later 5 Compile the code and write it to the PLC The communications should start when the DoRead bit is set and continuously read as long as DoRead is set Example Ladder Logic Continuous Reads TTL CE ex RD 1 i 8 8 8 DoRead RMC RD START DST SET LM 4 CONN ENABLED EN xw ws om 4 5 0 0 52500509 16 i 0 E 0 RMC ELEM ERROR 1 2 NUM DW 5 a cost 8 PLS RST Eo 4 2 EN ENO D EN ENO E 220 74s Cue DAR 2 03e 29 ioo d d d E omBu sy The example uses these labels Class Label Mame Data Type VAR DoRead Bit VAR ReadData FLOAT Single Precision 4D 1023 VAR v RMC_RD VAR Bit Explanation The example function above uses Ethernet connection 4 and will read 12 registers from address MD18 0 in the RMC placing the values in the ReadData label When the DoRead bit is on
24. dress and Indirect Data Map 21 Connecting to an with RMCTools 1 Install the RMCTools software RMCTools can be downloaded from www deltamotion com 2 Connect a USB cable from your computer to the RMC 3 Start RMCTools 4 Inthe StartUp dialog choose Create a New Project and click OK 5 Enter the Project Name and click Finish The New Controller Wizard will open 6 Choose Automatically Detect the Controller Information and click Next 7 Choose USB and click Next 2 1 Startup 3 LS veson 3 59 0 Project Name Path Project3 Users Vacob Documents AMET two deecbon d C lUsers yacob MeoOata Local we Project C sers Documents Displayunits C Users yecob Documents RMCTI Progect 10 C eere Documents LIFT 820 5 1 14 C Users Yared Local Me 3 Teeter moe Um n Ts mmt SAT T Selection from List Browse for an Existing Project DELT Documents RMCTools RMC200 Prc Browse COMPUTER SYS At startup Show Startup Winerd ex Cancel Welcome to the Project Wizard This witerd guide you rough creating Create sub folder for tis project Project edi be caved as Users Yacn Documents RMCT bois 200 Project Lrmcprot Autor 7 Start the New Controller after thes winard i fished
25. ernet Events Axes E Tada J Ethernet Link Up Down Communications Address Events 10 100 Ethernet TCP IP Events v Application Protocol Errors Application Connection Events RMCToos transactions Ethernet 1 0 Logging Requests particular events from the event log dear the check box set the combination box to None cancel _ Restore all to defaults 5 The Event Log will now show all the Ethernet communications with to the RMC For each transaction the Event Log lists the source the address and the number of registers 6 To pause the Event Log in the Event Log toolbar click the Pause button To resume it click the Hesume button 6 1 6 2 6 2 1 6 2 2 Chapter 6 Advanced Troubleshooting SP SOCSEND and SP SOCRCV Errors The RMC Read and Write function blocks use the SP SOCSEND and SP SOCRCV instructions The SP SOCSEND and SP SOCRCYV instructions may return an error code in the SND S2 label or S2 label in the function blocks For more details see the SP SOCSEND and SP SOCRCV instructions in the QnUCPU User s Manual Communication via Built in Ethernet Port SH NA 08081 1 ENG To see the internal errors 1 Open the function block program 2 Register the SND S2 label or ROV S2 label to the Watch window You will be able to see the errors if there
26. iption of Function Blocks Simple 4 1 4 2 Read Function Block Continuous 004400 4 2 4 3 RMC Read Function Block Single 4 3 4 4 Write Function Block Continuous 4 4 45 Write Function Block Single 4 5 4 6 Using Multiple Read and RMC Write Function 4 6 AY Gotmunicating Miti Mgltiple ES d iit ett Do UP ees 4 8 48 Mixing Data 4 10 5 Using the Read and Write Function Blocks Structured Project 5 1 5 1 Description of Function Blocks Structured 5 1 5 2 Read Function Block Continuous 00044200 5 2 5 3 RMC Read Function Block Single Read nennen nennen 5 3 5 4 Write Function Block Continuous 14 4 4 4 4 4 400 1 nnne 5 4 5 5 RMC Write Function Block Single VEI esses 5 5 5 6 Using Multiple RMC Read and RMC Write Function 5 6 5 4 Gommunicating With Multiple UR Orate uere Ua Du abc
27. nction block inputs and outputs are as follows START Bit CONN Word SRC_DEV FLOAT 0 1023 RMC_FILE Word RMC_ELEMENT Word NUM_DW Word ENABLED Bit Done Bit Error Bit Important The function block will perform one write for each rising edge of the Start bit The connection number 1 16 as defined in the CPU s Open Settings The source of the data in the PLC Specify the address in the RMC to write to The number of 32 bit registers that you wish to write to the RMC The maximum is 1024 oet while the write is in progress When the write completes or has an error the Enabled bit will be cleared Set when the write successfully completes This bit is cleared when the function block starts Set if the write has an error This bit is cleared when the function block starts When using multiple function blocks with the same Ethernet connection it is very important that only one function block is active at a time Follow the examples below The RMC Read and RMC Write function blocks have a built in timeout of 0 5 seconds 5 1 Chapter 5 5 2 Read Function Block Continuous Reads Follow these steps in a structured project to use the RMC Read function block to continuously read from the RMC 1 structured ladder program 2 Inthe User Library click the RMC Read function block and drag it to the ladder 3 GX Works 2 automatically assigns an instance name 1 whi
28. nction block to perform a single write is nearly identical to continuous writes As compared to continuous writes the additional code is circled below The labels are all the same WR 1 B START ENABLED B SET ComBusy DoWrite ComBusy u HEN ERROR B ESRC DEV WriteData K56 W RMC FILE W RMC ELEM K5 W NUM DW RMC_wR_1 D0NE RST ComBusy wR 1 ERROR 1 RST DoWrite This logic is identical to the previous example with the difference that when the when the transaction completes or has an error the DoWrite bit is reset To perform another read the DoWrite bit must be set 4 5 Ch anter 4 Using Multiple RMC Read and RMC Write Function Blocks It is very important that for all the function blocks that use the same Ethernet connection that only one function block is active at a time To achieve this use a bit to indicate when the communications are busy ouch a bit can be named ComBusy This method uses the same logic as shown in the previous examples You may add as many reads and writes as you wish and any of them can be continuous or single Example Continuously read items 0 9 from the RMC75E s Indirect Data Map address 9e MD 18 0 Doasingle write on demand to variable 10 on the RMC75E address MD56 10 Do a single write on demand to Axis 0 Command area in the RMC75E address MD25 0 When writing commands
29. ns are not in progress ComBusy is off the function block starts While it is in progress the Enabled bit is set which will also set the ComBusy indicating the communication transaction is in progress When the transaction completes or has an error the ComBusy bit will be cleared At this point the function block is triggered again and the cycle will repeat continuously The reads will stop if the DoWrite bit is reset 5 4 Chapter 9 5 5 Write Function Block Single Write Using the RMC Write function block to perform a single write is nearly identical to continuous writes As compared to continuous writes the additional code is circled below The labels are all the same Ee Xe e ar UR 8 29 4 4 4 CONN oe WriteData ERROR Ped T 56 FILE the DoWrite bitis set 0 10 RMC_ELEM 2 DW Explanation This example logic is identical to the previous example with the difference that when the when the transaction completes or has an error the DoWrite bit is reset To perform another read the DoWrite bit must be set 5 5 Ch apter 9 Using Multiple RMC Read and RMC Write Function Blocks It is very important that for all the function blocks that use the same Ethernet connection that only one function block is active at a time To achieve this use a bit to indicate when the communications are bus
30. s the addresses of all the registers in the RMC 2 4 Chapter 3 3 Configuration These are the steps to configure the iQ or L CPU to communicate with the RMC 31 Configure the PLC Parameters 1 Open GX Works2 and create a new for the appropriate CPU module You can choose a Simple Project with Labels or a Structured Project with Structured Ladder FBD 2 Inthe Project tree expand the Parameter node and double click M A Hig Remote Password PLC Parameter un Intelligent Function Module Global Device Comment 3 On the Built on Ethernet Port Setting tab set the IP Address Subnet Mask Pattern and Default Router IP Address to your desired values PLC Name PLC System P c File P c RAS BootFile Program SFC Device uo Assignme amp Built in Ethernet Port Setting in I O Function Setting Set Open Setting in Ethernet Configuration window SS FTP Setting Time Setting Default Router IP Address ES A Communication Data Code Binary Code C ASCII Code Enable online change FTP MC Protocol Disable direct connection to MELSOFT Do not respond to search for CPU Built in Ethernet port on network Simple PLC Communication Setting packet transfer setting Simple PLC Communication Setting IP packet transfer setting Setifitis needed Default Changed 4 Click the Open Setting button 3 1 Chapter 3
31. sually scattered in many different address locations in the RMC You can map all these items to the Indirect Data Map The PLC then simply reads and writes from the Indirect Data Map instead of from many different locations The Indirect Data Map is very useful for frequently accessed registers Larger reads or writes or less frequent ones can be done directly instead of via the Indirect Data Map EAS Project Project4 Sf RMC150 Controller1 Axes 1 In the RMCTools Project pane double click Indirect Data H Programming B Indirect DataMap x a 2 Inthe Map To column click a cell then click the ellipsis button Selection Toot d 3 Inthe Address Selection Tool browse to a desired register the RMC and click Add Int at Han Repeat for as many registers as you wish then click OK Map To Description MDS AxisO Actual Position mm 55 8 0 50 Status Bits 95 9 8 Axis1 Actual Position pu 55 09 0 Axis1 Status Bits If you plan on using the Indirect Data Map for both reading and writing it is good practice to set one area of the Indirect Data Map for reading and the other for writing For example this Indirect Data Map was set up to include Axis 0 and Axis 1 status information in a read area and some variables in a write area DaMD 56 0 D StartProgram Sa MD 56 1 1 Position1 a MD 56 2 2 PositionZ 0 1 2 3 4
32. that the read or write data contains items of both data types For example in the following Indirect Data Map the first two items are REALs and the last two items are DWORDs These RMC data types correspond to FLOAT Single Precision and Double Word in the Mitsubishi CPU Reg Map To Description Current oMD18 0 MD8 8 AxisQ Actual Position pu 5 0 1 18 1 9409 8 Axis1 Actual Position pu 50 000004 2 018 2 0 AxisQ Status Bits 16404002241 3 eMD18 3 409 0 Axis1 Status Bits 16304003244 a A Reading these four values with one function block in the PLC will result in an array containing data with different types The data itself will be correct but one of the types will be displayed incorrectly To remedy this use the BMOV instruction to copy the values to an array of the correct type or to a label defined by a structured data type The example logic below shows logic that reads the shown above in the Indirect Data Map address MD18 0 The circled item below is the BMOV that copies the third and fourth items to the label array StatusBits of type Double Word Notice that the number of words to copy K4 in the BMOV instruction below must be twice the number of registers to copy because the is in 16 bit units and the RMC registers are 32 bits Class Label Name Data Type RD 1 RMC RD VAR v Bit VAR FLOAT Single Precision0 10 VAR StatusBits Double Word Signed l 1 VAR v Bit
33. us 5 7 S ME D euDr icuhie ptm 5 7 5 9 Device Usage when Using Multiple Function Blocks 5 7 6 Troubleshooting the 6 1 6 1 Event 6 1 5 2 Advanced Troubleshooting oue eic 6 2 cect ence 1 ii R72 149 SLSASG 001 FURTHER READING REFERENCE LIST Mitsubishi Further Reading Reference List QnUCPU User s Manual Communication via Built in Ethernet Port SH NA 08081 1 ENG MELSEC L CPU Module User s Manual Built In Ethernet Function SH NA 080891 ENG Delta Computer Systems Inc Further Reading Reference List RMCTools User Manual DMCP Protocol http www deltamotion com pdf rmctools pdf RMC70 Startup Guide RMC150 Startup Guide ATTACHMENTS Mitsubishi Attachments FBs Simple MEAU gxw GX Works2 File RMC FBs Structured TCP MEAU gxw Works2 File Ethernet FB qxw GX Works2 Function Block Library File Simple Project FB Lib sul GX Works2 Function Block Library File Structured Project Delta Computer Systems Attachments RMC75MitsuDemo rmcproj RMC75E File iV R72 149 SLSASG 001 1 1 1 Chapter 1 Introduction This document describes how to set up a Mitsubishi iQ or L CPU with a built in Ethernet port to communicate with an RMC75E or RMC15
34. while the read is in progress When the read completes or has an error the Enabled bit will be cleared Set when the read successfully completes This bit is cleared when the function block starts Set if the read has an error This bit is cleared when the function block starts The RMC Write function block inputs and outputs are as follows START Bit CONN Word SRC_DEV Word RMC_FILE Word RMC_ELEMENT Word NUM_DW Word ENABLED Bit Done Bit Error Bit Important The function block will perform one write for each rising edge of the Start bit The connection number 1 16 as defined in the Open Settings The source device of the data in the PLC Typically this is a FLOAT array Specify the address in the RMC to write to The number of 32 bit registers that you wish to write to the RMC The maximum is 256 oet while the write is in progress When the write completes or has an error the Enabled bit will be cleared Set when the write successfully completes This bit is cleared when the function block starts Set if the write has an error This bit is cleared when the function block starts When using multiple function blocks with the same Ethernet connection it is very important that only one function block is active at a time Follow the examples below The RMC Read and RMC Write function blocks have a built in timeout of 0 5 seconds 4 1 Chapter 4 4 2
35. y Such a bit can be named ComBusy This method uses the same logic as shown in the previous examples You may add as many reads and writes as you wish and any of them can be continuous or single Example Continuously read items 0 11 from the RMC75E s Indirect Data Map address MD18 0 Doasingle write on demand to variable 10 on the RMC75E address MD56 10 Do a single write on demand to Axis 0 Command area in the RMC75E address MD25 0 When writing commands always use single writes Commands not intended to be sent continuously This example uses the labels Class Label Mame Data Type VAR RMC RD 1 RMC RD VAR DoRead Bit VAR ReadData FLOAT Single Precision yD 1023 VAR RMC WR VAR Bit VAR FLOAT Single 0 1023 VAR WR DoCommand Bit VAR CommandData FLOAT Single PrecisionW0 1023 VAR ComBusy Bit Explanation The RD 1 function block will continuously read when the DoRead bit is set After each read completes the ComBusy bit is reset so that if the DoWrite or DoCommand bits are set the corresponding WR 1 RMC WR 2 function block will start Once the write or command is complete the ComBusy is again reset and the logic continues its cycle Ladder Logic on next page gt 5 6 Chapter 5 Example Ladder Logic WILD PUE RRE gt gt 1 12711 1 7 DaRead

Download Pdf Manuals

image

Related Search

Related Contents

Closet Maid Storage Chest STCH User's Manual  取扱説明書 [保証書付]  Manuale DB04-08  e-Con for Dynamics NAV - e    Sunny Mini Central 5000 y 6000 Inversor Central para Centrales      FICHE CONSEIL Peinture et Papier Peint Peinture  LINAX 4000L Registrador de trazo contínuo  

Copyright © All rights reserved.
Failed to retrieve file