Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

flowchart layout enquiry

Status
Not open for further replies.

john1

Active Member
Hi,

I'd like to draw out a flow chart, but i'm not very clear about the
shapes and functions.

Could anyone recommend a site or an article to read up on it ?

regards, John :)
 
Hi Mark,

Thanks for your reply.
Yes i went to Wikipedia, and many other places to try to get this sorted.
I will have a look at that program you posted.

What i think i need is an explanation of how to decide what goes where.

Cheers, John :)
 
Hi,

Ive downloaded that program, and had a look at it.
It looks like it can put shapes in for me.

Thank you, but that is not what i need.

Its help documentation did not help me to decide which ones to use,
or how a "decision" should be expressed.

It might be easier if i just asked you how to do it .....

John :)
 
Its just personal use.
A simple enough set-up.
Its for a printer.

Most of the time it will be at rest.
There are several wires coming in to its control unit,
any of which can "go live" briefly to indicate an event.

The control unit has to respond to a wire, and operate the printer.
Then go back to a state of rest.

All very simple.

So what shape is for a state of rest, thats the starting point.

Regards, John :)
 
This is a very poor imitation of a flow.
Thats because i dont know what does what,
but even from this i can see there is a sort of loop.

it will check round the flags,
until it gets a "no more flags"
then it will go to rest.

Until another 'event' occurs.

Please help me to put the appropriate boxes,
and i may be doing it a silly way ....
There might be a much better way of doing it.

Regards, John :)
 

Attachments

  • Flow.jpg
    Flow.jpg
    74.7 KB · Views: 151
The Diamond is usually used for a decision, with the points being the Yes or No options. A Box is usually a process/function. For example, a box might read "Make pin 4 high"; the Diamond might read, "Is pin 4 high" with yes/no options. There is not a firm standard as to whether the "no" option exits the diamond to the side or bottom. I generally make "yes" the straight down point and "no" the point to the side.

A "product" is often indicated by a wavy sheet of paper, but frequently other icons are used. Arrowheads are used as needed.

I find PowerPoint my favorite for flowcharts. this tutorial is probably overly simplified, but it suffices for most of what I do. John
 
Hi jpanhalt,

Over simplified eh ?
That sounds like just the sort of thing i should read !

"I find PowerPoint my favorite for flowcharts. this tutorial is probably overly simplified, but it suffices for most of what I do."

Where would i find this tutorial then ... ?

Cheers, John :)
 
Sorry, poor grammar on my part. The "tutorial" to which I was referring was the simplified explanation I gave in the preceding sentences. Perhaps, it was an exaggeration to call it a tutorial.
 
Thats Ok, i got a lot to learn yet.
What shape is an instruction ?
 
A flow chart is just a way of codifying your program logic. The thing I think you are missing is that it is supposed to show program execution flow. Your first attempt seems static. I would go and look at flow charts others have written to get a sense of how people use them. understand the program logic defined in the flowchart and see how the author expressed it in the flowchart. It should become fairly clear.

Boxes are for linear sequences of instructions, diamonds are for conditional (i.e. branching) instructions. There are different symbols for input and output. However, I wouldn't think in terms of instructions but rather logical sequences.

personally, I use pseudo code to design. It's closer to the final program, more structured and is more the way I think about program logic. Flow charts don't encourage structured design.

I would write your design as
Code:
while(true) // forever loop
    read printer input
    if carriage return then
        if flag then
            send relevant message to printer
        endif
    endif
endwhile
this seems a lot simpler to me than a flow chart.
of course, I would break out the different flags and specify them individually.

also, I don't think the logic in your chart completely makes sense but that's a different topic.
 
Last edited:
You could always jsut use M$ word. Thats what I used to make 'official' ASM charts for projects, and it has all the symbols needed. Doesn't simulate or anything, but its neat. I've always used ASM charts for software, is that just me? or my universities influence?


Blueteeth.
 
Hi Mark, Hi jpanhalt, Hi philba,

I had started trying to lay out a flowchart because i thought that it
would help me to sort out the order of events, and the best way for
the various parts to interact.

Philba, after reading your post it seems that the flowchart is for
showing the sequence of events, not necessarily to help you arrive
at deciding the order of events.

Philba you are correct when you mention that my chart makes little
sense. That is cos i havent figured it out yet. In fact, i mention
that there are probably better ways to do it, than my attempt.

It now seems to me that to lay out a flowchart, one should already
know which bits affect other bits, and how they interact.
I now think that trying to draw a flowchart is not going to help me
to sort out the order of events.

Philba, thank you for the small piece of "pseudo code" which looks
like a stylised form of basic. I have been trying to follow it, and
i am encouraged by the style.

Although i am not sure about the bit: forever loop.
This position, which i describe as 'at rest' could better be described
as 'off'.

And i think that you are right about 'flowcharts dont encourage
structured design'

I will try to lay out the way i want it to work in normal language,
then maybe in short "basic style" notes.

Cheers, John :)
 
Wikipedia.org said:
A typical flowchart from older Computer Science textbooks may have the following kinds of symbols:

Start and end symbols, represented as lozenges, ovals or rounded rectangles, usually containing the word "Start" or "End", or another phrase signaling the start or end of a process, such as "submit enquiry" or "receive product".
Arrows, showing what's called "flow of control" in computer science. An arrow coming from one symbol and ending at another symbol represents that control passes to the symbol the arrow points to.
Processing steps, represented as rectangles. Examples: "Add 1 to X"; "replace identified part"; "save changes" or similar.
Input/Output, represented as a parallelogram. Examples: Get X from the user; display X.
Conditional (or decision), represented as a diamond (rhombus). These typically contain a Yes/No question or True/False test. This symbol is unique in that it has two arrows coming out of it, usually from the bottom point and right point, one corresponding to Yes or True, and one corresponding to No or False. The arrows should always be labeled. More than two arrows can be used, but this is normally a clear indicator that a complex decision is being taken, in which case it may need to be broken-down further, or replaced with the "pre-defined process" symbol.
A number of other symbols that have less universal currency, such as:
A Document represented as a rectangle with a wavy base;
A Manual input represented by rectangle, with the top irregularly sloping up from left to right. An example would be to signify data-entry from a form;
A Manual operation represented by a trapezoid with the longest parallel side utmost, to represent an operation or adjustment to process that can only be made manually.
A Data File represented by a cylinder

It states right in wikipedia what all of the symbols mean.
 
Hi Blueteeth,

Thank you for your suggestion of using MS-word.
If i get this sorted out, i will try using MS-word to make the layout.

Cheers, John :)

NOW ROLLED OVER TO TWO PAGES
 
Last edited:
Hi Mark,

This is not schoolwork, or part of an exam or course.
Its just me trying to figure out what to do.

I have read through that Wikipedia page, I now think that my problem
with drawing a flowchart was that i thought the flowchart would
help me to sort out the optimum/suitable arrangement.

I don't think so any more.

I now think you should know how it works,
to draw a flowchart.

So,
maybe you could help ...

I want a printer to respond when one of several wires "goes live"
by printing a brief message.
Then it should go back to 'rest' or even 'off'
until next time.

Thats it briefly.

I now realise that drawing symbols and filling them in will not
help much with sorting out the order of events, i need to express it
in a different manner, possibly the "pseudo code" mentioned earlier.

Regards, John :)
 
Hi Y'all,

Rough draft.
************

0. At rest Doing nothing. Maybe even turned off.

1. A signal comes in on one of the wires. usually the wire will go to 12v briefly.

2. Flag sets. The appropriate flag gets flagged up, because the signal often
disappears after a second or two.


3. Printer activated, message printed, carriage return activated, that flag re-set.

4. Remaining flags checked, in case one came in meanwhile. If so, go to 3, if not move on.

5. At rest Doing nothing. Maybe even turned off.

**************

This is not expected to pass muster, its only a first draft.
If there is another, or a better way of doing it please let me know.
That should give some idea of what i'm after.

Regards, John :)
 
Well, i guess i really don't understand what you are doing.
 
Hi Mark,

Well if you came home after being out all day, and saw the printout
i'm sure you would understand immediately. One line per message,
it would look something like this:

13:00 doorbell rang.
13:01 doorbell rang.
14:00 water heater on.
14:10 water heater off.
18:45 front door open.
18:45 front door closed.

I could look at that,
and i could see that i got home at 18:45

There are probably machines available to do this for me,
but i was thinking of making one.

Cheers, John :)
 
john1 said:
I now think that trying to draw a flowchart is not going to help me
to sort out the order of events....

And i think that you are right about 'flowcharts dont encourage
structured design'

Hi, I'm not entirely sure I agree with that. We weren't told to use flow charts for programming in uni (if I can remember), only in 'state machines' for CPLD's/FPGA's, but it has helped me a great deal to get an idea clear in my head and on paper. Loops, subroutines, and 'if/then/else' decisions are a lot clearer when you have a 'diamond tree', with simple 'yes/no' outputs. I'll definately agree its not a magical method, and its certainly not for all situations, but as an intermediate step between idea and (pseudo) code, it works for me quite well. Sounds like you could use a 'case' statement in there for all the events. Which is really just a 'decision tree', or 'chained decisions' where you check each flag in turn...if yes, do something, if not check next.

And just looking over waht you want to do, a flow chart would be simple, possibly pointless. As for specific symbols....I only use three:

statement: this is where you 'do' something, one input and one output. You go to the statement, it does something, then you move out of the statement to something else. Like printing a line on an LCD or something, print 'h', print 'e', print 'l' etc...

Decision: This is simply a boolean type affair, a question or decision to which the answer is 'yes' or 'no'. one input, two outputs.

And, just a final symbol for linking up 'parts' of a flow chart, like 'goto' sections conntected to A, B, C etc.. because sometimes it gets messy very quickly.

It really is basic, and I've never felt the need to use proper complicated ones with dedicated symbols for specific purposes, just a visual aid for a process.

Blueteeth

Edit: Marky256 - just downloaded that software, cheers bro!
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top