Results 1 to 1 of 1

Thread: Can anyone help me dEbug this Mach3 screenset

  1. #1
    Registered
    Join Date
    Jul 2008
    Location
    UK
    Posts
    135
    Downloads
    0
    Uploads
    0

    Can anyone help me dEbug this Mach3 screenset

    I've posted on the Mach3 forum, but suprisingly there doesn't seem to be the same amount of throuhput on there as there is on here, so I wonder if I could be so bold to post the predicament here.....

    This particular screenset (which is on teh arsoft download page) kind of an incomplete project by some users ...but still has a lot of functionailty that does seem to work

    The immediate issues, that 'hit me, that I'm puzzled about...


    The problem - The the 'spool count' doesn't budge from '0' ? (the spool count in this isnatnce is a DRO of a motor, representing how many times a bobbin spool hasturned...or inessence the Stepper moto revolutions)


    First the spool count DRO has the following attributes...


    Global No
    Function A DRO
    OEM Code 0
    Format %+.0f
    Hotkey
    DRO tabbing 1
    image path none
    Locked for Mouse no

    I've bolded what I believe is the important bit. I guess this could be considered a general screenset question. Why would the DRO not update?

    I'm possibly thinking is't not related to the above but the code at all. Now this is where I struggle, because not only does it involve VisualBasic (which is fairly new to me), but more importatnly G-Code output (which is very new to me!)

    So if anyone with a more experienced eye can pick out what would set up the total spool count, ultimately resulting in G-Code that would start the spool count DRO counting, then I'd be grateful!

    I've added some thoughts (not saying they're right - in fact they're just guesses)

    dim width as double
    dim guage as double
    dim numturns as double
    dim windspeed as double
    dim amountfit as double
    dim Xpos as double
    dim Apos as double


    all the above are just setting up some variables to be used in some calculations?


    width = abs(getoemdro(1000))
    guage = getoemdro(1003)
    numturns = getoemdro(1001)
    windspeeds = getoemdro(1002)



    The above takes the user input & assigns it to the aformentioned variables.



    OpenTeachFile "wind.tap"
    Code "g00 X1.17"
    Xpos = 1.17



    That lot opens up a new G-Code file in readiness for the output of below file, gives it a name & finally sets up a 'constant? (offest...whatever you wish to call it)

    call setdro(3,0) - no idea what this does!

    amountfit = width / guage - some simple maths, derived from the user input, to establish how many winds of wire can fit into the spool width)

    Now this is where it gets hairy for me...what's going on here....

    Nc = 1

    DO While( amountfit < numturns)
    Apos = amountfit * Nc
    If (Xpos = 1.17) Then
    Xpos = (width + 1.17)
    Else
    Xpos = 1.17
    end if
    code "G01 X " & Xpos & " A " & Apos & " F50"
    code "g01 g91 A -.0001"
    code "g90"
    numturns = numturns - amountfit
    Nc = Nc +1
    if (Nc = 99999) then
    msgBox"I fed up"
    End If
    Loop
    dist = guage * numturns

    If (Xpos = 1.17) Then
    Xpos = dist + 1.17
    Else
    Xpos = width - dist + 1.17
    End If



    I'm particularly interested in the following bitas I reckon this is what's setting up the spool count (is the bit that doesn't increment))


    Apos = Apos + numturns
    code "G91 A-.0001" - what' this line about ...specifically -.0001
    code "g90"
    code "G01 X" & Xpos & "A" & Apos
    Code "M30"

    CloseTeachFile

    Call LoadTeachFile()


    Many thanks for your help!
    Last edited by HankMcSpank; 07-01-2009 at 07:07 PM.


Similar Threads

  1. Does anyone have the Mach 3 screenset
    By carlnpa in forum Screen Layouts, Post Processors & Misc
    Replies: 12
    Last Post: 12-05-2010, 11:12 PM
  2. My tweaked screenset
    By zephyr9900 in forum Tormach Personal CNC Mill
    Replies: 4
    Last Post: 06-24-2009, 01:34 PM
  3. Mach3
    By routerrick in forum Machines running Mach Software
    Replies: 1
    Last Post: 01-04-2008, 03:51 PM
  4. 1st 'Beta' release of the MachSteelBlue Screenset
    By santiniuk in forum Screen Layouts, Post Processors & Misc
    Replies: 19
    Last Post: 10-14-2007, 11:48 AM
  5. Mach3Turn - 1st 'Beta' release of the SilverBlue Screenset for lathes
    By santiniuk in forum Screen Layouts, Post Processors & Misc
    Replies: 4
    Last Post: 03-08-2007, 10:55 PM

Visitors found this page by searching for:

Nobody landed on this page from a search engine, yet!
SEO Blog

Posting Permissions


 


About CNCzone.com

    We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

Follow us on

Facebook Dribbble RSS Feed


Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.