LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial RS-232 Error: (0xbfff0015) Timeout Expired Before Operation Completed

Hello,

 

      I am trying to monitor some holding registers on a KEP Supertroll 2 flow computer via modbus RTU RS-232. I have a DB9 to USB cable.

 

      I have followed as many of the troubleshooting steps that an can from the NI suggestions: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019L3mSAE&l=en-US

            I have confirmed that everything is connected properly

            I have confirmed the cable is working properly via the recommended serial loopback test

            I have run the shipping example with the same timeout result.

            I have completed an I/O trace (I will attached the results of the trace)

 

Based on the results of the trace and that the flow computer is rather old I am skeptical that I need to implement a wait time between the read and write commands but I am not sure how to do so.

 

       I am using an almost identical code for a RS-485 device without any issues.

 

Any help is appreciated!

 

Thanks!

Download All
0 Kudos
Message 1 of 12
(1,436 Views)

- The sub VIs are not part of LV, so the code cannot run on other computers

- ModBus registers always are on even numbers. Why deduct 1 from the address which the front panel shows as 256 so it becomes 255? I suppose that's the reason, an invalid address.

0 Kudos
Message 2 of 12
(1,381 Views)

 

Thanks MaSta,

 

The register address of 256 is the default starting value in the other LV program I referenced. That device had a register offset so I added the deduct for simplicity on the front panel control. If not needed for this device I intend to remove it. I just have not changed the default value yet as I have not been successful in communicating with the new device via LV. Below are the register values I will eventually be reading. I have tried multiple register numbers and variations of the register numbers and have not had any success.

 

HeatExchanger_0-1680698180512.png

 

HeatExchanger_0-1680697489573.png

 

0 Kudos
Message 3 of 12
(1,369 Views)

Ok, but in the code you still deduct 1 from the address. So register 40001 would be read from address 40000, given you enter 40001 as starting address from that list.

 

0 Kudos
Message 4 of 12
(1,346 Views)

@MaSta wrote:

Ok, but in the code you still deduct 1 from the address. So register 40001 would be read from address 40000, given you enter 40001 as starting address from that list.

 


I keep forgetting that modbus counts from 1, but code starts with zero.  Or did I remember that incorrectly?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 12
(1,330 Views)

With 232 you might need to make sure both your serial adapter and device have matching flow control settings (RTS/CTS). Modbus protocol doesn't specify what it should be, but if your device wants to use RTS/CTS your adapter will have to support those lines and you may need to dig into the Plasmonique vi's to see if you can set it there.

 

Also 232 protocol is only point to point so some devices don't bother with addressing, but again, you would have to check the manual.

0 Kudos
Message 6 of 12
(1,328 Views)

@billko wrote:

@MaSta wrote:

Ok, but in the code you still deduct 1 from the address. So register 40001 would be read from address 40000, given you enter 40001 as starting address from that list.

 


I keep forgetting that modbus counts from 1, but code starts with zero.  Or did I remember that incorrectly?


Actually address 40001 is Modicon address mode.

 

The 4 means that it is a Holding Register , the remaining 4 decimals are the register number but that is 1 based while the address range is really 0x0000 - 0xFFFF. But with 4 decimals you can go at most to 9999 which corresponds to address 0x270E. To achieve the full address range in Modicon address mode, sometimes 6 digits are used like 400001.

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 12
(1,309 Views)

Thanks StevenD,

 

      I tried every option out of desperation with no successes. 

 

    I have been able to communicate with the flow computer using the manufacturers service software so I know that the cable/communication controls are compatible. Was hoping I just had to pick the right one. Below are all the options available with this specific VI.

 

HeatExchanger_0-1680792190459.png

 

 

0 Kudos
Message 8 of 12
(1,294 Views)

Thanks for the information,

 

    I also tried removing the 4 from the register address today and unfortunately unsuccessful as well. Also tried this in combination with StevenD's suggestion of flow control settings. Still no luck!

0 Kudos
Message 9 of 12
(1,293 Views)

Fire up a serial port sniffer while using the manufacturer's software?

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 10 of 12
(1,281 Views)