LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Based on LabWindows/CVI using Modbus communication by means of RS-232

 

This is the part of the writeto slave code which is causing error.

 

 

if (GetInQLen (portNo) < mb.bRcvd) {
comerr = kRS_IOTimeOut;
goto Error;
}

 

 

0 Kudos
Message 21 of 26
(1,871 Views)

The function you are using is waiting for 8 bytes response, which reflects Modbus standard for function code 0x10: Preset multiple registers.

Is your device capable to handle such a function?  Or can it only accept function code 0x06: Preset single register? If the device cannot handle function 0x10 it will not give any response, thus your timeout error. Device capabilities are normally described in the documentation.



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 22 of 26
(1,866 Views)

Hi,

 

My project is related to ModBus CVI  applications.  I'm still using CVI 7.1.

 

The sample files in the forum has been removed.  Probably too long time ago.  Would you mind to post it again.

 

Many thanks.

0 Kudos
Message 23 of 26
(1,386 Views)

I reloaded the document you are referring to: it is now waiting for approval. I will post here when it will be available for download.



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 24 of 26
(1,378 Views)

The document we are referring to has been published and is now available here



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?
Message 25 of 26
(1,354 Views)

Thank you Roberto.

 

I'll try it.

0 Kudos
Message 26 of 26
(1,344 Views)