AI Code in FC - Discuss

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jay_dee
Posts: 257
http://meble-kuchenne.info.pl
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 101 times
Been thanked: 72 times

AI Code in FC - Discuss

Post by jay_dee »

Hi,
I know this is a little contentious but worth a chat. AI Code.
Firstly I explicit do NOT want AI to write the whole program BUT I'm an engineer not a coder, the reason I use flowcode is exactly because someone else has written modules of code. I then use these generic pre-built building blocks to build a solution that is very specific to my needs.

I have a contact who daily works with tools in this emerging 'AI' sector, whilst there is much hype and there will always be good and bad use cases, his view if that they should be treated the same as having a engineering assistant or external consultant working with you. You would not blindly Trust what the junior/graduate engineer has produced and Don't loose control of the project but selectively out-source some jobs.

I've used external human consultants, they spent lots of money, built what they thought we asked for but did not fully read the specification, felt documentation was over rated/time consuming and then charged even more for reworking aspects that never worked.
So humans can be just as crap as any AI. Finding good technical partners at the right price point for smaller projects when the whole budget might only be £1500 is near impossible.

If I could find a way on constraining AI to work within defined parameters maybe it could be a low cost 'partner' solve a specific function/problems in code.
>Force it to work to rules and/or define the Code style (maybe MISRA C complient for exampe)
>Meet industry defined good practice and document the code.
>Ensure it adheres to compatibility/standards of other FC modules and the result was a single module that I could call into FC.

Personally, I just don’t know how close we are to being able target AI to do this. Most free AI tools seem pretty dumb and give scatter gun results and typically ignore any guidance you give! :)

Does anyone see a future where FC would allow an AI agent into the build enviroment? The FC project would maybe help define the constraints, allow an AI produced block to be imported and maybe check is passes some FC specific validation tests.

And I acknowledge anything would be a massive block of work for the FC dev team I know!
Any thoughts fellow flowcoders?

WingNut
Posts: 285
Joined: Tue Jul 13, 2021 1:53 pm
Has thanked: 55 times
Been thanked: 43 times

Re: AI Code in FC - Discuss

Post by WingNut »

I've used AI to generate programs for visual studio and arduino. Results vary and depends which one you use. My experience for the engineering world, certainly embedded is that currently the versions free to the general public are little more than sophisticated search engines and for that purpose they are pretty good and have saved me a lot of time. You have to be very specific what you ask. Ask the same question 5 times and AI seems to give 5 different answers. ALso i've found with windows programs from visual studio, it assumes you know what you are doing which is a mistake on my part :P

BenR
Matrix Staff
Posts: 2289
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 634 times
Been thanked: 840 times

Re: AI Code in FC - Discuss

Post by BenR »

Hello,

We are currently planning on Flowcode and AI. We are working on a spectrum of possibilities from doing nothing right through to full AI integration. I'm currently not sure what will come of it but we are certainly thinking hard about it and what is the best road going forward.

At the moment I have these which work well with Claude and Cursor to allow them to be able to read and write flowcode project files. It's not full integration by any means but it does allow for AI to make sense of the Flowcode file format. Throw in a few example projects (the wiki can be a great resource here) and the AI is very good at being able to make sense of the project file. Just remember to reload the project file in Flowcode if the AI has made changes to the project source.

Please note the helper docs were made using AI and so there can and will be errors :D
Flowcode AI Helper Docs.zip
(18.69 KiB) Downloaded 62 times

ShelleyRYoung
Posts: 1
Joined: Thu Sep 10, 2026 9:52 am

Re: AI Code in FC - Discuss

Post by ShelleyRYoung »

AI integration in Flowcode could be really useful if it includes proper validation and project constraints.
Edit by geometry vibes a day ago

medelec35
Valued Contributor
Posts: 2404
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 768 times
Been thanked: 828 times

Flowcode v11 Re: AI Code in FC - Discuss

Post by medelec35 »

I've put together two reference documents on Flowcode 11 that might be useful to others here, built up over a long series of real component and app builds (custom components, PC Developer/App Developer apps, and some embedded projects along the way).

The first covers building custom Flowcode components from scratch - the real `.fcfx` XML schema, property types, the forwarded-property pattern, variable scoping rules, flowchart command syntax, child component wiring, lifecycle events, the 2D simulation-drawing components (GdiCanvas/GdiText/GdiShape), a couple of possible Flowcode bugs around TimedInterval callback macros, and a fairly long list of common errors and their actual fixes.

The second covers PC Developer / App Developer projects specifically - `.fcpcd` files, the SCADA wire-protocol side, COM port comms, GDI widgets and gauges, MQTT client setup (including a real bug where QoS 1 can silently drop packets in a request/response design), and some notes on Web Developer for comparison.

Everything in both documents was checked against actual exported Flowcode files or real compiler/export errors rather than guessed - if something wasn't confirmed against a real file, it's marked as such rather than stated as fact. They're written mainly for an AI assistant to work from when building or editing a Flowcode file directly (dense, exact XML/schema detail, no hand-holding), rather than as a beginner tutorial - but if you don't mind that style, there's a fair bit in there a person could learn from too.

If you have any issues or successes using AI then please let me know.
I found that Claude works really well at creating components and app developer projects, as a really complex MQTT project was successfully completed.
Al creates the working file, but you might need to upload a blank project file to start with if requested by AI
Attachments
Flowcode Creation Documents.zip
(183.07 KiB) Downloaded 2 times
Martin

Post Reply