CIP Modbus Object Read Example
Learn how to set up communication between Unity and M340 PLCs using Explicit Messaging for CIP Modbus Read. Detailed guide with configuration steps for seamless data exchange.
CIP Modbus Object Read Example
E N D
Presentation Transcript
CIP Modbus Object ReadExample M340 BMXNOC0401 usingExplicit unconnected_send request via DATA_EXCH to a Quantum 140NOC78000 Dec, 17, 2012 Rev 1.0
100.100.100.102 100.100.100.103 Unity7 PLC Hardware Configuration • BMXNOC0401 (100.100.100.103) to query NOC78000 (100.100.100.102) with Explicit Messaging CIP Modbus Object Read holding register • The USB connection is for Unity to M340 PLC communications.
M340 Unity Program • Note to add the ‘Pin negation’ on the activity bit ManagParam[0].0 • Configuring the DATA_EXCH ADR Input: • ADDM(‘0.1.0{100.100.100.102}UNC.CIP’) • Rack = 0 Module (Slot Number) = 1 Channel = 0 Remote Device IP address = 100.100.100.102 • Message Type = Unconnected_send Protocol = CIP
Declaring Variables 1- data to send / CIP Request header 24 bytes message footer Length of data to send in ManagParam[3] The DataToSend array has 3 part: the header (5 first word), the message (5 next word), the footer (2 last word)
Declaring Variables 2- Management parameters (array of 4 INT) 3- Reception data (array of 53 INT)
Example program in Quantum PLC • This data is incrementing every sec in the PLC to observe the data changing in the response. %MW2 is referring to the DataToSend[8], first and only Word to be read in this example