Setting up a probe touch off

More
03 Apr 2015 19:47 #57486 by Clive S
Ok That solved the problem in the my-mill profile the touch off button is on the axis panel etc but I don't think I have it quite set up correct yet as the z is going up instead of down that is because I have not set up the inverts etc ( and it was only proof of concept to get it working ( I can do all that though)

This is the new log from the Warco mill profile:
Debug file information:
.
Can not find -sec APPLICATIONS -var DELAY -num 1
custom_postgui.hal:6: Pin 'pyvcp.o100' does not exist

I have altered the ini to correct the spelling of MDI.

Do you know how to attach a ZIP file. Thanks Clive

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

More
04 Apr 2015 07:03 - 04 Apr 2015 07:06 #57502 by pippin88
Clive,

You attach a zip in the same way as any other file.

File Attachment:

File Name: Test.zip
File Size:0 KB


I think you need to take a step back and do a bit of reading of the manuals.
www.linuxcnc.org/docs/html/gui/gladevcp.html
wiki.linuxcnc.org/cgi-bin/wiki.pl?Gmoccapy
linuxcnc.org/docs/html/hal/pyvcp.html

Both GladeVCP and PYVCP are virtual control panels. They present signals the same way a physical button would.

I'd say you are getting that error because you don't have "PYVCP = custompanel.xml" in your .ini
However, I don't think PYVCP works with gmoccapy.

gmoccapy includes support for macros, as well as a vertical button list.

A macro is probably the easiest way. Try the following (I've never tried a gmoccapy macro, so I'm just going from the documentation)

In your ini insert:
[MACROS]
MACRO = 100

Make sure the 100.ngc file is in your nc_files directory.

Remove
net remote-o100 halui.midi-command-00 <= pyvcp.o100 from custom_postgui
MDI_COMMAND = o100 call from your ini

(if you want, you can rename the .ngc file. the Macro entry in .ini, the file name, and the opening and ending of the subroutine must match exactly) (I think they may need to be lower case with no spaces also).
Attachments:
Last edit: 04 Apr 2015 07:06 by pippin88.
The following user(s) said Thank You: Clive S

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

More
04 Apr 2015 13:45 #57511 by Clive S
quote I think you need to take a step back and do a bit of reading of the manuals.

Thanks again for the interest in this:
I am not being lazy in not trying to read the manuals although I have not read the glade and pyvc manuals

But I have read and reread lots of time the gmoccapy manuals also the full thread on gmoccapy (118 pages)

Ok back to the job. The my-mill profile above now seem to work ie button on pane etc l but I had done a basic setup with stepconfig and then modified it with your code but the z goes up instead of down. I will sort that by putting in the correct inverts etc .

The Warco profile is the one I use that has gmoccapy in it. But to test I have commented out gmoccapy in the ini so as to use the axis screen.

I am sure I have read that gmoccapy does not use pyvc so will have a try with your other option. I have tried putting custompanel.xml" in my Warco .ini

I will report back Clive

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

More
04 Apr 2015 14:26 #57512 by pippin88
Clive,

In regards to Z axis direction:
If it moves correctly on screen (page down makes the Z axis go negative) but on the machine moves up, then you need to change the SCALE in the ini for the Z axis from SCALE = 80.0 to SCALE = -80.0 (note the minus).
If page down moves the Z axis up on the screen and on the machine, then you need to invert the direction pin in your .hal by adding "setp parport.0.pin-07-out-invert 1" before the line "net zdir => parport.0.pin-07-out"

Let me know how the macro method works.
If you want to use gmoccapy, then I don't think there is much to gain from trying the pyvcp method on that profile as it's not the same process.

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

More
04 Apr 2015 18:16 - 04 Apr 2015 18:18 #57515 by Clive S
Ok Can we just handle the my-mill profile until I get that working.

The way I have it now axis loads ok with touch off showing. After homing then pressing "touch 0ff" the Z moves down slow but does not stop with pin 15 to ground until time runs out.

To be clear pin 15 on the bob is pulled high and goes low with grounding Also using halmeter pin 15 toggles between true and false when shorting to ground.

I have attached files.

Clive


File Attachment:

File Name: my-mill.zip
File Size:5 KB


Edit the Zip file attached ok before I was trying a rar file that failed.
Attachments:
Last edit: 04 Apr 2015 18:18 by Clive S.

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

More
04 Apr 2015 20:06 - 04 Apr 2015 20:07 #57518 by pippin88
Clive,

If your probe is pulled high, and grounds when triggered, then parport.0.pin-15-in-not is correct (signals when not high)

Can you be very very specific about what happens?
You click the 'Touch off' button.
Z axis moves down..
Then? You say time runs out, but it should move a maximum distance before displaying an error if no probe signal is triggered

Further down your .hal you have: net probe-in <= parport.0.pin-15-in
Get rid of that line.

I need to see your o100.ngc file from your nc_files directory.

I'm not sure if it matters but you have
addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
below your debounce code. The debounce is a multiple of the base thread.

I'd try rearranging it like so:
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt hal_parport cfg="0 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net spindle-cmd-rpm     <= motion.spindle-speed-out
net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs
net spindle-cmd-rps     <= motion.spindle-speed-out-rps
net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
net spindle-at-speed    => motion.spindle-at-speed

loadrt debounce cfg=2
setp debounce.0.delay 100
addf debounce.0 base-thread
net deb-probe-in debounce.0.0.in <= parport.0.pin-15-in-not

net debounce.0.0.out=> motion.probe-input

#net estop-out       => parport.0.pin-01-out
net xstep           => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir            => parport.0.pin-03-out
net ystep           => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net ydir            => parport.0.pin-05-out
net zstep           => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir            => parport.0.pin-07-out
net max-home-z      <= parport.0.pin-10-in-not
net min-home-y      <= parport.0.pin-11-in-not
net min-home-x      <= parport.0.pin-12-in-not
Last edit: 04 Apr 2015 20:07 by pippin88.

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

More
04 Apr 2015 20:23 #57519 by Clive S
quote Then? You say time runs out, but it should move a maximum distance before displaying an error if no probe signal is triggered

Yes Z moves down a preset distance then errors

I will do as you suggest and report back.

Thanks Clive

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

More
04 Apr 2015 20:53 #57520 by Clive S
Ok changed the hal file and attached o100.ngc

Its exactly the same click the touch off Z moves down -10mm then errors with G38.2 etc


File Attachment:

File Name: mymill.zip
File Size:5 KB


Clive
Attachments:

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

More
05 Apr 2015 06:30 #57538 by pippin88
I suspect the problem is the connection (software connection) between the probe input (pin 15) and LinuxCNC's probe signal.

Are you using a pcb plate probe?

Have a look with Halmeter at some other signals.
Look for debounce.0.0.out - it should go from False to True with probe contact
How about motion.probe-input? Does it change?

Can you be more specific. Sometimes it's a simple thing that isn't being communicated.
I presume you are trialling this in air above your table, you click the Touch Off button, hold your pcb plate closely under the tool but it doesn't detect the contact and keeps moving till Z-10?

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

More
05 Apr 2015 06:37 #57539 by pippin88
Clive:
It could be another typo. You have:
net debounce.0.0.out=> motion.probe-input

You are missing a space after debounce.0.0.out
It should be
net debounce.0.0.out => motion.probe-input

(Note that => and <= don't actually do anything in .hal, they are simply there for human readability)

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

Time to create page: 0.162 seconds
Powered by Kunena Forum