• Stars
    star
    113
  • Rank 310,115 (Top 7 %)
  • Language
    Perl
  • License
    MIT License
  • Created over 11 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple Modbus/TCP client write in pure Perl.

NAME

mbtget - Simple perl script for make some modbus transaction from the command line.

DESCRIPTION

Modbus is a standard serial communication protocol used to interconnect industrial PLC (and a lot of other things). This module gives you access to TCP and RTU version of this protocol, through the MBclient object.

You can have a look at http://en.wikipedia.org/wiki/Modbus for details.

INSTALL

You can install this module from:

GitHub:

git clone https://github.com/sourceperl/mbtget.git
cd mbtget
perl Makefile.PL
make
sudo make install

DEPENDENCIES

This script requires no other module or librarie.

It's pure Perl code without any extension.

USAGE

read mbtget help

pi@raspberrypi ~ $ mbtget -h

read a word data at address 1000 on modbus server 127.0.0.1

pi@raspberrypi ~ $ mbtget -a 1000 127.0.0.1

values:
1 (ad 01000): 52544

read 10 words data at address 1000 on modbus server plc-1.domaine.net

pi@raspberrypi ~ $ mbtget -n 10 -a 1000 plc-1.domaine.net

values:
1 (ad 01000): 52544
2 (ad 01001): 33619
3 (ad 01002): 61010
4 (ad 01003): 11878
5 (ad 01004): 60142
6 (ad 01005): 21714
7 (ad 01006): 14182
8 (ad 01007): 64342
9 (ad 01008): 18511
10 (ad 01009): 59909

write a word value of 333 at address 1000 on modbus server 127.0.0.1 with dump mode active

pi@raspberrypi ~ $ mbtget -w6 333 -a 1000 -d 127.0.0.1
Tx
[10 01 00 00 00 06 01] 06 03 E8 01 4D
Rx
[10 01 00 00 00 06 01] 06 03 E8 01 4D

word write ok

BUGS

Thanks to report issues at https://github.com/sourceperl/mbtget/issues

AUTHOR

Loic Lefebvre, <[email protected]>

COPYRIGHT & LICENSE

Copyright 2014 Loic Lefebvre

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

pyModbusTCP

A simple Modbus/TCP library for Python
Python
294
star
2

rpi.rtc

A Python module to deal with DS1302 RTC chip on Raspberry Pi
Python
28
star
3

smartplugctl

Little utility for control Awox BLE smartPlug SMP-B16-FR
Python
19
star
4

tiny.serial

Software UART for ATTiny85
C
17
star
5

millis

Implementation of millis() (like in Arduino IDE) on AVR microcontrollers ATTiny85
C
10
star
6

modbus-serial-monitor

Python script to check traffic between serial modbus RTU devices
Python
10
star
7

mbserverd

A simple modbus/TCP server write in pure Perl.
Perl
9
star
8

MBclient

Modbus/TCP client Perl module (pure Perl code)
Perl
9
star
9

arduino.yun.ikea-fado

Hack of an Ikea Fado lamp with Arduino Yun and RGB Neopixel. Use MQTT protocol to set the color.
Arduino
5
star
10

pymbserver

A python multithreaded modbus/TCP server (support function 1, 2, 3, 4, 5, 6, 15 and 16)
Python
5
star
11

docker.thingspeak

Docker container for thingspeak IoT platform (use compose for multi-container purpose)
4
star
12

rpi.backup

A useful set for backup or restore a Raspberry.
Shell
4
star
13

docker.mosquitto

Docker image for mosquitto MQTT broker.
4
star
14

py.sensor

Python tool for interface with Telecom Design Sensor platform
Python
3
star
15

sig2mqtt

Simple node.js gateway between Sigfox-backend HTTP callback and local MQTT broker
JavaScript
3
star
16

tiny.spi

Spi test with nRF24L01+ on an ATTiny84
C
3
star
17

msp430.nrf-scan

MSP430 with nRF24L01+ for scan ISM band
C
3
star
18

rpi.lcd-i2c

Raspberry Pi I2C LCD Python driver
Python
2
star
19

arduino.sendswitch

Tiny code for Arduino GSM shield (base on SM5100b chip) use to manage relay with SMS command.
Arduino
2
star
20

arduino.spybox

A tool to spy modbus RTU protocol on RS-485 differential line (arduino MKR Zero + MKR 485 shield)
C++
2
star
21

iot.server

Simple key/value storage server with embeded freeboard dashboard
JavaScript
1
star
22

msp430.uart

Still in dev. Don't use it !
C
1
star
23

arduino.serial-spy

A tool for spy serial line from an Arduino Mega 2560 and DUE
C++
1
star
24

docker.cookbook

Some useful docker images
Python
1
star
25

arduino.gsm_sms

Tiny code for manage SMS and RSSI on Arduino official GSM shield (base on Quectel M10 chip).
Arduino
1
star
26

rpi.servers

A list of pre-configured servers for Raspberry Pi platform
Shell
1
star
27

pyRedisMailGateway

A Gateway between Redis (pub/sub) and IMAP/SMTP mail protocols
Python
1
star
28

arduino.akeru

Arduino scripts for Snootlab Akeru Sigfox board
C++
1
star
29

utils

Shell
1
star
30

sigduino.solar

Solar station reporting with Arduino (ATMega328P 3V powered with 8 MHz XTAL, BOD set at 1.8V) and Sigfox UNB modem
C++
1
star
31

msp430.nrf-sender

Experimental (don't use it now)
C
1
star
32

ecotools

Python scripts to deal with energy consumption alert signals (ecogaz, ecowatt) of French grid operators
Python
1
star
33

rpi.webcam.pi3

A Raspberry Pi3 webcam project (Rpi camera + WPA WiFi access point with internal chip) —
Python
1
star
34

micropython.cookbook

Python
1
star