The Shop > CNC
DDCSV1.1 4 Axis controller
<< < (92/202) > >>
Benedikt:

--- Quote from: antonio on March 05, 2017, 06:54:33 AM ---I've found this on the slib.nc

(G28 X Y Z A)
O9028
#1=#451
#2=#452
#3=#453
#4=#454
IF #450LT0 GOTO1
#5=#488
#6=#489
#7=#490
#8=#491
GOTO2
N1 #5=#1+#488
#6=#2+#489
#7=#3+#490
#8=#4+#491
N2 G90G00X#5Y#6Z#7A#8
IF#455EQ0GOTO3
IF#455EQ1GOTO4
IF#455EQ2GOTO5
IF#455EQ3GOTO6
IF#455EQ4GOTO7
IF#455EQ5GOTO8
IF#455EQ6GOTO9
N3 #9=-#800
#10=-#801
#11=-#802
#12=-#803
GOTO10
N4 #9=-#800-#804
#10=-#801-#805
#11=-#802-#806
#12=-#803-#807
GOTO10
N5 #9=-#800-#808
#10=-#801-#809
#11=-#802-#810
#12=-#803-#811
GOTO10
N6 #9=-#800-#812
#10=-#801-#813
#11=-#802-#814
#12=-#803-#815
GOTO10
N7 #9=-#800-#816
#10=-#801-#817
#11=-#802-#818
#12=-#803-#819
GOTO10
N8 #9=-#800-#820
#10=-#801-#821
#11=-#802-#822
#12=-#803-#823
GOTO10
N9 #9=-#800-#824
#10=-#801-#825
#11=-#802-#826
#12=-#803-#827
N10 G90G00X#9Y#10Z#11A#12
M99

?? :scratch:

--- End quote ---
Yes, the original firmware has limited scripting capabilities. There are even more hooks you can create. One is called T.nc. Also, you can try placing files called 1.nc to 9.nc on your USB stick. I have not yet tried any of these or found out what they do, but the disassembly shows that these strings are used in the program.
Benedikt:
 :update:
Okay, I have thought a bit over the entire project.
I can't free enough time to actually completely rewrite the entire software alone and reverse engineer the driver interface. Maybe sometime, but not now. So I will now focus on improving the original software even further than already using external utility programs. Yes this is absolutely possible. The first point of attack is writing a parser hook that will preparse your G-Code and allow adding new commands. E.g. we can add new cycles that will be expanded by a deamon program that I will write that will always run in the background. Using the bare minimum set of G-Code of the original this will work quite well. We can even fix bugs in the old G-Code processing.
I have also thought of how to implement these new commands into the original firmware and I will be using the file manager. Deleting certain virtual files will now trigger commands and copying files to special virtual directories will automatically parse and process the files for you. I think this is fine for now.

I suggest we should now all post suggestions of what cycles and additions and fixes to the included G-Code parser should be done. Best would be actual examples of what the result should be.
I will also add Lua scripting capabilities to the next version of the firmware (so Lua can be used to extend the G-Code set).

EDIT:
I wanted to add that you cannot brick/permanently break the controller in any way.
Deleting linuxrc is fine too. It will be regenerated on the next boot when the Linux image is copied into RAM. Deleting any other file is also no problem. Installing the 2017 firmware update I released a couple of days ago will fix everything and restore the controller back to normal.
BrokenEye:
You have done more than enough already Benedikt, so I for one am not expecting you to put your stuff on the back burner, I think we all appreciate the work you have already done, Thank you.. :clap:
antonio:
Many many thanks Benedikt!!!


Inviato dal mio iPhone utilizzando Tapatalk
jjae6:
This is my second post. I do not have this driver yet, but I follow the great advances of this forum and DDCSV1.1 with great enthusiasm.

First I want to congratulate Benedikt for his great work.

Second, Now, I'm looking at the file "slib.nc", and I see the following things (please correct me if I am wrong):

(G28 X Y Z A) >>>>> commentary
O9028    >>>>>>>  G28 command  "Return to Reference Point" with "090" and "28"
#1=#451  >>>>>>  Defines a variable, named "# 1" with a "#451" value.
#2=#452  >>>>>>  Same a "#2" whith "#452" value...
I assume for  "# 451...#452...."  values , the program will read it from somewhere.., maybe some values defined by the user...., or variables as current position values of  XYZA axes, speed values, etc, etc.
......
IF #450LT0 GOTO1 >>> IF "#450@ value "is less than" "0" goto  "1" tag
>>>>>Here is a list of a Comparison Operators for "IF":    EQ: Equal ,     NE: Not equal  ,   GT: Greater than    , GE: Greater than or equal  ,    LT: Less than,     LE: Less than or equal
>>>> and  "goto 1"  tag is  the line 1 defined by "N1...." line
....
GOTO2  >> Jumps to tag "2", defined with a "N2.... " line
.....
 Then, If you look at it, in summary,  the G28 movement is defined by the following TAG lines "N2" and "N10", depending on  "GOTO ..." jumps, and the "IF ..." code according to last modified values "# .."
If code jumps to N2  tag  execute "N2 G90G00X#5Y#6Z#7A#8"  ,  And If the code jumps finally to  N10 tag  execute "N10 G90G00X#9Y#10Z#11A#12" . In both cases, it makes "G90" absolute movement , and then "G0" rapid movement, followed by axes movement with their values,  in case of N2 tag:  X#5  Y#6  Z#7  A#8 .... i.e. X with "#5" last  value, Y with "#6" last value...etc,etc., and same in N10 tag...

In short, inside the code I see that you can modify commands as we want, but we need to know all of defined system variables "#..."  for programming.
For example, In theory, Antonio, you can modify the code to go  Z axis wherever you want  ( i.e. Z00 , select N2 line or/and N10 line)
N10 G90G00Z00
G00X#9Y#10A#12
...
Of course, you should take all necessary precautions with these modifications! but in theory,  ( Remember that I do not have this controller yet ...),  you could change the code for i.e. add a tool change command, or add another XX command with "O90XX" .


PS: Excuse my bad english
Navigation
Message Index
Next page
Previous page

Go to full version