problem for use remap

More
23 Jun 2020 07:56 - 23 Jun 2020 08:22 #172445 by mahdi2001h
Replied by mahdi2001h on topic problem for use remap
thanks alot for your reply

I checked your code

but my problem not solved

also I using Sim with remapping setup and add a line for log to terminal
And I saw the same problem there

I will tell you my problem again

when linuxcnc opening the ngc file , in one step all remap function run
and when maching start , in a moment all remap python function run

in fact I want to remaped a g-code to send a serial command by python
and the G-codes should run in own place but its not worked


i think when first run (when ngc file open) is for draw shape for preview and can solve it with check machine power status
but for second run i don't know what should to do
Last edit: 23 Jun 2020 08:22 by mahdi2001h.

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

More
23 Jun 2020 09:18 - 23 Jun 2020 09:19 #172453 by Aciera
Replied by Aciera on topic problem for use remap
Do you mean that these codes for G70 and G70.1 are running without being called?

def g700(self, **words):
s.poll()
if s.estop == 0:
print "test p =" , words["p"]
return INTERP_OK

def g701(self, **words):
s.poll()
if s.estop == 0:
print "test1"
return INTERP_OK

Last edit: 23 Jun 2020 09:19 by Aciera.

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

More
23 Jun 2020 09:34 #172456 by mahdi2001h
Replied by mahdi2001h on topic problem for use remap
Almost


For example in running this code:


G70 P1

G0 X[26.55859*#<scale>]
G1 F100.0 Z[-#<depth>]
G1 F400.0 X[29.59375*#<scale>] Y[15.01953*#<scale>]
G1 X[33.3125*#<scale>]
G1 X[32.92969*#<scale>] Y[13.13281*#<scale>]
G2 X[34.16342*#<scale>] Y[14.08624*#<scale>] I[8.82141*#<scale>] J[-10.13994*#<scale>]
G2 X[35.52734*#<scale>] Y[14.8418*#<scale>] I[4.53823*#<scale>] J[-6.58354*#<scale>]
G2 X[38.08398*#<scale>] Y[15.36133*#<scale>] I[2.53506*#<scale>] J[-5.9247*#<scale>]

G70 P2

G2 X[39.5966*#<scale>] Y[15.13543*#<scale>] I[0.06403*#<scale>] J[-4.74845*#<scale>]
G2 X[40.90039*#<scale>] Y[14.33594*#<scale>] I[-1.02874*#<scale>] J[-3.14049*#<scale>]
G2 X[41.7019*#<scale>] Y[13.08328*#<scale>] I[-2.33045*#<scale>] J[-2.37388*#<scale>]
G2 X[41.93945*#<scale>] Y[11.61523*#<scale>] I[-4.07102*#<scale>] J[-1.41199*#<scale>]
G2 X[41.76899*#<scale>] Y[10.15744*#<scale>] I[-10.17473*#<scale>] J[0.45091*#<scale>]
G2 X[41.48828*#<scale>] Y[8.7168*#<scale>] I[-39.45138*#<scale>] J[6.93932*#<scale>]
G1 X[39.7793*#<scale>] Y[0.5*#<scale>]
G1 X[35.85547*#<scale>]

G70 P3


G1 X[37.57813*#<scale>] Y[8.74414*#<scale>]
G3 X[37.79665*#<scale>] Y[9.84001*#<scale>] I[-62.81729*#<scale>] J[13.09579*#<scale>]
G3 X[37.96094*#<scale>] Y[10.94531*#<scale>] I[-9.6524*#<scale>] J[1.99958*#<scale>]
G3 X[37.50977*#<scale>] Y[12.12109*#<scale>] I[-1.54162*#<scale>] J[0.0829*#<scale>]
G3 X[36.2793*#<scale>] Y[12.55859*#<scale>] I[-1.13356*#<scale>] J[-1.23903*#<scale>]

G70 P4


in machine start , first printed on the terminal output
test p = 1
test p = 2
test p = 3
test p = 4

and after this The rest of the gcode runs

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

More
23 Jun 2020 12:57 #172466 by Aciera
Replied by Aciera on topic problem for use remap
Does this also happen the same way if you use simple numerical positions?
Like:
G70 P1
G0 X10 Y10
G70 P2
G0 X20 Y20
G70 P3
G0 X30 Y30
G70 P4

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

More
23 Jun 2020 15:58 #172480 by mahdi2001h
Replied by mahdi2001h on topic problem for use remap
yes

same problem

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

More
23 Jun 2020 16:11 #172483 by MaHa
Replied by MaHa on topic problem for use remap
Once i had a similar problem, solved it by adding M66 E0 L0 next line after call G70
The following user(s) said Thank You: Aciera, mahdi2001h

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

More
23 Jun 2020 17:14 #172486 by Aciera
Replied by Aciera on topic problem for use remap
This is beyond my scope I fear. We will have to wait for somebody with more programming experience.
The following user(s) said Thank You: mahdi2001h

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

More
23 Jun 2020 17:14 - 23 Jun 2020 17:16 #172487 by mahdi2001h
Replied by mahdi2001h on topic problem for use remap
Nice! it worked :woohoo:

thanks a lot of MaHa .

but why should use this!?
in normally , don't think should use this!


also thanks a lot of Aciera for your attention.
Last edit: 23 Jun 2020 17:16 by mahdi2001h.

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

Time to create page: 0.209 seconds
Powered by Kunena Forum