08-10-2005 11:27 AM
08-11-2005 10:59 AM
08-11-2005 11:57 AM
08-11-2005 01:41 PM
It's actually a quadruple post but the first to get any responses. There is some useful information from the author here.
"I have a labVIEW program that is connected to a PLC through modbus. The PLC that I am using is an AutomationDirect 205 with a 250-1 CPU. The maximum wait time for any input to the PLC is very short. So when the wait time is up, the PLC closes the connection. I am trying to maintain this connection by sending the PLC an arbitrary bit.
My program was working until I put this bit in. Now when it reaches the point to send that bit, I get this error - Error 57 occurred at TCP Read in MB Ethernet Receive.vi->MB Ethernet Master Query.vi->WebbTest.vi"
<snip>
1. What are you using to communicate using Modbus? (your own LabVIEW/Modbus program? one of the several LabVIEW/Modbus libraries out there? LabVIEW DSC module? A third-party OPC server and Datasocket?)
2. Is this a pt-pt connection (PC to DL205) or a network?
3. Since you've mentioned Ethernet, it's known that you aren't connecting to either of the ports on the DL250 CPU itself. What Ethernet card are you using at the PLC? an H2-ECOM or something else?
4. Although I have DL205's, I've never used Ethernet with them … and I'm confused about:
"So when the wait time is up, the PLC closes the connection. I am trying to maintain this connection by sending the PLC an arbitrary bit. My program was working until I put this bit in. …"
Was the connection being dropped and then the PLC didn't respond to further polls?? It's not quite clear to me what this problematic bit's purpose was.
08-11-2005 02:13 PM
Thanks for the reply unclebump and Donald.
1. I am using a LabVIEW program that I created but I am also using the modbus vi's created by NI inside this program.
2. It is a pt-pt connection over ethernet.
3. I am using an H2-ECOM100 since the H2-ECOM does not communicate using modbus.
4. My connection would drop if there was not any activity within a certain period of time. When I attempted to create activity again, I recieved an error stating that the connection was closed by the peer. The bit that I was trying to send was just my way of trying to create activity for the connection to close. I deleted this bit and now use a read bit that reads every loop iteration.
I do believe I solved my problem though because I had multiple read bits. They were trying to access the PLC at the same time. I used a sequence structure to sequence these bits and now I do not have this error. Thank you though for your input.