setup qtplasmac

More
5 years 3 months ago #215532 by phillc54
Replied by phillc54 on topic setup qtplasmac

Thanks for adding code to repo.
If you want, I can try write code for encoder height override too.
Martin
I am not sure what you mean, but I would be happy to have a look.

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #215553 by fupeama
Replied by fupeama on topic setup qtplasmac
similar feature like a buttons but for encoder.
I think the source code is explanatory
Martin.

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.

More
5 years 3 months ago #215554 by phillc54
Replied by phillc54 on topic setup qtplasmac
Aha, for a MPG...

I don't have a spare for testing, if you have tested it and are happy with it then push a PR.

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #215583 by fupeama
Replied by fupeama on topic setup qtplasmac
HI,
I tested MPG code on 7i76e with 7i73 (pendant card) with handwheel and looks fine.

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
 

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago - 5 years 3 months ago #215618 by phillc54
Replied by phillc54 on topic setup qtplasmac

HI,
I tested MPG code on 7i76e with 7i73 (pendant card) with handwheel and looks fine.
Great, thanks.
Edit: I forgot to mention that when you submit a PR could you also increment the version at the very top of qtplasmac_handler.py and also add the change to versions.html which is in the same directory.


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?

I think it is worth experimenting with. I have no oxy gear so I cannot help much...

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.

Last edit: 5 years 3 months ago by phillc54.
The following user(s) said Thank You: fupeama

Please Log in or Create an account to join the conversation.

More
5 years 3 months ago #215624 by tommylight
Replied by tommylight on topic setup qtplasmac
Just lost over an hour searching fro that info, no luck.
Do remind me, i will write it again sometime ... like not at 3AM ! :)

Please Log in or Create an account to join the conversation.

Moderators: snowgoer540
Time to create page: 0.429 seconds
Powered by Kunena Forum