2.1 Adding a Serial Port Tag

Although the tutorial uses a simulator to provide data and imitate a physical system, we will complete the steps involved in establishing a serial port tag and an I/O device driver tag, just as we would in an actual system.

The Configuration Toolbox (Figure 16) should still be open from the last lesson. If it is not, click the Configure button in the Display Manager's title bar to open it.

Figure 16

1.  Click on the Tag Browser button in the Configuration Toolbox as indicated in Figure 16.

Figure 17

Note that the Types selection is initially set to "All" and that a number of tags already appear in the list. These tags are created with each new application you begin, and are used to display text in different areas throughout VTS, and to set the behavior of alarms.

 

These default tags should never be deleted. Further information on their purpose can be found later in the tutorial.

The next step is to add a serial port tag:

 

2.  Click the down arrow to the right of the Types drop-down list.

The list expands and displays the standard tag types.

 

3.  Select the Serial Port tag type in the Types drop-down list.

You will probably need to scroll down through the list to find this tag type. 

Serial Port is now displayed in the Types field, and the tag list below it is empty, as no serial port tags currently exist for this application.

 

4.  Click the New button.

Because the serial port tag type is selected in the Types drop-down list, a new serial port tag properties folder opens and displays the entry fields necessary to configure a new serial port tag. (Shown completed in Figure 18).

Note the new tag properties folder for the serial port tag. The title bar indicates the type of tag you are creating. By default, the first set of properties displayed for a new tag are always the identification properties of the ID tab; these are the Name, Area, Description and Help Search Key properties.

We will now configure the serial port tag.

Note: Throughout the process of building tags, always remember to press the "Enter" key or "Tab" key to enter the value you've just typed into a field. This applies to removing text from a field as well; delete the text, and then press the "Enter" key to remove text from a field.

5.  Enter "COM2" in the Name field. "COM2" must be used as the name for this serial port tag in order for the simulator to work.

6.  Press the Enter key or Tab key on your keyboard to set the name in the Name field.

7.  Select "System" from the Area drop-down list.

"System" is typically the area we will use for all communications-related tags so that we can easily organize them.

8.  Enter "Port to Virtual Modicon PLC" in the Description field.

9.  Press the Enter key on your keyboard to set the description in the Description field.

We do not have a custom help file for this application; therefore the properties of the ID tab are now complete and should appear as shown in Figure 18.

Figure 18

10. Click the Settings tab. The properties of the Settings tab are displayed.

11. Ensure that "2" is selected in the Port Number spin box. Port 2 is required for the tutorial simulator to work.  The config folder should look similar to Figure 19

Figure 19

12. Click the OK button. The new serial port tag properties folder closes. The new serial port tag "COM2" appears in the tag list of the Tag Browser.

 

It may be useful to know that more than one port tag can be created in a VTS applications, depending upon the number of ports available on your PC.

You can also use TCP/IP Port tags to connect your VTS application to a series of hosts, allowing you to transmit data across a network or over the Internet.

 

Now that a serial port tag has been configured for this tutorial, you can create the device driver tag to communicate with the virtual I/O device.