Teach us to make us smarter :-)

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Teach us to make us smarter :-)

Post by MJU »

In a Flowchart, made by BenJ I came across several items that I don't understand.

Can somebody please explain how to read these lines:

In a decision I found : ! (.RegVal & 0x03)
What does the exclamation mark stands for in the decision?

In a Cal_spi I found this: ((.Address << 1) & 0x7E) | 0x80
What does the pipe sign | do in this action?

In a calculation, again the pipe: Value= .RegVal | .Mask

In a decision: If Tag ?
Does this mean that if the variable tag = 1 it follows the "yes" branch?

In a decision: (.Status != 0) || (RetCount != 0x90)
Again in a decision: ((.Status != 0) || (RetCount != 4) || ((Buffer[0] & 0x0F) != 0x0A))
Again the exclamation mark..

The fool wonders, the wise man asks

Disraeli, Benjamin


I just wonder how to read these lines.
Thanks for the help!

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Teach us to make us smarter :-)

Post by kersing »

MJU wrote: In a decision I found : ! (.RegVal & 0x03)
What does the exclamation mark stands for in the decision?
The exclamation mark is NOT, so true becomes false vice versa.
MJU wrote: In a Cal_spi I found this: ((.Address << 1) & 0x7E) | 0x80
What does the pipe sign | do in this action?

In a calculation, again the pipe: Value= .RegVal | .Mask
A single pipe symbol is a bitwise OR. So 0x01 | 0x02 becomes 0x03
MJU wrote: In a decision: If Tag ?
Does this mean that if the variable tag = 1 it follows the "yes" branch?
No, any value <> 0 means the 'yes' branch will be selected. Only for 0 the 'no' branch is active.
MJU wrote: In a decision: (.Status != 0) || (RetCount != 0x90)
Again in a decision: ((.Status != 0) || (RetCount != 4) || ((Buffer[0] & 0x0F) != 0x0A))
Again the exclamation mark..


The '!=' sequence means not equal.

Just to make sure everything is addressed:
- A double pipe symbol means a logical OR. This means the result will true if one of the operands is not zero.

In case you find it later on:
- A double ampersand symbol (&) is a logical AND. Both operands need to be not zero for the result to be true.

MJU wrote: The fool wonders, the wise man asks
Disraeli, Benjamin
And an even wiser man might have considered using the help page?
BTW as Flowcode is C based, the C operators page might help by providing additional information.
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: Teach us to make us smarter :-)

Post by MJU »

kersing wrote: And an even wiser man might have considered using the help page?
BTW as Flowcode is C based, the C operators page might help by providing additional information.
Thank you Kersing, but I use the help page in Flowcode itself.
I've tried to search for these things in the Wiki but nothing returned.

Try searching something on the wikipage and it returns a lot of things you really don't want to find.
Flowcode's credo was No coding, No limits. So I bought it because I didn't want to learn again another programming language.
If I wanted to learn C, I would not have bought so much Matrix stuf, but have bought Arduino instead :D

But thanks for your help.

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: Teach us to make us smarter :-)

Post by kersing »

If you read the decision icon help page you'll see a link to "Calculation Icon Properties". (See high lighted text below)
snippet.png
(245.7 KiB) Downloaded 1733 times
That link will open the same page I linked to in the Flowcode help browser. As I am unable to provide a link to the help pages in Flowcode I choose to provide the wiki URL for that page.

If you do not want to read the additional information I've provided, no problem. I was not suggesting you learn C, just to take a look at the operators C and Flowcode have in common to allow you to enhance your understanding of Flowcode. You were asking a question and I tried to provide the best possible answer. It is up to you how much you want to learn...
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: Teach us to make us smarter :-)

Post by dazz »

Hi Fella
i cant add to kersings advice ,but people often overlook the manual within the compiler it resides at

C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc.pdf
or
C:\Program Files)\Flowcode 6\compilers\pic\boostc\boostc.pdf

this contains explanations for operators etc
If you want to learn c stay away from arduino as the arduino language is a cannjabalised version of c and a few others :0

Regards

Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

MJU
Posts: 502
Joined: Wed Nov 07, 2007 6:51 pm
Location: Antwerp Belgium
Has thanked: 121 times
Been thanked: 108 times
Contact:

Re: Teach us to make us smarter :-)

Post by MJU »

What I'm saying is that the information is scattered.

If I have a program like Flowcode, and I need help, I will look in the help-file for that program.
In Flowcode you end up in the Wiki.
The forum is a great place for people to ask questions, but I must admit that it isn't the most active forum I know.
I bought Flowcode starting from version 3 (or even earlier), I don't remember.
Because my main interest is the electronics in the project, and because most electronic project these days use a µ-controller I wanted a program that made this part as easy as could.
Flowcode was advertised as a visual way to get the microcontroller working
"No code" you know?

I followed some (not that cheap) courses and I was convinced that this was what I was looking for.
The "teacher" told many times that the forum was the way to get more info when stuck.
And it used to be that way!
The forum has become a place where people ask their questions, and only a handful of people answers them. (I really appreciate this)
There is no real system to keep this information grouped.

Flowcode is not really that popular it seems.
And then I make the comparison with Arduino.
Arduino is alive. It has for every chip a library. Ask a question on any of the many forums and you get an answer in a few minutes. (don't tell me this is not true, I have seen this many times).

My frustration these days with Flowcode is that the knowledge isn't kept in a decent manner.
For instance: I'm working on a Flowcode file with multiple DS18B20.
Be my guest to search for decent information about how to accomplish this.
Let me help you:
- The wiki: tells what each command in the macro does. But, as a non programmer I can't make much out of this.
To read the amount of devices on the bus... what way can I search for this number?
The page for the one-wire bus has an example for multiple devices: great.. Only it was originally written in French and it uses not that clear comments and variable names.
Variable names as i and j and dsNedio don't make sense to me.
If I write a Flowcode file for someone, I really try and put as much comments in it to make it readable for everyone.
So instead of variables named "Hrjnew8ehjge" I would use "decimal_temp".
This way, if some would download it, he could make out what the variable is meant for.

I know this example was made by someone that visits the forum (for which he receives much thanks), but if Matrix uses this file as an example they should read it and make it easier for everybody to understand. (newbie to professional).
They should not only put it on the Wiki, but add much more comments for people to understand it later.

- The examples in the learning zone..
Nu such file for the 1-wire component.

- The forum: much about the DS1820, but shattered between files for DS1820 / DS18S20 sometimes a comment for the DS18B20.
But nowhere a good example how to read and store all the devices on the bus.

I found a great video about the 1-wire bus and using multiple devices on the bus: https://www.youtube.com/watch?v=ZKNQhzPwH0s
This is a guy that made a video of almost an hour about how to make a multiple thermometer with the DS18B20.... for Arduino.
I've seen the whole video and I learned a lot about how the 1-wire bus protocol works.
I've read the datasheet for this device several times, but I'm not a programmer..

So instead of always answering the same questions on the forum, and risk of getting all the information scattered, there should be a real learning centre that keeps all this information alive.

I know people @Matrix are working hard to make the best of Flowcode. But in my opinion they should start rebuilding the learning centre from scratch.
If you know where to search: everything is easy, but if I need to search two days to find an answer to my question I stop and ask this on the forum.

If somebody should ask me what the people @Matrix should make their priority I would tell them to first start writing much more on the Wiki (and keep in mind that not all of us are English speaking, and not everybody is a programmer).
The next thing to keep up with Arduino would be to drop everything they are working on and make macro's for each and every device they come across that has an Arduino shield.

I have for many thousands of £ of Matrix stuff ( a few PIC programmers, ECIO boards, Arduino boards, AVR programmers, dsPIC programmer.. and for each and every family of controllers the Pro version of Flowcode, GSM-board, internet board, RF boards, IR boards, CAN boards, Combi board, Card reader, 4D touch screen board... and you name it).
So I think that I am a good customer for them :-)

So if I stumble across something that I really don't know where to find the answer to, I do ask this on the forum.
This way the information is found quickly for everyone later..

BTW: the people that posted already in this tread are a few of my favourite people on this forum because they keep the forum alive by answering much of the questions!!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Teach us to make us smarter :-)

Post by Benj »

Hello,

Thanks for the comments, I can understand where your coming from. Currently feeling a little deflated but I'm sure I'll get over it :D
If somebody should ask me what the people @Matrix should make their priority I would tell them to first start writing much more on the Wiki (and keep in mind that not all of us are English speaking, and not everybody is a programmer).
The next thing to keep up with Arduino would be to drop everything they are working on and make macro's for each and every device they come across that has an Arduino shield.
I agree the Wiki needs some work, the Wiki was one of my tasks to improve for v6 and I put a lot of time and effort in but it could still be a lot better. If anyone would like to help contribute to the Wiki and knows or wants to learn the MediaWiki markup language then please let me know.

Supporting all the Arduino shields might be a good way to proceed, however the Arduino community has made it clear that they want the cheapest possible solution. They buy the Arduino hardware as it is cheap as chips and the Arduino software is free. We could support all the shields but I'm pretty sure that this wouldn't get us any more paying customers which would keep us in business. You may or may not be aware that Arduino itself is currently in hard times as a company despite it's popularity, one reason could be that the bottom has simply dropped out their market thanks to cheap Chinese hardware. So our focus has to be on what will keep us in work for another 20 years and so on.

Our primary focus is education as that is where our dealer network sits and also what allows us to maintain our revenues as well as allowing us to develop applications which also suit hobbyists and industry. One major downside to this is that teachers / lecturers and students will rarely come and post on a forum, even less to try and help someone else. This is made even worse when most of the dealers also offer support via email or their own forums, often due to language barriers. Industrial users will also likely not come onto the forum to provide help and support mainly as industry usually likes to keep their IP under wraps to fend off competition. That leaves hobbyists, of which most use Arduino simply due to the low price point. We still have a lot of hobbyists but out of the users we do have there are not many that would feel confident in replying to technical corner case questions which in truth is what 80% of all the questions are.

We are gaining momentum and with Flowcode v6 we really have started something rolling. We also have some very exciting and unique products in the pipeline for 2016. Hopefully we can continue to grow in this manner with v7 and what comes after. What really helps us is people posting things about Flowcode. Instructables for example is a huge site with millions of visitors every month yet there are only about 5 projects on there that mention Flowcode and at least 3 of them were made by me. If we could get more people willing to shout about the product then more and more people would hopefully get to know about us and our award winning software.

User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

Re: Teach us to make us smarter :-)

Post by Jay Dee »

Hi Guys,
I must confess I often find myself trawling the forum, help pages and learning zone..trying to find an answer I know is there.... somewhere. :)
Without knowing where to look, I too spent a while finding the basics like logical and bitwiz operators.
I've also had to support products myself and know how hard detailed documentation can be.. especially to maintain as products develop.
FC support is generally one of the best that I use over a selection of commercial products and can feel bit of a prat asking things that must have been answered many times before.
The forums are great but it can be hard to extract the facts from the conversation.
Maybe we (the community) could contribute, I myself have learned so much, tips and tricks over the couple of years of using flowcode that I would be happy to contribute some simple stuff as I can. It would still need moderating and being kept accurate and concise (hard!!) but its probably worth doing.

Something else that could be very cool would be sections on program structure etc.. I know how to make a FC program work...but is it following good practice or vaguely efficient.
I'm promoting FC to other engineers in our industry as it simply ideal for engineers as opposed to coders but I think we all find it hard getting started as we know so little of the fundamentals a coder would take as given.

Cheers all. J. Having fun at a late night tyre test in Bahrain.. oh the fun!! :lol:

Post Reply