# $d as data # $mbc as ModBusControl # $r as response my ( $d, $mbc, $r )=( shift, MBclient->new(), undef ); #### my $data = shift; my $mod_bus_control = MBClient->new; my $response = undef; #### $mbc->host ( $d->{ip} ); $mbc->port ( $d->{port} ); $mbc->unit_id ( 0 ); #### $mbc->host( $d->{ip} ); $mbc->port( $d->{port} ); $mbc->unit_id( 0 );