- Posts: 5713
- Thank you received: 2100
I am not sure what you mean, but I would be happy to have a look.Thanks for adding code to repo.
If you want, I can try write code for encoder height override too.
Martin
Please Log in or Create an account to join the conversation.
index 521dc682e..40c4ad0df 100644
@@ -208,6 +208,7 @@ class HandlerClass:
self.dialogError = False
self.cutTypeText = ''
self.heightOvr = 0.0
+ self.old_ovr_counts = 0
self.startLine = 0
self.preRflFile = ''
self.rflActive = False
@@ -474,6 +475,10 @@ class HandlerClass:
self.extHeightOvrPlusPin = self.h.newpin('ext_height_ovr_plus', hal.HAL_BIT, hal.HAL_IN)
self.extHeightOvrMinusPin = self.h.newpin('ext_height_ovr_minus', hal.HAL_BIT, hal.HAL_IN)
self.extHeightOvrResetPin = self.h.newpin('ext_height_ovr_reset', hal.HAL_BIT, hal.HAL_IN)
+ self.extHeightOvrCountsPin = self.h.newpin('ext_height_ovr_counts', hal.HAL_S32, hal.HAL_IN)
+ self.extHeightOvrCountEnablePin = self.h.newpin('ext_height_ovr_count_enable', hal.HAL_BIT, hal.HAL_IN)
self.probeTestErrorPin = self.h.newpin('probe_test_error', hal.HAL_BIT, hal.HAL_IN)
self.out0Pin = self.h.newpin('ext_out_0', hal.HAL_BIT, hal.HAL_OUT)
self.out1Pin = self.h.newpin('ext_out_1', hal.HAL_BIT, hal.HAL_OUT)
@@ -1248,6 +1253,18 @@ class HandlerClass:
if self.heightOvr > 10 :self.heightOvr = 10
self.heightOverridePin.set(self.heightOvr)
self.w.height_ovr_label.setText('{:.2f}'.format(self.heightOvr))
+
+ def height_ovr_encoder(self,value):
+ if (value != self.old_ovr_counts and self.extHeightOvrCountEnablePin.get()):
+ self.heightOvr += (value-self.old_ovr_counts) * self.w.thc_threshold.value()
+ if self.heightOvr < -10 :self.heightOvr = -10
+ if self.heightOvr > 10 :self.heightOvr = 10
+ self.heightOverridePin.set(self.heightOvr)
+ self.w.height_ovr_label.setText('{:.2f}'.format(self.heightOvr))
+ self.old_ovr_counts = value
+
+
+
def touch_xy_clicked(self):
self.touch_off_xy(0, 0)
@@ -1859,7 +1876,8 @@ class HandlerClass:
self.extRunPausePin.value_changed.connect(lambda v:self.ext_run_pause(v))
self.extHeightOvrPlusPin.value_changed.connect(lambda v:self.height_ovr_pressed(v,1))
self.extHeightOvrMinusPin.value_changed.connect(lambda v:self.height_ovr_pressed(v,-1))
+ self.extHeightOvrCountsPin.value_changed.connect(lambda v:self.height_ovr_encoder(v))
self.probeTestErrorPin.value_changed.connect(lambda v:self.probe_test_error(v))
def set_axes_and_joints(self):
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Great, thanks.HI,
I tested MPG code on 7i76e with 7i73 (pendant card) with handwheel and looks fine.
I think it is worth experimenting with. I have no oxy gear so I cannot help much...I have one more question. I'm going to adjust the plasma so I can use an oxy fuel torch. I would need to manually adjust the height "z" without the probe and start burning. Scribe is similar. Uses arm delay and on delay. This could be used to preheat the material and then for the cutting itself. Do you think it's a good idea?
Do you plan to add oxy fuel support to plasmac? Thanks Martin
I did intend to a long while ago, I got some info from Tommy but I got sidetracked with other things and I probably cannot even find that now. We could certainly take a look later if there is enough interest.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.