03-03-2009 02:07 PM
Hi,
I am using the Modbus Library to communicate with a VFD to control a fan. I am using the master write and read vi. I can write data to the VFD and get the fan to do what I want. The VFD is supposed to send a confirmation packet after I tell it to do something and I can also read its registers. When I debug the VI it shows the problem is the buffer always reads zero and the VI timesout. If I watch the lights of the USB to RS 485 adapter I am using to interface with the VFD, I see that the RX light flashs right after I send a message. So I should have something in the buffer. Does anyone have any suggestions?
Aaron
Solved! Go to Solution.
03-03-2009 03:25 PM
Hi Aaron:
Recently I had a problem similar to yours in an application made to communicate LabVIEW with a Unitronics OPLC via Modbus TCP. When using the "MB Ethernet Master Query.vi" to read or write some registers, I always received the Timeout error after reading or writing. I found out that it was caused because I left the input "MBAP Header" unwired, and the default values of (0,0) in the cluster never worked for me. So, for testing purpuses I wired a (1,1) cluster, and It started to work.
Hope this helps.
Robst.
Robst - CLD |
Using LabVIEW since version 7.0 |
03-04-2009 04:14 AM
Several possibilities. You could be trying to write to addresses that are read only. Could be using the wrong modbus command, wrong address ranges,...
Try using portmon or NI Spy to monitor the serial port hex code and post the data for what is transmitted and what is received from the device. Do you have an indicator wired to the error out terminals??
03-04-2009 10:00 AM