Page 1 of 1

Easier editing of PLC source code

Posted: Mon Mar 11, 2019 5:03 pm
by DannyB
Hey folks,
I got bored last week and wrote a extension for VSCode that makes editing Centroid PLC source code (the .src files for the PLC) a lot easier. If you have to edit the PLC source code, i'd suggest downloading it and giving it a try
(If you install vscode, just click the extension button, type "centroid", and install it, it's very very easy)

It supports:
Syntax highlighting

Hover documentation (If you hover over a variable, it will tell you what it does). I have extracted all system documentation and machine parameter documentation, so hovering over those variables will tell you the same thing the docs/program will.

Code completion of all system variables, etc.

I'll probably make some other small improvements (like trimming the completion suggestions based on context, so that it only completes stage variables when you complete on a JMP, etc) and am open to ideas if people have them.
Pics below.

When i get a chance i'll probably next make a nice G-code extension as well that understands centroid M codes/variable mappings.
Completion2.png
HoverHelp2.png
HoverHelp1.png

Re: Easier editing of PLC source code

Posted: Mon Mar 11, 2019 5:35 pm
by Dan M
Awesome and thank you, I can't wait to try it out! Quick question, will it work for macros too?

Dan

Re: Easier editing of PLC source code

Posted: Tue Mar 12, 2019 5:52 pm
by Dan M
So I checked it out pretty cool nice work.. If you could make a macro extension that would be amazing!!!

Dan

Re: Easier editing of PLC source code

Posted: Tue Mar 12, 2019 11:48 pm
by Arrow
Cool , I will give this a try

Re: Easier editing of PLC source code

Posted: Wed Mar 13, 2019 10:15 am
by agsweeney1972
I had downloaded this from your GitHub a week or so ago and can say it has been very helpful. I use and prefer VSCODE to most other editors and your work on this has been much appreciated.

Re: Easier editing of PLC source code

Posted: Wed Mar 13, 2019 2:26 pm
by DannyB
Dan M wrote: Tue Mar 12, 2019 5:52 pm So I checked it out pretty cool nice work.. If you could make a macro extension that would be amazing!!!

Dan
I'll try to get it in the next week.
I have all the documentation extracted, etc.

Re: Easier editing of PLC source code

Posted: Wed Mar 13, 2019 4:14 pm
by Dan M
DannyB wrote: Wed Mar 13, 2019 2:26 pm
Dan M wrote: Tue Mar 12, 2019 5:52 pm So I checked it out pretty cool nice work.. If you could make a macro extension that would be amazing!!!

Dan
I'll try to get it in the next week.
I have all the documentation extracted, etc.
Thank you!

Re: Easier editing of PLC source code

Posted: Thu Mar 14, 2019 6:14 pm
by DannyB
Here's a test version if you want to play with it (it will auto-update to whatever version i put on the extension store).

You need to rename it from .vsix.zip to .vsix before installing into vscode.

(Go to the extensions page, choose the "..." item, and use "install from vsix"

I haven't finished formatting documentation or handling a few things (like processing labels or hovers for variable access)

But it should generally work :)