Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction
30.07.03 Introduction 1-0
1.0 Content
3D-Visualizer 3D Visualizer modules Installation Important notes about this software version
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
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
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
30.07.03
Accompanying documents
2-6
30.07.03
Accompanying documents
2-7
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
3D Marker
30.07.03
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
30.07.03
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
30.07.03
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
30.07.03
30.07.03
30.07.03
30.07.03
2.13.1
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
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
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
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
After saving the project file and closing the 3D-Scene Editor, the 3D scene can be launched in WinCC Image.
2.13.4
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
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
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
30.07.03
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
30.07.03
Tutorial
3-2
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
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
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
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
} Tutorial 3-24
30.07.03
} 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.
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.
30.07.03
Tutorial
3-26
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.
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
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
Float[3] Colour of the drive at rest Bool Process connection of drive; drive changes colour depending on status
30.07.03
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
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
Display_light_beam
Bool
Width SingleSensor
Float Bool
30.07.03
Init_Visible
Bool
30.07.03
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