ModbusTCP: Unterschied zwischen den Versionen

Aus Gude Systems GmbH
Zur Navigation springen Zur Suche springen
Zeile 7: Zeile 7:
  
 
===Device Summary===
 
===Device Summary===
  ./mbpoll epc8221.gudetest -c 6 -t 3 -r 0 -0 -1
+
  mbpoll epc8221.gudetest -c 6 -t 3 -r 0 -0 -1
  
 
  mbpoll 0.1-23 - FieldTalk(tm) Modbus(R) Master Simulator
 
  mbpoll 0.1-23 - FieldTalk(tm) Modbus(R) Master Simulator
Zeile 29: Zeile 29:
  
 
===Line Sensors===
 
===Line Sensors===
  ./mbpoll epc8221.gudetest -c 12 -t 3 -r 0x400 -0 -1
+
  mbpoll epc8221.gudetest -c 12 -t 3 -r 0x400 -0 -1
  
 
  mbpoll 0.1-23 - FieldTalk(tm) Modbus(R) Master Simulator
 
  mbpoll 0.1-23 - FieldTalk(tm) Modbus(R) Master Simulator
Zeile 60: Zeile 60:
 
===Port Status===
 
===Port Status===
  
  ./mbpoll epc8221.gudetest -c 12 -t 0 -r 0 -0 -1
+
  mbpoll epc8221.gudetest -c 12 -t 0 -r 0 -0 -1
  
 
  mbpoll 0.1-23 - FieldTalk(tm) Modbus(R) Master Simulator
 
  mbpoll 0.1-23 - FieldTalk(tm) Modbus(R) Master Simulator

Version vom 27. Juli 2018, 15:58 Uhr

Mbpoll Examples

  • The following examples are showing how to get some information from Expert Power Control 8221 using Modbus TCP protocol.
  • as Modbus TCP client we are using mbpoll


Input Registers

Device Summary

mbpoll epc8221.gudetest -c 6 -t 3 -r 0 -0 -1
mbpoll 0.1-23 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright (c) 2015 epsilonRT, All rights reserved.
This software is governed by the CeCILL license <http://www.cecill.info>

Protocol configuration: Modbus TCP
Slave configuration...: address = [1]
                        start reference = 0, count = 6
Communication.........: epc8221.gudetest, port 502, t/o 1.00 s, poll rate 1000 ms
Data type.............: 16-bit register, input register table


[0]: 	12    // Number of Ports (Relay)
[1]: 	0     // Number of Ports with Energy Measurement
[2]: 	2     // Number of Banks
[3]: 	1     // Lines per Bank
[4]: 	1     // Phases per line
[5]: 	0     // Number of Inputs


Line Sensors

mbpoll epc8221.gudetest -c 12 -t 3 -r 0x400 -0 -1
mbpoll 0.1-23 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright (c) 2015 epsilonRT, All rights reserved.
This software is governed by the CeCILL license <http://www.cecill.info>

Protocol configuration: Modbus TCP
Slave configuration...: address = [1]
                        start reference = 1024, count = 12
Communication.........: epc8221.gudetest, port 502, t/o 1.00 s, poll rate 1000 ms
Data type.............: 16-bit register, input register table

-- Polling slave 1... Ctrl-C to stop)
[1024]: 	1
[1025]: 	25266
[1026]: 	0
[1027]: 	0
[1028]: 	0
[1029]: 	224
[1030]: 	0
[1031]: 	0
[1032]: 	0
[1033]: 	4997
[1034]: 	0
[1035]: 	31


Read Coils

Port Status

mbpoll epc8221.gudetest -c 12 -t 0 -r 0 -0 -1
mbpoll 0.1-23 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright (c) 2015 epsilonRT, All rights reserved.
This software is governed by the CeCILL license <http://www.cecill.info>

Protocol configuration: Modbus TCP
Slave configuration...: address = [1]
                        start reference = 0, count = 12
Communication.........: epc8221.gudetest, port 502, t/o 1.00 s, poll rate 1000 ms
Data type.............: discrete output (coil)

-- Polling slave 1...
[0]: 	1
[1]: 	0
[2]: 	0
[3]: 	1
[4]: 	1
[5]: 	1
[6]: 	1
[7]: 	0
[8]: 	0
[9]: 	0
[10]: 	0
[11]: 	0


Low Level Examples

Read Coils

Port Status

The mbpoll command above is equivalent to the the following low level command:

 echo '00010000000601010000000c' | xxd -r -p | nc epc8221.gudetest 502 

as shown by this WireShark PCAP trace file [1] :

Modbus read coil ports.png