Author Topic: NETCMD$  (Read 2080 times)

Lorne Van Dusen

  • Jr. Member
  • Posts: 87
  • I'm a old guy
    • View Profile
« on: March 01, 2019, 12:15:12 PM »
I need someone to clarify something for me.
If in my program I am using the NETCMD$(2, _____)to send or receive information in and out of port 2
It's my understanding from reading the manual that the Ethernet can use the vertual COMM port #4
Do I just change the statement to NETCMD$(2,____) to NETCMD$(4,____ for all the NETCMD's


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3133
    • View Profile
    • Internet Programmable PLCs
« Reply #1 on: March 02, 2019, 01:46:28 PM »
Unlike serial port connecting via Ethernet is not a one to one. All Ethernet communication are made via virtual connection channel established in a shared medium.

So you must first make a  connection to the server using the PRINT #4 "<CONNECT>.

You have to verify that the connection is successful. After the connection has been established, you can the communicate with the slave using the same NETCMD$ command and yes you can just replace the comm port #2 with comm port #4 and all the commands are identical.

Your program should also monitor the connection and stop the communication if the socket connection has been lost with the server.
Tel: 1-877-TRI-PLCS