Industrial Automation
Industrial Automation | Europe

myKnowledge

Main > Product Type > Software > Visualisation
Minimize Text   Default    Enlarge Text
 

Print
E-mail

How To Setup Ethernet/IP Datalink Between CX-Supervisor And NJ, NX And NY Controllers


Introduction

CX-Supervisor can communicate to Sysmac devices like NJ, NX and NY controllers which are normally configured to use SYSMAC Gateway component with 'explicit messaging' which means that each Read or Write message is explicitly send from CX-Supervisor at the required time.  Regular 'Read' commands are issued for example every second in a process known as 'polling'.  Under normal circumstances a Polling application can provide a satisfactory solution.

For a few solutions with high bandwidth usage, high number of devices, high update rates or a combination of these, the communications can become stressed. Network load of other tools and controller cycle time (and therefore Peripheral Servicing time) can also be factors.  For these scenarios a new model using Ethernet/IP datalinks to synchronise data with the PC node running SYSMAC Gateway can deliver an enhanced and more stable system. EIP datalinks use 'implicit messaging' which is handled at the hardware and network layer directly with higher repeatability and less processing time.  When CX-Supervisor decides to read (or write) the data it is already received by the SYSMAC Gateway node so it is received with virtually zero latency, giving a much more responsive application even under high load conditions.

This tutorial will help you create a basic application using EIP datalinks to teach you the principles involved.

Tutorial steps
The example is split into 4 distinct steps:
  1. Correct creation of Controller variables
  2. Creation of SYSMAC Gateway Tags
  3. Configuring the EIP Datalink and Tag Sets
  4. Creating the CX-Supervisor Points
Step 1: Correct creation of Controller variables

For any EIP tool to access Controller Global Variables they must be correctly configured as Network variables.  In order read variables with an implicit message data link the required variables MUST be configured in Sysmac Studio as Network variable of "Output" type.  This means the controller can output this data to another place.

  • Open Sysmac Studio and open or upload your controller project
  • Open the "Global Variables" view
  • Find the variable you wish to read, and set "Network Publish" to "Output"
  • Synchronise the project again to transfer the setting to the controller
Tip: Sysmac Studio Variable view supports Copy and Paste to allow bulk editing of property values in Excel etc.
Step 2: Creation of SYSMAC Gateway Tags

SYSMAC Gateway must also have EIP Network tags created before use.

  • Start "SYSMAC Gateway Console" (can search for "SYSMAC Gateway" folder to find the shortcuts)
  • On the "Communication Network" tab ensure the "Ethernet" adapter is correctly set, shows "Status" is "Open" and the "Communication Service" is running and shows "Start". If you are in doubt you can Stop and Start the service here.
  • On the "Tag Table" tab use "Data->Add" to create your SYSMAC Gateway tag.  You can name it the same as the controller variable, or if you think this could be confusing you can adjust the local name here.
  • Set the "Data Type" to the correct value for the controller variable
  • Make sure on "Network" page you set to "In".  This means SYSMAC Gateway can receive data 'into' this variable from the controller
Tip: For a large number of tags there is the Edit->Clipboard and Edit->Import menus.  There is no easy way to create the CSV file or clipboard format, but with some manipulation of data from Sysmac Studio you can create compatible data in the format of existing tags.
Step 3: Configuring the EIP Datalink and Tag Sets

Now that source and destination tags are created, we must pack them into sets of tags (Tag Sets) and finally link the sets together. This is all done using "Network Configurator" tool.

3.1 Create Output Tag Set on controller

  • Open "Network Configurator", for example from "Control Panel" page of SYSMAC Gateway Console
  • Make sure your correct Ethernet adapter is selected for use from "Option->Select Interface", e.g. "Ethernet I/F"
  • Select "Network->Connect" to go online and "Network->Upload"
  • All target devices on your network will be shown. Unselect everything except your PC and Controller and click OK to upload.
  • For your controller icon, double click (or select Parameter->Edit)
  • On the "Tag Sets" tab, select the "Out - Produce" tab.  This is for all data the controller will be producing and outputting to SYSMAC Gateway.
  • Click "Edit Tags" and on the "Out - Produce" tab click "New" for each controller variable. Add the name and correct size of the data. Make sure you type the name correctly and get the exact capitalisation. For BOOL types tick the "Use bit data" and select "1" bit size (or more if arrays).
  • Click "Regist" for each tag you want to add. For a basic test just create 1 Tag Set with 1 variable to start with.
  • Note that if you edit tags when there is no Tag Set, one is automatically created for you, or if you edit Tag Sets when there are no Tags defined you are taken to Edit Tags first.
Tip: For a large number of tags there is the "To/From File->Import From File".  There is no easy way to create the CSV file, but with some manipulation of data from Sysmac Studio you can create compatible data in the format of existing tag sets.

3.2 Create Input tag Set SYSMAC Gateway

Using the same Network Configurator project from 3.1, double click the SYSMAC Gateway icon to edit the parameters. In the same way as 3.1 create your tag sets containing tags with the following differences

  • Always select your SYSMAC Gateway Tag Sets and Tags as "In - Consume" as they will be consuming the data produced by the controller
  • Always use your SYSMAC Gateway defined tag names (if using different from the controller variable names)

3.3 Create Data link between Input and Output tag sets

Using the same Network Configurator project from 3.1, and still editing the SYSMAC Gateway parameters (by double clicking the SYSMAC Gateway icon)

  • On the "Connections" tab, click "New" to create the data link connection
  • For the "Originator Device" (SYSMAC Gateway) select the name of your new Input Tag Set from the drop down list.  If the list is empty then check you created the SYSMAC Gateway Tag Set as "In - Consume".  (The list will also appear later once the tag set has been used)
  • For the "Target Device" (controller) select the name of your Output Tag Set from the drop down list. If the list is empty then check you created the Controller Tag Set as "Out - Produce". (The list will also appear later once the tag set has been used). Check also that the byte sizes match.  For normal use, set "Connection Type" to "Point to Point" connection.
  • Click "Regist" to add the connection and then "Close". Click "OK" to save the changes to the Parameter window.

The configuration is now complete and you can download the settings using "Network->Download". Changing to Program Mode is quicker but not always preferred in running systems.  When complete the Output window will show any warnings or sucessful message "Network download was completed."

Step 4: Creating the CX-Supervisor Points 
CX-Supervisor can now access these SYSMAC Gateway tags directly, without having to configure the device for communication. This means that reading data is virtually instantaneous and the application runs smoothly.  To configure these points:
  • Open your CX-Supervisor project
  • Click "Setup Devices" toolbar icon
  • Click "Add" and select "SYSMAC Device" (or "Modify" your traditional connection)
  • Choose your desired name (for example "SYSMACGateway")
  • Type the IP address of your PC
  • You MUST tick the "Local SYSMAC Gateway" option.  This forces CX-Supervisor to talk directly to the local SYSMAC Gateway service
  • Create all your Points in the usual manner. Select "Input" points and configure as "SYSMAC Gateway device"
  • Click "Setup" to choose your device name from above (e.g. "SYSMACGateway")
  • For "Tag", enter the name from the SYSMAC Gateway Tag Table (not necessarily the same as controller name).

CX-Supervisor will now read the tag value direct from the SYSMAC Gateway tag table.

Troubleshooting
As mistakes are very easily made, there are some good troubleshooting tools to help you:
  1. After step 3.3 and downloading the EIP Datalink connection configuration, check the Datalinks are running without error. From "Network Configurator" choose ->Monitor for both controller and SYSMAC Gateway nodes to look for errors. [Tag Status] and [Connection] tabs should show no errors, otherwise mistakes in the tag set configurations need to be corrected.
  2. If the Datalinks are working correctly, then use "SYSMAC Gateway Console"->Control Panel->Tag Montior to monitor you SYSMAC Gateway node (using PC IP address).  The variables should show the same values as any changes to controller variables.
  3. For CX-Supervisor, any errors opening devices or reading values are shown in the Error/Event log.
Conclusion
You will find that Ethernet/IP datalinks solutions take more planning and configuration to set up that traditional communications, but that development effort is repaid by a quicker and robust final solution.  This is the recommended solution for the most extreme solutions.
This Tutorial focuses only on Reading data, because most HMI and SCADA communications are 99% reading, 1% writing. The writing of control bits etc are usually handled in the traditional method with a direct device connection (rather than to SYSMAC Gateway) with the "Output" points defined.  As most control is human triggered and 'ad-hoc' there is no need for it to be cyclically delivered at high update rates. However it would also be possible to configure datalinks in the reverse direction, i.e. with controller tags as "Input" and SYSMAC Gateway tags as "Out".
See also
There are some other articles dealing with other aspects of Ethernet/IP datalinks which may include some interesting reference for you:




Comments (View All Comments / Add Comment)

Related Articles
No related articles found.
Created 2018-01-17
Modified 2018-01-26
Views 242

 

You are not logged in.