Touch plate error

More
5 years 4 months ago #211946 by mb_cnc
Replied by mb_cnc on topic Touch plate error
The error happens during the running of the touch plate routine. It is after the measurement step and what seems to be a missing formula variable, missing file or a writing error. Not sure? Any help would be appreciated.

thanks

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

More
5 years 4 months ago #212150 by andypugh
Replied by andypugh on topic Touch plate error
Can you show us the code of the touch plate routine? Is it built-in to Silverdragon?

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

More
5 years 4 months ago #212255 by mb_cnc
Replied by mb_cnc on topic Touch plate error
I searched and It seemed built in so I downloaded the source code to see. Here is what seems to be the code located in qtdragon_handler.py.

def touchoff(self, selector):
if selector == 'touchplate':
z_offset = float(self.w.lineEdit_touch_height.text())
elif selector == 'sensor':
z_offset = float(self.w.lineEdit_sensor_height.text()) - float(self.w.lineEdit_work_height.text())
else:
self.add_status("Unknown touchoff routine specified")
return
self.add_status("Touchoff to {} started".format(selector))
max_probe = self.w.lineEdit_max_probe.text()
search_vel = self.w.lineEdit_search_vel.text()
probe_vel = self.w.lineEdit_probe_vel.text()
ACTION.CALL_MDI("G21 G49")
ACTION.CALL_MDI("G10 L20 P0 Z0")
ACTION.CALL_MDI("G91")
command = "G38.2 Z-{} F{}".format(max_probe, search_vel)
if ACTION.CALL_MDI_WAIT(command, 10) == -1:
ACTION.CALL_MDI("G90")
return
if ACTION.CALL_MDI_WAIT("G1 Z4.0"):
ACTION.CALL_MDI("G90")
return
ACTION.CALL_MDI("G4 P0.5")
command = "G38.2 Z-4.4 F{}".format(probe_vel)
if ACTION.CALL_MDI_WAIT(command, 10) == -1:
ACTION.CALL_MDI("G90")
return
command = "G10 L20 P0 Z{}".format(z_offset)
ACTION.CALL_MDI_WAIT(command)
command = "G1 Z10 F{}".format(search_vel)
ACTION.CALL_MDI_WAIT(command)
ACTION.CALL_MDI("G90")

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

More
5 years 4 months ago #212308 by cmorley
Replied by cmorley on topic Touch plate error
I can get this error message by aborting running code.
but not in all qt screens.

with print statements I can see the cc code is getting the right ini/param file.
This is a mystery.

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

More
5 years 4 months ago - 5 years 4 months ago #212387 by Myscion
Replied by Myscion on topic Touch plate error
I'm battling this right now too, good to see I'm not going crazzy! The strange thing is the Vesa Probe widget works great! This is with QTDragon_HD on the master branch.

I've narrowed it down to these two lines in the touchoff function around line 905.

command = "G1 Z10 F{}".format(search_vel)
ACTION.CALL_MDI_WAIT(command)


If I comment this out no error. If I hard code the speed it works great:

command = "G1 Z10 F20"
ACTION.CALL_MDI_WAIT(command)


I would recommend anyone simply edit the file and hardcode it until someone figures it out.

The strange thing is the search_vel parameter is used earlier on in the same function with no errors!?

A separate tangential complaint is that the function is hardcoded to be metric and leaves the machine in metric. Not a big issue, I can tell a ton of work has gone into getting the GUI to a state where it works with both units of measurement and I haven't run into this anywhere else. I just had to remove the G21 at the start of the function.
Last edit: 5 years 4 months ago by Myscion.

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

More
5 years 4 months ago - 5 years 4 months ago #212426 by Myscion
Replied by Myscion on topic Touch plate error
I slept on the problem and determined there must be a problem with the

.format(search_vel)

function inserting bad characters into the command. I then added a print to check the output.

print("Touch Off Command: " + command)

Oddly though the printed command looked fine despite the error I was still getting. I attached the console output as an image.

Running out of things to try I hardcoded the feed rate of 10.0 that I set as search velocity and still an error. Okay, maybe it doesn't like the decimal point.

command = "G1 Z1.5 F10"
command = "G1 Z1.5 F15"

Still get an error.

command = "G1 Z1.5 F20"
command = "G1 Z1.5 F21"
command = "G1 Z1.5 F30"

These commands worked without any errors. A feed rate of 15 did get the "parameter file not found" error.
The 2nd to the last ACTION.CALL_MDI in the touchoff function does not like the '1' digit in the feed rate.

Very strange this makes no sense. Wonder if my machine is corrupted or something. The Vesa probe routines all work fine.

Mathew, what value do you have set for search velocity in settings? If you use the same search velocities I tried do your results match mine?
Last edit: 5 years 4 months ago by Myscion.

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

Moderators: cmorley
Time to create page: 0.151 seconds
Powered by Kunena Forum