News for hackers. Stuff that matters.
Re:Where should visual programming go? by needles1986 on Friday July 26, 2024 @03:05PM (#41081320)
Non-programmer here. I’ve long desired to program Arduino microcontrollers but haven’t had the ability and/or the patience to learn programming. I’m a very visual person and get confused if I have to keep more than a few lines of code in my head. Even if I understand how I want a signal to be processed into an action, when the flow chart in my head needs to be translated into text I get overwhelmed.

A solution arrived for me in the form of a number of visual arduino IDEs. Flprog, Outseal, and Open PLC. They all allow programming in ladder logic, and Flprog and Open PLC allows for function block programming. Ladder logic is useful for many tasks involving discrete I/O (Ex. A button latches a contact which turns on a relay which turns off a light and turns on a motor.) Function block programming has enabled me to perform more complicated functions like creating an HMI using a menu system displayed on an LCD connected via I2C. These are tasks that I wouldn’t have a chance of accomplishing without the complex arduino code being contained in graphical functions blocks which I can wire together and configure with a gui.

Prior to compilation, Flprog displays the raw arduino code in the arduino IDE, which gives me a chance to exam the actual code produced by my function block program. I find it to be very educational.

As a non-programmer, I have no idea if this embedded programming use case can be generalized to more complex programming tasks, but for my limited use case it’s been transformational.

Re:Where should visual programming go? by skybrian on Friday July 26, 2024 @03:54PM (#41081702)
Interesting. Looks like the Flprog website is largely in Russian and Outseal seems to be Indonesian. Is there a good introduction to ladder logic in English?
Re:Where should visual programming go? by needles1986 on Friday July 26, 2024 @04:09PM (#41081825)
OpenPLC is a good English introduction. You're right, the biggest downside to these programs is that support and documentation are not in English. The Outseal IDE gives you the option of setting it English, although error messages still get output in Indonesian. Flprog also allows you to switch to English within the IDE.

If you're willing to pay a little extra for hardware you could go with Allen Bradley and their Connected Components workbench software.

Re:Where should visual programming go? by endorphine on Friday July 26, 2024 @03:08PM (#41081350)
Curious, what's your profession? To me you do sound like a programmer.
Re:Where should visual programming go? by needles1986 on Friday July 26, 2024 @03:12PM (#41081375)
Former machine technician. I used to repair machines in factories. I’ve been lurking on hacker news for over a decade because I find the work of programmers fascinating, but my brain just doesn’t cope well with code. I do however, understand machines and control logic, so for me visual programming is a sweet spot.
Re:Where should visual programming go? by sterlind on Friday July 26, 2024 @03:55PM (#41081718)
have you tried Simulink? it gets hated on and it's proprietary but I bet you'd really like it. there's also Drakon if you're down with flow charts.
Re:Where should visual programming go? by jarsin on Friday July 26, 2024 @11:10PM (#41084199)
I have a theory that software devs make horrible mechanics.
Re:Where should visual programming go? by toast0 on Friday July 26, 2024 @05:04PM (#41082268)
> I’m a very visual person and get confused if I have to keep more than a few lines of code in my head. Even if I understand how I want a signal to be processed into an action, when the flow chart in my head needs to be translated into text I get overwhelmed.

It looks like you've got things sorted. But another option would be to write your flowchart down on paper ... get your idea out of your head in a visual medium, and then turn that into code without needing to hold the whole thing in your head at once.