10-14-2016 09:09 AM
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.
10-14-2016 10:15 AM
Are you sure your device is sending data?
Can you provide code?
10-14-2016 10:27 AM
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.
10-14-2016 12:14 PM
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?
10-14-2016 12:44 PM
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?
10-14-2016 12:53 PM
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
10-14-2016 03:35 PM
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.
10-14-2016 05:25 PM
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ł
10-14-2016 05:53 PM
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.
10-14-2016 06:28 PM
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ł