How to connect your scale to a network (Ethernet) using Moxa’s NPort 5110A

Many scales and balances are equipped with an RS-232 interface. Moxa’s NPort series and similar serial device servers allow you to connect such scales to a network (Ethernet). In this article, I’ll show you how to connect a Moxa NPort 5110A to an Ohaus scale and how to configure and test it.

1. Physical connection

The Moxa Nport 5110A has an RS-232 port (DE9M) on one side and an Ethernet port on the other side:

Data cables (red) are not included.

To communicate with your scale, you’ll need a matching RS-232 cable. The Ohaus Defender 3000 scale used in this example requires a DE9M to DE9F straight (1:1) cable:

Ohaus scale with Ethernet connection through Moxa NPort 5110A

Once the physical connection to the scale has been established, the Moxa NPort has to be configured. There are several ways to do so. I prefer the following method:

  1. Connect the NPort directly to a single computer (not a LAN) with an Ethernet cable.
  2. Use the NPort Administator software included with the device to configure it.

2. Network configuration

Start the NPort Administrator and locate your NPort by clicking on the Search button:NPort Administrator: Search

It should be found at the default IP address (192.168.127.254).

Note: It’s not always necessary to change your PC’s IP address if you’re running the NPort Administrator software. However, if you receive error messages during the following steps, try to temporarily set your computer’s IP address to an address on the same subnet (such as 192.168.127.1).

Select the Ethernet connection under Control Panel > Network and Internet > Network connections, right-click on it and choose Properties, then select Internet Protocol Version 4 (TCP/IPv4) and click on Properties. Make a note of your current settings so that you can restore them later, then enter the temporary IP address:
Ethernet IP address setting in Windows 10

If the NPort is shown as locked, right-click on it and select Unlock:
NPort Administrator: UnlockThe default password is “moxa”.

Right-click again and select Configure, then select the Network tab:
NPort Administrator: Network configurationEnter a static IP address, subnet mask and gateway that work on your network (or select DHCP or BOOTP for automatic address assignment, though this is not recommended for most operating modes).

To make the NPort accessible on our network, I set its IP address to 192.168.0.253:
NPort Administrator: Modified network settings

With the network configuration complete, you can disconnect the NPort 5110A from your computer and connect it to your network (LAN).

3. RS-232 configuration

It is essential that both the NPort and the scale use the same settings for the serial port (RS-232). In the Serial tab, select the port (the NPort 5110A only has one, but you still have to select it), check Modify and click on Settings:
NPort Administrator: Default serial settings

Enter the RS-232 settings found in your scale’s menu or user manual. The default settings of our Ohaus Defender 3000 scale are shown in the screenshot below:NPort Administrator: Serial configuration (RS-232)

Important: By default, the NPort is set to CTS/RTS flow control! You cannot change this setting when using the Setup Wizard through the web console. As mentioned before, I recommend using the NPort Administrator software instead.

4. Set an operating mode

To change the mode, go to the Operating Mode tab, check Modify, select the port and click on Settings:NPort Administrator: Operating Mode

The NPort 5110A supports several operating modes, I will only discuss the following two here:

  • Real COM mode: This mode allows you to create a virtual COM port on a PC and use the scale as if it were connected directly to that PC. This is very useful when you’re using software which only supports connections to COM ports and cannot communicate over TCP/IP (such as our 232key virtual keyboard wedge software).
    Please note that you’ll have to install a virtual COM port driver on the PC that communicates with the scale. In my tests on Windows 10, setting up the COM port through NPort Administrator did not create a new virtual COM port on the system. However, using the NPort Windows Driver Manager worked.
  • TCP Server: The NPort acts as a server, waiting for incoming connections from TCP clients on port 4001 (or on another user-defined port). The maximum number of concurrent connections can be changed from 1 (default) to up to 8. This mode works with software like our Simple Data Logger and many others.
    NPort Administartor: TCP Server mode

    Note: It is not necessary to set the data packing options unless you want to optimize either for minimal latency or maximum throughput. By default, the device will try to find a reasonable compromise (this is likely achieved by observing the delay between the data received over RS-232 to determine when a “line” of data is complete).

    When I set the scale to continuous transmission mode (wich has no delay between the weight values), the NPort packed 104 bytes in each Ethernet frame, corresponding to almost 6 weight values (the scale sends 80 values/s):
    Wireshark screenshot

For further details and for information on the other modes, please consult the user manual.

5. Run a test

Depending on the operating mode chosen above, you’ll have to use different programs to test the NPort 5110A. In addition to the software I’ve already mentioned above, you could use the following:

Real COM mode

A terminal program like Termite or HTerm can connect to the virtual COM port. Make sure that the connection parameters correspond to the settings of your scale.

TCP Server

You can use PuTTY set to “Raw” TCP mode to act as a TCP client:
PuTTY configurationThe following screenshot shows commands sent to the scale and the replies:PuTTY communication with Ohaus scaleAnother option is our free TCPTester software. It repeatedly sends a user-defined command to the scale (e.g. to request the weight). Once a reply has been received, the command is repeated:

During testing, it can be useful to observe the LEDs on the NPort:

  • The “Ready” LED should be green.
  • The “Link” LED is green when the NPort has established a 100 Mbs Ethernet connection and orange on a 10 Mbps connection.
  • The Tx/Rx LED flashes orange when the NPort receives data from the scale and flashes green when the NPort is sends data to the scale over the serial port. Therefore, If you’re sending commands to a scale, you should be able to see it flash green. A reply from the scale would cause the LED to flash orange. If this is too difficult to see, consider using the web console to diagnose connection issues (I found it worked best in Firefox):
    Moxa web console monitor async

I hope this article has been useful. What are your experiences with Moxa’s NPort serial device servers? Please don’t hesitate to leave a comment! For support, please contact Moxa or your vendor.

Ohaus Scout STX – a touchscreen scale done right

The first scale with a touchscreen display that I ever used took a while to start up, reacted sluggishly and – if I remember this correctly – required me to set up a user account before it would let me actually use it. That was a few years ago, but still, I was a bit skeptical when Ohaus announced that the newest model in their legendary Scout series would now have a touchscreen, too. However, after purchasing the cheapest Scout STX (the STX 421) and testing it extensively over several weeks, I can say that my worries were unfounded.

Startup time

As you can see in this short video, the Scout STX is even faster than the Ohaus Ranger 3000:

Settings

How many scales can truly claim to be so easy to set up that you never have to look at the manual? As an example, here’s how you change the language: Touch “Menu”, then you’ll see 8 settings, of which “Balance Setup” looks the most promising. You’ll now see another seven settings with “Language” being the first one:

Should you ever find yourself somewhere you didn’t want to go, you can simply touch “Back” to go back to the previous screen.

Somewhat embarrassingly, the only thing I actually had to look up was how to change into another application mode: Instead of going through the menu, you simply touch the application name shown in the top left corner of the screen. I’m just not used to things being so intuitive.

9 applications

The touchscreen really shines when it comes to different applications. As you can see in this video of me using the parts counting mode with auto-optimization, the STX can even replace a dedicated counting scale:

12 seconds into the video, the scale displays an entire number block to let me enter the average piece weight or number of samples. There’s simply no way to achieve this kind of application flexibility and user friendliness without a touchscreen.

Touchscreen disadvantages

One common complaint about touchscreens is the lack of tactile feedback. Fortunately, the most frequently used buttons on any scale, ON/OFF/Zero and Tare, were still kept as physical buttons on the Ohaus Scout STX.

You also have to consider that the fairly large screen needs a lot of power. The Scout STX can be used with four AA batteries, but those won’t last more than a few hours (6 according to Ohaus). It’s certainly a good idea to use the included power adapter whenever possible.

Links and further information

New Scales and Balances coming in 2014

A&D

A&D has confirmed that the SJ-WP series of compact bench scales is going on sale in Europe in the first quarter of 2014.

A&D SJ-30KWP Food Scale

To understand what’s so ingenious about this scale, you should know that until now, compact scales were either fast or they had a high degree of ingress protection. It was not possible to have both a very short stabilization time (<1s) and resistance to dust and liquids in a compact instrument. The reason for this is that the air pressure inside the housing of the scale changes when a load is applied (or removed). For accurate measurements, the air pressure inside and outside has to be equalized. Of course, this could be achieved by simply building a few holes into the housing, but then you would allow dust and liquids to enter. The conventional solution has been to use selectively permeable membranes which let air through and block water. However, air diffusion through these membranes takes time, slowing down the measurement process.

A&D’s new approach is remarkably simple and effective: By mounting the load cell outside of the housing, the SJ-WP scale achieves a stabilization time of 0.5s or less in combination with IP67 protection (dust tight and water proof up to 1m):

A&D SJ-WP externally mounted load cell

Fast, compact, resistant to harsh environments and easy to clean, A&D’s SJ-WP could be a game changer in the food industry.

You can already find further information on A&D’s website.

Adam Equipment

While I have no information on new products coming in 2014 yet, I was told that Adam is planning to add USB host functionality to a number of balances. This would allow weighing data to be written directly on a memory stick, greatly simplifying data logging and data transfer to a computer. This functionality is already available on Adam’s PMB moisture analyzer:

PMB Moisture Analyser

Kern

The first pages of the 2014 catalog show Kern’s continued focus on touchscreen scales. The new models include analytical and precision balances as well as platform scales. While Kern does not indicate who the ODM is, I’m pretty sure these devices are made by Radwag in Poland.

Kern Touchscreen Scales

A cooperation between the two companies would make sense: Kern’s strengths are sales and marketing, while Radwag is good at actually developing and manufacturing weighing instruments.

Further information will soon be available on Kern’s website.

Ohaus

The new Valor 2000 and 4000 are aimed at the food industry and are meant to improve productivity even in harsh environments. There are still some inconsistencies in the available documents but it appears that Ohaus is claiming a stabilization time of 0.5s with an IPX8 rating (no dust ingress protection; protected against submersion beyond 1m).

Ohaus Valor 4000 XW

If you’ve read this post from the very beginning, you might be wondering how Ohaus has been able to achieve this with a load cell that’s placed inside the housing. The answer is called “Flow-Through Design” and simply means that there are indeed some holes in the housing which allow air and liquids to enter and exit relatively unhindered. The electronic components are silicon sealed to protect them from fluids and condensation:

Ohaus Valor 4000 flow through design

I’m looking forward to comparing this approach with A&D’s external load cell solution.

Update March 2014: Ohaus has released a video featuring the new scales:

Smartlux (my company)

I want to take this opportunity to announce that our RS-232 communication software “232key” is going to be released this year:

Rs232 Software

Our software is designed to make it easier to transfer measurement values from any instrument with an RS-232 interface to any application which accepts keyboard input. It receives data from a scale, balance or other device via RS-232 (COM port), extracts the numeric value, formats it and “types” it into another program (“keyboard wedge”-functionality). I’ll announce the release on this blog.