August 16, 2013 | Bretislav Valek
The following article was taken from a review by Mr. Jaroslav Blazek who tested the connection of a Siemens SIMATIC S7 PLC to the Reliance system. The original Czech version of his article can be found at www.blaja.cz.
Note: The Deltalogic OPC server is identical to the Softing OPC server.
Have you ever wanted to try and get anything developed in a visualization, more correctly SCADA system, get anything connected to a PLC but were afraid of the complexity of the installation, of the reconfiguration of your PC, and of the actual work in the development environment? Now you can let your inhibitions go. Try to create a visualization project in the user-friendly environment of the Reliance SCADA/HMI system. This article describes a sample project that will show you how to connect Reliance to a Siemens SIMATIC S7 control system using an OPC server.
I have tested it all step by step on a common laptop with Windows XP Professional SP3. To connect to the SIMATIC S7 PLC, a network IBHNet Link MPI cable and the OPC server by Deltalogic are used.
After creating the project in the Reliance Design development environment and confirming the settings, it is suitable to choose what we are going to connect to, i.e., the type of PLC, driver, etc. So, go to the Managers menu and bring up the Device Manager. Because an OPC server is used for the SIMATIC PLC, choose OPC and confirm. For direct communication, you could select drivers for other PLCs connected, for example, via RS232. Next, we will focus in more detail on the communication settings because that's on which the entire project stands or falls.
Device Manager – device type selection
On the left side of the window, click on OPC1. Then, click on the OPC icon next to the red cross. By doing so, the Select OPC Server dialog box is brought up. Select the Deltalogic OPC server and confirm. Then, in the Tags folder, create the OPC_Group subfolder into which tags from the OPC server will be imported. You can create more such folders and with different properties.
Device Manager – selecting the Deltalogic OPC server
You can see in the OPC group's properties that the tags will be updated every 500 ms with a deadband of 0 % and the entire group is active. The most important thing here is to get the tags into the folder by pressing the Import from OPC Server button.
Device Manager – OPC group properties
You can see there is one SIMATIC S7_313 accessible in the OPC server. Expand the type of the tags you need to get into the folder and simply move them by dragging with the mouse into the folder.
Import of tags from the OPC server
Once the tags are in the group, their properties can be configured. Just click a tag. We'll only show you the settings of the
16-bit tag SET_04 that will be displayed with one decimal place. Therefore, on the Correction page, set the constant to 0.1 for one decimal place.
Device Manager – tag properties – Correction page
Next, on the Advanced page, set the number of decimal places to 1. For each tag, you can decide, for example, whether to display units, i.e., kPa, °C, MW, etc. You will understand everything as you switch the pages.
Device Manager – setting the number of decimal places for a tag
Done. Now, the tags are defined and ready to be used in the project. Save the changes and watch out – the Confirm window is brought up. It allows you to connect the OPC server (OPC1) to the computer. If you click Yes, everything is all right. If you choose No, the tags won't be working and you must confirm the connection later through the Project Structure Manager. I really recommend that you confirm it now. Otherwise, you may forget about it.
Device Manager – confirmation of new objects definition
Now you can move on to the Window Manager and create a new window. On the top menu (Component Palette), select an object (component) and place it into the window. First of all, of course, choose a display, because a number from the PLC is what is going to be displayed. The components' icons in the top menu clearly indicate the function of each component. So, you can just select the desired component on the palette and place it into the window by clicking on the window area. The position and size of the component can also be changed by using the mouse in the same way as in a standard graphics editor. In Window1 and Window2, there already are some components, especially the window switch, number from the PLC, and bits for generating alarms and reports. Alarms and reports will be displayed both below in the container and after clicking the Open Alarms Window button. I have also tried a recipe – stored it and written to the PLC – and an internal tag (variable).
Window1 – placing components into the visualization window
In Window2, I have also placed a LED picture that changes depending on the state of the tag and a real-time trend. In addition, you can write/read numbers to/from the PLC and set a bit in the PLC.
Window2 – placing components into the visualization window
Now let's take a look how to configure these objects (components) so that they do and display exactly what they should. It's not difficult at all.
First, the display. Double-click it and choose the Functions page. Select the ACT_00 tag and confirm. Finished. Easy. Go through the other pages and configure the number's size, font, color, etc. The pages are important as they are almost the same for each component. So, simply go through the display pages and later, when working with other components, just go to Functions and, for example, specify the link to a tag if you wish.
Display – tag selection
The button is intended for switching the windows. Again, go to Functions and activate the desired window. Click on the window icon to open the Select Window dialog box and choose the window. It's absolutely easy and intuitive.
Button – window activation
The Reliance SCADA/HMI system allows the user to define own custom actions, i.e., what should be done. I have defined just a few of them to show, for example, alarms or recipes. So, another button, but this time on the Scripts/Actions page. Go to Actions – Mouse and click on the icon to open the list of actions. Simply choose the Show alarms action. The Open Recipes button is then assigned the Recipe list action
Button – action selection
All these embedded functions, i.e., actions, tags, recipes, or pictures must be first defined through the Managers menu. Don't be frightened of the huge amount of items in the menu. For our purposes, we'll only need some of them. What is more, as I mentioned above, everything is very intuitive, so take your time to go through the managers and you will understand it all. The way in which, for example, actions are created via the Action Manager is similar in all managers. You cannot, therefore, get lost in the menu.
Defining alarms and events. In the Device Manager, where tags and communication with the OPC server have been defined, you can now define an alarm or event. Click on the Alarms/Events folder, choose a New Alarm/Event, and configure the properties on the right. For an integer-type tag, you can also configure the Range property. If you open the other pages, you will find out what else you can do with the alarm. For example, on the Information page, you can put down what the operator should do to get rid of the alarm. I have only used one bit for the alarm and the other for the event. They can be controlled by the corresponding buttons in the visualization windows.
Device Manager – defining alarms and events
If you add the so-called container to the window, you can insert, for example, alarms and events into it and see what's going on in the window.
Container – properties
Here, we'll focus on recipes. In the Recipe Manager, add Recipe1 and, into it, as many tags as you need. Here, only one is needed. That's it.
Later, once we run the project in the runtime software, you'll see how to write and read the recipe.
In the next window, there's an example of the definition of an active picture, i.e., the one that changes depending on a tag. Again, go to Functions, select the respective tag (the 1Hz blinking bit from the PLC) and pictures for individual states of the tag. "L" = led-green-m (small picture), "H" = led_green_v (big picture). At runtime, the LED picture will have a pulsating effect. This indicates the PLC is connected and running.
Active picture – properties configuration
If you need a trend, go to the Real-Time Trend Manager and specify tags for the trend. Then, on the right, assign the tags to the series. It is apparent here that whatever you define, the insertion functions are still the same.
Real-Time Trend Manager
Now, you can run the application in the runtime software either directly from the Reliance Design development environment or by pressing F9.
The report and alarm buttons can be used to turn on error bits in the PLC. These bits will then appear as text – the error one must be confirmed while the event can just be turned off. Set the internal tag to "H". You'll see that the color of the text has changed. The www link can be used directly in the runtime software to go to the Web address defined through the Action Manager.
Project at runtime – Reliance 4 Control
The Open Recipes button will bring up the Recipe Editor. 863 are real-time numbers in the PLC that can be either stored as another recipe under a name or overwritten with an already stored recipe. In the Recipe Editor, the number changes to 256 by pressing the Load into Device button. It is all evident from the picture and after testing it once.
Recipe Editor – loading the recipe into the device
Switch to the next window where everything is working OK at the first attempt. The trend enables you to easily find out whether there has been a loss of connection or runtime software failure. The red curve in the trend provides a precise time base for the PLC numbers 0–100, so any deviation can be seen at once. The base can be switched off by pressing the
TURN OFF bit button. The blue curve represents a random number in the range of 0 to 250.
Project at runtime – Reliance 4 Control
Finally, an example of how to enter a tag value. The value can be changed using the Enter Value for Tag dialog box, which appears immediately after clicking on the tag (component).
Entering a tag value
Similarly, the Reliance SCADA/HMI system can also be connected to other control systems.
On our website, there is a video tutorial showing how easy it is to connect an OPC server to the Reliance 4 SCADA/HMI system.