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.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Modbus RTU Timeout Error

Hello,

 

I have problem with communication with Mitsubishi Electric 96NSR via Modbus RTU. Device has RS485-USB converter. I tested connection in MAX. I can write, but when I try to read, I encounter Timeout Error (Hex 0xBFFF0015). Could anyone help me with my problem? I use Labview 2015 (32 bit)/ Windows 10

 

MAX Settings:
Baud rate: 38400

Parity: none

Flow control: none

Data bits: 8

Stop bits: 2

Timeout: 2000 ms ( I tried also 10000ms )

 

PS. I checked the connection with Modbus Poll with same settings and it worked fine.

 

0 Kudos
Message 1 of 10
(17,288 Views)

Are you sure your device is sending data?

 

Can you provide code?



-Matt
0 Kudos
Message 2 of 10
(17,277 Views)

Thank you for reply.

Yes, I`m sure of that. I checked the hardware with non-Labview software and it works (sends data properly).

 

I added code (NI Modbus library required), but it`s in early stadium.  

 

0 Kudos
Message 3 of 10
(17,274 Views)

What version of Modbus are you using? I installed the latest version and the libraries appear very different. You said it was an older version.  Is there a reason you arent updating the version? Also what version is it?



-Matt
0 Kudos
Message 4 of 10
(17,266 Views)

NI Modbus Library 1.2.1 from http://www.ni.com/example/29756/en/

The reason I `m not updating library is, this code was written by another student, who had similiar thesis and back then code worked. I thought I needed exact version of the library so Labview detects functions. Do you think it is possible, that library causes the error? Does library affect MAX?

 

 

0 Kudos
Message 5 of 10
(17,264 Views)

Im not sure ill be much help at this point, have you checked the compatibility of the modbus version with your labview version and windows 10? Have you also confirmed the hardware is working in max? Also is the timeout frequent or just random?

 

take a look through this link.

http://forums.ni.com/t5/LabVIEW/LV-Modbus-library-1-2-1-Error-code-6101-timeout/td-p/3153674/page/2

 



-Matt
0 Kudos
Message 6 of 10
(17,262 Views)

I`ve got timeout error every single time when I run the program. Could you talk me through how can I confirm work of device in MAX? Maybe I`m doing something wrong, it is my first time using it.

I didn`t find out any compatibility problems with my software.

Thank you very much for your replies.

0 Kudos
Message 7 of 10
(17,253 Views)

Well, I read the topic you gave me and I tried Modbus API example program (https://decibel.ni.com/content/docs/DOC-30140) and it worked! ( There were no errors)

So the problem has to be in the library. Could you tell me what version of NI Modbus library do you have?

Could you explain to me why program works and in the same time, MAX give me timeout error?

 

Second thing is, Modbus API is way too advanced. My thesis supervisor wants me to build communication with measurement device "from scratch" (meaning using NI VISA functions) Could you give me some advice or point me some sources I can begin with? I`m talking about serial Modbus RTU in Labview. I tried examples in Labview (simple serial.vi), but I have no response.

Many, many thanks for your help, now and in advance.

Best regards

Michał

0 Kudos
Message 8 of 10
(17,244 Views)

Well i cant explain why that version wasnt working, possibly some incompatibilty.  Just to confirm youre going to use modbus or visa in labview? for either you can go to the help in labview and find examples.  there you can search for examples, thats always a good place to start.  If you need more information you can always search the ni website, and if you have difficult with serial control post to the labview forum page, there is always more people monitoring that page.  



-Matt
0 Kudos
Message 9 of 10
(17,236 Views)

My device uses Modbus RTU protocol.  I`m going to use NI Visa library to establish communication via Modbus RTU ( I was told that is possible). Please, if you have any thoughts on this, share with me. I struggle with communication for 2 months now.

 

Best regards

Michał

 

 

0 Kudos
Message 10 of 10
(17,234 Views)