• Like
Wonderware tutorial
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Wonderware tutorial

  • 714 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
714
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
21
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Wonderware Tutorial Creating Basic Shapes in Wonderware Select Start/Programs/Intouch For Windows/Intouch. When the Intouch dialog box appears, select Create Directory. Name the directory C:Intouch.16ENT311. Press OK. Select Window Maker (this is the icon with the pencil on it). When WindowMaker loads, select File/NewWindow. Enter the following information in the dialog box: Next select Rounded Rectangle from the Toolbox. Move the cursor to position 40, 110 and hold down the left mouse button. Drag the mouse to position 250, 20 and release the left mouse button. Now select Polygon from the Toolbox. Move the mouse to position 30, 90 and click (don’t hold) the left mouse button. Move the mouse to position 50, 90 and click the left mouse button. Finally move the mouse to position 40, 110. At this position double click the left mouse button. This will close the polygon and fill it with a white color. Creating a Tagname A tagname is similar to a variable in a programming language. It is used to store information to be shared by various components of Wonderware. Select Special/Tagname Dictionary. Click NEW on the dialog box and fill in the information shown below: Be sure to enable Data Logging. Click Done when finished.
  • 2. Animating Basic Objects Now that the tagname has been created, we can use it to animate some basic shapes. Double click on the triangular shape you created earlier. Press the Horizontal Slider button. Enter the data shown below in the dialog box: Double click on the Rounded Rectangle. Select Percent Fill/Horizontal. Enter slider as the Tagname. Press Done. Now press Runtime! Move the polygon left and right with the mouse. The polygon serves as a slider and the rectangle fills with a color as the polygon is moved. The tagname in the rectangle dialog box could easily be changed to, say, the timer on a programmable controller to represent the current timer state. Placing Animated Text on the Screen The value of tagname slider can be shown on the screen with Text. Select Text from the Toolbox and place it at 100, 170. Enter: Slider = ####.## The # indicator will be replaced with the value of a tagname at runtime. Now double click on the text. Select Value Display/Analog. Enter slider for the Expression, then press Done. Press Runtime! The ####.## in the text area is replaced by the slider value. Move the slider left and right and observe the effect on the text. Press Development! When finished. Creating a Bottle Fill Operation Draw a rounded rectangle near the center of the screen. Next draw a polygon or top of the rectangle as shown below:
  • 3. Next draw a polygon on top of the rectangle as shown below. Try to match your polygon as close as possible to the one shown below. Double click on the last endpoint to ensure closure. Click on the polygon to select it and press Duplicate Selection from the Toolbox. Immediately after press Flip Horizontal. Move the inverted polygon next to the original until the overall shape resembles a bottle, as shown below: The bottle contains three shapes, a rounded rectangle and two polygons. These three shapes can be made into one object with the Make Symbol button in the Toolbox. Select the three objects with the mouse and press the Make Symbol button. Next double click on the bottle and select Percent/Vertical. Enter slider as the Expression. Change the background color by selecting Background Color. Press Done when finished. Now change the bottle fill color by clicking on the bottle, pressing Fill (on the Toolbox), and selecting a color. Select Runtime! and observe the bottle fill operation. Press Development! when finished. Controlling Visible Lines Note the bottle has lines from the polygons and rectangle. Delete these lines by selecting Lines from the top menu and No Lines. Press Runtime! and observe the results. Selecting Text Fonts The text font for Slider = ####.## can be changed by selecting the Font button on the Toolbox. Change the font to Times New Roman, size 20. Creating New Tagnames Enter WindowMaker. Create a new tagname with the following parameters: Name:bottle Type: Memory Real Minimum Value: 0 Maximum Value: 500 Log Data: Enabled
  • 4. Log Events: Disabled Controlling the Bottle Motion Double click on the bottle. Press the Location/Horizontal button. Enter the following data: Expression:bottle Value Horizontal Movement Left End 0 Left 0 Right End 400 Right 400 Click OK. Next click on the Object Size/Height button. Enter the following data: Value at Max Height: 320 Max % Height: 70 Value at Min Height: 0 Mm % Height: 100 Middle Click on the Object Size/Width button. Enter the following data: Value at Max Height: 320 Max % Height: 70 Value at Min Height: 0 Min % Height: 100 Center Select Special/Scripts/Window Scripts from the top menu. Enter the following script file in the While Showing screen: bottle = bottle+ 10; IF bottle == 100 THEN IF slider< 100 THEN slider=slider+l; bottle=90; ENDIF; ENDIF; IF bottle> 320 THEN bottle=0; slider=0; END IF; Note: You can use the buttons on the bottom of the screen to help enter the commands. Next select On Show from the Window Scripts menu. Enter the following data: bottle=0; slider=0; Select Runtime! The bottle should now appear to move along the conveyor, and stop to be filled at the fill station. Select Development! when finished. Creating an Alarm Condition An alarm occurs when something out of the ordinary happens to the physical process. Wonderware provides for monitoring and acknowledging alarms. The alarm for this process will occur when the conveyor is not running. Create a new tagname called ConvStop. It should be type Memory Discrete, with Log Events Enabled. Click on the Alarms box and set Alarm State On. Now click on the Wizard button on the Toolbox. Select Switches and On/Off Rocker Discrete Switch. Place this switch on the screen to the left of the conveyor. Double click on the switch and set the Tagname to ConvStop.
  • 5. Again select Wizards and Lights/Tube Lights. Place the Tube Light on the screen just below the switch. Double click on the light and name the Expression ConvStop.Alarm. Next revise the Scripts/Window Scripts/While Showing script as shown below: bottle = bottle+ 10; IF ConvStop == 1 THEN bottle = bottle - 10; ENDIF; IF bottle == 100 THEN IF slider<100 THEN slider=slider+1 Bottle = 90; ENDIF; ENDIF; IF bottle > 320 THEN Bottle = 0; Slider = 0; ENDIF; Select Runtime! and observe the movement of the bottle. Creating an Alarm Panel Create a new window by selecting File/New Window. Press Yes when asked “Copy Window Scripts?”. Name the window Alarm, and keep the size the same as the Bottle window. Select Wizards from the Toolbox menu. Next select Alarm Display/Std. Alarm Display. Using the left mouse button, size the alarm display on the screen so that 10 entries (rows) are shown. Double click on the alarm display. We do not wish to create priorities, so click on Format Alarm Message and unselect Priority. Also select Alarm History on the screen. Press OK. From the top menu, select Special/Configure/Alarm Logging/Logging Enabled. Press OK twice. Now that the Alarm screen has been created, there must be a way to go back and forth between the Alarm and Bottle screen. Open the Bottle screen (you will either have to use File/Open Window or Windows from the top menu). Select Button from the Toolbox. Select Special/Substitute Strings from the top menu. Enter Alarm for the string. Double click on the button and select Show Window. Select Alarm (only Alarm should be highlighted). Now open the Alarm Window. Repeat the process above, this time naming the button Bottle. Double click on the button and select Show Window. Select Bottle (only Bottle should be highlighted). Press Runtime! It should now be possible to go back and forth between each screen by pressing the appropriate button. As conditions change on the Bottle screen, the appropriate alarms should be displayed. Select Development! when finished. Alarm Acknowledging Alarms can be acknowledged. Any alarm that has been acknowledged is recorded on the alarm display screen. To acknowledge an alarm, first draw a button. Using Special/Substitute Strings, rename the button Alarm Acknowledge. Double click on the button and select Touch Pushbuttons/Action. Enter Ack ConvStop; in the white box. Run the program and test the Alarm Acknowledge by pressing it and viewing the alarm screen. Creating a Historical Trend
  • 6. A historical trend chart records past events in the process. In this example both tagnames slider and bottle are recorded. Use File/NewWindow to create a new window named History. In this window, select the Wizard button on the toolbox and Trends/ Hist Trend w/Scooters and Scale. Place the trend chart on the upper left of the screen. Next select Trend Zoom/Pan Panel (second from left) and place it on the screen below the trend chart. Double click on the chart and press Suggest and OK. Wonderware will create the appropriate tagnames for you. Next select the Trend Zoom/Pan Panel and press Suggest and OK. Wonderware will link the Trend Zoom/Pan Panel with the chart. Now create buttons and use Show Window to have a method of going from the History to the Bottle window and back. Run the program. Allow the bottle to fill a couple of times. Go to the history window and press the right arrow key, as shown below:
  • 7. Note: The Historical Trends chart will not update automatically. An event must occur, such as an arrow button pressed. Press Development! when finished. Zooming In on the Historical Trend Window The Trend Zoom/Pan has a zoom feature on it. Adjust the sliders on the screen to select a small part of the graph. Press Zoom In to zoom in on the window. Study the other buttons n the Trend Zoom/Pan Panel until you understand the operation. Configuring a Real Time Display Besides a Historical Display, Wonderware can also display a Real Time Display. Select Real-Time Trend from the Toolbox menu. Draw the chart on the upper right of the bottle window. Double click on the chart and enter the slider and bottle in pens 1 and 2. Press OK. Run the program. You should see the tagnames slider and bottle continually updated on the screen. Saving Historical Data in a CSV File A CSV file can be generated with the Wizards/Trends/HistData Wizard. Select the item and place it below the Trend Zoom/Pan Panel. Double click on it and fill in the dialog box. Press OK. Run the program. Click the button HISTDATA.EXE when prompted. After collecting some data, press the Save button on the Historical Trend box. You can change the filename if you like. After saving the file, exit Wonderware, load Excel and use File/Open. Change Files Type to .CSV files. Find the directory, select the file, and open it. The recorded date, time, and tagnames will now appear in Excel. Graph the tagnames using a scatter diagram. DDE Data Transfer Just like Visual Basic, Wonderware can transfer data to other programs through DDE. Wonderware requires and Access Name, Application/Server Name, Topic name, and Item name. We will illustrate this process with the following example. Select Special/DDE Access Names. Select Add. Fill in the following data: DDE Access Name DDELink DDE Application/Server Name Excel DDE Topic Name Sheet1 Leave everything else at the default values. Select Special/Tagname Dictionary create bottlefill as a DDE Real. For the DDE Access Name choose DDELink, and for the Item choose R1C1. In the Special/Scripts/Window Scripts, enter bottlefill = slider; in the While Showing screen.
  • 8. Start Excel and minimize it. Press Runtime! in Wonderware. As the bottle moves on the screen, Row1 Column1 of Excel should show the present value. All of this should be fairly straight forward. You can get help in the Wonderware help menu. The DDE can also transfer to another server. Suppose we wanted to transfer to another computer named ENT12. The DDE Application/Server Name would change to //ENT12/Excel. 1