Задани на лабораторные работы. ПРК / Professional Microsoft Robotics Developer Studio
.pdf
www.it-ebooks.info
www.it-ebooks.info
Part III
Visual Programming
Language
Chapter 10: Microsoft Visual Programming Language Basics
Chapter 11: Visually Programming Robots
Chapter 12: Visual Programming Examples
www.it-ebooks.info
www.it-ebooks.info
Microsoft Visual
Programming
Language Basics
The Microsoft Visual Programming Language (VPL) is a new application development environment designed specifically to work with DSS services. Programs are defined graphically in data flow diagrams rather than the typical sequence of commands and instructions found in other programming languages. VPL provides an easy way to quickly define how data flows between services. It is useful for beginning programmers because they can quickly specify their intent, but it is also well suited to help with prototyping and code generation for more experienced programmers. It is also useful for specifying robotic orchestration services within the context of the Microsoft Robotics Developer Studio SDK, but it can be used outside of robotics as well.
This chapter covers what it means to work with a data flow language, how to specify a data flow diagram using the basic activities provided by VPL, and how to debug and run it. You won’t find any robots in this chapter but you will learn how to use VPL to control robots in Chapter 11.
What Is a Data Flow Language?
Many people learn how to program using an imperative language such as BASIC or C++. Such a language uses control statements to modify program state. This matches the underlying hardware implementation of the CPU well because it is built to execute machine code statements that modify memory.
When a program is dataor event-driven and has different parts that execute asynchronously, the imperative programming model can become inefficient and difficult to use. The following example shows why this might sometimes be true.
Imagine a program as a city grid. Each intersection represents some processing that must be done, and cars on the roads between intersections represent data, as shown in Figure 10-1.

C