Have CODESYS V3 Devices? TOP Server V6.2 for Wonderware

7 min read

Jun 29, 2017 2:00:00 PM


There are some great new updates now available with TOP Server V6.2.  In case you missed it, I did a high-level post giving you an overview of the four biggest features from the V6.2 release - click here to see that post.

In this post, I'll give you a more detailed review of the updates to the new CODESYS Ethernet driver in TOP Server V6.2.  Used extensively by controller manufacturers when creating custom firmware isn't scalable, CODESYS continues to grow in usage globally. Keep reading to find out more about specific features of the CODESYS Ethernet driver.

As you may be aware, CODESYS is an abbreviation for COntroller DEvelopment SYStem.  It is an open-source development platform from 3S-Smart Software Solutions GmbH for programming controller applications.  If you're reading this post, you're likely somewhat familiar with CODESYS and I'm guessing there is a good chance you either have or are going to have devices supporting the CODESYS protocol.

It's a protocol that is commonly used in the pharmaceutical, food and beverage, and packaging industries for collecting data from controllers across a site for numerous varied purposes — including traceability, monitoring and control, and plant-wide automation.

So that's the basic background of the protocol but what updated functionality is available with the CODESYS Ethernet driver in TOP Server V6.2?

Support for CODESYS V3 Runtimes

In this second phase of the CODESYS Ethernet driver, we added support for the newer CODESYS V3 runtimes, which many manufacturers using CODESYS have either already migrated to or are starting to migrate to.

With the driver's initial release in TOP Server V6.1, we started with V2.3 runtimes because that's the runtime version that has been out in the market the longest and is implemented on the most existing devices out in the field.  So it was one of those situations where it made the most sense to break the development effort up across two releases and add support for V2.3 first. Now with more and more manufacturers moving towards Version 3, we definitely wanted to get that support added as soon as possible, which is why it's been added so quickly with this V6.2 release.

If you did happen to buy a license for the CODESYS Ethernet driver after it was initially released in V6.1 and have an active support/maintenance agreement for that license, the upgrade to V6.2 is included with support/maintenance, and you can get this update at no additional cost.

And, as far as actually specify one runtime or the other when configuring communications in TOP Server, first in TOP Server you configure a channel and select the CODESYS driver, and that's what you'll use for communications over the Ethernet connection. Then, as you're configuring your device under that CODESYS channel, you would select from the Model field either CODESYS V2.3 Ethernet or CODESYS V3 Ethernet, depending on which of those runtimes your actual device in the field has installed and running.

Selecting CODESYS Runtime Version in TOP Server

So it's just that simple if you're manually configuring the device - we'll cover the new Device Discovery functionality shortly, which handles this step for you!

Support for CODESYS Gateways

We've also added support for communicating through CODESYS gateways with V6.2.  Essentially, that allows us to route TOP Server communications through a CODESYS gateway server to get to those field devices.

A CODESYS gateway server is a CODESYS component that can be added to runtimes to provide gateway functionality. So, in your TOP Server configuration if you need to communicate through a CODESYS gateway, you enable using a gateway and then specify the IP address or host name of that gateway node and the gateway port that's configured in the gateway.  That allows the driver to go to the gateway, and then from there the gateway would route communications to the end device.

CODESYS Gateway Support in TOP Server

And you're still specifying either an IP address or host name or a logical name of the actual controller that you want to communicate with, even if you're going through a gateway. So you'll just be specifying both of those pieces as part of your configuration in TOP Server.

There is one important distinction I want to make regarding using CODESYS gateways with TOP Server V6.2 - if you are communicating with CODESYS devices running a V2.3 runtime through a gateway, the CODESYS gateway does have to be installed on the same machine as your TOP Server in order to communicate with those V2.3 controllers.

If that were not to be the case, and the CODESYS gateway servers were on a different machine, you would basically get "Device not responding" errors in TOP Server's event log, and you wouldn't be able to communicate.

To be clear, that is only true of V2.3 runtimes. If all of your devices in the field have V3 runtimes, then it doesn't matter if the gateway is installed on the same or a different machine from TOP Server. 

CODESYS Device Discovery

The CODESYS Ethernet driver also supports going out on your network and actually discovering your CODESYS device, either via gateway or on the local subnet. Essentially, once you've configured your CODESYS channel in TOP Server, you can right-click on the channel and select "Device Discovery", and then specify the desired parameters.

CODESYS Device Discovery in TOP Server

Device discovery is even supported through a CODESYS gateway server.  If you're using a gateway, then you enable the checkbox and specify the IP address or host name of the gateway and the configured port.

Or, if you're not using a gateway, then you would just leave that setting disabled, click "OK", and the CODESYS driver goes out on your local subnet and detects any CODESYS runtimes that are out there and populates a list for you to select from.

Another nice feature applies if you already have some devices added to your CODESYS channel in TOP Server.  When the driver discovers devices for that channel, the list is only populated with devices that have NOT already been added.  So if they already exist in TOP Server, the driver doesn't bother to show them to you in the list of discovered devices, as that could be confusing.

So from the list of discovered devices, you can then just add the desired devices to your channel preconfigured - eliminating the need to manually configure your device properties.  This saves you both time, effort and the potential of any misconfigured settings.

Static Tag/Item Generation Online or Offline

And last, but not least, the CODESYS driver also supports automatic tag generation, either online from the device itself (if you have network connectivity to the device) or offline from an import file (if you're configuring TOP Server prior to the device being online).

CODESYS Automatic Tag Generation in TOP Server

In your TOP Server device properties, under "Tag Import Settings", you can select a tag generation method of "Online", and then at that point you'd go to "Tag Generation" and click to actually generate the tag database.

Or you would select "Offline" for the method in Tag Import Settings and then you would browse in Windows to a .sym file. The .sym file is generated as part of the process when you compile your CODESYS runtime project.

So you'll need to just find that .sym file and browse to that from TOP Server. At that point, once you've selected "Offline" and browsed to that .sym file, again, you'd go to Tag Generation and you'd automatically generate the tag database.

Both options provide flexibility if you do prefer to maintain a tag database in TOP Server - you may or may not be aware that TOP Server drivers support either having static tags/items in TOP Server or you can dynamically reference the device variable addresses directly from the client, if you prefer to only maintain a tag database there. So this is for those of you who like to maintain a static tag database in TOP Server so that you do have that browsing capability that's available with OPC.

So the new features in this second phase of the CODESYS driver in TOP Server V6.2 give CODESYS users coverage for the widest range of devices and all of the ease-of-use and time-saving capabilities you may be familiar with with other TOP Server drivers.

If you're interested in learning more about the other features introduced with TOP Server V6.2, don't forget to have a look at my TOP Server V6.2 main features post.  Or, have a look at the full release notes - click for details.

And please visit our updated TOP Server V6 Focus Website for other useful information.  And if you missed my live V6.2 release webinar, don't forget to watch the on-demand version.

Watch Now - TOP Server V6.2 Webinar

Kevin Rutherford
Written by Kevin Rutherford

Software Toolbox Technical Blog

We're engineers like you, so this blog focuses on "How to" appnotes, videos, tech team tips, product update announcements, user case studies, and other technical updates.  Subscribe to updates below. Your feedback and questions on posts are always welcomed - just use the area at the bottom of any post.

Subscribe to our Blog

Recent Posts

Posts by Topic

See all