I'm trying to figure out how to use the Modbus API. I've read quite a bit and watched some tutorials but there are still things that I am struggling with.
1) Why is there a Master API and Slave API ?
2) Do the read/write VIs in the API automatically assign the correct function codes based on what you are trying to read/write?
This NI page(The Modbus Protocol In-Depth - NI) lists the standard function codes. Based on that, I'm assuming the 'Read Holding Registers.vi' will assign a function code of 03.
3) My device has a function code (H10) which does not appear in this standard function code. How can I send this frame?
4) The documentation for my device states that I need to provide 'Number of Elements' in the field. This is the description of what 'Number of Elements' is:
The address for my parameter also varies depending on whether I'm using 4-byte mode and 2-byte mode:
I don't understand this part. Does the API handle the byte mode and adjust what 'Number of Elements' should be?
Thanks in advance!