Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How to talk with my RS485 Modbus devices

by Anonymous Monk
on Jul 18, 2021 at 09:40 UTC ( [id://11135128]=note: print w/replies, xml ) Need Help??


in reply to How to talk with my RS485 Modbus devices

try stuff?

modpoll -b 4800 # Baudrate -p none # No parity -a 1 # Slave address (1-255 for serial, 0-255 for TCP, 1 is d +efault -r 13 # Start reference (1-65536, 1 is default) -c 1 # Number of values to read (1-125, 1 is default), option +al for writ ing (use -c 1 to force FC5 or FC6) /dev/ttyUSB0

so

my $client = Device::Modbus::RTU::Client->new( port => '/dev/ttyUSB0', baudrate => 4800, parity => 'none', ); my $req = $client->read_holding_registers( address => 1, # -r quantity => 1, #-c ); $client->send_request($req); my $resp = $client->receive_response;

https://grep.metacpan.org/search?q=start&qd=Device-Modbus&qft=

https://metacpan.org/release/JFRAIRE/Device-Modbus-RTU-0.022/source/examples/simple_client_rtu.pl

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11135128]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-19 12:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found