From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI User Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Based on LabWindows​/CVI using Modbus communication via RS-232

LabWindows/CVI does not have the Modbus library,but we often need Modbus communication protocal based on CVI.

Now I meet a problem that Modbus protocal is required in my program.

My original program didn't use modbus protocal becasuse I don't know how to use modbus protocal.

I've read the protocal PDF.I'm confused how to calculate the address and the numbers of registers in my procedure.See the attachments yibiaoxianshi.jpg and xitongceshi.jpg.

Someone who can tell me how to calculate the adress and the numbers of registers.

There is CRC code in the modbus protocal ,but I don't know if we can use it directly.

As there are different data types between modbus and CVI,how to convert the data type ?

I have known I should use function code 0x03 in my program.

I need RS232 to communicate with it,so I have only one serial port setup in my user interface.See the attachment chuankoupeizhi.jpg.

My colleague tells me to use different address if I adopt modbus communication protocal.

In that case,I need to change my serial port setup menue to access the required function panel when running.

I don't know that is feasible in practical applications.

Please give a hint,your advice is highly appreciated. Thanks.

I wouldn't care success or failure,for I will only struggle ahead as long as I have been destined to the distance.
Download All
0 Kudos
Message 1 of 2
(10,256 Views)

This discussion follows in this CVI forum thread



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(4,622 Views)