Many Commercial PLCs support what are refereed to as Function Block Diagrams (
https://en.wikipedia.org/wiki/Function_block_diagram) not exactly the same as something like Scratch but there are similarities. I have discussed a little bit the idea of working on a cross platform Ladder Logic editor using Qt. I'm sure if that goes somewhere, support for FBDs could possibly be added as well.