My custom designed GUI

More
8 years 6 months ago #109740 by tripwire
Replied by tripwire on topic My custom designed GUI
Thanks so much for your work on this, Grotius! I'll check it out and report back...

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

More
8 years 6 months ago #109741 by KCJ
Replied by KCJ on topic My custom designed GUI
tripwire: Thanks for posting Dewey's, as always, excellent explanation! It had not even crossed my mind that the error was caused by not being in teleoperating mode. That explains why I was having trouble duplicating it, as the first thing I do when I start LCNC is home and switch to coord or teleop mode. I should have mentioned that in my previous post, but I do it so automatically that I don't even think about it!

Grotius: Thank you for taking the time to prepare and post such a complete code snip, it is very helpful!

Cheers,
Kurt

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

More
8 years 6 months ago #109757 by Grotius
Replied by Grotius on topic My custom designed GUI
Hi,

Okey i forgot one thing. In the past i had problem's with multiple homing commands.
Now for homing all axis with one button this works also multiple homing commands good :
Code:
self.c.mode(self.cnc.MODE_MANUAL) self.c.wait_complete() # 1:teleop, 0: joint self.c.teleop_enable(0) self.c.wait_complete() self.c.home(0) self.c.wait_complete() self.c.home(2) self.c.wait_complete() self.c.home(3) self.c.wait_complete() self.c.home(4) self.c.wait_complete() print " home all "

Good luck !

A ini file example for double motors on x axis :
Code:
[TRAJ] AXES = 5 COORDINATES = X X Y Z A LINEAR_UNITS = mm ANGULAR_UNITS = degree DEFAULT_LINEAR_VELOCITY = 2.50 MAX_LINEAR_VELOCITY = 25.00 [EMCIO] EMCIO = io CYCLE_TIME = 0.100 TOOL_TABLE = tool.tbl [KINS] KINEMATICS = trivkins coordinates=XXYZA #kinstype=BOTH JOINTS = 5 ####################################################### [AXIS_X] MIN_LIMIT = -10.0 MAX_LIMIT = 6025.0 MAX_VELOCITY = 125.0 MAX_ACCELERATION = 125.0 ## Calculation ## # drive : 10000 steps / rev # pitch : 37.69 mm / rev # calcutation : 10000 / 37.69 = 265.3 # scale = 265.3 [JOINT_0] TYPE = LINEAR HOME = 0.0 MAX_VELOCITY = 125 MAX_ACCELERATION = 125 STEPGEN_MAXACCEL = 750 SCALE = 265.3 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -10 MAX_LIMIT = 6025 HOME_LATCH_VEL = -1 HOME_SEARCH_VEL = -20 HOME_FINAL_VEL = -1 HOME_IGNORE_LIMITS = YES HOME_OFFSET = -2 HOME_SEQUENCE = -2 [JOINT_1] TYPE = LINEAR HOME = 0.0 MAX_VELOCITY = 125 MAX_ACCELERATION = 125 STEPGEN_MAXACCEL = 750 SCALE = 265.3 FERROR = 1 MIN_FERROR = .25 MIN_LIMIT = -10.0 MAX_LIMIT = 6025 HOME_LATCH_VEL = -1 HOME_SEARCH_VEL = -20 HOME_FINAL_VEL = -1 HOME_IGNORE_LIMITS = YES HOME_OFFSET = -2 HOME_SEQUENCE = -2 #######################################################

A hal file example for double x motors and also the limit switches.
Code:
net both-home-x1 <= parport.0.pin-10-in-not net both-home-x2 <= parport.0.pin-15-in-not #net spindle-cw => parport.0.pin-17-out # X-AXIS ####################################################### setp stepgen.0.position-scale [JOINT_0]SCALE setp stepgen.0.steplen 1 setp stepgen.0.stepspace 0 setp stepgen.0.dirhold 35000 setp stepgen.0.dirsetup 35000 setp stepgen.0.maxaccel [JOINT_0]STEPGEN_MAXACCEL net x1pos-cmd joint.0.motor-pos-cmd => stepgen.0.position-cmd net x1pos-fb stepgen.0.position-fb => joint.0.motor-pos-fb net x1step <= stepgen.0.step net x1dir <= stepgen.0.dir net x1enable joint.0.amp-enable-out => stepgen.0.enable net both-home-x1 => joint.0.home-sw-in net both-home-x1 => joint.0.neg-lim-sw-in net both-home-x1 => joint.0.pos-lim-sw-in setp stepgen.1.position-scale [JOINT_1]SCALE setp stepgen.1.steplen 1 setp stepgen.1.stepspace 0 setp stepgen.1.dirhold 35000 setp stepgen.1.dirsetup 35000 setp stepgen.1.maxaccel [JOINT_1]STEPGEN_MAXACCEL net x2pos-cmd joint.1.motor-pos-cmd => stepgen.1.position-cmd net x2pos-fb stepgen.1.position-fb => joint.1.motor-pos-fb net x2step <= stepgen.1.step net x2dir <= stepgen.1.dir net x2enable joint.1.amp-enable-out => stepgen.1.enable net both-home-x2 => joint.1.home-sw-in net both-home-x2 => joint.1.neg-lim-sw-in net both-home-x2 => joint.1.pos-lim-sw-in
The following user(s) said Thank You: tripwire

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

More
8 years 6 months ago #109758 by KCJ
Replied by KCJ on topic My custom designed GUI
Grotius, if the home sequences are specified in the INI then self.c.home(-1) should home all in the home sequence specified. It is not advisable to hard code the home sequence.

Cheers,
Kurt

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

More
8 years 6 months ago #109767 by Grotius
Replied by Grotius on topic My custom designed GUI
Hi kcj,

I would do so. I Have tried several times in the past to home with the -1 command, in the python code and also in glade.
In the gmocappy python code it is also done by this way. But it is not showing why it works over there. And that is a big puzzle.

If you trigger the home all button multiple times, then i get complaint's in the past. So to avoid that i did hard coding.
I was not able to find the solution, even asked this before on this forum. If you say that it has to do with the ini file. i will try your advise. Thanks a lot.

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

More
8 years 6 months ago #109811 by tripwire
Replied by tripwire on topic My custom designed GUI
fwiw, the self.c.home(-1) was the only thing that worked for me to home all axis.

I tried the following, separate homing sequences with the noted results:
Code:
#=============================================== self.c.home(0) self.c.wait_complete() self.c.home(1) self.c.wait_complete() self.c.home(2) self.c.wait_complete() # this just homes my Y axis, consiting of joints 1 & 2 #================================================== self.c.home(0) self.c.wait_complete() self.c.home(1) self.c.wait_complete() self.c.home(3) self.c.wait_complete() # This homes axis Y and Z (joints 1, 2 and 3) #====================================== self.c.home(3) self.c.wait_complete() self.c.home(0) self.c.wait_complete() self.c.home(1) self.c.wait_complete() # just homes Y axis (joints 1 & 2) #============================================ self.c.home(0) self.c.wait_complete() self.c.home(0) self.c.wait_complete() self.c.home(1) self.c.wait_complete() # just homes Y #=========================================== self.c.home(0) self.c.wait_complete() self.c.home(2) self.c.wait_complete() self.c.home(3) self.c.wait_complete() # homes Y & Z

I never did manage to home the X-axis this way. The one cool thing about the "separate" method is when more than one axis was homed, they homed simultaneously, instead of waiting for each axis' homing to complete.

One day I'll have this all figured out...! (But then the fun will be gone :) )

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

Time to create page: 0.233 seconds
Powered by Kunena Forum