Page 1 of 1

Advise correct method for own component

Posted: Wed Dec 07, 2016 8:53 am
by QMESAR
Hi All.

I need help advise on what would be the steps or correct method in FC ,
I have a project that I would like to run purely in FC as the project would require that I use a lot of my own functions foe example to configure and drive the Motor Control PWM module on a dsPIC33 to name one
now I know I can use a C call to do that but I was thinking is it not possible to embed this C function call into a component Icon that would give me for example PWM_MC Initailze and calcualte set point and so on then I would have icons on the Flow chart or is it better to make a complete component ?

I guess I am not sure what to do embed the C code into an Icon or make complete components and then in both cases I have actually no clue where to start :D any input advise or direction is highly appreciated this is quite important for me as since FC7 I am trying to fully move over to FC and not run both C style projects and FC However I need to make the FC charts lean and not having 100 C call icons in a Flowchart
The simulation part of FC is interesting but that is something I rarly use I code run and debug on the target hardware in my opinion (with my little knowledge on FC ) I would like not to add all the simulation features to my Component or icon that embed my C code

Thanks a million for your support

Re: Advise correct method for own component

Posted: Wed Dec 07, 2016 10:04 am
by LeighM
Hi,
To create a component that has some custom API...
Just create a new project and your required macros, that contain Flowcode icons and C icon code.
Then use the Interface manager to change your macros into "Downloadable"
interface_mngr.jpg
interface_mngr.jpg (42.75 KiB) Viewed 5239 times
Then create your new component by File->Export component
Give the new component a name and a new GUI ID (just the first time you export it)
export.jpg
export.jpg (66.12 KiB) Viewed 5239 times
Refresh or rerun Flowcode, then use search to find and use your new component.

There is an example here...
http://www.flowcode.co.uk/mmforums/viewt ... 386#p73065

Hope that gets you started.
Leigh

Re: Advise correct method for own component

Posted: Wed Dec 07, 2016 12:35 pm
by QMESAR
Hi LeighM

Thank you this helps already a great deal just tried it and I could export one of my makro's

I will slowly start to use these techniques to improve myself and my FC knowledge

Many Thanks

Re: Advise correct method for own component

Posted: Wed Dec 07, 2016 12:42 pm
by Benj

Re: Advise correct method for own component

Posted: Thu Dec 08, 2016 12:12 pm
by Steve
So you are aware, we have been working on component creation and the next 7.2 release of Flowcode will have a number of features to make it much easier. We'll have more information available in the new year.

Re: Advise correct method for own component

Posted: Thu Dec 08, 2016 12:43 pm
by QMESAR
That sounds really good looking forward to this :D

Re: Advise correct method for own component

Posted: Thu Dec 08, 2016 12:44 pm
by QMESAR
Sorry double post