News:

  • May 05, 2026, 02:49:39 PM

Login with username, password and session length

Author Topic: Ethernet Communication  (Read 10794 times)

ynot1186

  • Newbie
  • *
  • Posts: 1
Ethernet Communication
« on: June 20, 2013, 05:57:24 PM »
I am trying to send an ascii string to our company server with no success. I am using a DoMore plc with an ethernet port. I am using an "OPENTCP" instruction, everytime I enable it I get an "On Error, Set bit" error. Warning message reads "Device driver error - $DriverError (ST143), plus "Attemped to use a device that hasn't been opened.
Couldn't open TCP connection with specified device

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: Ethernet Communication
« Reply #1 on: June 20, 2013, 06:35:05 PM »
Please zip and post your program, or post screenshots.
The "Attempted to use a device that hasn't been opened" sounds like your program flow may not be correct.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Ethernet Communication
« Reply #2 on: June 26, 2013, 02:39:13 PM »
If your OPENTCP instruction is getting the error bit set, this simply means the connection to your company server is not being made. A good way to troubleshoot this would be to install Wireshark (free Ethernet packet sniffer) on your company server and take a sample trace to see if the TCP connection telegrams (i.e. SYN) are reaching the server and what the server is responding with. It could be the telegrams are never reaching the server due to IP address, subnet and gateway settings, or it could be that the server is rejecting the TCP connection request.

If you have trouble understanding the Wireshark trace, you can save it, zip it up and send it to me for evaluation at support@hosteng.com. Or post it here.
There are two types of people in the world; those that can extrapolate from incomplete data sets.