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

I have just had a look at the source code and I think I have found the list of supported codes and I will post them here soon.
Apart from that, I have just found the place, where inches are handled:


--- Code: ---; =============== S U B R O U T I N E =======================================

; Attributes: bp-based frame

ParserGGroup6 ; CODE XREF: FindProgramBlock:loc_43FF4p
; ParserProgramBlock+A54p ...

var_20 = -0x20

MOV R12, SP
STMFD SP!, {R4-R7,R11,R12,LR,PC}
SUB R11, R12, #4
SUB SP, SP, #8
LDR R3, =bakNcBlock
LDR R3, [R3,#(dword_1279BC - 0x1279A4)]
CMP R3, #0x14
BNE loc_3C570
MOV R3, #0
STR R3, [R11,#var_20]
B loc_3C54C
; ---------------------------------------------------------------------------

loc_3C470 ; CODE XREF: ParserGGroup6+110j
LDR R7, [R11,#var_20]
LDR R3, [R11,#var_20]
ADD R3, R3, #0x22
LDR R1, =systemVarTable
MOV R3, R3,LSL#2
MOV R2, R3,LSL#2
ADD R3, R3, R2
MOV R2, R3,LSL#4
ADD R3, R3, R2
ADD R3, R3, R1
LDR R3, [R3]
MOV R0, R3
BL __extendsfdf2
MOV R3, R0
MOV R4, R1
MOV R0, R3
MOV R1, R4
MOV R2, #0
MOV R3, #0x40190000
BL __muldf3
MOV R3, R0
MOV R4, R1
MOV R5, R3
MOV R6, R4
LDR R3, [R11,#var_20]
ADD R3, R3, #0xC
LDR R1, =systemVarTable
MOV R3, R3,LSL#2
MOV R2, R3,LSL#2
ADD R3, R3, R2
MOV R2, R3,LSL#4
ADD R3, R3, R2
ADD R3, R3, R1
LDR R3, [R3]
MOV R0, R3
BL __extendsfdf2
MOV R3, R0
MOV R4, R1
MOV R0, R5
MOV R1, R6
MOV R2, R3
MOV R3, R4
BL __muldf3
MOV R3, R0
MOV R4, R1
MOV R0, R3
MOV R1, R4
BL __truncdfsf2
MOV R2, R0
LDR R3, =perUnitToPulse
STR R2, [R3,R7,LSL#2]
LDR R3, [R11,#var_20]
ADD R3, R3, #1
STR R3, [R11,#var_20]

loc_3C54C ; CODE XREF: ParserGGroup6+28j
LDR R3, [R11,#var_20]
CMP R3, #2
BLE loc_3C470
LDR R2, =systemVarTable
LDR R3, =0x3124
LDR R2, [R2,R3]
LDR R3, =perUnitToPulse
STR R2, [R3,#(dword_127C08 - 0x127BFC)]
B loc_3C614
; ---------------------------------------------------------------------------

loc_3C570 ; CODE XREF: ParserGGroup6+1Cj
MOV R3, #0
STR R3, [R11,#var_20]
B loc_3C5F4
; ---------------------------------------------------------------------------

loc_3C57C ; CODE XREF: ParserGGroup6+1B8j
LDR R4, [R11,#var_20]
LDR R3, [R11,#var_20]
ADD R3, R3, #0x22
LDR R1, =systemVarTable
MOV R3, R3,LSL#2
MOV R2, R3,LSL#2
ADD R3, R3, R2
MOV R2, R3,LSL#4
ADD R3, R3, R2
ADD R3, R3, R1
LDR R0, [R3]
LDR R3, [R11,#var_20]
ADD R3, R3, #0xC
LDR R1, =systemVarTable
MOV R3, R3,LSL#2
MOV R2, R3,LSL#2
ADD R3, R3, R2
MOV R2, R3,LSL#4
ADD R3, R3, R2
ADD R3, R3, R1
LDR R3, [R3]
MOV R1, R3
BL __mulsf3
MOV R3, R0
MOV R2, R3
LDR R3, =perUnitToPulse
STR R2, [R3,R4,LSL#2]
LDR R3, [R11,#var_20]
ADD R3, R3, #1
STR R3, [R11,#var_20]

loc_3C5F4 ; CODE XREF: ParserGGroup6+134j
LDR R3, [R11,#var_20]
CMP R3, #2
BLE loc_3C57C
LDR R2, =systemVarTable
LDR R3, =0x3124
LDR R2, [R2,R3]
LDR R3, =perUnitToPulse
STR R2, [R3,#(dword_127C08 - 0x127BFC)]

loc_3C614 ; CODE XREF: ParserGGroup6+128j
SUB SP, R11, #0x1C
LDMFD SP, {R4-R7,R11,SP,PC}
; End of function ParserGGroup6

; ---------------------------------------------------------------------------
off_3C61C DCD bakNcBlock ; DATA XREF: ParserGGroup6+10r
off_3C620 DCD systemVarTable ; DATA XREF: ParserGGroup6+38r
; ParserGGroup6+98r ...
off_3C624 DCD perUnitToPulse ; DATA XREF: ParserGGroup6+F4r
; ParserGGroup6+120r ...
dword_3C628 DCD 0x3124 ; DATA XREF: ParserGGroup6+118r
; ParserGGroup6+1C0r

--- End code ---

TLDR:
This function changes the PulseToUnit once it hits a G20.
It recalculates the PulseToUnit 3 times (for the X, Y and Z axis) and when in inch mode, multiplies it by 2.390625.
The calculation appears to take the steps per mm from the configuration params #34 (X-axis pulses per mm), #35 (Y-axis pulses per mm), #36 (Z-axis pulses per mm) into account when recalculating.
I have just had a brief look over it and I may have overseen something important.
I can easily change this multiplication constant to some other one (2.54 = 0x40228f5c for example), if this will increase the accuracy.

These were G/(M?)-Codes I found by quickly searching through the huge code listing. It may not be correct and is certainly incomplete, but it is a start:

--- Code: ---0
1

12
13
28
29

17
18
19

20
21

43 ?
44 ?
49 ?

53
54
55
56
57
58
59

90
91

98 ?
99 ?

--- End code ---

BR,
Benedikt
WeldingRod:
Benedikt,
Great work on Pandora!  Thank you so much!  :beer:

I've been running the original DDCSV firmware on an engraver for quite a while now and it worked quite well.  I'm now in the process of upping my game to FOUR  :zap: axis and an OX from SMW3D (great kit, BTW).  I will post the settings once I have them thrashed out.  FYI, my rotary is a Haas HA5C with a fresh stepper motor (the old slo-syn one was corroded solid with globs of coolant goo and white paste.  Blech.).  Nice unit, BTW.  5 degrees per turn of the stepper.

It looks like I may be the only person using the 4th axis.  My challenge is there doesn't seem to be any way to control the feed rate on the 4th axis, other than doing the FRO and down method to set the overall feed rate to 70 or 80%.  I've tried quite a few gcodes without success.  The following code makes the rotary go back and forth to 30 degrees, but all four cycles are the same speed.  FYI, I tried this code again on Pandora and got the same result.  On the good side, the angular axis DOES work, and is repeatable (once I slow down the master feed enough so it doesn't loose steps).

G1 A30 F100
G1 A0 F100
G1 A30 F10
G1 A0 F10
G1 A30 F1
G1 A0 F1
G1 A30 F0.1

I've also tried pre-setting the feed rate without any change in feed speed:
G1 F10
G1 A30
G1 A0
G1 F1
G1 A30
G1 A0

Any ideas?  All of the maximum speed and acceleration settings seem to be tied to manual mode, except 76, 77, 80, and 99.  However, all of these are linear; the only angular ones are for manual.
WeldingRod:
I took Benedikt's gcode list (harvested from the firmware) and added "what the heck is that".  I also cross referenced it to the manual.

Gcodes on DDCSV
0   Quick cut
1   Standard cut
   
G2   Clockwise cut                           Not on Benedikt's list
G3   Counterclockwise cut                     Not on Benedikt's list
G4   Dwell (milliseconds?)                     Not on Benedikt's list

12   Clockwise circle w/entrance and exit arcs         Not in manual
13   Counter clockwise circle w/entrance and exit arcs        Not in manual

17   XY plane selection
18   ZX plane selection
19   YZ plane selection
   
20   English units
21   Metric units

28   Return to home                     Not in manual
29   **no clue, used for bed leveling on 3d printers**   Not in manual

43   Tool length compensation (negative)         Not in manual
44    Tool length compensation (positive)         Not in manual
49    Cancel tool length compensation             Not in manual

53   Turn off G54-G59 offset                  Not in manual
54   Select G54 coordinate system
55   Select G55 coordinate system
56   Select G56 coordinate system
57   Select G57 coordinate system
58   Select G58 coordinate system
59   Select G59 coordinate system

G81   Drill hole                     Not on Benedikt's list
G82   Drill hole                     Not on Benedikt's list
G83   Circulation drill hole               Not on Benedikt's list

90   Absolute positioning
91   Increment positioning

98 ?   Back to R point according to "time fixed feed"
99 ?   Fixed circulation W.R.T. G81/82/83
WeldingRod:
OK, got the OX moving!
Re-testing the rotary axis...  I  was watching the display this time.  There is a line on the display that says F....actual feed rate....feed set point
When I run the pendant on X, y, z, I see the set point at 500 on the right, and I see the feed speed up to 500 and then slow back down, according to the acceleration.  When I run the A axis program above, I see the feed set point change at  each step of the program.  HOWEVER, the actual feed ramps up to about 99 and then back down for ALL the various feed rates.  When I slow down the master feed rate, the A rotation slows down as expected. :(
on a side note, the maximum A speed seems to have gone down some.  I wish I knew which setting that was!  I have no idea where the 100 limit comes from!
WeldingRod:
High frustration!  I forgot that the DDCSV has a default minimum steps per MM value of 50.  The Ox has 26.670 steps per mm on X and Y, and 50 on Z.
 :bugeye:
Is there any hope that this value is easy to change in the code?
Navigation
Message Index
Next page
Previous page

Go to full version