Skip to content

I've implemented modbus client request/responses 1-6,15,16#4

Open
behrat wants to merge 4 commits intoTooTallNate:masterfrom
behrat:master
Open

I've implemented modbus client request/responses 1-6,15,16#4
behrat wants to merge 4 commits intoTooTallNate:masterfrom
behrat:master

Conversation

@behrat
Copy link

@behrat behrat commented Jun 9, 2013

The device I'm currently working with only supports functions 1,2,5,15,16, so the others are untested. The code should be the other functions should be very similar, but still... untested. The device also only has a single coil to test with.

Thanks for your previous work. Hopefully you can push this to the npm repository. :)

-Braden

@behrat
Copy link
Author

behrat commented Apr 27, 2015

Hi amechti,

Here's what I'm using in some of my code:

var req = client.request(
        modbus.FUNCTION_CODES.WRITE_MULTIPLE_REGISTERS,
        16, // Start at this register address
        [52429,15820] // Make an array for all the consecutive registers you want to write
);

The starting address is 16 in this example, the values are in the array, and the quantity is determined by the array length.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're not assigning the result of map() to anything here!

@amechti
Copy link

amechti commented May 20, 2015

I'm really sorry to be late for my response.
Thank you very much behrat it's done .
TooTallNate i'havn't understand your question !!

@lamyra
Copy link

lamyra commented Jun 10, 2015

Hi,
Please i need to have an fonction that englobe all of function for example function 1 2 and 3 in the same ap.js. Not need to change code function every time.
And i need to know if i can enter code function and address from my interface and have the result not from console Thanx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants