LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus TCP communication

Hello,

 

I've inherited some code for monitoring tension and controlling motion with a Beckhoff device. This is done over Modbus, and for the most part this communication works, the problem that I have is when it runs for a period of time it drops communication. I'm guessing because of a timeout because it's generally thousands of cycles into the motion profile. This means that we have to scrap the data up to that point. Does anyone have any ideas on how to troubleshoot this? I'm a relatively new user to labview but have experience coding on other platforms and am experience in Beckhoff. NI seems to be a different beast entirely though and I'm not sure where to start.

I can't post the entire vi, but I certainly can post screenshots or provide other information.

 

We are using some standard vi's for communication, Modbus_Read_Write_Multi.vi, Util_Read_Discreet_Inputs.vi and our own Get_TCP_Conn_ID.vi

 

Any help would be appreciated.

0 Kudos
Message 1 of 3
(1,018 Views)

Are you reading / writing data the entire time? Some devices close the connection when no data is received for some time. Maybe, this behavior can be switched off, maybe not. If not, just poll some data every second or so, even if you don't need that data.

0 Kudos
Message 2 of 3
(1,012 Views)

So in theory yes, there is a heartbeat communication that happens every 2 seconds just to check and make sure communication is till established, but according to the code I don't believe that's how it actually operates. How would I go about doing that? I have attached all of the screenshots for the comms subroutine

0 Kudos
Message 3 of 3
(1,007 Views)