Easier editing of PLC source code

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Post Reply
DannyB
Posts: 109
Joined: Mon Jan 15, 2018 1:11 am
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: A900712
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Easier editing of PLC source code

Post 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


Dan M
Posts: 506
Joined: Tue Aug 28, 2018 3:47 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8df84dfbdd5-0809181120
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: No
Contact:

Re: Easier editing of PLC source code

Post by Dan M »

Awesome and thank you, I can't wait to try it out! Quick question, will it work for macros too?

Dan


Dan M
Posts: 506
Joined: Tue Aug 28, 2018 3:47 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8df84dfbdd5-0809181120
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: No
Contact:

Re: Easier editing of PLC source code

Post by Dan M »

So I checked it out pretty cool nice work.. If you could make a macro extension that would be amazing!!!

Dan


Arrow
Posts: 8
Joined: Tue Feb 05, 2019 12:37 am
Acorn CNC Controller: No
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Easier editing of PLC source code

Post by Arrow »

Cool , I will give this a try


agsweeney1972
Posts: 57
Joined: Mon Jan 22, 2018 1:04 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Clifton Illinois

Re: Easier editing of PLC source code

Post 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.


DannyB
Posts: 109
Joined: Mon Jan 15, 2018 1:11 am
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: A900712
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Easier editing of PLC source code

Post 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.


Dan M
Posts: 506
Joined: Tue Aug 28, 2018 3:47 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: C8df84dfbdd5-0809181120
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: No
Contact:

Re: Easier editing of PLC source code

Post 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!


DannyB
Posts: 109
Joined: Mon Jan 15, 2018 1:11 am
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: No
Hickory CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: A900712
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Easier editing of PLC source code

Post 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 :)
Attachments
centroid-gcode-language-0.0.1.vsix.zip
(83.74 KiB) Downloaded 131 times


Post Reply