Training Exercises
Training Exercises
Training Exercises
No part of this publication may be reproduced in any form or by any means – electronic, mechanical,
photocopying, recording or otherwise – without prior permission in writing from DYNICS, Inc.
Microsoft® is a registered trademark of Microsoft Corporation, in the United States and/or other
countries.
The information contained in this document is for information purposes only. You assume full
responsibility for the appropriate use of information contained herein, and use of associated software.
While DYNICS takes pride in providing accurate and up-to-date information about software product
installation and use, this document may contain omissions or inaccuracies. Without limiting the
foregoing, DYNICS, Inc. disclaims any and all warranties, expressed or implied, including the warranty or
merchantability and fitness for a particular purpose. DYNICS, Inc., including its officers, directors,
employees or agents, does not warrant or guarantee the accuracy or completeness of its information or
services, and specifically disclaims liability for any damages, including special or consequential damages,
arising out of the user of such information or software, even if DYNICS, Inc. has been advised in advance
of the possibility of such damages. The user of the software described and the information contained
herein is subject to the DYNICS, Inc. standard license agreement, which must be executed by the buyer
or user before the use of the software or such information.
Exercise 1 .................................................................................................................................................. 4
Exercise 2 .................................................................................................................................................. 6
Devices ........................................................................................................................................................ 14
Exercise 3 ................................................................................................................................................ 14
Alarms ......................................................................................................................................................... 16
Exercise 4 ................................................................................................................................................ 16
Exercise 5 ................................................................................................................................................ 19
Trend ........................................................................................................................................................... 21
Exercise 6 ................................................................................................................................................ 21
Datasets ...................................................................................................................................................... 27
Exercise 7 ................................................................................................................................................ 27
Report ......................................................................................................................................................... 31
Exercise 8 ................................................................................................................................................ 31
Exercise 9 ................................................................................................................................................ 33
Goal: Create the Menu display with 7 buttons to switch between the project’s displays.
This menu should look like the figure below:
7. Click on the button and change the Text property in the Button to “Main”.
Exercise 2
Goal: Create the Main display. It will simulate two areas where the temperature is increasing
and we need to use two fans to stabilize or to decrease the temperature.
Exercise 2.1
8. Create a Text Output just below the fan and configure the dynamic output as shown
below:
3. Click on Draw environment and click on the icon in the top toolbar to create a
new display.
4. Configure the new display in the DisplaySettings as shown below:
if(@Tag.fan1Enabled[@Tag.area] == 1) {
@Tag.temperature[@Tag.area] -= 1;
}
if(@Tag.fan2Enabled[@Tag.area] == 1) {
@Tag.temperature[@Tag.area] -= 1;
}
if(@Tag.temperature[@Tag.area] <= 0) {
@Tag.temperature[@Tag.area] = 0;
}
}
Goal: Create a communication driver using the “Modbus Master – TCP and RS232” protocol over
TCP/IP interface.
1. Click on the Edit environment and the Tags section.
2. Create the tags shown below:
Name Type
modbus000001 Digital
modbus000002 Digital
modbus000003 Digital
modbus400001 Integer
modbus400002 Integer
modbus400003 Integer
Name Type
FilterAlarm Text
4. Click on the Items tab and configure the items as shown below:
5. Click on the Draw environment and create a new display called “AlarmOnlinePage”.
6. Click on the icon to draw an AlarmWindow object in the display and configure it as
shown below:
7. Add the other elements to the display to make the AlarmOnlinePage display look like the
figure below:
Alarms
Warning
Exercise 5
Name Type
StartDate DateTime
EndDate DateTime
EndDate
cursorDateTime DateTime
8. Click on the Draw environment and create a new display called “TrendPage”.
Note: Generally, the Trend Window is recommended over the Trend Legacy, however, the Trend
Legacy works with iOS, while the Trend Window does not.
b. In the top right corner, check the box “Cursor Enable” and click on “Settings”
c. Your cursor settings should be configured as below:
10. Create two Combo-Box objects on the display and configure them as below:
Combo-Box1 – Pen1
Combo-Box2 – Pen2
13. On the rectangle Dynamics, set the MoveDrag like the figure below:
Name Type
Admission DateTime
Name Text
Identification Integer
Name Type
Employee Employee
5. Using the Windows Explorer, go to <ProViewDS installation folder> \pv-2014.2
6. Run the TDatabaseBuilder.exe
7. Click on the File menu and New Database. Call it “Training”.
8. Right-click on Tables and click on New Table. Call is “Employees”.
9. Configure three columns, as shown below:
12. Go back to ProViewDS, click on the Edit environment and the Datasets section.
13. Click on DBs tab and on Create new…
14. Select the “TDB 4 direct connection” as the Provider and click the Ok button.
22. Click on Draw environment and create a new display called “DatasetPage”.
23. Click on the icon and draw a DataGrid in the display. Configure the DataGrid as shown
below:
25. Configure Dynamic Action of the buttons with the ToggleValue command with the
respective Dataset commands:
Dataset.Table.TBEmployees.Select
Dataset.Table.TBEmployees.Next
26. To Export the grid to Excel, create a new button labelled “Export to Excel”
27. Set the new button to run a script on from the Dynamics -> RunScript option
28. Change the “DisplayOpening” method as shown below:
TDataGridWindow grid;
29. In the CodeBehind, create and edit the script as shown below:
Important Info
The saved file will be compatible with Excel, however, an alert message might appear depending
on your Excel version. The file will still be accessible. There is also an option to save as “xml”
format. In that case, the user must to open the file by the Excel menu instead of double-clicking
on the file.
Name Type
ReportFile Text
2. Click on the Edit environment and the Reports section.
3. Configure as shown below:
5. Click on the Draw environment and create a new display called “ReportPage”.
6. Right-click on the icon and select the Report Viewer and add it to the display.
7. Configure the Report Viewer as shown below: