how to create a link Button help me please !!

More
08 Jan 2011 13:51 #6532 by Raen
program.py part its not configured anything....
program.py is only configured by python script...
is there any configure for the program.py in order to be a part of M101 ?

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

More
08 Jan 2011 13:54 #6533 by BigJohnT
First you need to read up on M1xx here

www.linuxcnc.org/docview/html/gcode_main.html#sec:M100-to-M199:

unless program.py is called by your M101 it will do nothing...

John

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

More
08 Jan 2011 14:06 #6534 by Raen
how to configure it ?? i really dont understand John...please help me.... >.<

i only add this section into M101 file.....still nothing happen...>.<
#!/bin/sh
# file to turn on paraport pin 14 to open the collet closer
halcmd setp parport.0.pin-14-out True
exit 0

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

More
08 Jan 2011 14:09 #6535 by BigJohnT
If you monitor pin 14 as shown here

www.linuxcnc.org/docview/html/hal_basic_...tml#sec:Hal-Commands

is it on after you press your button?

John

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

More
08 Jan 2011 14:19 #6537 by Raen
there's no partport subfolder Pin

the folder Pins only have :
+axis
+axisui
+comp
+ddt
+hal_manualtoolexchange
+halui
+hypot
+iocontrol
+motion
+or2
+pyvcp --> program
owner = 12
type = bit
dir = out
value = False
Name = pyvcp.program ==> btn1

when i click the button there's nothing happen....
anyway sorry to disturb your time John....

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

More
08 Jan 2011 14:25 #6538 by BigJohnT
Ok, in your M101 file your trying to turn on a parallel port pin #14 yet you don't have the parallel port driver configured and you have a program.py file that is not called by anything. I'm seriously confused as to what your trying to do at this point.

John

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

More
08 Jan 2011 14:30 #6539 by Raen
can i have a parallel port driver to configured ?

i'm trying to make a button at EMC2-Axis and i want that button can execute my program.py...i'm really stuck here for 1 week....

i dont know that i must turn on a parallel port....

why pin 14?
because i read from the link that u gave me before....

sorry, i'm really noob here...but i really want to study this software...

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

More
08 Jan 2011 14:37 #6541 by BigJohnT
Ok, I understand what you want to do I think...

From the link "The external program "M1nn" must be in the directory named in [DISPLAY]PROGRAM_PREFIX in the ini file and is executed with the P and Q values as its two arguments. Execution of the RS274NGC file pauses until the invoked program exits. Any valid executable file can be used."

Simply rename your program.py to M101 and make sure it is executable as show in the M1xx part of the manual.

John

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

More
08 Jan 2011 14:52 #6542 by Raen
>.<
when i rename "program.py" into M101 i must change the

<halpin>"program.py"</halpin> into <halpin>"M101"</halpin> ??

net halui.mdi-command-00 <= pyvcp.program
net halui.mdi-command-00 <= pyvcp.M101 ??

From the link "The external program "M1nn" must be in the directory named in [DISPLAY]PROGRAM_PREFIX in the ini file and is executed with the P and Q values as its two arguments. Execution of the RS274NGC file pauses until the invoked program exits. Any valid executable file can be used."

i dont understand to configured P and Q values....
two arguments mean, i should have M101 and M102 ??

want to cry...... >.< why it's so hard...... >.<

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

More
08 Jan 2011 15:10 #6543 by BigJohnT
Your pyvcp button has a halpin named program.
In your postgui.hal file you have pyvcp.program executing the MDI 00 command when you press the button.
The MDI 00 command runs the g code M101.
The contents of the file M101 is the program you wish to run by pressing the button on your screen.

I don't think I can be any more clear on how this works.

John

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

Time to create page: 0.384 seconds
Powered by Kunena Forum