Вы находитесь на странице: 1из 73

Chapter 1

Introduction
30.07.03 Introduction 1-0

1.0 Content

1.1 1.2 1.3 1.4

3D-Visualizer 3D Visualizer modules Installation Important notes about this software version

1-2 1-3 1-4 1-6

30.07.03

Introduction

1-1

1.1 3D-Visualizer
While the use of dynamic 3D technology has become widely adopted in the fields of animation and design, as well as in virtual factory planning, we do not yet see it applied to the graphic visualisation of materials handling processes and machinery. What has been lacking is the means of integrating virtual reality into a known engineering environment, so that the automation engineer too may routinely access 3D technology in his day-to-day business. Using a genuinely 3D process visualisation program, it is now possible to walk your way through a realistic virtual installation, simply by moving your mouse. The handling movements and status modes displayed on-screen are constantly monitored and updated in real time via an online connection with the process operation. By combining this type of visualisation with standard two-dimensional process visualisation systems, the volume and quantity of graphic data is substantially enhanced, providing benefits such as:

Only one graphic 3D model for the whole facility Speedier grasp of process situations thanks to near-reality representation Rapid pinpointing of malfunction sites, particularly in distributed and complex assemblies Faster, and more intuitive perception of process status now possible for non-technical or less experienced personnel Cost savings from use of existing CAD system data (3D-CAD, ProE, 3D-Max, etc. ...)

     

30.07.03

Introduction

1-2

1.2

3D Visualizer modules

3D Visualizer consists of a number of modules which facilitate the integration of 3D scenes and scenarios into Simatic WinCC images. 3D Scene Editor is integrated as a module in WinCCExplorer. In the planning phase, visualisation modules from an object library can be added in VRML format to a 3D scene, their properties being rendered dynamically using WinCC variables. All the data relevant to the runtime module is stored in a project file within an xml configuration. Using an ActiveX module called 3D Scene Control, you design and display the 3D scene in Win CC Image with the aid of GraphicsDesigner software. Bi-directional communication between WinCC and the 3D scene is established in real time. Data relating to the process integration of object properties such as colour and position are read out and changes in the WinCC variables are displayed in the 3D scene. The route of a 3D scene from its creation in an external application, via the animation process in 3D Scene Editor right through to the display in WinCC Image using 3D Scene Control is shown in the following flowchart :

30.07.03

Introduction

1-3

1.3

Installation

Hardware requirements:

Computer with Intel Pentium III processor, or AMD Athlon/Duron, 700 Mhz or above. Minimum 256 MB RAM Graphic card with 3D acceleration and at least 32 MB RAM (eg, recommended: one of the following chip sets - Geforce2 and higher, ATI ) CD Rom drive Screen resolution : at least 1024x768 pixel

Software requirements:

Simatic WinCC Version 5.x installed (Windows 2000 Servicepack 2 requirement) Microsoft DirectX Version 8 or higher is recommended

Installation:

Please close down all other open applications before commencing installation. Un-install any older previous versions of 3D-Visualizer. To install the 3D Visualizer program you must have adminstrator rights on the designated computer. Carry out the setup.exe program from the CD. The default directory for 3D Visualizer installation is c:\Siemens\WinCC\3Dvisualizer. A demo project is usually installed in the WinCC project folder : c:\Siemens\WinCC\WinCCProjects\VisualizerDemoRollenbahn.

 
30.07.03 Introduction 1-4

Uninstall:

Uninstall does not delete existing WinCC projects! On the task menu bar, click on Start | Settings | System Control Double-click on the software icon In the new window opened top left, select the option Change/Remove Programs From the program menu, select 3D-Visualizer Click on the buttton Change/Remove

30.07.03

Introduction

1-5

1.4 Important notes about this software version


Please take a few moments and read the following section carefully. It contains important hints and tips about working with this version of 3D Visualizer. For operating sequences, such as step-by-step instructions, the following conventions are used:

Click or Left-click means a single click on the left-hand mouse button. Right-click signifies a single click on the right-hand mouse button. Double click - unless expressly stated otherwise refers to two rapid consecutive clicks with the left-hand button on the mouse.

Menu sequences are shown in italics and separated by a vertical stroke (|). For example, the sequence File | Load signifies : left-click to activate the File menu and then select the Load menu option Load by clicking with the left-hand mouse button. Restrictions relating to the use of this version: 3D Scene Control can be used only within a single location project. Joint use of one and the same 3D scene in a multi-location project is not possible. In this present version, 3D Scene Control is not suitable for use with WinCC Webnavigator.

30.07.03

Introduction

1-6

Chapter 2

Accompanying documents
30.07.03 Accompanying documents 2-0

2.0 Content
2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 2.13.1 2.13.2 2.13.3 2.13.4 2.13.5 VRML 3D-Scene Editor Menu Bar File Menu Options Menu Preview Menu Toolbars 3D Scene tree structure Object area Tabs in the right-hand area of the program screen Status Bar 3D-Scene Control Integration of a 3D scene into a WinCC project Copying 3D scene into the WinCC project structure Inserting objects into the 3D scene Process connection Projecting 3D Scene Control in WinCC Image Launch of WinCC Runtime environment 2-2 2-4 2-6 2-7 2-8 2-10 2-11 2-13 2-15 2-18 2-19 2-20 2-21 2-21 2-21 2-23 2-24 2-25

30.07.03

Accompanying documents

2-1

2.1 VRML
VRML stands for virtual reality modelling language and is currently available in version VRML97. The VRML standard is supported by the Web3D Consortium. VRML is ideally suited as a universal exchange format for 3D graphics and multimedia, and can be used in many areas, eg, in scientific and technological visualisation applications, for multimedia presentations, on Web sites and for shared virtual worlds. To display VRML scenes, a plug-in is required. 3DVisualizer uses the VRML plug-in produced by the company, blaxxun. Nearly all 3D modelling tools are capable of exporting of geometry parameters into VRML. All VRML data types have open fields where changes may affect the geometric parameters, for example. As the action messages required for this often presuppose a program logic, a change of parameter will often bring up a function written in ECMA script language. None of the 3D modelling tools is however capable of generating program code, hence programming is usually in a text editor or in a VRML authoring tool. VRML data files are built hierarchically. The structure of the 3D scene may be represented graphically by means of a tree structure. It consists of socalled nodes, which describe parameters and their organisation by means of assigned fields. The node fields can be animated in WinCC by means of variables, and they can also effect parameter changes (surface colour, changes of size or position). Complex sets of parameters can also be generated from nodes, in so-called prototype form, and subsequently used at a number of positions in the 3D scene. The Node fields may be inputs (eventIn), outputs (eventOut) or combinations (field, exposedField). Interaction between the field of a node and WinCC takes place via a route. This links an output-typefield of one node with an input-type field of a second node.

30.07.03

Accompanying documents

2-2

The 3D scene interaction with WinCC may be bi-directional: WinCC variables can change the property of a node via a route; conversely a node attribute can change a variable in WinCCs range of variables. 

30.07.03

Accompanying documents

2-3

2.2 3D-Scene Editor


3D Scene Editor enables you to select 3D visualisation components from a library, and animate their attributes using WinCC variables. It is not suitable for creating or compiling 3D scenes. Three dimensional modelling tools such as taraVRbuilder, or 3D CAD systems, which have VRML export capability, should be used to generate materials handling installations. 3D Scene Editor is launched from WinCCExplorer by right-clicking the 3DVisualizer option and then selecting start 3D-Scene Editor from the Context menu.

After 3D Scene Editor starts up, menus and buttons are in part disabled until a 3D scene (file type suffix.wrl) or a project file (file suffix .xml) has been loaded.

30.07.03

Accompanying documents

2-4

In the upper part of the screen are the menu bar and 3 toolbars. The left-hand of the screen is divided into a window showing the 3D scene in a tree structure, and an area with three tabs : Geometry, Object and WinCCTags. On the right of the screen are tabs for displaying the 3D scene, the source code and the project directory.

30.07.03

Accompanying documents

2-5

2.3 Menu Bar


Important functions and operation mode setting options for the 3D Scene Editor program are available via the menu bar. Left-clicking a menu entry brings up the associated options.

         

30.07.03

Accompanying documents

2-6

2.4 File Menu


The File menu displays options for downloading and saving 3D scenes and project files, as well as for closing Editor. Menu Entry Load... Save... Save as... Close Exit Description Loads a VRML-formatted 3D scene (file suffix .wrl) or a project file (file suffix .xml) Saves the current project Saves the project under any user-defined name Closes the project currently open Exits the 3D Scene Editor program and returns to WinCCExplorer

30.07.03

Accompanying documents

2-7

2.5 Options Menu


It is possible to adapt 3D Scene Editor operation mode and menu language using the Options menu. The following illustration shows the Options chart, together with its standard settings. These can be restored at any time by left-clicking the Standard button.

30.07.03

Accompanying documents

2-8

In the Standard filter for Open dialogue field it is possible to select whether 3D Scenes (file type .wrl) or Project files (file suffix .xml) should be displayed in the Open file dialogue window. In the Display Options - Tree field it is possible to alter the property settings to be displayed in this view. It makes sense to change these settings if individual objects have many properties and if, for example, only inputs or only outputs are to be linked. In the WRL Options field, it is possible to alter how a 3D scene is handled once it has been loaded to 3DScene Editor. For each 3D scene file it is standard to generate a project file of the same name, which contains data relating to added objects and their process connections. Alternatively, the 3D scene can be embedded complete in the project file. Only in special cases is it necessary to change this parameter eg, to match the output format of other applications. Please note that the runtime module works only with VRML references. The default setting Save Reference should therefore not be changed. In the XML Options field it is possible to alter how 3D scene data is handled once the project files have been loaded. If the 3D scene is embedded into the project file, it can be saved again separately by altering the Embedded 3D data settings. Conversely, scenes which have been saved separately can again be embedded into the project file by changing the External 3D data settings. Alteration of these settings is required only in special cases, eg, for adaptation to the output format of other applications.

30.07.03

Accompanying documents

2-9

2.6 Preview Menu


Using the Preview Menu option it is possible to change the 3D window work settings. Menu Entry 3D View 3D Selection Description Updates the 3D scene in the 3D View tab 3D Selection enables direct selection of objects in 3D View, synchronising the selection in the tree structure. This is helpful when positioning new add-in objects. The type of visualisation for the object selected is determined by the 3D Flag menu entry. Indicates how an object selected in 3D View should be formatted. There are three options from which to choose: Outline Shell Shell with pointer External contours of the selected object are shown in red. A box with semi-transparent sides is shown surrounding the object. As Shell option. A red cone also moves along the side edges of the shell body. This helps to pinpoint the selected object in complex 3D scenes.

Internet Explorer... Displays the 3D scene in Internet Explorer

3D Marker

  

30.07.03

Accompanying documents 2-10

2.7 Toolbars
Underneath the menu bar there are three toolbars. They offer rapid access to the 3D object library and important options from Menu bar sub-menus. File toolbar Symbol Function Load 3D Scene (.wrl) or Project file (.xml) Save Project file

Preview toolbar Symbol Function Preview in 3D View tab Preview in Internet Explorer Object Library toolbar Symbol Function Adds Traffic Light object into the 3D scene. Adds Drive object into the 3D scene. Adds Display object into the 3D scene. Adds Flag object into the 3D scene. Adds Photoelectric Light Barrier object into the 3D scene. Adds Box object into the 3D scene.

30.07.03

Accompanying documents 2-11

Adds Touch Sensor object into the 3D scene.

          

30.07.03

Accompanying documents 2-12

2.8 3D Scene tree structure


The object structure of the 3D scene is displayed in tree form in a window on the left of the screen.

Entries linked with a symbol indicate those objects from the object library which have already been added to the 3D scene. If an entry is in bold, this shows the properties have already been already animated using WinCC 30.07.03 Accompanying documents 2-13

variables. These properties can be displayed by clicking the small + symbol in front of the entry. This applies to the Flag_1 object in the illustration, where the bool variable show_in responsible for showing or hiding the flag in the 3D scene has been activated. Clicking on the plus signs of the other entries brings up the 3D scene sub-structures. In this way it is possible to make a selective choice of individual objects; these are highlighted simultaneously in the 3D-View tab on the right of the program window. Clicking on a minus symbol closes a sub-structure. By right-clicking on an object and selecting the Delete option from the context menu, an object can be removed from the 3D scene. All of this objects links are also removed from the project file.

30.07.03

Accompanying documents 2-14

2.9 Object area


In the lower left field of the program window there are three object tabs. These relate in each instance to the object currently selected from the tree structure. The Geometry tab ... is used to position and scale an object very precisely. In the Alignment field it is possible to rotate the object round one of the three axes x, y or z, at any desired angle (figure in degrees). The Size field allows the object to be re-sized in a single plane (Complete Scaling selection not ticked) or scaled proportionately (Complete Scaling selection ticked). In the latter case, it is immaterial which of the three horizontal dial bars are activated. Alternatively, a dimension may be inputted direct in the entry field.

30.07.03

Accompanying documents 2-15

In the Object tab, ... it is possible to enter object-specific settings. This might for example be a caption, such as that shown in the example of the flag in the illustration which follows. Similarly, the status of the Drive object (On or Off) may be displayed by allocating different colours to each of the states.

In the WINCC Tags tab .. the properties of an object can be animated using WinCC variables. In the illustration which follows, the property Show Flag, for example, is linked with the WinCC variable, Alarm. Depending on the status of this variable, the flag in the 3D scene is either shown or not displayed.

30.07.03

Accompanying documents 2-16

30.07.03

Accompanying documents 2-17

2.10 Tabs in the right-hand area of the program screen


To the right of the screen are the Source Code tab for displaying the 3D scene VRML source code, the 3D View tab for displaying the 3D scene via the blaxxun VRML plug-in, and the XML tab, which displays data such as the number of links currently contained in the project file. When using 3D Scene Editor and working direct within the 3D scene, it is the 3D View tab which is of primary relevance.

30.07.03

Accompanying documents 2-18

2.11 Status Bar


In the status bar at the lower edge of the screen is displayed status information, such as data relating to loading procedures or the formatting of the 3D scene in tree form.

         

30.07.03

Accompanying documents 2-19

2.12 3D-Scene Control


The 3D scene is integrated into the WinCC screen using 3D Scene Control. It is integrated in GraphicsDesigner via the Standard tab of the Object range by selecting the Control option from the SmartObjects menu group, and dragging the window to the desired size in the WinCC screen. From the list of objects which appears, select 3DSceneControl Class. When first launched, a file selection dialogue asks about the project file generated or expanded in 3D Scene Editor. This has the suffix .xml and the same name as the file with the 3D scene. When starting up the WinCC runtime environment, the project file is loaded using 3D Scene Control. This file contains cross-references to the 3D scene to be displayed in the 3D window as well as data relating to the links which aid communication between WinCC and the 3D scene. Type conversions are automatically carried out during connection checks. You can for example link bool type properties with WinCC variables of the double type. The property is in this case set at true precisely when the WinCC variable value is equal to, or greater than, one. Linking string variables with numerical variables is not supported by the runtime module. In this instance you must carry out the adaptations by using either the scripts embedded in the 3D scene (ie, Javascript or VRML script), or the script functionality of WinCC.

30.07.03

Accompanying documents 2-20

2.13 Integration of a 3D scene into a WinCC project


This section describes the general procedure to follow when integrating a 3D scene into a WinCC image.

2.13.1

Copying 3D scene into the WinCC project structure

If 3D Visualizer software has been installed, a VisualizerDat sub-folder will automatically be added to an existing or new WinCC project. All the project-specific data required to embed a 3D scene in WinCC with the 3D Visualizer is stored here. Before working on a 3D scene in 3D Scene Editor, it should be copied to the VisualizerDat directory. The scene must be available in VRML format, which is an ISO standard for virtual reality environments. Many CAD programs offer export filters for the conversion of standard CAD formats into VRML. See also the chapter, VRML, in this Help section.

2.13.2

Inserting objects into the 3D scene

During the next stage, various objects such as drives, photo sensors and displays can be added to the 3D scene and their properties animated using variables from the WinCC environment. The 3D Scene Editor package is available for these tasks. It is integrated in WinCC Explorer, from where it can be launched.

30.07.03

Accompanying documents 2-21

Selecting File|Load from the menu loads a 3D scene to the Editor, and displays it in a window. On the left are displayed, in tree-type form, the individual components of the 3D scene, the so-called nodes, together with their properties. This facilitates navigation through the 3D scene, and rapid selection of particular parts of the 3D scene geometry, so objects may be added from the library, or properties be linked with process variables.

30.07.03

Accompanying documents 2-22

To add an object from the library, simply select one from the toolbar and drag the object to the tree structure. There, it is automatically given a name and immediately shown in the 3D scene. The next stage is to locate the object in three dimensions. A positioning tool which enables movement in each of the planes xy, yz, or xz is available for this task. For more precise location definition, it is also possible to enter numerical values via the Geometry tab.

2.13.3

Process connection

Broadly speaking, the variables needed for controlling the 3D scene will already exist in the WinCC project environment. However, to drive the 3D scene using operating controls such as buttons or slider bars, it may be advisable to add other WinCC variables. Having selected the object which is to be added to the process, you now access animation properties via the WINCC Tags tab. Using the button with 3 dots on the right next to the property name you reach the Variables tag reference dialogue.

You can, for example, specify whether the property of the object should function in the 3D scene as Source or Sink. It is also possible to plan a touch sensor as an active component. Clicking on the Select Tag button opens up the WinCC variable options range for selection of the process variable.

30.07.03

Accompanying documents 2-23

After saving the project file and closing the 3D-Scene Editor, the 3D scene can be launched in WinCC Image.

2.13.4

Projecting 3D Scene Control in WinCC Image

Once the 3D scene has been copied to the WinCC directory structure and the project file saved, the 3D scene can be projected into the desired WinCC image. The scene is integrated in GraphicsDesigner via the Standard tab of the Object range by selecting the Control option from the SmartObjects menu group, and then dragging the window to the desired size in the WinCC screen.

30.07.03

Accompanying documents 2-24

From the file selection dialogue, select the project file with the suffix .xml and the same name as the 3D Scene, and the 3D scene is displayed in 3D Scene Control. After saving, then closing GraphicDesigner, incorporation is complete and the WinCC runtime environment can be started up.

2.13.5

Launch of WinCC Runtime environment

The WinCC Runtime environment can now be launched. The 3D scene is displayed within 3D Scene Controls 3D window and responds to changes in the linked process variables from the WinCC variables range.

30.07.03

Accompanying documents 2-25

30.07.03

Accompanying documents 2-26

Chapter 3

Tutorial
30.07.03 Tutorial 3-0

3.0 Content

3.1 3.2 3.3 3.4 3.4.1 3.4.2 3.4.3 3.5 3.5.1 3.5.2

Tutorial - Demonstration project Integrating 3D Scene Control into a WinCC image Install/embed Object in process using 3D Scene Edit Alarm - Implementation The VRML environment Tag allocation Integration into WinCC image in GraphicsDesigner Plane Sensor - Implementation The VRML environment Tags - allocation and integration

3-2 3-3 3-9 3-24 3-24 3-25 3-26 3-27 3-27 3-28

30.07.03

Tutorial

3-1

3.1 Tutorial - Demonstration project


The following step-by-step instructions explain the use of the 3D Visualizer software by integrating a 3D scene into a WinCC image. Using the 3D Scene Control, you will integrate a 3D scene into a WinCC image, and animate specific elements of the 3D scene by means of WinCC variables. First of all, please load the Project Demo Visualizer in WinCC Explorer. To do this, first select File | Open in WinCC Explorer and from the option dialogue box select the DemoVisualizer.mcp project file from the C:\Siemens\WinCC\WinCCProjects\DemoVisualizer directory. Next, using 3D Scene Control, you will integrate a pre-prepared 3D scene into a WinCC image. In the second section of the tutorial you will use 3D Scene Editor to add a drive mechanism with process connectivity to the 3D scene. When you have successfully completed the tutorial, your WinCC image should look like this:

30.07.03

Tutorial

3-2

3.2 Integrating 3D Scene Control into a WinCC image


In WinCCExplorer, left-click to select the GraphicsDesigner option.

Double-clicking on the VisualizerDemo.pdl option in the WinCC Explorer right-hand window opens the WinCC image for the tutorial. Click on the 3D window. Press the Delete key. The WinCC image now looks like this:

30.07.03

Tutorial

3-3

Display and Control elements created using standard WinCC components are projected in the lower part of the WinCC screen. The 3D scene is to be displayed in the upper area. To do this, proceed as follows: 3D Scene Control is implemented via Object Control. Therefore in the Standard window of the Object range select the Control option from the Smart Objects menu group.

30.07.03

Tutorial

3-4

In the WinCC image, above the Display/Control options, click on the top left corner of the 3D window, hold down the left mouse button and drag to create a rectangular box.

From the Selection box which now appears, please select 3DSceneControl Class and click on the OK button. A file selection dialogue box now opens and asks for the location of the connection file. Please select the VisualizerDemo.xml file from the C:\Siemens\WinCC\WinCCProjects\VisualizerDemo directory, and click on the Open button.

30.07.03

Tutorial

3-5

The 3D scene is now displayed in the 3D window you created.

30.07.03

Tutorial

3-6

You can now adjust the size and position of the 3D window. Use the small black square boxes to resize (expand/shrink) the window. The Control position is changed as the mouse pointer is moved within the control window. By clicking and holding down the left mouse button, then moving the mouse, the window is dragged and relocated in the WinCC image. Save the WinCC image by clicking on the diskette icon in the standard toolbar, then close GraphicsDesigner. You may now start up the WinCC runtime environment and observe how the 3D scene reacts to input via the operating controls. To do this, start the WinCC project using the toolbar.

30.07.03

Tutorial

3-7


At this stage, the following actions can already be carried out within the 3D scene.

The Alarm button simulates an alarm which automatically alerts the 3D scene observers location to the missing/defective object, in this instance, the drive mechanism. The alarm can be disabled using the Escape/Quit button. The Workshop button displays/hides the surrounding spaces as part of the 3D scene. The position of the pallet on the roller conveyor can be changed using the slider bar. The Animation button moves the pallet once, from the beginning to the end of the conveyor belt. It is possible to change the location of the observer within the 3D scene using the blue button. Start then changes you back to the view defined as the initial viewpoint for this 3D scene. Round Flight switches continuously from one location specified in this 3D scene to the next, one after the other; thanks to the flexibility of the transitions the impression is of flying slowly through the 3D scene.

30.07.03

Tutorial

3-8

3.3 Install/embed Object in process using 3D Scene Editor


During the next stage, which expands the functionality of the 3D scene, you will design a drive mechanism which reacts to On and Off buttons by changing colour. For control purposes, the binary variable Drive1 has already been designed into the WinCC variables range; it is set to 1 or 0 by the On and Off buttons respectively. In order to install the drive mechanism, 3D Scene Editor must first be launched. In WinCC Explorer, right-click to select the 3DVisualizer option, and then click on start 3D-Scene Editor in the menu listing.


The 3D Scene Editor window is opened. Now use the project file to download the 3D scene to the 3D-Scene Editor for further expansion.

30.07.03

Tutorial

3-9

In the File menu select the Download option and in the file selection dialogue box which opens, switch to the VisualizerDemo.xml file in the C:\Siemens\WInCC\WinCCProjects\ VisualizerDemo\3DvisualizerDat directory. Clicking the Open button downloads the file to 3D-Scene Editor in preparation for further expansion.


30.07.03 Tutorial 3-10

The drive mechanism can now be installed by first left-clicking the Drive icon in the toolbar. At this point the mouse pointer changes into the Drive icon. Move this symbol to the Group option in the tree structure and leftclick again.

The drive mechanism has just been added into the 3D scene. It is currently located at (0, 0, 0), the base point of the 3D scene, at the bottom right of the following image, behind the pallet. The white arrow is part of the positioning tool for the object just added. The drive mechanism must now be scaled and re-positioned so that it fits into the red Alarm box in the bottom left of the screen image.

30.07.03

Tutorial

3-11

When scaling and positioning, it can be advantageous to change the movement mode within the 3D scene. By right-clicking in the 3D window and then selecting from the Movement menu you can for example change into Flight mode. In the same menu you can also de-select Collision. This may be particularly helpful in any highly complex 3D scene. As it is difficult to recognise the object from this viewpoint, please change it, roughly as in the illustration which follows. Starting point and destination positions can both be easily seen in this view.

30.07.03

Tutorial

3-12


The drive mechanism with its surrounding locator can now be aligned within the space. The hand symbol indicates the plane in which movement is currently activated that is, upwards, at right angles to the floor. Click on the semi-transparent movement plane of the positioning tool (hand symbol) and hold down the left mouse button. The button is activated and coloured blue; lift the drive by gently dragging mouse upwards.

30.07.03

Tutorial

3-13

Change the direction of movement by clicking on the vertical arrow of the positioning tool. The active movement is now switched to a plane parallel to the floor.

30.07.03

Tutorial

3-14


Now click anywhere on the movement plane just activated, and move the drive mechanism in the direction of the red box.

30.07.03

Tutorial

3-15

In order to locate and scale the drive mechanism with greater precision, you are advised to switch to the initial viewpoint as defined in the 3D scene. To do this, click on the right of the 3D window, and from the menus select Viewpoints | Reset | End tour.

30.07.03

Tutorial

3-16

To re-size an objects dimensions simultaneously, first selection the Geometry object tab. Tick the Complete Scaling box and move one of the little wheels to change the scale. Keep changing the size of the drive mechanism until it fits, and can be located directly inside the red alarm box. Using the positioning tool arrows you can quickly switch from one plane to another. Alternatively, you can carry out precise positioning using the Position option in the Geometry tab.

30.07.03

Tutorial

3-17

Once the drive has been relocated and installed in the 3D scene, its Colour property can be added using a WinCC variable. First select the Object tab WinCC Tag. The Status signal variable should be set via WinCCs Drive_1 variable. Click on the button with 3 dots behind the white display field on the Status signal variable line.

30.07.03

Tutorial

3-18

The Variables tag reference opens.

Click on the Select tag button and the WinCC variables range opens up. Now select the Drive_1 variable from the tarakos variables group, and click on OK.

30.07.03

Tutorial

3-19

In the Tag name field of the Variables tag reference window, the name Drive_1 now appears.

The connection has been carried out successfully. The status_in variable relating to Drive_1 in the tree structure is now marked up in bold. This shows that connection was established.

30.07.03

Tutorial

3-20

Save your current project by clicking on the diskette icon in the 3D Scene Editor toolbar. Then exit 3D Scene Editor via the File | Close menu. You can now start up the WinCC Runtime environment using the WinCCExplorer toolbar ...

30.07.03

Tutorial

3-21

... and observe the drive mechanism change colour in line with the status of the On and Off buttons in the lower part of the demonstration project screen.

30.07.03

Tutorial

3-22

Congratulations ! You are now familiar with the basic operation of the 3D Visualizer program. A more detailed description of the properties and features of the individual objects can be found in the reference chapter of this Help tutorial.

30.07.03

Tutorial

3-23

3.4 Alarm - Implementation


Within a WinCC window the reaction to the changing of a boolian variable should be the display of a Closed/Off box. This section explains how this can be handled without using the VRML library.

3.4.1 The VRML environment


To prepare the way for the switching operation, the following VRML file is generated and saved as alarm.wrl in the 3D Visualizer folder of the current WinCC project. #VRML V2.0 utf8 # A black cube with an edge 2 PROTO AlarmBox [ # Position (x,y,z) exposedField SFVec3f pos 0 0 0 # Size (x,y,z) exposedField SFVec3f dim 2 2 2 # Color (red, green, blue) exposedField SFColor col 0 0 0 ]{ Transform { translation IS pos scale IS dim children [ Shape { appearance Appearance { material Material { diffuseColor IS col

} Tutorial 3-24

30.07.03

} geometry Box { size 2 2 2 ] }

} DEF alarm AlarmBox { col 0.2 0.3 0.4 } AlarmBox { col 0.2 0.3 0.4 pos 5 0 0 }

This file defines a new VFML object named Alarmbox, password PROTO. This object serves to represent a cuboid, enabling easy access to size, location and colour. The first instance of this object is allocated the definition name DEF alarm. This is necessary in order to be able to establish a uniquely defined relationship between its col field and a WinCC tag. The second instance has no unique designation. Its events can therefore not be linked with WinCC tags.

3.4.2 Tag allocation


The VRML environment should react to the Alarm bool variable. This is applied in WinCC Explorer via Variables |Internal variables|New variables. After alarm.wrl has been downloaded into 3D-Scene Editor, the hierarchy of the VRML file is displayed in the left-hand window in tree format. A node is shown in blue at the point at which it has a unique definition. The only blue node is alarm; it alone is permitted to link events with WinCC tags. As an alarm warning is to be displayed by means of a change in colour, the col field is selected. The col event has the data type SFColor, consisting of three elements for red, green and blue. Each entry can be allocated a floating point value between 0 and 1. The value 1 corresponds to the maximum colour brightness.

30.07.03

Tutorial

3-25

The switching dialogue is opened via the Context menu of the col field. Here, the WinCC variable Alarm should be selected. As bool variable settings are converted within the Runtime module from false to 0 and from true to 1, the Alarm cube is coloured red at the point at which the alarm variable has the value true.

3.4.3 Integration into WinCC image in GraphicsDesigner 


To use the runtime module, 3D SceneControl must be added to a Graphics Designer window. First open a screen in Graphics Designer, select Object range|Smart.Objects|Control and then highlight a rectangular field in the current screen using the left mouse button. A dialogue window which requires an ActiveX module to be selected now opens. Selecting 3D SceneControl brings up a File dialogue. Click on alarm.xml. An appropriate means of amending and testing a bool variable is a CheckBox which is linked with the Alarm variable. The corresponding Property dialogue is opened on selecting Variable when the field with the heading Dynamics is right-clicked. Starting the Runtime environment should bring about the desired result: activating the Alarm checkbox changes the WinCC Alarm variable from true to false, and the left-hand box turns to red.

30.07.03

Tutorial

3-26

3.5 Plane Sensor - Implementation


This example shows reactions within WinCC to VRML events.

3.5.1 The VRML environment


To prepare the way for the switching operation, the following VRML file is generated and saved as touch.wrl in the 3D Visualizer folder of the current WinCC project. #VRML V2.0 utf8 # A black cube with an edge 2 PROTO AlarmBox [ # Position (x,y,z) exposedField SFVec3f pos 0 0 0 # Size (x,y,z) exposedField SFVec3f dim 2 2 2 # Color (red, green, blue) exposedField SFColor col 0 0 0 ]{ Transform { translation IS pos scale IS dim children [ Shape { appearance Appearance { material Material { diffuseColor IS col } }

geometry Box { size 2 2 2 ] }

} Transform { children [ DEF mover AlarmBox { col 0 0.8 0.5

30.07.03

Tutorial

3-27

] } AlarmBox { col 0.2 0.3 0.4 pos 5 0 0 } ROUTE Drag_Sensor.translation_changed TO mover.pos The first instance of AlarmBox named mover was defined as a sub-junction of a Transform node and provided with a plane sensor. The ROUTE command leads the EventOut translation_changed from Drag_Sensor to Event pos of the mover node. Thus the mover junction may be pushed along a plane using the mouse.

} DEF Drag_Sensor PlaneSensor { }

3.5.2 Tags - allocation and integration


Two additional variables of the 64-bit, IEEE 754 floating point value type are to be saved within the WinCC project under the names xpos and ypos. These variables are linked in 3D Scene Editor with the first two elements in the EventOut translation_changed of the Drag_Sensor plane sensor. Since an EventOut is responsible for messages from a junction, only Source may be selected as the route in the Allocation dialogue box. Thus the WinCC variables xpos and ypos were set just as the plane sensor was being moved. In Graphics Designer the image may be taken from the first example. In 3D SceneControl, however, the SceneDescription field must be changed so that reference is made to the touch.xml file. To do this, right-click on Control, and then select Properties from the menu options which appear. A dialogue window opens and you should chose the link Control Properties. The SceneDescription attribute can then be altered by double-clicking on Static. In addition there are also two roller bars to display the current values of the xpos and ypos variables. A roller bar can be accessed via Object range|Windows objects|Slider object. The object properties should be set as follows: Maximum = 6, Minimum = 6, Operating steps = 1000 and Process connection = 0. For a more rapid display there is the update level, On modification.

30.07.03

Tutorial

3-28

After starting up in the Runtime environment, an image is displayed with a 3D module and two scroll bars. When you move the green cube, the scroll bars are moved at the same time. Conversely, a movement of the scroll bars has, however, no effect on the 3D view, since in the demonstration example, connections were made only from VRML events to WinCC tags. To achieve genuine synchronisation, the exposedField pos of the node/junction mover would have to be linked with the xpos and ypos variables in 3D Scene Editor.

30.07.03

Tutorial

3-29

Chapter 4

object references
30.07.03 object references 4-0

4.0 Content
4.1 4.2 4.3 4.4 4.5 4.6 4.7 Object: Object: Object: Object: Object: Object: Object: Traffic Signals Drive Mechanism Display Flag Photoelectric Light Barrier Box Touch Sensor 4-2 4-3 4-4 4-5 4-6 4-7 4-8

30.07.03

object references 4-1

4.1 Object: Traffic Signals


The following chart provides information about animation-type properties of the object listed under the Object tab. Property Type Description

SignalColours 2*Float[3] The float [3] values indicate the individual colours of the signals. The first corresponds to the upper colour, the second to the lower colour. StatusSignal Int Process connection for switching signal colours. Colour controls as follows: 0 - no colour selected 1 - upper colour selected 2 - lower colour selected

30.07.03

object references 4-2

4.2 Object: Drive Mechanism


The following chart provides information about animation-type properties of the object listed under the Object tab. Property Colour_activated StatusSignal Type Description

Float[3] Colour of the drive at rest Bool Process connection of drive; drive changes colour depending on status

Colour_not_activated Float[3] Colour of the drive in action

30.07.03

object references 4-3

4.3 Object: Display


The Display object permits data to be shown in graphic form, either statically or dynamically, within the 3D scene. For example, various parts of the assembly may be provided with captions, or process measurements may be displayed dynamically. The Display object is aligned in relation to the observers location, so the information is always legible. The following chart provides information about animation-type properties of the object listed under the Object tab: Property Display_ dimensions Text TextColour DisplayColour Text_transparency Type Description

Float[3] Gives the width, height and depth of the display box String Shows the data which is to be displayed Float[3] Colour of the text Float[3] Colour of the display box Float Transparency of the text - selectable on sliding scale from 0 (solid) to 1 (invisible) Transparency of the display box selectable on sliding scale from 0 (solid) to 1 (invisible)

Display_transparency Float

30.07.03

object references 4-4

4.4 Object: Flag


This object may be used to provide graphic representation of the presence and location of malfunctions within the 3D scene. The flag has its own viewpoint. This means that when it is displayed in the 3D scene, the observers location is, if necessary, amended so that the flag is easily visible. Using the Box object, the relevant object or component can be provided with a semi-transparent flashing shell. The following chart provides information about animation-type properties of the object listed under the Object tab: Property OwnViewpoint Type Bool Description This property is normally set to 1. This ensures that on display, the 3D viewpoint is changed such that the flag is shown more or less at the centre of the image. This is particularly useful for identifying the location of faults or malfunctions. If OwnViewpoint is de-selected, then the current viewpoint of the scene is maintained even when the flag is displayed. Process connection for graphic display of flag

DisplayFlag CaptionHeader CaptionText

Bool

String Provides the wording of the flag heading. Caption heading is shown in red. String Can, for example, include a brief description of the malfunction which has occurred.

30.07.03

object references 4-5

4.5 Object: Photoelectric Light Barrier


The following chart provides information about animation-type properties of the object listed under the Object tab: Property DisplayLabel Type Bool Description Bool value to display caption in a small label on the light barrier. This might, for example, be an exact description of the unit. The display label can be displayed or hidden by clicking on the light barrier within the 3D scene. With the light barrier not activated, (no transit), a narrow beam is displayed between the sensors. Indicates the distance between the two light barrier sensors In the default setting, the light barrier is shown with two coneshaped sensors; if this property is set to 1, then only one sensor is displayed. Shows the colour of the light barrier when not activated (no transit) Shows the colour of the light barrier when activated (transit) Shows the colour of the caption label The default setting shows the light barrier. If this property is set to 0, it is no longer visible. Signal input for the switch from inactive to active status Caption text colour Caption text Transparency of the text Transparency of the caption label

Display_light_beam

Bool

Width SingleSensor

Float Bool

Colour_not_activated Colour_activated LabelColour ObjectVisible

Float[3] Float[3] Float[3] Int

SignalInput Label_text_colour LabelText Label_transparency

Bool Float[3] String Float

Label_text_ transparency Float

30.07.03

object references 4-6

4.6 Object: Box


Should a malfunction occur within the 3D scene, the Box object allows the fault location, for example, to be surrounded by a semi-transparent box with optional flash feature. In conjunction with the Flag object, the 3D scene viewpoint can be altered automatically and relocated to the site in question. The following chart provides information about animation-type properties of the object listed under the Object tab: Property BoxColor Box_visible Flash Flash speed Init_Flash Type Bool Bool Float Bool Description Process connection to display box Indicates whether the box should flash (default setting) Indicates the flash/second frequency Indicates whether Flash mode should be activated from start-up of the Runtime environment, independently of any process connection. Shows whether the Box object should be displayed at the start-up of the WinCC Runtime environment, independently of any process connection.

Float[3] Colour of the box

Init_Visible

Bool

30.07.03

object references 4-7

4.7 Object: Touch Sensor


The Touch Sensor object can be used to generate binary signals within a 3D scene. Simply clicking on it in the 3D scene causes a bool signal to be transmitted. The following chart provides information about animation-type properties of the object listed in the Object tab: Property Type Description

SwitchFunction Bool In its default setting the Touch sensor works as a key or button; with the setting on 1, it acts as a switch. SwitchSignal TouchSignal Bool Delivers a bool signal in Switch mode Bool Delivers a bool signal in Touch mode

30.07.03

object references 4-8