Title: Flowcharts and Schematics (Using Visio)
1Flowcharts and Schematics (Using Visio)
2Flowcharts
- An Algorithm is just a detailed sequence of
simple steps that are needed to solve a problem. - A program is an implementation of an algorithm in
a specific programming language, e.g., PBasic - A Flowchart is a graphical representation of an
algorithm.
3Symbols
- Of the many Symbols available, these 7 Basic
Symbols will be used most
4Example 1
DO GOSUB Get_Ir_Remote_Code DEBUG "Remote
code ", DEC remoteCode GOSUB
Bot_Command LOOP
5Example 2
DEBUG "Remote code " SELECT remoteCode CASE 0
TO 9 DEBUG DEC remoteCode CASE Enter
DEBUG "ENTER" CASE ChUp DEBUG "CH"
CASE ELSE DEBUG DEC remoteCode, "
(unrecognized)" ENDSELECT
6Example 3
IF remoteCode gt 0 AND remoteCode lt 9 THEN
DEBUG DEC remoteCode ELSEIF remoteCode Enter
THEN DEBUG "ENTER" ELSEIF remoteCode ChUp
THEN DEBUG "CH" ELSE DEBUG DEC
remoteCode, " (unrecognized)" ENDIF
7Example 4
time VAR Word remoteCode VAR Byte DEBUG
"Binary Val Decimal Val DO remoteCode 0
DO RCTIME 9, 1, time LOOP
UNTIL time gt 1000 PULSIN 9, 0, time IF
time gt 500 THEN remoteCode.BIT0 1 RCTIME 9,
0, time IF time gt 300 THEN remoteCode.BIT1
1 RCTIME 9, 0, time IF time gt 300 THEN
remoteCode.BIT2 1 LOOP
8Example 5
- Get_Ir_Remote_Code
- remoteCode 0
- DO
- RCTIME 9, 1, time
- LOOP UNTIL time gt 1000
- PULSIN 9, 0, time
- IF time gt 500 THEN remoteCode.BIT0 1
- RCTIME 9, 0, time
- IF time gt 300 THEN remoteCode.BIT1 1
- RCTIME 9, 0, time
- IF time gt 300 THEN remoteCode.BIT2 1
- RETURN
9Using Visio start up
10Drag shapes to the drawing pane
Drag to place
Double-click to add text
Resize using bounding-box
11Connect shapes with connectors
Connect shapes with connectors
Click the lower blue connection point on the
shape. A red box appears around the connection
point to show that the connector is glued to
the shape.
Once glued to a shape, the connector moves with
the shape
12the drawing grid
- Grid lines crisscross each drawing page like
those on traditional graph paper. A grid helps
you position shapes visually on a drawing page,
and you can snap shapes to the grid. The grid
does not print.
13Working with the grid
- Show or hide the grid On the View menu, click
Grid. - Set grid spacing On the Tools menu, click Ruler
Grid. - Snapping By default, shapes snap to both ruler
subdivisions and grid lines. On the Tools menu,
click Snap Glue. - GlueGlue is what keeps connectors attached to
shapes.
14Schematics
- Schematics are a graphical representation of
electrical systems. - Shapes represent components and lines depict
connections.
15Schematic Symbols
16Custom Stencil for 180 Schematics
- Copy the stencil file from this link and store it
on your computer. - You can store it anywhere, but if you place it in
the following directory - C\Program Files\MicrosoftOffice\Visio10\1033\Sol
utions\Electrical Engineering - it will be listed as one of the stencils
available under Electrical Engineering.
17180 Custom Stencil
- Open the stencil as follows
- Under the File menu option, select Stencil
followed by Open Stencil... - In the pop-up window, enter the directory where
you stored the stencil in the text box labeled
Look in. - If you stored the stencil in the directory
recommended above, simply select the folder
labeled Electrical Engineering from the directory
list contained in the pop-up window. - After designating the directory containing the
180 stencil, select that file, i.e.,
180stencil.vss, from the list of stencil files.
18180 Custom Stencil
- Once you have opened the stencil, you can use it
just as you would any other Visio stencil with
the caveat that the custom shapes do not have
anchor points. This means that you can't glue
them to connectors which makes the interface with
connectors more tedious. - Now that you know about this stencil, let me add
that you are not required to use it.
19Example 1 (from Ch 2 of the Robotics Manual)
20Example 2---Servos
21Example 3---IR Detector
22Example 4---From a Previous Project Report
23Other Good Stuff in Visio
- Group/ungroup
- select multiple shapes holding the shift key down
- Group shapes
- Selected shapes move as a unit
24Good Stuff
- Many automatic layout
- features
- Export options under save as
- .vsd
- .html
- .gif, .jpg, .png
- .wmf
25Hyperlinks
- If your flow chart gets too big, you can extend
it on several pages. - Create the page or document you want to link to.
- Select the shape you want to link from.
- In the Insert menu, select Hyperlink (or use the
shortcut CtrlK.) - You can have several links from the same shape.
- To link to another page in the same flowchart
document, browse in the Sub-address box, and
select the page. - To link to an external document, browse in the
Address box. - Click OK when you have added all the hyperlinks
you need. - Access the links by right-clicking the shape to
select a link. - If you create an html document from the
flowchart, you will be able to click on the shape
to access the link.