Basic drawing tools in NR editor

Regarding grouping nodes by using subflows: a had found some ideas on the node-red wiki some time ago, there was this concept of inline-subflows -- I interpreted them as singleton subflows that don't clutter the palette.

All in all, some grouping mechanism like that would really increase readability of larger projects. You could lay out the general structure of your flows with a few of these inline-subflows, and then "zoom in", if you need the details.

Just some ideas, but be careful not to end up with something like LabView. :grin:

2 Likes

Well, I've only seen LabView once but I was quite impressed, out of my price-range of course :slight_smile:

It is used in some projects by our company (mechanical and plant engineering) for measuring and process supervision. Very impressive indeed, but very complex, too.

Ah, that explains why our LabView guys are always saying "LabView for poor people" when they see me using Node-RED in our projects. :joy:

2 Likes

Yes, I saw it at a local engineering company here in Sheffield that make sensors for the oil industry - my son managed to bag a work experience week with them and I couldn't resist having a nose (much to his disgust :smile:). I was surprised to see them building IoT microprocessor logic using a visual tool. Nice.

Reasonable price for its intended audience I guess - their use case needed at least the "Full" license as they were programming FPGA's.

https://www.ni.com/en-gb/shop/labview/select-edition.html

LabView equivalent sounds like the way to go. Who do we need to speak to here? :stuck_out_tongue_closed_eyes:

It is a very different beast in reality and the cost indicates the investment in development and support. So if you wanted to have something similar, you would need to start investing money in the project - perhaps funding some developers :smile:

Of course, you can also contribute yourself as well by writing code or updating documentation.

2 Likes

And the software license is only a part of it... don't forget the appropriate hardware like industrial PCs, extension cards for measuring and so on...

1 Like

Would love to, but my coding days are from a different era, C, Modula-2, Ada etc. This newfangled JS stuff often does my head in.

Well, I think Node-RED is an impressive platform and is only getting better and better from release to release.

I have been using it for personal projects at home since v0.10 in 2015, I think.
Two years ago I introduced it at work for use in industrial projects, doing all kinds of communication with PLCs, data handling and SCADA like stuff. Productivity has improved a lot since then. :+1:

3 Likes

It took me some time to get over the lack of types and compile time assistance you get from typed languages.

After just a few months, I dreaded the thought of going back to explicitly declaring types up front, no being able to add properties to an object by simply .prop = value and the simplicity of serialisation in js is excellent. Don't get me wrong, it still annoys me at times but the benefits do outweigh the struggles.

You should find a gap in the contrib nodes and crack on. Perhaps an ultra flexible number convertor for bits, bytes, hex conversion, octal, etc (I've seen tonnes of how to convert 2 bytes to integer, how to set bit 3 of a WORD, how to split 16bit into two bytes etc)

That would be pretty sweet. I'm imagining something like a html group box that can be collapsed into a descriptive title (multiline of course)

Also like the idea of more flexible comment box. Multiline for starters. Adjustable colours?
Resizable too to make things line up (OCD) :slight_smile:

1 Like

as per Add a 'line break' function by YumaMatsuura Ā· Pull Request #2242 Ā· node-red/node-red Ā· GitHub ...

and Add support for specifying subflow template color by HiroyasuNishiyama Ā· Pull Request #2225 Ā· node-red/node-red Ā· GitHub ... (for subflows)

3 Likes

@dceejay

Double nice :slight_smile:

I was about to add a new feature request but I'm now afraid you will reply with a "already thought of it" link :laughing:

probably :slight_smile: but not always...

It certainly does require a mindset change. Ok, I shall "crack on" with something contrib based, and see what happens :exploding_head:

1 Like

Haha, if you can cope with those monstrosities, JavaScript is a doddle! :smile:

I now make extensive use of ESLint and JSDoc in my JS programming as it really helps track the meaning of variables/objects which I find more important than a fixed declaration of type - though that is certainly helpful sometimes and also helped by ESLint.

Using a decent code editor like VScode with ESLint properly configured eliminates loads of silly little errors that I make because I'm not a full-time developer. JSDoc helps me keep track of what everything means.

VSCode's built-in TypeScript help for JavaScript is also generally useful - though occasionally really annoying when you can't tell it exactly how you need it to behave. Working out how to stop it giving me an error on the RED object for coding the Editor panel for a node was especially frustrating. Also the TypeScript descriptor for Node-RED is far from complete unfortunately (and I don't know enough about TypeScript to be able to offer improvements to the authors). But it is great when it works because it offers up descriptors of objects and variables integrated into your coding. Even across required external packages and libraries.

2 Likes

Thanks for the advice. I admit I've avoided "learning" eslint thus far. I do use vscode (almost exclusively now) - it is tremendous.

1 Like

Perhaps the years of brain fade since those heady days will also help. We shall see. :smirk:

I too am a relic of those days, so please forgive the ramblings of a grumpy old man. I've never coded for a living but have always written code as part of my job. So, I could easily have some of the history and technology wrong, but it seems that each language family reflects a slightly different view of the world. In particular JS is looking out from inside a web browser, where it has very little control of its destiny. Trying to make it feel like a procedural language with synchronous function calls, subroutines, and so on (which I sorely miss) would be self-defeating.

I've used it extensively, but with an academic/institutional license so that cost was not an issue. LabView and some other flow-based programming tools like Extend (now ExtendSim) strike me as what you get when a C programmer does flows. Node-RED can't avoid having its JS foundation show through and probably shouldn't try.

2 Likes