コード例 #1
0
def g886(self, **words):
    for key in words:
        MESSAGE("word '%s' = %f" % (key, words[key]))
    if words.has_key('p'):
        MESSAGE("the P word was present")
    MESSAGE("comment on this line: '%s'" % (self.blocks[self.remap_level].comment))
    return INTERP_OK
コード例 #2
0
ファイル: remap.py プロジェクト: sundale/Calibration-G-Code
def M207(self, **words):

    T0 = self.params[4000]
    T1 = self.params[4001]
    T2 = self.params[4002]
    TC = self.params[3999]
    Acc = .1
    TopLim = T0 + Acc
    BotLim = T0 - Acc

    if T1 >= BotLim and T1 <= TopLim:
        print "T1 in Range"
    else:
        T1Adj = T1 - T0
        MESSAGE('T1 Adjustment = {0:+.2f} ISSUE M252 TO ADJUST'.format(T1Adj))
        self.params[4003] = T1Adj

    if T2 >= BotLim and T2 <= TopLim:
        print "T2 in Range"
    else:
        T2Adj = T2 - T0
        MESSAGE('T2 Adjustment = {0:+.2f} ISSUE M253 TO ADJUST'.format(T2Adj))
        self.params[4004] = T2Adj

    if TC >= BotLim and TC <= TopLim:
        print "TC in Range"
    else:
        TCAdj = TC - T0
        MESSAGE('TC Adjustment = {0:+.2f}'.format(TCAdj))
        self.params[4005] = TCAdj

    return INTERP_OK
コード例 #3
0
ファイル: remap.py プロジェクト: yfma2010/linuxcnc-mirror
def g842(self, **words):

    global _sticky_params

    firstcall = False

    # determine whether this is the first or a subsequent call
    c = self.blocks[self.remap_level]
    r = c.executing_remap
    if c.g_modes[1] == r.motion_code:
        # this was the first call.
        # clear the dict to remember all sticky parameters.
        _sticky_params[r.name] = dict()
        text = "*" + r.name
    else:
        text = r.name
    # merge in new parameters
    _sticky_params[r.name].update(words)

    # insert your cycle actions here
    for (key, value) in _sticky_params[r.name].items():
        text += "%s%.1f " % (key, value)
    MESSAGE(text)

    # retain the current motion mode
    self.motion_mode = c.executing_remap.motion_code
    return INTERP_OK
コード例 #4
0
ファイル: remap.py プロジェクト: EqAfrica/machinekit-1
def g301(self, **words):
    MESSAGE("g301:")
    for key in words:
        MESSAGE("word '%s' = %f" % (key, words[key]))
    return INTERP_OK