Results 1 to 3 of 3

Thread: MTC.sbp - CHECK_MTL subroutine

  1. #1
    Join Date
    Dec 2015
    Location
    New Jersey
    Posts
    60

    Default MTC.sbp - CHECK_MTL subroutine

    I was looking at MTC.sbp and can't figure out why CHECK_MTL subroutine is there. It doesn't seem to do anything. No matter what, it's going to set &z_adjust to zero.

    First line is commented out. Second line sets &zshift to zero.
    If MSGBOX answer is NO, then &z_adjust = 0 * 0
    if MSGBOX answer is YES, then &z_adjust = 0 * 1



    CHECK_MTL:
    'If &zshift = 0 Then GoSub MTL_ERROR
    &zshift = 0
    if &zero_to_bed = 0 then GoTo doaskbed
    if &zero_to_bed = 1 then GoTo doaskbed
    MSGBOX(Did you Zero to bed? ,YesNo,ZERO BIT?)
    doaskbed:
    if &msganswer = NO then &zero_to_bed = 0
    if &msganswer = YES then &zero_to_bed = 1

    &z_adjust = &zshift * &zero_to_bed
    return

  2. #2
    Join Date
    Apr 2007
    Location
    Marquette, MI
    Posts
    3,388

    Default

    Scott...
    I didn't write the code, but my guess is that it is in there for compatibility with the ShopBot Link which uses the "&zshift" variable. I would imagine that when in use the comment may be removed from one line and others would rem'd out
    Gary Campbell
    GCnC Control
    GCnC411(at)gmail(dot)com
    Servo Controller Upgrades
    http://www.youtube.com/user/Islaww1


    "We can not solve our problems with the same level of thinking that created them"
    Albert Einstein


  3. #3
    Join Date
    Dec 2015
    Location
    New Jersey
    Posts
    60

    Default

    Thanks. I think I'll just delete it from my version - clean things up a bit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •