Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69503

LabVIEW Modbus API

$
0
0

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?

MrXXX_0-1632291449295.png

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:

MrXXX_1-1632291759236.png

The address for my parameter also varies depending on whether I'm using 4-byte mode and 2-byte mode:

MrXXX_2-1632291964739.png

I don't understand this part. Does the API handle the byte mode and adjust what 'Number of Elements' should be?

 

Thanks in advance!


Viewing all articles
Browse latest Browse all 69503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>