VjD51 Exercises

102
Schneider Electric | Industry Business | Training Department p 1 Vijeo Designer Training XBT G, XBT GT, XBT GK, Smart / Compact, Flex iPC, XBTGTW, Vijeo Designer V5.1 EXERCISES BOOK Monday, 04 January 2010

Transcript of VjD51 Exercises

Page 1: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 1

Vijeo Designer Training XBT G, XBT GT, XBT GK, Smart / Compact, Flex iPC, XBTGTW, Vijeo Designer V5.1

EXERCISES BOOK

Monday, 04 January 2010

Page 2: VjD51 Exercises

VijeoDesigner Training Course

p 2

At a glance This training manual is a supplement to the authorised training. In order to make full use of the software you should also refer to the Online Help of VijeoDesigner. The graphics displaying screen shots have been taken using the Windows XP operating system using Classic mode display properties. If you are running a different version of Windows then your screens may differ slightly from the ones shown in the training manual. Some screen shots may have been taken from beta versions of the software and mayvary slightly from release screen shots. Summary

Exercise 1 – Starting a New Project ................................................................................ 4

Exercise 2 – Importing PLC Variables ............................................................................12

Exercise 3 – The Process Panel.....................................................................................14

Exercise 4 – Popup Panels & Motion..............................................................................27

Exercise 5 - Trending .....................................................................................................39

Exercise 6 - Alarms ........................................................................................................46

Exercise 7 - Scripting......................................................................................................50

Exercise 8 - Security.......................................................................................................52

Exercise 9 - Recipes.......................................................................................................58

Exercise 10 – Data Sharing ............................................................................................64

Exercise 11 - Webgate ...................................................................................................67

Exercise 12 – Multimedia - Snapshots............................................................................71

Exercise 13 – Multimedia - Video ...................................................................................77

Exercise 14 – Application Language...............................................................................87

Exercise 15 – Alarm message from external sources .....................................................91

Exercise 16 – Reference & Structured Variables ............................................................96

Page 3: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 3

This page intentionally blank

Page 4: VjD51 Exercises

VijeoDesigner Training Course

p 4

Exercise 1 – Starting a New Project

Exercise 1 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 Create a new folder on your PC named C:\Class. Your instructor

will give you files to copy into this folder. These will be used at various points in the course

2 Launch Vijeo Designer. Right click on the Vijeo Manager. Select New Project.

3 Name your project “Class”

Select single target and No Password as options 4 Select XBTGT model 6340 and name Target 1 “MyBrewery ”

Page 5: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 5

5 Set the target’s IP address

6 Add a Schneider TCPIP Communications driver for the PLC. The IP address will be added at the end of this exercise

Click on the Finish button to end the Wizard

Page 6: VjD51 Exercises

VijeoDesigner Training Course

p 6

7 Expand your projects in the Navigator until you can see the communications driver

Select “ModbusEquipment01 in the Navigator and change it’s name to PLC200 in the Inspector.

8 Set the address for the PLC connection to 192.168.1.200. If you are connecting to a Unity controller, select the IEC 61131 Syntax addressing option. If it’s a Modicon PLC, select 1 based addressing and Low word first (double word) as shown on the right below. Click on OK when finished (Premium based) (Traditional Modicon)

Page 7: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 7

9 From the Navigator, right click on Master Panel and select New Panel

10

- add the image (1) provided by your Instructor

(Brewery2.jpg) to the panel - Add two Data Display objects to show the date and time

- Save the Master panel as “MasterPanel1 The background color of the master panel does not matter since it will be come an “overlay” to the Base panel that uses it

Page 8: VjD51 Exercises

VijeoDesigner Training Course

p 8

11 From the Navigator, right click on Graphic Panels and select New Panel with Master

Select the MasterPanel1 option

Adjust the color of the panel to match the edge of the MasterPanel1 using the color picker tool Save the panel using the name “Main ” Repeat the same procedure to create a second new base panel. Save this panel as “Navigate ”

12 Create four new additional new panels but do not use the master panel for these four panels. Name these panels:

Page 9: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 9

13 Declare the “Brewery2.jpg” as starting splash screen: navigate into the target properties, select “Startup Options” then Custom Welcome screen” and select the picture file.

14 Open the “Main” panel.

- Add two Text objects (1) – Vijeo Modern 28x50, 3D, Blue & Black colors Create the two text labels shown (large text)

- Add a Switch (2) from the Native parts. Set the switches’ foreground color to light gray. Change the label to read “Enter” and the label’s color to Black

- Animate the switch to Navigate to panel2

Page 10: VjD51 Exercises

VijeoDesigner Training Course

p 10

- Save

15 The Navigate Panel (named Navigate) - Open the Navigate panel

and create the page shown.

Animate the switches as follows: Switch Panel Brew Process Process Alarms Alarms Process History History System Settings - animate to System, Configuration Add a native switch “Back”, style 20, with “previous panel” functionality.

16 Group all the buttons. Rename the group “NavigationBar” and drag it into the touchest area.

17 Drag this “NavigationBar” into all the other panels. The advantage of using this method is to have a quick access to objects often used.

18 Validate your project.

Page 11: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 11

Fix any Red Errors” (if any) that appear in the “Feedback Zone”

19 Right click on your Target and select the Simulate option shown. Your project will compile, and start in a window. It will attempt to communicate with the PLC

Test your navigation between all panels to insure everything functions correctly. Fix anything that does not work correctly

20 This completes this exercise

Page 12: VjD51 Exercises

VijeoDesigner Training Course

p 12

Exercise 2 – Importing PLC Variables

Exercise 2 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step This process uses a link to a Unity .XVM file

Step Action 1 From the variables tab, right click on the target and select “Link

Variables .”

2 Link to the file VD_VARS.XVM (Unity tag file). This file will be in the C:\Class folder. Browse for the file, select it and click on the Open button. You must have Unity installed to use .XVM

3 When the file is opened, you will see a list of all the variables. Click on the “Select All” button and each variable gets a tick mark.

Click the Add button and the variables are added

Page 13: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 13

4 Change the default folder that the system generates to External buy selecting the folder, and changing the name in the Inspector

Save your project This completes this exercise

Page 14: VjD51 Exercises

VijeoDesigner Training Course

p 14

Exercise 3 – The Process Panel

Exercise 3 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 At the end of this exercise, the process panel will appear as

shown

2 Navigate to the Toolchest tab and select the user folder. Right click and select the “Import Folder” option (1)

Page 15: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 15

Navigate to your “Class” folder and import the Training.ztc file (2). This will create a custom folder in the Toolchest that contains the pipes for the Process screen. - Drag the pipes from the folder to the Process p[anel

3 Add the following items to the Process Panel - The Brew Process – panel label - Tank – from the toolchest, Image Library – Tanks – Batch

Tank (2) - Hoppers – Image Library – Tank 4 (3) Add text labels - Pipes (1) – you should have already added them - Steam Valve (4) – use the polygon tool and draw. The stem

is a thick line. Use the “Pie” tool to draw the valve handle - Steam Pipe – Use the Polyline tool to draw. Increase the

thickness of the line when finished - Pump (6) – from Image Library – classic pump. Add a circle

on the pump to show it’s status. Add your own pipe from the library

- Tank Cutout (7)– draw using the Polygon tool

Page 16: VjD51 Exercises

VijeoDesigner Training Course

p 16

Add a button to this panel that will return you to the Navigate panel. In the example shown, it is under the panel’s title Save

4 Add the following parts to the panel

Page 17: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 17

Native Numeric Display (1) – Add five Native Numeric Displays. Configure the hopper displays for “4” digits. Configure the Step counter for one digit - Draw four circles (2). These will represent valves- - Add all labels (3)

5 Add the following parts:

- Three additional Native Numeric Displays (1). The tank level

display should be able to show 4 digits. Set the Temp & Time displays for 2 digits

- Add text labels as shown

6 Next, you will create the process control panel.

- Add six Native Numeric Displays (1) – 3 digits each

Page 18: VjD51 Exercises

VijeoDesigner Training Course

p 18

- Add three switches (2) Add the labels shown - Add a lamp (3)

7 Animate the numeric displays below as follows:

Water - External.S1_WATERLVL Malt - External.S1_MALTLVL Adjuncts - External.S1_ADJUNCTLVL Hops - External.S1_HOPSLVL Step Counter - External.S1_Stepcounter (only 1 digit)

8 Animate the valves below the hopper as follows:

(OFF = RED, ON = GREEN) (Variables left to right) External.S1_WATERACTIVE External.S1_MALTACTIVE External.S1_ADJUNCTSACTIVE

Page 19: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 19

External.S1_HOPSACTIVE Animate for ON/OFF foreground colors

9 Continue animating

Temp - External.S1_COOKTEMPACT Time - External.S1_COOKTIMEACT Tank level - External.S1_BREWLEVEL (4 digits)

10 Create a new color resource named process

Page 20: VjD51 Exercises

VijeoDesigner Training Course

p 20

Set it up as shown

Set the OFF color to Red and the ON color to Green

11 Animate each part of the valve and the steam pipe separately and link to the color resource “Process”

12 Animate the Process panel numeric displays as follows

Page 21: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 21

Water – External.S1_WATERSP Malt – External.S1_MALTSP Cook Temp – External.S1_COOKTEMPSP Adjuncts – External.S1_ADJUNCTSP Hops – External.S1_HOPSSP Cook Time - External.S1_COOKTIMESP Activate the popup keypad for setpoint input from the Input Mode setpoint

13 Next you will animate the buttons The Start button: (External.S1_START)

Page 22: VjD51 Exercises

VijeoDesigner Training Course

p 22

14 The STOP button (External.S1_STOP)

15 The Reset Button (External.S1_RESET)

Page 23: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 23

The PLC program is expecting a low to high transition in order to reset the program

16 Animate the ON/OFF lamp as follows: From the colors tab, set the lamp to Green when the bit is ON and Red when the bit is OFF

17 Animate the circle you overlaid on the pump as shown. Red =

OFF, Green = ON (use the color resource if you like)

Page 24: VjD51 Exercises

VijeoDesigner Training Course

p 24

18 The last step is to animate the bargraph on the tank, Double click on the bargraph and animate as shown below

Notice that there is a scaling involved

19 Limiting Operator input – Select Variables and select the first variable to be configured

Page 25: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 25

From the Inspector, enable Input Range and add the limits shown in the table below. Repeat for each variable listed

Variable Min Max S1_WATERSP 100 200 S1_MALTSP 10 80 S1_HOPSSP 5 15 S1_ADJSP 20 100 S1_COOKTEMPSP 10 50 S1_COOKTIMESP 5 10 Save, Validate and fix any problems Run your project (simulate) it should work at this point You must have a value in all input fields or the PLC program will not allow the program to start (PLC)

Page 26: VjD51 Exercises

VijeoDesigner Training Course

p 26

This page intentionally blank

Page 27: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 27

Exercise 4 – Popup Panels & Motion

Exercise 4 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 When you have completed this exercise, you will have created a

popup panel that launches when you click on the brew tank. The popup panel will have two analog meters on it and a close button

2 Create a new popup window from the navigator

3 Add two native analog meters and a native switch as shown

4 The left meter is linked to External.COOKTEMPSP and the right meter is linked to External.S1_COOKTEMPACT. Scale both meters as shown

Page 28: VjD51 Exercises

VijeoDesigner Training Course

p 28

5 Double click on the switch and label the switch “Close” Animate as shown:

Save and close the popup

6 Open the process panel and add a native switch. Stretch the switch so that it covers the brew tank and set it’s property to invisible.

7 Animate the switch as shown. Notice the open location (100.100)

Page 29: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 29

8 Save, validate and test your popup by running a batch. Specify a temperature of 45-50 degrees (remember the scaling on the meters) Once the batch starts cooking, click on the tank to open the popup and observe the meters operation

9 Shutdown the simulator. This completes the first p art of this exercise

10 To simplify the next part, you will import a new panel that is partially configured and then complete the animation. When finished, you will have a kegging line. It currently takes several steps to move a panel between projects on different PCs.

11 Click on the Vijeo Manager tab

12 Right click on the Vijeo Manager and select Import Project

13 Browse your C:\Class folder and select “KeggingIEC ”and import it. This project contains the panel and variables that you will move into your brewery project

14 Open the KeggingIEC project (save your current project if prompted) . Notice that it contains a single panel.

Page 30: VjD51 Exercises

VijeoDesigner Training Course

p 30

15 Right click on the panel and copy it.

Save and Close the KeggingIEC project. Open the Brewery project, select the Base Panels option, right click and past the panel

The panel is pasted into the Brewery project. Save

Page 31: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 31

16 The panel is added to your project. The system adds all the graphic items and tag names used in the animations. Verify that a new data structure named Keg was created and that the external variables within have PLC addresses. Note – if the scangroup linked to the variables in the kegging project did not exist in the brewery project, the system would drop the address when you pasted in the panel. This can be avoided by either modifying the scangroup in the source project or creating a scan group of the same name (as source) in the destination project The PLC addresses for an IEC project are

Verify that the addresses are correct. If they are not present, you can enter them manually using the list above or try copying and pasting the new panel into the Brewery project again

Page 32: VjD51 Exercises

VijeoDesigner Training Course

p 32

17 Open the that panel you just imported (Kegging) to complete the animation

When running, the keg will move down the conveyor line and stop under the nozzle you’ve selected. The nozzle willl move down, fill the keg, then move up. The keg then moves to the end of the conveyor line. The line can run one keg and stop or run continuously. Once you’ve select selected a beer type, you cannot select again until you start the next batch or if your reset. Remember, everyone is using the same variables.

18 Keg animation – Double click on the keg and animate as shown. Notice that the Keg will move 581 pixels from the start position as the Keg.keg_cntr variable changes from 0 to 500 counts

Page 33: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 33

19 Each of the three brew selectors switches will have 3 animations Light Beer – first Animation

20 Light Beer – second animation

Page 34: VjD51 Exercises

VijeoDesigner Training Course

p 34

21 Light Beer – third animation

22 When you’ve finished, each switch should have three animations

23 Dark Beer – first animation

Page 35: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 35

24 Dark Beer – second animation

25 Dark Beer – third animation

Page 36: VjD51 Exercises

VijeoDesigner Training Course

p 36

26 Ale – first animation

27 Ale – second animation

Page 37: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 37

28 Ale – third animation

29 Double click on the switch labeled “Single” and animate as shown

Page 38: VjD51 Exercises

VijeoDesigner Training Course

p 38

Click on the label tab and look at the configuration. This switch will display different messages, depending on the state of the bit

30 Open the Navigation panel and add a button to navigate to the Kegging panel

31 Save, validate and test your line. Remember the other students are sharing the same variables

32 This completes this exercise

Page 39: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 39

Exercise 5 - Trending

Exercise 5 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 Upon completion of this exercise, the History Panel will appear

similar to the charts shown:below

2

1) Open the History panel and add a realtime trend chart (Native tool) and size so the it fills ½ the panel. Scale the chart 0 - 20

Page 40: VjD51 Exercises

VijeoDesigner Training Course

p 40

3 The graph will be linked to the S1_COOKTIMESP and S1_COOKTIMEACT variables. When selecting them, you may have this message:

Indeed, trend variables must be logged. This action will be done the next steps.

3 Configure the chart as shown

Page 41: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 41

Only channels 1 & 2 are configured. Pick any colors that you like for the panel, and the chart for this exercise. Set the scaling as shown

4 Add a historical trend (toolchest) below the realtime trend. Pick any one you like, they all do the same thing (but look different)

Page 42: VjD51 Exercises

VijeoDesigner Training Course

p 42

5 Configure the trend chart as shown

Page 43: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 43

Scale the chart 0-1000 Select any pen colors you like

6 Open the default logging group from the Navigator

Page 44: VjD51 Exercises

VijeoDesigner Training Course

p 44

Set the Sampling rate to 3 seconds. This will control the scroll rate on your charts

7 Navigate to the variables tab. Each variable that is linked to the charts must be added to the logging group

This will also control the scroll rate of the chart

8 Insure that each of the six variables is attached to the logging group.

9 Validate and test the panel’s operation by running a several batches in a row. After sufficient data has been collected,

Page 45: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 45

navigate to the history panel and observe the charts operation. Request some historical data from the historical chart

10 This completes this exercise

Page 46: VjD51 Exercises

VijeoDesigner Training Course

p 46

Exercise 6 - Alarms

Exercise 6 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 From the Navigator, create a new Alarm Group named

Ingredients_Low . You can just rename the default group

2 Open the Sound option from the Data Files area in the Navigator

3 With Sound selected, create an alias named “alarm” and browse

for the alarm.wav file as shown.

This wave file is now available to be played when an alarm is triggered

Page 47: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 47

4 Assign the sound file to the S1_WATERLVL variable by selecting the Sound option and attaching the sound alias as shown. This will cause the sound to be played when that alarm occurs

5 Configure all the alarm threshold for the level variables. Configure also the alarm message to display.

5 Select your project in the Navigator and add a Global Alarm banner on the bottom of the panel. Select any attributes you like

Page 48: VjD51 Exercises

VijeoDesigner Training Course

p 48

6

- Open the Alarm panel and add an Alarm Summary (Native ) - Add a navigation button from the Alarm panel to the AlarmH Panel - Add a navigation button from the AlarmH panel back to the - Alarm panel - Add an Alarm Summary to the AlarmH panel. Set it to run in historical mode - Validate and save your project - Run your application through several cycles until an alarm(s) are shown in the alarm banner - Go to the Alarm panel and acknowledge your alarms - Stop the batch and reset the application - Go back to the Alarm panel, the alarms should be gone - Go to the AlarmH panel, it should show all the historic alarm actions. - Experiment with the viewer(s) settings. - Experiment the logging mode.

7 Validate and test the alarms by running the process several times, until the supply hoppers get low enough to trip an alarm

8 When alarms occur, acknowledge them from the viewer and notice operation of the viewer

9 This completes this exercise

Page 49: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 49

This page is blank

Page 50: VjD51 Exercises

VijeoDesigner Training Course

p 50

Exercise 7 - Scripting

Exercise 7 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 Add switches (switch07) that look like “Spin Buttons” from the

Native Switches to the Process Panel as shown (1)

2 Double click on the top switch and add a script under the “While

Touch ” tab.

3 Create the script as shown

Hint - Use the right click – insert function to help you generate the code. Validate your script when finished

Page 51: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 51

4 Add the script below to the bottom spin button under the while pressed tab. Validate your script when finished

This script uses a different method to manipulate the water setpoint variable. It also includes a comment

5 When all scripts validate, test the operation of your scripts. When you select and hold down one of the switches that you just created, the sater setpoint will either increment or decrement, depending on which one you selected

6 This completes this exercise

Page 52: VjD51 Exercises

VijeoDesigner Training Course

p 52

Exercise 8 - Security

Exercise 8 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 Create a new panel named “Secure” and number it 999

2 Select the security option from the Navigator

Page 53: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 53

3 Make the adjustments shown below in the Inspector

When you test security, the application will cancel back to panel 999 when the inactivity period expires. It will not matter if you are on a secure or not secure panel when the time expires.

4 With Security still selected in the Navigator, create two new security groups. Name the first group “admin ” and the second group “maint ”

admin = security level 1 main t = security level 9

5 Create two new users by right clicking on the User field. Using upper case letters, name the users BOSS and BUBBA. Make the passwords BOSS and BUBBA (upper case)

Assign the BOSS to the admin group and BUBBA to the maint group as shown

Page 54: VjD51 Exercises

VijeoDesigner Training Course

p 54

6 Open the Secure panel and add a “Login ” tool. This is located in the Toolchest, under security

Adjust to colors of the tool to what ever you like

Add two switches labeled Admin and Bubba as shown

7 Configure the Admin switch as follows:

From the Advanced tab, assign switch to the admin security level

Page 55: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 55

8 Configure Bubba switch as follows:

Under the advanced tab, assign it to the maintenance group

Under the Visibility tab, enter the expression shown below

_UserLevel is a system tag that holds the security level of the current logged in user. The expression will make the switch visible if the current user is maint (e.g., BUBBA). It will not be visible when the BOSS logs in

9 Open the Navigate panel and select the Brew Process switch

Under the advanced tab, set the security level to maint. When the BOSS logs in, he will be able to go to the Navigate panel but does not have permission to go to the Process panel.

10 From the Navigato r, with your target selected, set the initial panel to 999:Secure

This will force the user to login when the project first starts.

Page 56: VjD51 Exercises

VijeoDesigner Training Course

p 56

11 Save, Validate and test your operation.

1) Login as BUBBA and observe that you are locked out of

the process panel. 2) Do not touch the simulator for 1 minute, you should cancel

back to the secure panel and be logged out. 3) Log in as BUBBA and notice that the BUBBA button

appears. You should be able to navigate to the process panel

4) Feel free to experiment with other options

12 This completes this exercise

Page 57: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 57

This page is blank

Page 58: VjD51 Exercises

VijeoDesigner Training Course

p 58

Exercise 9 - Recipes

Exercise 9 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 From the Navigator, locate the Recipe option, right click and

create a new Recipe group

Name your Recipe group Brewery1

2 There will be three recipes, Dark, Light and Ale. Right click

On the default recipe and create two new recipes. Rename the recipes to Dark, Light and Ale. The finished recipes should appear as shown below

Page 59: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 59

3 Next you will select the ingredient variables for the recipes. Each recipe will use the same variables, but will have different quantities of each. ingredient Collapse the Recipe fields (left side of editor) back to their original size

Browse for the variables from the variable field by double clicking in the variable field

4 The finished ingredient values should appear as shown

5 Create a new popup panel named “Recipe”

Page 60: VjD51 Exercises

VijeoDesigner Training Course

p 60

6

Adjust the panel color to something that you like.

1) Add a switch to the panel that takes you back to the previous panel. Use the “Previous” option is the switche’s animation

2) Add a “Small Recipe Manager” control to the panel. From the toolchest

3) Add a Text Error Object to the panel (toolchest) (labeled no error in the picture) and position it below the recipe manager. This is an optional recipe tool that is located with the other recipe objects

You can use a complete object (above) or you can build your own recipe control from individual parts

Page 61: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 61

7 Add a switch to the process panel labeled “Recipe” as shown. Configure the switch to launch the Recipe popup panel

8 Save, Validate and test the recipe operation. Since we are all sharing a single PLC, the ingredient values will change every time someone sends a new value to the PLC

9 In this part, you will add in recipe security. Open your recipes and add the access levels shown. These levels have NOTHING TO DO WITH the security levels you set up before

A user with access right 7 can run all the recipes. A user with access level 2 could run 2 or 1. Access level 0 means no security.

Page 62: VjD51 Exercises

VijeoDesigner Training Course

p 62

10 Open up the Secure panel and double click on the Admin switch..

Add the command Word/Set as shown. This line writes the value 2 into the variable RecipeControlDefault._AccessRight This variable controls the access rights for recipes. Add the Change Panel(2) command shown. Make sure that access rights are set before you navigate away from the secure panel (e.g., it’s first) Repeat the same procedure for the Bubba switch only write a value of 7 into the RecipeControlDefault._AccessTight variable

11 Since the access rights will not change until you change it, you can insure that the access rights are reset to 0 when the logged in user is logged out by the system. This can be done by adding a one line script

12 Add a panel level script to the secure panel

13 Set the script to trigger “ON OPEN” event for the secure panel

Page 63: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 63

14 Create the script shown below

This will set the access rights to 0, anytime the secure panel opens. Therefore, after one minute of inactivity, the access rights will reset to zero

15 If you disabled Security at the close of the earlier exercise, you must re-enable it now. Change the logout Behavior such that the application jumps to the secure panel after 1 minute of inactivity

Also set your first panel to be the secure panel. This will force you to login when the application starts Remove the security from the Process button on the Navigate panel or the Boss will not be able to navigate to the process panel

16 Validate, and test the operation of security. Notice that when The Boss is logged in, he can only see one recipe but when Bubba is logged in, he can run any of the three batches

17 This completes this exercise

Page 64: VjD51 Exercises

VijeoDesigner Training Course

p 64

Exercise 10 – Data Sharing

Exercise 10 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 To save time, your Instructor will have you restore a project that

has been started for you. You will need to complete the project and when you run your project, you will become a “display client” of the hardware target. In other words, the hardware target will poll the PLC for data and share it with your application running in the simulator.

2 If your Brewery project was created in a folder, select your folder and right click. If the Brewery project was not created in a folder, create one now and move your brewery project into the floder by drag and drop. Right click on the folder. The folder is not technically required for this exercise but it helps you to organize your work. Select Import project

3 Import the project “Sharing ” from the class file folder you have been using.

The project is imported

Page 65: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 65

4 Open the Sharing project. Two target’s are configured. DO NOT EDIT THE SERVER PROJECT. This is a copy of the project that will be running in the hardware target

5 Open the Client project. Notice that there are no communications drivers configured. In this exercise, all target to PLC communication will be done by the hardware target. Also notice that the client program does not have any variables configured. The client will get all it’s information from that shared variables in the server. You will be configuring a pure HMI client

6 Open Panel2. The animated fields are present but are not linked

to any variables yet 7 Link a variable to the animated field as follows:

1) Double click on the “Integer Input field and browse for the Server.input_int variable from the Server project. This variable has been previously “shared” in sthe server project so you can add it to the Client’s Panel2

Page 66: VjD51 Exercises

VijeoDesigner Training Course

p 66

8 Link the other three Animation fields as follows: Field Variable Integer Output - output_int Float Input - input_float Float Output - output_float Save, Validate and test your project

9 Since there is no Exclusive Input or any protection enabled at this point, everyone should be able to go to Panel 2 at the same time. If there are more than 8 simulators, some will not be able to connect to the server until others leave

Shut down your simulator when finished

10 Select Panel2 of your client program

In the Inspector, enable Exclusive Input

Page 67: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 67

Save, validate and test your application. This time, only one target should be able to access panel 2 at a time. All others should receive an error when they try. Take turns connecting

11 This completes this exercise

Exercise 11 - Webgate

Exercise 11 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 In this exercise, you will run the Sharing application again and

work with another group in the class. First you will run your Sharing application in simulation mode while your partner group creates a Webgate connection with your simulator. Then you will reverse roles and you will make a Webgate connection with your partners simulator Finally, we will try multiple connections to a single server

2 Open the “Sharing ” project you used earlier. Once again, only edit the client project.

3 With the client project selected in the Navigator, enable Webgate in the Inspector (under the Webserver options)

4 Ignore the publish options that popup when you enable Webgate.

Follow the procedure below to set the Publish property globally Select Publish as shown below

Page 68: VjD51 Exercises

VijeoDesigner Training Course

p 68

Enable the publishing of everything and click on OK

5 Work out with your partner group who will be the webgate client

first and who will be the server. Both groups need to disable Exclusive Input on Panel 2 ..Start the server.

6 The Client group should open an Internet Browser and type in the IP address of the Server application

7 The Default Webgate screen appears

Page 69: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 69

8 Click on the Monitoring option

9 Select the New Window option and ignore any error messages

you might see

10 Navigate to Panel 2. Observe that you see live data via the

webgate connection. Where is the data actually coming from?

Page 70: VjD51 Exercises

VijeoDesigner Training Course

p 70

The hardware target is actually polling the PLC and sharing the data with your simulator who in turn, is sending it to a Webgate client. Change the setpoints and the data should change

11 Right click in an open area of the screen on the webgate client. Select the Synchronize option

12 Now, change panels on the server application and notice what the client does.

13 Switch roles with your partner group and let them try their webgate connection and the options described

14 Designate one student station as a server and connect multiple clients to the server (max of 4).

15 This completes this exercise

Page 71: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 71

Exercise 12 – Multimedia - Snapshots

Exercise 12 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 Create a new sub folder in your Class folder named “Picts” Your

path will be C:\Class\picts 2 Reopen the Brewery project. With the Brewery project select in

the Navigator, activate Screen Snapshot in the Inspector

The system will create several new variables when this feature is activated

3 Create a new switch on the process panel as shown

Page 72: VjD51 Exercises

VijeoDesigner Training Course

p 72

4 Create a new integer variable names PICT as follows:

Link it to 40400 or %MW400, depending on your PLC

Active sharing for the variable PICT as shown

5 Animate the switch as follows:

Even though the Snapshot.Control variable is an integer, you can apply a bit operations (SET/RESET) to it. Vijeo Designer does not differentiate between a bit’s value of 0 or 1 and an Integers value of 0 or 1. In other words Bits and Integer values of 0/1 are treated the same, Each time the switch is activated, a picture will be taken

Page 73: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 73

6 Enable target & Web Gate security. Make “Process” the starting panel

7 Add the following Panel Action script on the Process panel. Set the triggering of the script as shown Create New Panel Action

The script should run whenever the variable PICT is true

Actual Script

The Vijeo Designer Simulator cannot store pictures since there is no compact flash. It will display pictures using the JPEG viewer but the operation is totally correct. This script runs in your simulator and also the hardware target. Anytime any student presses the Picture button in the simulator, it will set the bit PICT in the target. This bit causes the script in the real Target to run, take a picture and store it in the compact flash.

8 Save, Validate and run your project. Take ONE picture. Go to the JPEG viewer and see if your picture is there

9 Ask your instructor to open the JPEG Viewer page in the target and see the picture(s) there. These pictures come from the compact flash

10 Launch the Data Manager. This is located under the Tools menu

Page 74: VjD51 Exercises

VijeoDesigner Training Course

p 74

11 Create a new connection to the target and name it “Bubba” when prompted

12 Enter the information shown. The User name and Password are BUBBA, BUBBA (uppercase)

Data location is the secondary drive. Click on Create when ready

13 With Bubba showing in the Media window, click on Next

Page 75: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 75

14 Select Retrieve files

15 Select only Captured Images. Set the path to the picts folder you created earlier

Page 76: VjD51 Exercises

VijeoDesigner Training Course

p 76

If you are successful, you will see a status report similar to the one below

16 Go to your C:\Class\picts folder and double click on one of the pictures. You should see the process screen. If you have time, open a Web Gate connection to the target and take a picture from the process screen. Open the JPEG Viewer and observe the captured screens. Remember that each student is also taking pictures

17 This completes this exercise. Proceed to the next exercise

Page 77: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 77

Exercise 13 – Multimedia - Video

Exercise 13 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 In this exercise, you will initiate a vide capture from your

simulator. The actual video will be taken generated by the target. The videos will be played on the target and retrieved and played on your PC. This will require you to install a video player provided by your instructor, that can play MPG4 format videos

2 Install the .MPG4 video player provided by your ins tructor

3 With your application selected in the Navigator, enable NTSC Video in the Inspector

4 Configure video to record in the MPEG4 format

Page 78: VjD51 Exercises

VijeoDesigner Training Course

p 78

5 Create a new panel named Video . Add a switch that will take you back to the previous screen and a VideoDisplay tool. The panel should appear as below:

6 Configure the VideoDisplay tool as shown

7 Create a new color resource named “VideoColors” with 5 states and for Message Displays only

Page 79: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 79

8 Pick any colors you like with the exception that the “2” state should be a slow flashing red

9 Create a new text resource named ”VideoMessage“ that has 5 states and is targeted for Message Displays

Configure it as shown below

Page 80: VjD51 Exercises

VijeoDesigner Training Course

p 80

10 Create a new variable named “MovieStatus” as shown

11 Add a message display below the Back switch

Configure the message display as shown. Notice that it uses the two resources that you just created

Page 81: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 81

14 Create a new external variable named “Movie” as shown

15 Select the VideoRecord.control variable

Page 82: VjD51 Exercises

VijeoDesigner Training Course

p 82

Add the Movie variable to the ReadFrom field

16 Add two switches to your Video Panel as shown

Label them Record and Stop. Configure them as shown: The Record Switch Bit Set(Movie)

The Stop Switch (Bit Reset Movie)

17 Create a panel action (Script) for your Video panel that is triggered as shown

Page 83: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 83

18 The script should appear as shown

This script will copy the status of the VideoRecord.Status variable to the located variable, MovieStatus. The Text display will then display a message from the text resource, that is determined by the value in the MovieStatus variable. This will allow your simulator to display the status of the movie being recorded or playing in the hardware target. I

19 Nominate one student to download his project to the hardware target. Everybody else, open your script (if closed) and comment the two lines above out. This must be done so that the simulators will not be fighting the hardware ov er control of the moviestatus variable

(the student that downloaded his project to the target must also alter his script after the download) Run your project in simulation mode When ready, ONE simulator can press the Record button. All simulators and the hardware target should display the recording message. Only record a video for a few seconds. Another student station can also start and stop the recording process.

20 Play the recorded movie from the hardware target.

Page 84: VjD51 Exercises

VijeoDesigner Training Course

p 84

21 (All students) Open your Data Manger and configure it to upload the recorded video

22 DO NOT ERASE AFTER THE UPLOAD

23 Open the uploaded video with the .MPG4 you installed at the beginning of this exercise

Page 85: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 85

24 Play the Video

25 This completes this exercise

Page 86: VjD51 Exercises

VijeoDesigner Training Course

p 86

This page intentionally blank

Page 87: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 87

Exercise 14 – Application Language

Exercise 13 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 In this exercise, you will switch your application to another

language. 2 From the navigator, create a second language 2(ex :French)

3 In the navigation panel, create 2 touch area.

Define the animation parameters for each touch area : • Animation Touch • Fonction Special / Change language (user application) • 1: English or 2: French

Page 88: VjD51 Exercises

VijeoDesigner Training Course

p 88

4 You can translate each text object in the second language

• Select the object to translate and access the Text property

• Select the second language 2 : French • Enter the text in the new language (ex. Eau)

5 To be sure that all the texts are translated, you can export a

language, translate all the items and import the translated texts in the new language • Export the english texts

Page 89: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 89

Translate the items of the text file (do not translate the object paths !)

And import the new translated text.

6 Run the simulator and test. 7 This completes this exercise

Page 90: VjD51 Exercises

VijeoDesigner Training Course

p 90

This page intentionally blank

Page 91: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 91

Exercise 15 – Alarm message from external sources

Exercise 13 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 In this exercise, you will display an alarm message which comes

from an external source (a text file) 2 In the C:\Class folder, check if you have this 4 text files (provided

by your instructor): • Alarm1_lang1.txt • Alarm1_lang2.txt • Alarm2_lang1.txt • Alarm2_lang2.txt You can open the first file to see what is inside:

The character "::" is used to separate the blocks Important note : when creating a file, it is mandatory to save it as « Unicode » format !

3 Define the alias associated to the previous text files : • Alarm00101 associated to Alarm1_lang1.txt file • Alarm00102 (Alarm1_lang2.txt) • Alarm00201 (Alarm2_lang1.txt) • Alarm00202 (Alarm2_lang2.txt) The Alias must be defined following this rule: Alarm = alias name

Page 92: VjD51 Exercises

VijeoDesigner Training Course

p 92

3 first digits (001) = file number 2 last digits (02) = language

4 Create a new popup panel. Name it “Level_alarms”.

Create a button to close the panel. 5 Insert a Text Display from the Toolchest panel

6 Configure the Text display as follow:

FileName: base of the Alias (here Alarm) FileNumber: create a INT variable FileNumber BlockNumber: create a INT variable BlockNumber.

7 Select the variable “S1_WATERLVL” and configure the Touch Action Alarm behaviour.

Page 93: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 93

Indicates to open the popup, and add also the TextDisplay feature with these parameters:

8 Do the same for the others variables following this table: Var name FileNumber value BlockNumber value S1_MALTLV 1 1 S1_HOPSLV 1 2 S1_ADJUNCTLV 1 3 Kegdone 2 0 Kegpaused 2 1

(make sure that alarm levels = 800

9 Open the AlarmH panel. Activate the TouchAction properties of the Historical trend.

Page 94: VjD51 Exercises

VijeoDesigner Training Course

p 94

10 Validate Save and Run the project. Start the brewing process.

Start and Stop the kegging, then open the AlarmH panel. You should have the history and be able to see the description from the text file by selecting an alarm. Change the language and see if it is taken into account.*

Page 95: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 95

This page intentionally blank

Page 96: VjD51 Exercises

VijeoDesigner Training Course

p 96

Exercise 16 – Reference & Structured Variables

Exercise 13 Complete each step in this exercise. Do not hesitate to ask questions if you

do not understand a step

Step Action 1 In this exercise, you will discover structured and reference

variables, which are helpful for saving time in development. 2 The idea here will be to monitor the valve of each tank.

First we monitor the Water and the Malt valves. Create 2 popup windows. Name them “water_valve” and “malt_valve”

3 Draw the following elements in the panels:

Do not link to any variable for now.

4 Right click on the Variable and select “User Data Types”

5 Add a structure, name it “valve”

6 Add 3 elements: status- type BOOL; temp – type INT and speed

– type INT.

7 Implement the instance of the variable:

Create a new variable, type “Valve”. Name it “Valve0”

Page 97: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 97

8 This step was just to show how to create a structure. Some

structure variable has been created in the PLC. You can import them if there are not here already.

9 Check that the valve variables exist. 4 structured variables should

appear:

You can now link the elements of the 2 popups to Valve 1 & Valve 2.

10 Validate and Run your application to test. 11 In our case, there are only 4 valves, but in some applications the

number of valves can be very high. To save time in development, we will use the reference variables. Create a new variables as follow: ValveN: This variable will be used as the index number for the valves. Type: INT, Source Internal, Initial value:1, range 1 to 4

Page 98: VjD51 Exercises

VijeoDesigner Training Course

p 98

- RefValveSpeed : This variable has to be referenced to the Valves speed. Type: INT, Source: Internal, and select the Reference radio button option. The reference name has to be build. Build the reference string as follow: External.Valve%d.speed

Where %d represents the index of the valve. The rest of the string must match with the targeted variable names (ex: External.Valve 1.speed ) %d will take the value of the variable set in the “Parameter” field. In our case, select “ValveN ”

Do the similar with the Temperature by creating the RefValveTemp

Page 99: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 99

Open the Valve popup and create 2 buttons: one to increment the ValveN , one to decrement it.

Replace the variable linked in the temperature and speed fields by the 2 referenced ones.

Do the same for the Status lamp.

Page 100: VjD51 Exercises

VijeoDesigner Training Course

p 100

12 Create a text animation for the title of the popup, that will change with the valve selection:

- create a new resource text: “ValvesNames ”

- link this resource to the message display

13 Save, Validate and Run.

Reset the process, load a recipe and start it. Open the popup and change the Valve visualization by clicking on the buttons which change the index ValveN. You can imagine how useful this method is when having to create monitoring view of similar components. Note that the parameter can also be a string. Concerning the string of the referenced variable, these rules

Page 101: VjD51 Exercises

Schneider Electric | Industry Business | Training Department

p 101

Page 102: VjD51 Exercises

VijeoDesigner Training Course

p 102

This page intentionally blank