Programming method

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Amrat
Posts: 39
http://meble-kuchenne.info.pl
Joined: Sun Jan 31, 2021 11:25 am
Has thanked: 1 time

Programming method

Post by Amrat »

In FC9, how can I set in each of 5 Programming method ?

I mean Flow chart, Blocks, Pseudo-code, C code or State machine diagrams ?

Thanks in advance
Amrat

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Programming method

Post by p.erasmus »

Hi.

Go to User Macros's then select the the coding style and then the macro you want to show in this style format

P1.jpg
P1.jpg (59.43 KiB) Viewed 8686 times


P2.jpg
P2.jpg (104.45 KiB) Viewed 8686 times
Hope this help

:D
Regards Peter - QME Electronics

Steve-Matrix
Matrix Staff
Posts: 1554
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 214 times
Been thanked: 362 times

Re: Programming method

Post by Steve-Matrix »

Flowchart, Blocks, Pseudocode and C code are all different ways of representing the same macro. By default, when you create a new macro it is displayed as a flowchart. You can then choose to view it (and edit it) in a different way using the 4 dropdowns on the User Macros toolbar.

State Diagrams work a little differently and you cannot interchange between the different programming styles. Instead, you need to create a specific State Diagram macro (there's a dropdown to choose between "flowchart" and "state diagram" when you create a new macro) which can only be viewed as a State Diagram. You can look at the C code behind the State Diagram by selecting View C Code from the Build menu, but you cannot edit it as C code.

Amrat
Posts: 39
Joined: Sun Jan 31, 2021 11:25 am
Has thanked: 1 time

Re: Programming method

Post by Amrat »

Thanks very much

Amrat
Posts: 39
Joined: Sun Jan 31, 2021 11:25 am
Has thanked: 1 time

Re: Programming method

Post by Amrat »

Hi Peter,

Thanks very much
Amrat

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: Programming method

Post by p.erasmus »

Hi Amrat.

You are welcome if it helped you in any way I am happy :D
Regards Peter - QME Electronics

Brendan
Posts: 65
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 51 times
Been thanked: 15 times

Re: Programming method

Post by Brendan »

I've just opened an old project in FC9 and all macros are represented in blocks.

How do I configure a "once-for-all" please, so that all files are only ever opened in familiar flowcharts?

Many thanks,
Brendan

Steve-Matrix
Matrix Staff
Posts: 1554
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 214 times
Been thanked: 362 times

Re: Programming method

Post by Steve-Matrix »

I don't think there is an easy way to do that. When a project is loaded, the macros are opened as they were when they were saved.

You would need to close all unwanted views of the macros and then open the macros in the views you require, and then re-save the project.

Brendan
Posts: 65
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 51 times
Been thanked: 15 times

Re: Programming method

Post by Brendan »

Thanks Steve.

I'd call for a global option. The many legacy FC projects we've created have anywhere between a few and several-dozen macros :shock:

With many such projects, I'll revert to FC8 in the hope this might change.

Many thanks,
Brendan

Steve-Matrix
Matrix Staff
Posts: 1554
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 214 times
Been thanked: 362 times

Re: Programming method

Post by Steve-Matrix »

Flowcode v9 works pretty much the same way as Flowcode v8 in this regard - it also has the 4 different display modes for macros (flowchart, c-code, blocks and pseudocode) and will reopen with the same views that it was saved with.

So I'm confused about the problem you're experiencing because you should be experiencing the same issue in v8.

If you want to send me one of your projects via PM then I will have a look and see why you are having an issue in v9.

Post Reply