Skip Menu |

This queue is for tickets about the Protocol-Modbus CPAN distribution.

Report information
The Basics
Id: 95713
Status: open
Priority: 0/
Queue: Protocol-Modbus

People
Owner: Nobody in particular
Requestors: kas [...] fi.muni.cz
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.10
Fixed in: (no value)



Subject: RTU.pm calls $req->frame()
It seems that the RTU driver attempts to call $req->frame() method at line 158, while the "sub frame" is defined only in Modbus::Response, not in Modbus::Request: use Protocol::Modbus; my $proto = Protocol::Modbus->new( driver => 'RTU', transport => 'Serial', ); my $request = $proto->readHoldRegistersRequest( address => 600, quantity => 9, unit => 1, ); I am new to Modbus, so I hope the above example is not broken. It dies with Can't locate object method "frame" via package "Protocol::Modbus::Request" at /usr/local/share/perl5/Protocol/Modbus/RTU.pm line 158.
Il Ven 16 Maggio 2014 12:59:27, YENYA ha scritto: Show quoted text
> It seems that the RTU driver attempts to call $req->frame() method at > line 158, while the "sub frame" is defined only in Modbus::Response, > not in Modbus::Request:
Show quoted text
> my $proto = Protocol::Modbus->new( > driver => 'RTU', > transport => 'Serial', > );
I believe this problem is linked to the fact that Serial transport was never implemented. Only the TCP/IP driver is functional (and likely ever will be, unless somebody steps up and implements the remaining Serial-related bits)... I understand this is not what you wanted to hear.
Subject: Re: [rt.cpan.org #95713] RTU.pm calls $req->frame()
Date: Thu, 29 May 2014 16:49:53 +0200
To: Cosimo Streppone via RT <bug-Protocol-Modbus [...] rt.cpan.org>
From: Jan Kasprzak <kas [...] fi.muni.cz>
Cosimo Streppone via RT wrote: : <URL: https://rt.cpan.org/Ticket/Display.html?id=95713 > : : Il Ven 16 Maggio 2014 12:59:27, YENYA ha scritto: : : > It seems that the RTU driver attempts to call $req->frame() method at : > line 158, while the "sub frame" is defined only in Modbus::Response, : > not in Modbus::Request: : : > my $proto = Protocol::Modbus->new( : > driver => 'RTU', : > transport => 'Serial', : > ); : : : I believe this problem is linked to the fact that Serial transport was never implemented. Only the TCP/IP driver is functional (and likely ever will be, unless somebody steps up and implements the remaining Serial-related bits)... : : I understand this is not what you wanted to hear. Well, some answer is better than none :-). It looks like I will have several MODBUS devices in our new building, so I might even try to implement the serial support myself. -Yenya -- | Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> | | New GPG 4096R/A45477D5 - see http://www.fi.muni.cz/~kas/pgp-rollover.txt | | http://www.fi.muni.cz/~kas/ Journal: http://www.fi.muni.cz/~kas/blog/ | There's clearly a balance between "octopus merges are fine" and "Christ, that's not an octopus, that's a Cthulhu merge". --Linus Torvalds