|
Forum Index : Microcontroller and PC projects : Stepper Project
| Author | Message | ||||
| mozzie Senior Member Joined: 15/06/2020 Location: AustraliaPosts: 276 |
G'day Bryan, Great to see you are making progress I think the command you are looking for is PEEK(STEPPER BUFFER) ' prog to test stepper functions Option default integer On Error skip Stepper close SetTick 200,Show_Pos Stepper init 0.05,32,,1 Stepper axis x,gp0,gp1,gp5,,200,400,50,5 Stepper axis y,gp6,gp7,,,400,600,100,5 Stepper position home Stepper run 0 Stepper gc g1 x100 y80 f500 Stepper gc g4 p1000 Stepper gc g0 x0 y0 Do Pause 100 Loop Until Peek(stepper active)=0 ' wait until motion complete Pause 250 ' wait for final position update Stepper close End Sub Show_Pos Print @(100,108),"X-POS = " Str$(Peek(stepper x),-4,4) Print @(100,120),"Y-POS = " Str$(Peek(stepper y),-4,4) Print @(100,132),"Buffer = " Str$(Peek(stepper buffer),4) End Sub Pretty sure this is the latest version of the Stepper Reference. Stepper_Reference.pdf Regards, Lyle. |
||||
Bryan1![]() Guru Joined: 22/02/2006 Location: AustraliaPosts: 1872 |
Hi Lyle yea mate getting the DM556 working today was a huge step in the right direction for me so now I do have to get my head around coding all this up. Now what I did find when I did those buttons to mimic the stepper limits it clearly states for the same axis the same pins can be used but when I did try that got an error so thats why 6 off in/out pins are used + one for the E-Stop. As I do have my HDMIUSB board up in the shed now it's right next to the surface grinder so when those DM556's arrive I will have a go with that board as with the mouse and keyboard to go setting up the parameters for the grinder will be a breeze. Now I do think we can get away from using ball screw on the Y and Z axis and make an allowance in the code for the backlash. But with the Z axis I do think a ball screw should be used as we do want precision when we set the grinding wheel for the cut where just a few step pulses may be needed to get the depth. Also a damper could be installed to beef up the Z axis. So basically the X axis is just going to going back and forth at a predetermined distance and when it changes direction the Y axis can move the required distance to keep the cutting going, also once the X axis has gone back and forth the Z axis can be incremented down to set the level to get a good cut. So getting this all my head is one thing now putting all this into code is certainly going to test the grey matter. Regards Bryan |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |