SimPhonics, Inc. V+ Training Class. SimPhonics, Inc. Introductory V+ Introductory V+ Intermediate V+...

Preview:

Citation preview

SimPhonics, Inc.

VV++ Training Class Training Class

SimPhonics, Inc.

• Introductory VIntroductory V++• Intermediate VIntermediate V++• V+ ExercisesV+ Exercises• Class ProjectClass Project

SimPhonics, Inc.

Introduction to VIntroduction to V++

• Form Basic Understanding of V+

• Intermediate V+

• Advanced V+

SimPhonics, Inc.

Why V+ Was DevelopedWhy V+ Was Developed

• Ease of concept to design

• High cost of application Development

• Maximize software reuse

• Self documenting

SimPhonics, Inc.

• 1st Machine Code

• 01000101

• 2nd Assembly Language

• MOV al,bx

• 3rd High Level Language

• a = a + b + 5;

Generations ofProgramming Methods

Generations ofProgramming Methods

SimPhonics, Inc.

• 4th OOP Programming

• Class Furniture;

Derived Class Chair;

• Visual C++ is not a Visual Language!

Generations ofProgramming Methods

Generations ofProgramming Methods

SimPhonics, Inc.

• 5th Visual Language

Generations ofProgramming Methods

Generations ofProgramming Methods

SimPhonics, Inc.

• Data Flow

• State Transition

• Object Oriented Nyquist

Various Types ofVisual LanguagesVarious Types ofVisual Languages

V+ is a Data FlowVisual Language

SimPhonics, Inc.

Traditional Software LifecycleTraditional Software Lifecycle

Requirements

Analysis

Design

Test

Implementation

(Code)

Not necessary with V+

FinalProduct

SimPhonics, Inc.

Software DesignSoftware Design

• Top Level (Configuration)

• Detailed (V+ Designs)

SimPhonics, Inc.

Software Top Level DesignSoftware Top Level Design

• Analog In/Out Channels

• Wave In/Out Channels

• Interfaces

• Configuration- Drivers

- Execution rate

- Networked Audio

SimPhonics, Inc.

V+ is Similar toSchematic Diagrams

V+ is Similar toSchematic Diagrams

In fact, V+ is a schematic of the software architecture, execution order, etc.

V+ is self documenting since the worksheet IS the source.

SimPhonics, Inc.

V+ is Not a Code GeneratorV+ is Not a Code Generator

V+ objects are pre-compiled software modules that can be authored in any language supporting COM.

Currently, objects are authored by VPLus Corporation only.

SimPhonics, Inc.

Introduction to V+Introduction to V+

• Windows XP (Service Pack 2)

• Latest Updates

• Windows Firewall Turned Off

• 32 Bit Code

• COM, COM+, and .NET Based

SimPhonics, Inc.

Introduction to V+Introduction to V+

A visual program, called a design, is constructed of objects and ports connected via nets and placed on one or more worksheets.

SimPhonics, Inc.

V+ is a Data FlowVisual Language V+ is a Data FlowVisual Language

Data travels via nets from object outputs pins to object input pins.

SimPhonics, Inc.

Object Data FlowObject Data Flow

Inside objects, data flows from object input pins to object output pins.

SimPhonics, Inc.

Object Execution OrderObject Execution Order

1

2

3

Execution Order is defined by the user and defaults to an order of

placement on the worksheet

SimPhonics, Inc.

• Objects are execution units- Constructor - PreExecute- Execute- PostExecute- Destructor

• Design must have at least 2 objects

• Simple to complex

ObjectsObjects

SimPhonics, Inc.

Examples of V+ ObjectsExamples of V+ Objects

SimPhonics, Inc.

Object AnatomyObject Anatomy

INPUT PIN(S) OUTPUT PIN(S)

OBJECT BODY

GRAPHIC

OPTIONAL ARROW ON INPUT PINS

SimPhonics, Inc.

• User editable initialized constants

• Any object may contain static data

• Standard static data types

• Float, String, Table

• Activated by Double-click

Objects – Static DataObjects – Static Data

SimPhonics, Inc.

• Connections to/from the outside

• Ports are grouped into I/O devices

• I/O devices are grouped into drivers

PortsPorts

SimPhonics, Inc.

PortsPorts

I/O Driver

I/O Devices

PORT 1

Ports

PORT 0

PORT n

SimPhonics, Inc.

• I/O DRIVER – UDP/IP Ethernet

• Contains the following devices:

• I/O DEVICE – Input

• Contains Ports:

• Port 1,2,3,4, etc…

V+ I/O Driver ExampleV+ I/O Driver Example

SimPhonics, Inc.

Port AnatomyPort Anatomy

DEVICE NAME INPUT PIN PORT NAME

De Blah

OUTPUT PORT

PORT 0

DEVICE NAME OUTPUT PIN

PORT NAME

PORT 0 Blah

INPUT PORT

SimPhonics, Inc.

V+ I/O DriversV+ I/O Drivers

V+ Shipped With Basic Drivers

Configurable Network Socket

Ethernet UDP/IP

File Mapping I/O Device(Shared Memory)

Joystick Input Device

Windows Audio Mixer

SimPhonics, Inc.

• Connects object pins

• Contains 32-bit float data

• Output to input

• Cannot “short” inputs

NetsNets

SimPhonics, Inc.

NetsNets

Single output to multiple inputs

SimPhonics, Inc.

NetsNets

SimPhonics, Inc.

NetsNets

2 NETS OVERLAID

SimPhonics, Inc.

NetsNets

SimPhonics, Inc.

WorksheetsWorksheets

SimPhonics, Inc.

WorksheetsWorksheetsSharing data among worksheets is accomplished via worksheet connectors

SimPhonics, Inc.

The Simplest of DesignsThe Simplest of Designs

SimPhonics, Inc.

A Simple Math DesignA Simple Math Design

SimPhonics, Inc.

Pythagorean Theorem(distance calculation)

Pythagorean Theorem(distance calculation)

c = √a2 + b2

SimPhonics, Inc.

VV++ Classroom Classroom Exercise 1Exercise 1

SimPhonics, Inc.

Development andRun Time SystemsDevelopment and

Run Time SystemsDEVELOPMENT SYSTEM

RUN-TIME

SYSTEM

SimPhonics, Inc.

Design ProcessDesign Process

SimPhonics, Inc.

.DES – Design File (worksheet)

.VPJ – Contains Multiple Worksheets

.VNE – Run-Time Configuration and Executable

File TypesFile Types

SimPhonics, Inc.

• Real-Time, Frame based

• Input – Objects – Output

• Real-Time, Frame based

• Input – Objects – Output

V+ ExecutionV+ Execution

SimPhonics, Inc.

Execution Time

Spare Time

V+ ExecutionV+ Execution

Timeline

Frame Time

SimPhonics, Inc.

Input Ports Output Ports

Objects 1 through n

V+ Execution OrderWithin a Frame

V+ Execution OrderWithin a Frame

1 2 3 ……. n

SimPhonics, Inc.

Spare TimeSpare Time

Run-time calculates spare time per frame.

Measured with special high-resolution timer accurate to system clock resolution.

SimPhonics, Inc.

Spare TimeSpare Time

SimPhonics, Inc.

V+ Execution RateV+ Execution Rate

SimPhonics, Inc.

• Default of 25ms (40Hz)

• From .01 Hz

• Up to 1,000 Hz

• Future Systems… even faster

V+ Execution RateV+ Execution Rate

SimPhonics, Inc.

More on Development and Run Time Systems

More on Development and Run Time Systems

Development System Used to Edit Designs Not Needed For Final System Costs More

Run Time System Always Required Provides Object Inventory I/O Device Configuration System Configuration Execution

Development System Used to Edit Designs Not Needed For Final System Costs More

Run Time System Always Required Provides Object Inventory I/O Device Configuration System Configuration Execution

SimPhonics, Inc.

• Analyze Requirements

• Define Interfaces

• Configure Platform (.vne File)

• Create Worksheets (.des Files)

• Organize into Project (.vpj File)

• Run and Debug System

• Save in Platform (.vne File)

Application Process FlowApplication Process Flow

SimPhonics, Inc.

Intermediate VIntermediate V++

SimPhonics, Inc.

Why Separate Development and Run Time Systems?

Why Separate Development and Run Time Systems?

• Editor is much larger application

• Not needed for execution environment

• Editor costs more

• Quantity systems can use Run-time System

SimPhonics, Inc.

Run Time SystemRun Time System

ConfigurationConfiguration

SimPhonics, Inc.

Run Time System Configuration

Run Time System Configuration

SimPhonics, Inc.

Run Time System Configuration

Run Time System Configuration

• I/O Driver Configuration

• Execution Rate

• Audio Device Order

• Networked Audio Configuration (DIS and HLA)

SimPhonics, Inc.

I/O Driver ConfigurationI/O Driver Configuration

SimPhonics, Inc.

I/O Driver ConfigurationI/O Driver Configuration

• Most drivers are installed separately

• Each driver has its own configuration user interface

SimPhonics, Inc.

Configuration is Saved in.VNE File

Configuration is Saved in.VNE File

CONFIG

.VNE File

SimPhonics, Inc.

V+ Development SystemV+ Development System

1. User enters/edits a design

2. User presses the play button

3. V+ Editor checks for visual errors

4. Error messages printed to Editor Message Window

SimPhonics, Inc.

Open Pin ErrorOpen Pin Error

SimPhonics, Inc.

V+ Development SystemV+ Development System

Once all errors are cleared:

V+ submits design to the Run-time system.

When the design is submitted, the following message appears:

“Trying to Start Platform…”

SimPhonics, Inc.

Design Time Object List (DTOL)

Design Time Object List (DTOL)

The DTOL is the list of ports, objects, static data, and connection information.

The Run-time system then begins the process of trying to run the DTOL

SimPhonics, Inc.

DTOL SubmissionDTOL Submission

DTOL

SimPhonics, Inc.

Run Time SystemRun Time System

1. Accepts DTOL from Editor

2. Verifies objects are in inventory

3. Verifies ports are in inventory

4. Tries to start objects and devices

SimPhonics, Inc.

Run Time SystemMessage WindowRun Time SystemMessage Window

Scrollable message area

SimPhonics, Inc.

Run Time SystemPre-Execute PhaseRun Time System

Pre-Execute Phase

Each device and Object may halt pre-execution. Most will display an error in the message window.

Once all objects and devices report they can start:

The DTOL is executed.

SimPhonics, Inc.

Run Time SystemPost-Execute Phase

Run Time SystemPost-Execute Phase

Each device and Object is asked to stop during user stop commands.

Once all objects and devices report they can stop:

The DTOL execution is halted.

Again, read your message window.

SimPhonics, Inc.

.VNE FileDTOL and Configuration

.VNE FileDTOL and Configuration

Configuration is always saved with .VNE file.

DTOL is only saved if a successful execution has occurred.

SimPhonics, Inc.

Configuration is Saved in.VNE File

Configuration is Saved in.VNE File

CONFIG

.VNE File

DTOL

SimPhonics, Inc.

.VNE File – Updating.VNE File – Updating

Anytime the design or configuration has changed, the .VNE file must be resaved.

The .VNE file is similar to a .EXE file in this sense.

SimPhonics, Inc.

.VNE Files – Auto-booting.VNE Files – Auto-booting

The .VNE file may be executed directly.

Insert the .VNE file into the STARTUP folder for auto-loading the system at power-up.

Double-clicking the .VNE file will start the run-time system and execute the design – provided that one is present in the file.

SimPhonics, Inc.

VV++ Classroom Classroom Exercise 2Exercise 2

SimPhonics, Inc.

VV++ Remote Control Remote Control

SimPhonics, Inc.

Remote Control ApplicationsRemote Control Applications

• Two types of remote control:

• User Control of V+ via remote PC

• Programmatic Control via Host

• Useful for tuning sounds

• Versatility of different configurations

SimPhonics, Inc.

User Control – Windows XPUser Control – Windows XP

• Remote Desktop

• Allows complete desktop remote control

• Over Internet, networks, etc.

SimPhonics, Inc.

Programmatic Remote ControlProgrammatic Remote Control

SimPhonics, Inc.

Programmatic Remote ControlProgrammatic Remote Control

• Host can start, stop, and load designs.

• Useful for automatic switching of V+ applications at run time by a host.

• Via TCP/IP, Port 5068

SimPhonics, Inc.

Miscellaneous Miscellaneous DevicesDevices

SimPhonics, Inc.

Microsoft Flight Simulator I/O Device

Microsoft Flight Simulator I/O Device

Read virtually any data from Game

SimPhonics, Inc.

WAGO - PROFIBUSEthernet I/O DeviceWAGO - PROFIBUSEthernet I/O Device

• DIN Rail I/O Modules• Choice of Ethernet or

PROFIBUS

• Excellent Transport Delay• Distributed I/O

• DIN Rail I/O Modules• Choice of Ethernet or

PROFIBUS

• Excellent Transport Delay• Distributed I/O

SimPhonics, Inc.

V+ - The Tie That BindsV+ - The Tie That Binds

YOURAPPLICATION ATIS, VMIC,

SCRAMNET, NATIONAL,

etc…

SimPhonics, Inc.

Name the generations of programming paradigms.

Is V+ a code generator system?

What operating systems can host V+?

Q and AQ and A

SimPhonics, Inc.

What type of visual language is V+?

State Machine

Object Oriented Nyquist

Data Flow

Data, contained in objects only changeable by the developer, is called what?

Q and AQ and A

SimPhonics, Inc.

What two types of pins can an object have in V+?

Objects that connect V+ data to the outside world, or to other software is called what?

Object pins are connected via what?

Q and AQ and A

SimPhonics, Inc.

What are the following file types in V+?

.DES

.VNE

.VPJ

Q and AQ and A

SimPhonics, Inc.

In the beginning there were computers, and the computer was In the beginning there were computers, and the computer was programmed with ones and zeros.programmed with ones and zeros.

The programmer said, let us use text for these codes so that we The programmer said, let us use text for these codes so that we can understand them better. So the assembler was created and can understand them better. So the assembler was created and the programmer was happy.the programmer was happy.

Then the programmer said, let us program with words so that Then the programmer said, let us program with words so that our programs are easier to understand. Hence, the compiler was our programs are easier to understand. Hence, the compiler was born and the programmer smiled.born and the programmer smiled.

Then the engineer said let us use this machine and program it Then the engineer said let us use this machine and program it

with drawings of our ideas.  Thus, with drawings of our ideas.  Thus, VV++ was born, the engineer was born, the engineer rested, and the programmer went home.rested, and the programmer went home.

Closing RemarksClosing Remarks

Recommended