methods for embedding video streams in scada systems, · pdf filetaking citect's scada...

14
1 July 2009 www.excelnex.com Methods for embedding video streams in SCADA systems, part II Unlike general I/O data that is familiar to automation engineers, embedding IP video streams requires considerably more time and effort to understand the SDK documents, programming code, and trial and error tests. This article is the second installment in a 3-part series providing technical tips on how to embed video streams in SCADA systems. How to use Modbus/TCP to set up and control an IP video device in Citect's SCADA software Last month, we introduced how to use VPort ActiveX SDK PLUS to embed IP video into Citect and Intouch SCADA software. Since Modbus/TCP is one the most popular protocols in automation, using it with ActiveX Control SDK can make your integrated IP video–SCADA applications more user-friendly. Taking Citect's SCADA software and the VPort 254 (a 4-channel industrial video encoder with Modbus/TCP support) as an example, we will explain how to use Modbus/TCP with VPort ActiveX SDK PLUS. Using the VPort 254's Modbus/TCP with Citect 1. Connect 1.1. In the project setup window, click on OK after creating a new project for ModBus_Demo. The new Modbus_Demo project will be displayed on the project list of Citect Explorer. 1.2. Click on the new ModBus_demo project and choose Communications to set the parameters for communications and connections.

Upload: truongphuc

Post on 06-Mar-2018

237 views

Category:

Documents


2 download

TRANSCRIPT

  

1  

July 2009www.excelnex.com

Methods for embedding video streams in SCADA systems, part II Unlike general I/O data that is familiar to automation engineers, embedding IP video streams requires considerably more time

and effort to understand the SDK documents, programming code, and trial and error tests. This article is the second installment

in a 3-part series providing technical tips on how to embed video streams in SCADA systems. How to use Modbus/TCP to set up and control an IP video device in Citect's SCADA software Last month, we introduced how to use VPort ActiveX SDK PLUS to embed IP video into Citect and Intouch SCADA software. Since

Modbus/TCP is one the most popular protocols in automation, using it with ActiveX Control SDK can make your integrated IP

video–SCADA applications more user-friendly. Taking Citect's SCADA software and the VPort 254 (a 4-channel industrial video

encoder with Modbus/TCP support) as an example, we will explain how to use Modbus/TCP with VPort ActiveX SDK PLUS.

Using the VPort 254's Modbus/TCP with Citect 1. Connect

1.1. In the project setup window, click on OK after creating a new project for ModBus_Demo. The new Modbus_Demo

project will be displayed on the project list of Citect Explorer.

1.2. Click on the new ModBus_demo project and choose Communications to set the parameters for communications and

connections.

   

1.3. There are several items under Contents of Communications. Choose Express I/O Device Setup, and the Express

Communications Wizard will initiate setup.

1.4. On the 1st page of the wizard, there is a simple description for each function and purpose. Click on Next to continue.

1.5. On the 2nd page, you will need to set up the I/O Server Name for this project. The default name is IOServer. Click on

Next when you have finished.

1.6. On the 3rd page, you will need to set the I/O Device Name for the connected device. The default name is IODev. Click on

Next when you have finished. 1.7. On the 4th page, choose External I/O Device for the I/O Device type and click on Next to continue.

 

   

1.8. On the 5th page, choose Modicon -> TSX Quantum -> Ethernet (TCP/IP) to select the Driver Type. Click on Next to

continue. 1.9. On the 6th page, set up the IP address and TCP port for the connection. Be certain to select TCP for the protocol. When

you have finished, click on Next to continue.

1.10. On the 7th page, you can set up whether to read the external database or not. Then, click on Next to continue.

1.11. On the 8th page, you can see a complete list of configurations to be made. Click on Complete once you have confirmed all

the settings.

 

   

2. Configure Data Tag

2.1. Click on Tags after you finish configuring the tags for Communications.

2.2. If you want to monitor DI1 (Digital Input 1) of the VPort 254, then configure the Variable Tags setup page as follows:

Variable Tag Name: VPort254_DI1

Data Type: INT

I/O Device Name: IODev

Address: 30129

   

 

   

2.3. The Address can be obtained from the Modbus Address Map. The Address of DI1 is 0x0080, which can be transferred to

128 in decimals.

2.4. Different function codes have different address definitions in Citect. For example, the address definition of Output Coils in

the figure below is 00001-099999, Input Status is 10001-199999, and Input Register is 30001-399999.

2.5. Since the VPort 254's Modbus/TCP Server currently only supports Input Register, the Address is 128 plus 30001.

2.6. Since the UnitID of the VPort 254 is fixed at 1, additional setup is required. Click on I/O Devices of Communications in

Citect Explorer to display the content for the Modbus_Demo project in Citect Project Editor.

 

   

2.7. Input 1 in the Address column refers to the UnitID 1 for communications. If the address is incorrect, communication

between Modbus_Demo and the VPort 254 will fail.

2.8. Since the initial Citect address for Modbus is 40001, you must change the initial address to 30001.

2.8.1 Select Help -> Driver Help in Citect Explorer to open the Citect Driver Help menu.

2.8.2 Select the Content tab in the Help menu and open MODNET -> Parameters.

 

   

2.8.3 There will be a series of setup items under Parameters. The [MODNET] InitVar column confirms if the Device

connection at startup was successful or not. The default value is 40001, but the VPort 254 only supports the function code

for Input Register. So, the address of 40001 does not exist on the VPort 254.

2.8.4 To change the 40001 address to 30001, click on Click here to view/edit the values for this parameter and then

change the value of InitVar to 30001. Click on Confirm to complete setup.

2.9. After you finish configuring, you can start compiling the tags. Click on File ◊ Compile and then wait for the compilation

process to complete. A Compilation successful dialog box will appear.

 

   

3. Design Graphics

3.1. After completing the configurations for Communications and Tags, you can design the presentation user interface.

3.2. In Citect Explorer, go to Graphics -> Pages, double-click on Citect Graphics Builder and the setup window will appear.

3.3. In the Citect Graphics Builder setup window, select your preferred template, such as Normal or XP_Style, from the

Template List.

3.4. From the menu bar, select Objects -> Number to display the return values as numbers.

3.5. Place the Object a blank section of the screen, and the setup window for this Object will appear.

 

   

3.6. You must set up the Type, Numeric Expression, and Format.

3.7. There is no need to change the Type because it is automatically displayed.

3.8. In the Format list, select #### to represent values that do not have digits after the decimal point.

3.9. Click the icon to the right of Numeric Expression and select Insert Tag… to display the designated Tag List.

Select the tag you want to use.

   

 

   

10 

3.10. After setting the values, choose Objects -> Symbol Set if you want to use a light to indicate the status.

3.11. Drag the Symbol Set to a blank section of the screen and the Symbol Set setup window will appear. It is just like the

Number setup window except for the additional Type box on the right.

3.12. Since the status for DI1 is 0 -> OFF and 1 -> ON, you must select Multi-state for the Appearance Type.

3.13. In the Conditions setup box, configure A as VPort254_DI1=0 and B as VPort254_DI1=1. The rule is that the light will be

green when A is valid, and the light will be red when B is valid.

 

   

11 

3.14. After the screen is designed, Save the screen and click Compile on the File menu. Compilation is complete when the

Compilation successful message appears.

4. Run

4.1. After completing the design and compilation of the Graphic, you can start to run the project screen.

4.2. Choose Run from the File menu in the Citect Graphics Builder to go to the Start screen. 4.3. In the Start screen, choose Pages -> Update Page List -> Page Name after the compilation appears. Select this page

for the next step.

After the page is selected, if DI1 of the VPort 254 is off, then the light will be green, and the number will be 0; if DI1 is on,

then the light will be red and the number will be 1. 4.4.

 

   

12 

Using the VPort 254's Modbus/TCP with the Connect Function of VPort ActiveX SDK PLUS

1. Create a new ModBusDemo Cicode page in Cicode Files.

2. Edit ModBusDemo.ci

After creating the new page, add the Demo_Connect function.

3. Choose Objects -> Cicode Object in Citect Graphics Builder.

 

   

13 

4. Select Demo_Connect from the Insert Function list.

5. Compile and Run the project.

DI1 Off

 

   

14  

When DI1 is triggered, the above window will appear and

VPortSDK can automatically connect to the video encoder. ActiveX Control components offer an easier and quicker way to embed IP video streams into a SCADA/HMI system. Although the

ActiveX Control SDK can also support the controls and configurations, it would be more beneficial to use Modbus or TCP protocols

for these functions because they are more familiar to automation engineers. Even though there may not be a best method

according to the integration viewpoint, the optimal method would allow engineers to do their job quickly, precisely, and easily

with the most familiar tools.

In addition to control and monitoring capabilities, ActiveX Control SDK provides system engineers with a useful tool to embed IP

video streams in SCADA software. However, most automation system engineers are not familiar with Video ActiveX Control SDK.

As a result, they may need to study the SDK documents and resort to try-and-error programming, requiring a great deal of time

and effort. It may even take weeks for engineers to complete the programming job.

Thankfully, there is a simpler and easier way to embed IP video into SCADA software.

Next month, we will introduce VPort Video Gadget, a new VPort ActiveX SDK PLUS tool that significantly reduces programming

effort by packaging the function codes into several objects, such as display, connect, etc. All system engineers need to do is

input the required parameters into the appropriate columns and they will be able to embed and control IP video devices in their

SCADA system.