04-09-2011 03:25 AM
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.
05-05-2011 06:03 AM
This discussion follows in this CVI forum thread