Getting QTDragon settings values from within remap.py

More
1 year 8 months ago #322536 by JohnnyCNC
How can I get the X & Y values of the Tool Sensor Location from Settings tab in QTDragon_HD from with remap.pyThis code below works when getting the values from the .ini file but I would rather use the values from QTDragon’s screen.self.execute("G53 G0 X[#<_ini[TOOLSENSOR]X>] Y[#<_ini[TOOLSENSOR]Y>]")

Thank You.

Please Log in to join the conversation.

More
1 year 8 months ago #322558 by cmorley
You would need to modify qtdragon to output though settings as HAL pins, then you can read them in a ngc program.

Please Log in to join the conversation.

More
1 year 8 months ago #322582 by JohnnyCNC
By ngc program does that also include a remap done in Python?

I thought the values were stored in self.lineedit_list.sensor_x and self.lineedit_list.sensor_y but I can't seem to get at them.

Thanks
John

Please Log in to join the conversation.

More
1 year 8 months ago #322660 by cmorley
Something like:
x = float(self.w.lineEdit_sensor_x.text())
y = float(self.w.lineEdit_sensor_y.text())

Please Log in to join the conversation.

More
1 year 8 months ago #322662 by cmorley
You can read HAL pins in python remaps

Please Log in to join the conversation.

More
1 year 8 months ago #322695 by JohnnyCNC
Thanks. I will keep trying. I had the exact same two lines in my code and it caused an error that states: m6remap remap error.

print("Before test code") <- This prints then the error text is next.
x = float(self.w.lineEdit_sensor_x.text())
y = float(self.w.lineEdit_sensor_y.text())
print("After test code") <- Does not print.

Please Log in to join the conversation.

More
1 year 8 months ago #322729 by cmorley
Those lines won't work in the remap (if that is what you meant) you would need to connect those to a HAL pin in qtdragon, then read the pins n the remap. I'm at work right now but will see if I can make a sample file for qtdragon tonight. You use master and regular or HD dragon?

Please Log in to join the conversation.

More
1 year 8 months ago #322733 by JohnnyCNC
Thanks Chris,

Yes, that is what I meant. I am using 2.9.4 and the HD version of QTDragon.

No hurry at all. I've got my m6remap working really well. It allows using a mix of fixed and variable length tools where the variable length ones get automatically measured during the manual tool change. I'm just adding the finishing touches. I use this in conjunction with Basic Probe.

Thanks again.
John

Please Log in to join the conversation.

More
1 year 8 months ago #322768 by JohnnyCNC
Chris,

With ChatGPT's help I think I have found enough examples to have a go at this. I'll report back with how it goes. Thanks for your guidance.

John

Please Log in to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum