Visual Programming Language VPL 12 Instructor Prof ShihChung

  • Slides: 26
Download presentation
Visual Programming Language (VPL) (1/2) Instructor Prof. Shih-Chung Kang 2008 Spring

Visual Programming Language (VPL) (1/2) Instructor Prof. Shih-Chung Kang 2008 Spring

Introduction • Microsoft Visual Programming Language (VPL) is an application development environment designed on

Introduction • Microsoft Visual Programming Language (VPL) is an application development environment designed on a graphical data-flow-based programming model. It is well suited to programming a variety of concurrent or distributed processing scenarios. • VPL is targeted for beginner programmers with a basic understanding of concepts like variables and logic. However, VPL is not limited to novices. The compositional nature of the programming language may appeal to more advanced programmers for rapid prototyping or code development. 2020/9/16 S. C. Kang 2

Installation (1/5) • Download : Microsoft Robotics Studio (1. 5) Refresh 2020/9/16 S. C.

Installation (1/5) • Download : Microsoft Robotics Studio (1. 5) Refresh 2020/9/16 S. C. Kang 3

Installation (2/5) • Also need : . NET framework (version is up to 3.

Installation (2/5) • Also need : . NET framework (version is up to 3. 0) 2020/9/16 S. C. Kang 4

Installation (3/5) • The document: Introductory Courseware for Microsoft Robotics Studio (1. 5) CTP

Installation (3/5) • The document: Introductory Courseware for Microsoft Robotics Studio (1. 5) CTP Sep 2007 2020/9/16 S. C. Kang 5

Installation (4/5) • Order of install : . NET framework -> Microsoft Robotics Studio

Installation (4/5) • Order of install : . NET framework -> Microsoft Robotics Studio -> Courseware • Start the Visual Programming Language 2020/9/16 S. C. Kang 6

Installation (5/5) • Start the Visual Programming Language 16 September 2020 S. C. Kang

Installation (5/5) • Start the Visual Programming Language 16 September 2020 S. C. Kang 7

(I) VPL Overview

(I) VPL Overview

VPL Interface 2020/9/16 S. C. Kang 9

VPL Interface 2020/9/16 S. C. Kang 9

Activity (1/3) • Activities can represent pre-built services, data-flow control, functions, or other code

Activity (1/3) • Activities can represent pre-built services, data-flow control, functions, or other code modules. The resulting application is therefore often referred to as orchestration, the sequencing of separate processes. 2020/9/16 S. C. Kang 10

Activity (2/3) • Activities can also include compositions of other of activities. This makes

Activity (2/3) • Activities can also include compositions of other of activities. This makes it possible to compose activities and reuse the composition as a building block. In this sense an application built in VPL is itself an activity. Activity configuration 2020/9/16 S. C. Kang 11

Activity (3/3) • Activity blocks typically include the activity’s name and borders that represent

Activity (3/3) • Activity blocks typically include the activity’s name and borders that represent its connection points. An activity block may also include graphics to illustrate the purpose of the activity as well as user interface elements that may enable the user to enter values, assignments, or transformations for data used in an activity. 2020/9/16 S. C. Kang 12

Connection • An activity may have multiple input connection pins and each with its

Connection • An activity may have multiple input connection pins and each with its own set of output connection pins. Output connection pins can be one of two kinds: a result output or notification output (sometimes also referred to as a event or publication output). Result outputs are displayed as rectangular connection pins while publication outputs have round connection pins. Result Connection output pin Action input pin Notification output pin 2020/9/16 S. C. Kang 13

Result output vs notification output • A result output pin is used in situations

Result output vs notification output • A result output pin is used in situations where an outgoing message (data) is sent as the result of an specific incoming action message. • Notification pins can send information resulting from an incoming message, but more typically fire a message as the a change their internal state. They can also generate messages multiple times, whereas a result pin only sends out a single message on the receipt of an incoming message. So notification output pins are used for sending message data without having to repeatedly request or poll for the state of an activity. 16 September 2020 S. C. Kang 14

(II) Basic Activity

(II) Basic Activity

Activity: Data • The Data activity is used to supply a simple data value

Activity: Data • The Data activity is used to supply a simple data value to another activity or service. To define a specific kind of date, select its type from the dropdown under the text box, then enter a value into the text box. 2020/9/16 S. C. Kang 16

(III) Hello World

(III) Hello World

Step 1: Create a Diagram in VPL • Click “File” -> “Open” • Type

Step 1: Create a Diagram in VPL • Click “File” -> “Open” • Type a new project name and save as a. mvpl file 2020/9/16 S. C. Kang 18

Step 2: Drag Data into Diagram and Type in “Hello World” 1 3 2

Step 2: Drag Data into Diagram and Type in “Hello World” 1 3 2 2020/9/16 S. C. Kang 19

Step 3: Drag Simple Dialog Activity into Diagram 2020/9/16 S. C. Kang 20

Step 3: Drag Simple Dialog Activity into Diagram 2020/9/16 S. C. Kang 20

Step 4: Link 2020/9/16 S. C. Kang 21

Step 4: Link 2020/9/16 S. C. Kang 21

Step 5: Set Up the Connections Dialog 2020/9/16 S. C. Kang 22

Step 5: Set Up the Connections Dialog 2020/9/16 S. C. Kang 22

Step 6: Set Up the Data Connections dialog 2020/9/16 S. C. Kang 23

Step 6: Set Up the Data Connections dialog 2020/9/16 S. C. Kang 23

Step 7: Run This Program 2020/9/16 S. C. Kang 24

Step 7: Run This Program 2020/9/16 S. C. Kang 24

Result 2020/9/16 S. C. Kang 25

Result 2020/9/16 S. C. Kang 25

Question? Reference reading VPL Tutorial 1 Course website http: //robot. caece. net

Question? Reference reading VPL Tutorial 1 Course website http: //robot. caece. net