ModbusTCP: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Mb (Diskussion | Beiträge) |
Mb (Diskussion | Beiträge) |
||
Zeile 1: | Zeile 1: | ||
=Mbpoll Examples= | =Mbpoll Examples= | ||
− | * The following examples are showing how to get | + | * The following examples are showing how to get some information from '''Expert Power Control 8221''' using Modbus TCP protocol. |
− | * as Modbus TCP | + | * as Modbus TCP client we are using '''[https://github.com/epsilonrt/mbpoll mbpoll]''' |
Zeile 96: | Zeile 96: | ||
echo '00010000000601010000000c' | xxd -r -p | nc epc8221.gudetest 502 | echo '00010000000601010000000c' | xxd -r -p | nc epc8221.gudetest 502 | ||
− | as shown by this WireShark PCAP | + | as shown by this WireShark PCAP trace file [http://files.gude.info/misc/read_coil_ports.pcap.gz] : |
[[Datei:Modbus_read_coil_ports.png]] | [[Datei:Modbus_read_coil_ports.png]] |
Version vom 27. Juli 2018, 15:52 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] :