Yep, The G92 command does the trick. Now I just need a way of issuing both lines of code using my z touch off button.
Yes my probe is part of the tool. I am using G54. I'll give G92 a go let you know in a few if that's right. Here's a picture of my probe setup for clairification:
http://chuckscnc.blogspot.com/
Yep, The G92 command does the trick. Now I just need a way of issuing both lines of code using my z touch off button.
http://chuckscnc.blogspot.com/
well for a quick fix make two buttons one for 'probe', one for 'set Z origin' each connected to an MDI command thru HAL-UI. If you want the one button deal then set up classicladder to load with EMC and I'll help with the program- It should be trivial (the program).
Chris
Sounds like a plan. I'll get some buttons setup. As for installing classic ladder I should be able to do an upgrade installation from the emc install disk right?
http://chuckscnc.blogspot.com/
No. Classicladder is included with EMC. You need to add loadrt classicladder_rt and loadusr classicladder myfile.clp to your HAL file and add classicladder to the servo thread. Then when you make a program save it with the same name as myfile.clp and it will load when classicladder loads. What version of EMC are you using?
there are some online docs for classicladder 7.10 (comes with EMC 2.2.x to 2.3.x) here:
http://wiki.linuxcnc.org/cgi-bin/emc...?ClassicLadder
I'm running version 2.2.6. I'll try the command line way. I thought it wasn't installed because the gui option was shaded out with emc running. But thats for after classic ladder commands are in my hal file? So my code should look something like this:
loadrt classicladder_rt
loadusr -w classicladder --myfile.clp
loadrt classicladder_rt servo
Not sure about that last line.
http://chuckscnc.blogspot.com/
No last two not quite right.
no '--' before 'myfile.clp'
last line should be
addf classicladder.0.refresh servo-thread
here is HTML docs for the loading the new version of classicladder most things are the same:
http://www.linuxcnc.org/docs/devel/h...der.html#r1_11
oh sorry the first line should be loadusr -w classicladder --nogui myfile.clp
then you use axis to open the GUI like you said.
There is a bug that when you go to save your ladder program you will have to use save-as not save.
OK I'll give it a try tonight. I should be able to get most of it going. Thanks
http://chuckscnc.blogspot.com/
You bet . When you finish and prove the concept I'll add it to the EMC wiki . I gotta say thats pretty damn cool!
I should have read page 3 before replying
John
Well I have two working buttons so far and have classic ladder load in my hal file. My only problem was I couldn't get into the ladder editor from the file menu. I did get in through the hal configuration screen and It looks like that will work. All I need is a ladder program and I should be all set. Do I have to make a file before I can open the editor from the file menu?
http://chuckscnc.blogspot.com/
What did you put in your hal file exactly? There should be three lines related to classicladder.
The editor should be enabled in your menu.
I see a mistake in the classicladder section that I will correct tonight.
I assume your using 2.2.6???
John
Classicladder should open regardless if there is a file or not. If you run EMC from a terminal
screen, you may see an error message to let you know whats wrong. The realtime module has to be loaded before the user program. (i'm not sure where you added those comands to)
On another note: I think you'll need to connect 5 signals to classicladder:
1 for each MDI command (out)
1 to motion.motion-inpos (in) to let you know when the probing is done
1 to the your pyvcp button (in)
1 to halui.mode.is_mdi (in) to let you know when in MDI mode
In my head the ladder program should work like this:
when the button is pushed AND EMC is in MDI mode send command 1
after the command 1 has been sent wait for motion to stop then send command 2
You may want to get fancy and send a third command to rapid away from the plate
Did you added HALUI=halui to the [HAL] section of your ini file?
I put this exactly in the top of my custom.hal file:
loadrt classicladder_rt
addf classicladder.0.refresh servo-thread
loadusr -w classicladder --nogui mybuttons.clp
I have version 2.2.2 but I'm upgrading to 2.2.6 right now. I ran the command from a field inside emc so I assumed classic ladder was loaded from my .hal file. I did add HALUI = halui into my .ini file. I'll let you know if the upgrade makes a difference.
As for the program, are the 5 signals added as n.o. switches and outputs like in the link you sent? If so, how do the %I0 type variables trace back to hal pins? I like the idea of having the tool back off after the offset. Last time I ran a program the tool lightly scratched the touch off plate.
http://chuckscnc.blogspot.com/
Look here for an idea for the ladder program:
http://wiki.linuxcnc.org/cgi-bin/emc...LadderExamples
It roughly explains it. I tried the ladder program by just clicking buttons did not try it with MDI commands so test carefully!
%I variables are connected to HAL pins named classicladder.0.in-xx
%Q variables are connected to HAL pins named classicladder.0.out-xx
The variable number and the XX corespond eg %I0 is classicladder.0.in-00
You have the hal correct. I suspect that upgrading to 2.2.6 will "fix" things with the menu...
Some examples that explain classicladder are here. This is 2.3 unreleased docs but this part is similar enough to get the gist of it...
http://www.linuxcnc.org/docs/devel/h..._examples.html
chester88 are you on the irc?
John
Hey John not usually though I sometimes read the logs.
I am on Vacation for a week in mexico.....
but you have my email
Chris
I wonder if he got this to work...
Sorry for the silence. It's exam week for me. I'll have some time tomorrow and friday to figure this out. The update didn't fix my problem but I can still get into the editor.
Chester88, in the link you sent me with program examples how did you get the extra room near the bottom (the part with the black bar)? I though there was a window for setting the number of variables was that it? I'll have to look tomorrow evening. Also, once I saved what I had I couldn't load that file back into the editor. It did save the file though. Think there was some problem with my emc install? There wasn't any errors when I installed. It is an old system though running the minimum hardware requirements. It's a bit hard to catch on to classic ladder with so many problems but I'm getting there.
http://chuckscnc.blogspot.com/
After talking to the programmers of EMC I learned that the gui menu will not come on if you load classicladder in the postgui.hal... as the menu is already created... I'll fix the manual this evening. So you need to move the three classicladder lines to the main hal file and the menu will work.
John