Using Comm Operator to Control Ethernet Relays - NCD.io (2024)

In this tutorial, we will demonstrate relay control over a standard Ethernet port using a ProXR series relay board and a Lantronix XPort communications module. This tutorial will show you everything you need to get started sending TCP/IP data using Comm Operator. Comm Operator wascreated byginkgomo.com, and we have worked directly with the author of this software since 2003. Comm Operator is capable of communicating to every device we manufacture, this tutorial will show you how easy it is to use Comm Operator to control our devices. A trial version of Comm Operator is included with Base Station. If you have not done so, please download Base Station software and run on your Windows 7, 8, or 10 computer:

/start

Controlling a Relay over Ethernet using TCP/IP

Sending and Receiving TCP/IP data is very easy using Comm Operator software. This tutorial will demonstrate the basics of discovering a device and controlling relays by sending TCP/IP data over Ethernet using Comm Operator.

Step 1: Determine IP Address through UDP Broadcast

The first step to controlling a network device using Comm Operator is to determine the IP address of the device. The easiest way to determine the IP address is to listen on the local area network for a UDP broadcast. This is a default feature of all NCD network devices. To read the UDP broadcast, make sure your controller is connected to your local area network and make sure your computer is on the same network connection.

In Comm Operator, select the “File” pull-down menu and select “Open Connection”.

Now click on the UDP tab and make sure the listen port is set to 13000 as shown in the screenshot below. Click the “Open” button to begin listening for the UDP broadcast of the device.

Using Comm Operator to Control Ethernet Relays - NCD.io (1)

Step 2: Determine IP Address of the Device

Within the next minute or so, you should see a UDP broadcast appear. This UDP broadcast will identify the IP address of the device, the Mac Address, the port number, the type of device (in this case, Lantronix XPort, and the firmware version. See the photo below for an example of a UDP broadcast and take note of the IP address of your device.

Using Comm Operator to Control Ethernet Relays - NCD.io (2)

Step 3: Open a Connection to the Ethernet Relay Controller

Now that you know the IP address and port of your controller, it’s time to use Comm Operator to open a connection to the device.

Select File>Open Connection in Comm Operator.

Choose TCP Client and Enter the IP Address and Port Number (Usually 2101) and click the “Open” button, as shown in the screenshot below:

Using Comm Operator to Control Ethernet Relays - NCD.io (3)

Step 4: Setup Comm Operator User Interface

Make sure Comm Operator is configured for the following settings (the IP Address may be different for your network, also, you can disregard the Recv and Send data, this just indicates how many bytes have been communicated since the connection was opened):

Using Comm Operator to Control Ethernet Relays - NCD.io (4)

Step 5: Sending a Command

Many times in our tutorials, we will show you the complete command, including API encoding. You will see tables throughout our tutorials that look like this:

TX:FUNCTION:RX:
1703254108124Turn On Relay 1 in Bank 11701850
1703254109125Turn On Relay 2 in Bank 11701850
1703254110126Turn On Relay 3 in Bank 11701850
1703254111127Turn On Relay 4 in Bank 11701850

The actual command is smaller than the API encoding data. The table below shows the actual commands, as the API data can be automatically generated. Highlighted in Blue below, the actual bytes of data sent and received from the controller.

TX:FUNCTION:RX:
1703254108124Turn On Relay 1 in Bank 11701850
1703254109125Turn On Relay 2 in Bank 11701850
1703254110126Turn On Relay 3 in Bank 11701850
1703254111127Turn On Relay 4 in Bank 11701850

As you can see, it’s pretty easy to strip out API data to look at the command. Simply omit the first 2 bytes and the last byte on both the send and receive packet.

For this tutorial, we will be activating the first 4 relays on a ProXR series controller:

TX:FUNCTION:RX:
2541081Turn On Relay 1 in Bank 185
2541091Turn On Relay 2 in Bank 185
2541101Turn On Relay 3 in Bank 185
2541111Turn On Relay 4 in Bank 185

Start by entering: 254 108 1 as shown in the box below and click the “Send” button.

Using Comm Operator to Control Ethernet Relays - NCD.io (5)

Step 6: Confirm Data

After sending data to the controller you, should receive a API packet back. Notice how CommOperator added the API data for you. The relay should be on and you shouldbe ready to send any command you want with Comm Operator.

Using Comm Operator to Control Ethernet Relays - NCD.io (6)

Using Comm Operator to Control Ethernet Relays - NCD.io (2024)
Top Articles
Latest Posts
Article information

Author: Jeremiah Abshire

Last Updated:

Views: 5951

Rating: 4.3 / 5 (74 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Jeremiah Abshire

Birthday: 1993-09-14

Address: Apt. 425 92748 Jannie Centers, Port Nikitaville, VT 82110

Phone: +8096210939894

Job: Lead Healthcare Manager

Hobby: Watching movies, Watching movies, Knapping, LARPing, Coffee roasting, Lacemaking, Gaming

Introduction: My name is Jeremiah Abshire, I am a outstanding, kind, clever, hilarious, curious, hilarious, outstanding person who loves writing and wants to share my knowledge and understanding with you.