Skip to content

Native Function to Slave devices #45

Description

@timoteo7

Hi!
First, I would to thank you for your wonderful library.

Can you help with some code to Native Functions in Slave Devices ?
I tried that:

var native = require('modbus').native;

var ctx = native.new_rtu('/dev/ttyACM1',38400,'N', 8 ,1 );
native.connect(ctx);
native.set_slave(ctx,1);
var rc = native.read_registers(ctx, 0, 1, tab_reg);

But it doesn't seems to work.

Can you give some help with that?

Thanks in advance,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions