Device::Modbus::ASCII - Modbus ASCII communications for Perl
#! /usr/bin/env perl use Device::Modbus::ASCII::Client; use strict; use warnings; use v5.10; my $client = Device::Modbus::ASCII::Client->new( port => '/dev/ttyUSB0', baudrate => 19200, parity => 'even', ); my $req = $client->read_holding_registers( unit => 4, address => 0, quantity => 2, ); $client->send_request($req); my $resp = $client->receive_response;
This distribution implements the Modbus ASCII protocol on top of Device::Modbus. It includes only a client, Device::Modbus::ASCII::Client, which is based on Device::Modbus::Client. See this last module for the core of the documentation.
This distribution came to life thanks to Stefan Parvu from Kronometrix. It was his motivation, dedication and support that made this module possible.
These are other implementations of Modbus in Perl which may be well suited for your application: Protocol::Modbus, MBclient, mbserverd.
You can find the repository of this distribution in GitHub.
Julio Fraire, <julio.fraire@gmail.com>
Copyright (C) 2017 by Julio Fraire This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.
To install Device::Modbus::ASCII, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::Modbus::ASCII
CPAN shell
perl -MCPAN -e shell install Device::Modbus::ASCII
For more information on module installation, please visit the detailed CPAN module installation guide.