Page 1 of 1

Programming method

Posted: Thu Feb 25, 2021 12:12 am
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

Re: Programming method

Posted: Thu Feb 25, 2021 5:10 am
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 8678 times


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

:D

Re: Programming method

Posted: Thu Feb 25, 2021 9:32 am
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.

Re: Programming method

Posted: Thu Feb 25, 2021 12:07 pm
by Amrat
Thanks very much

Re: Programming method

Posted: Thu Feb 25, 2021 12:09 pm
by Amrat
Hi Peter,

Thanks very much
Amrat

Re: Programming method

Posted: Thu Feb 25, 2021 1:26 pm
by p.erasmus
Hi Amrat.

You are welcome if it helped you in any way I am happy :D

Re: Programming method

Posted: Wed Jun 16, 2021 10:36 am
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

Re: Programming method

Posted: Wed Jun 16, 2021 12:09 pm
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.

Re: Programming method

Posted: Wed Jun 16, 2021 12:33 pm
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

Re: Programming method

Posted: Wed Jun 16, 2021 12:55 pm
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.