Hi,
We are trying to get a remap done purely in python and we are running into an
issue in that the interpreter is ignoring our commands. We know the interpreter
is receiving them because if we send it a bad gcode command, it will spit at us
that the gcode is invalid. We tested the status right before we send it a
command and it returns idle. We tried with mdi command and with the execute
command and in both cases ti just ignores us and continues on like it has made
the move and everything is valid. Well, that reeks havoc if we let it go, cause
it will think it is where it is suppose to be and drop the tool thinking
everything is ok.
Below is the commands we are sending it. We have not done any tracing to find
out what the interpreter is doing internally frankly because we just don't know
how....... But what we do know is it ignores our commands.
def ok_for_mdi(self):
self.stat.poll()
return not self.stat.estop and self.stat.enabled and self.stat.homed
and _
(self.stat.interp_state == self.cnc.INTERP_IDLE)
if self.ok_for_mdi():
self.command.mode(self.cnc.MODE_MDI)
self.command.wait_complete() # wait until mode switch executed
self.command.mdi("G1 G53 F%d X%f Y%f Z0.0" %
(self.feedSpeed, posX, posY))
Here we are checking to see if it is ok to send mdi commands and the command
gets sent....... IGNORED
So we try with execute:
self.execute("G1 G53 F%d X%f Y%f" % (10, 20.0, -9.0))
The command gets sent...... IGNORED
We checked the status of the interpreter before we send the command and it is
IDLE.
stat.interp_state == linuxcnc.INTERP_IDLE
stat.task_mode == linuxcnc.MODE_MANUAL
INI file:
[RS274NGC]
REMAP=M6 modalgroup=6 prolog=change_prolog python=change_remap
epilog=change_epilog
We spent all weekend working on this and are back at square one with no
results. The manual clearly states the remapping can be done purely in python
and we tested exactly what the manual says to do also to no prevail.
What are we doing wrong?
Thanks in advance for any help, would greatly appreciate it.
Bob Bevins
Senior Technical Service Specialist
Allegion Canada Inc.
9450 Henri-Bourassa Ouest
Montréal, QC, H4S 1N8
Office / Bureau: 514.385.0005
Mobile / Portable: 514.231.6241
Email / Courriel: bob.bev...@allegion.com
[ALLE_RGB_V]
The information contained in this message is privileged and intended only for
the
recipients named. If the reader is not a representative of the intended
recipient,
any review, dissemination or copying of this message of the information it
contains
is prohibited. If you have received this message in error, please notify the
sender
and delete the original email and any attachments.
L'information contenue dans ce message est strictement confidentielle et est à
l'usage
exclusif de son destinataire. Si le lecteur n'est pas un représentant du
destinataire indiqué ou prévu,
il est strictement interdit de consulter, reproduire ou distribuer ce message
et les renseignements
qu'il contient. Si vous avez reçu cette communication par erreur, veuillez
aviser l'expéditeur
immédiatement et supprimez ce message ainsi que tous documents en pièces
jointes.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users