Puma 560 simulation using pumakins

More
11 years 6 days ago - 11 years 6 days ago #64295 by Askjerry
I get what you are saying... swing the arm CW or CCW depending on the potentiometer... via the comparator signal... and use the result of the comparator AND the index as the exact home. I'm not sure how to wire/program that into HAL however.

Two separate inputs... one denoting the need to go forward (CW) or back (CCW) comparator and one giving periodic pulses once per revolution, index.

It seems like you would need TWO inputs to HAL and a custom home sequence... currently if the comparator and index were tied together via an AND gate for example... HAL would detect either a 0 or a 1 and start the movement of the arm... at the first pulse of the index... which still may be several iterations from actual home... it would start the standard homing sequence because it thinks the home switch was triggered.

You would need a custom routine to do the following...

1) Evaluate the comparator ONLY, move the arm in the position to where the signal reads logic 0.
2) Move the arm until BOTH the comparator and the index read as logic 0. (I.E. NOT INDEX)
3) Combine (AND) the signals... this output will be read as the HOME SWITCH signal.
4) Hand-off to normal HOME routine... HAL will begin to move the arm until the comparator AND the INDEX read logic 1... the HOME circuit detects the output as a HOME SWITCH signal.
5) HAL will run it's normal course of moving off, then back to this spot... an exact point.
6) Repeat for next axis.

It seems to me that a custom routine would be needed to home the entire sequence, then handed off to HAL. Or... the human would have to get it "close enough" so that the comparator and index both read as logic 0... within one pulse of the index... then handed it off to a normal HAL home sequence.
Last edit: 11 years 6 days ago by Askjerry.

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

More
11 years 6 days ago #64296 by Askjerry
Thinking about it... there is another low-tech way of doing it...

Run the HOME sequence with the comparators only... that gets you in the ballpark...
Flip a switch that now combines the comparators and the index outputs via an AND gate... then run the home sequence again to lock it to the exact index spot.

Two step process... but exactly one spot all the time... very accurate.

thoughts?
Jerry

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

More
11 years 6 days ago #64300 by andypugh

Askjerry wrote: I get what you are saying... swing the arm CW or CCW depending on the potentiometer... via the comparator signal... and use the result of the comparator AND the index as the exact home. I'm not sure how to wire/program that into HAL however.


I haven't thought about it very hard, but I think I would be looking at using the potentiometer to do lookup into a lincurve that stored the exact position of each encoder index.
LinuxCNC would do a simple home-to-index with the home switch set permanently to high (in HAL) and the lincurve output would be latched by a sample-hold and fed into a hal "offset" component.

This might not work, of course. It would be relatively easy if the HOME_OFFSET value could be updated live.

I think this might be possible by adding the offset to this code block
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...f0ce671ad4aff72#l630

Then the code here would need to copy the value across:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...f0ce671ad4aff72#l504

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

More
11 years 6 days ago #64303 by Askjerry
Ok Andy... you are well over my head at this point.

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

More
11 years 6 days ago #64316 by andypugh

Askjerry wrote: Ok Andy... you are well over my head at this point.


Don't worry, we are on it:

thread.gmane.org/gmane.linux.distributions.emc.devel/15358

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

More
11 years 2 days ago #64524 by robottom
Hi Andy and Jerry,

a lot of usful thoughts on how to home the Puma. In parallel I'm investigating if I can use a Arduino Nano to do parts of the homing procedure. I have only one parport on my LinuxCNC laptop and not enough pins for all the needed lines. In addition my cable from the controller to the Puma arm also would need a lot of additional wires (at least 6 analog lines for the potis and 6 for the index signals). So I thought to put a Arduino in the arm to connect to the potis to the analog input and the index to digital inputs of the Nano board and need the USB connection to my laptop and only one (or a few) inputs to the parport (for the real time signals of a common index).
My idea is to home each axis after another with potis + index signal to prevent the arm to do big moves during homing. Via USB I would transfer all the poti values and which index signal was fired. One input line on the parport would be required to signal in real time that there is an index reached to stop immediately the homing move and go e.g. from CW to CCW for a very slow precision move to hit the index again. The USB signals non-real-time would be sufficient to calculate from the poti signal and the index for a certain joint the exact position.
My question to you is: As far as I understood I can implement my own homing procedure (e.g. read to from USB, initiate the moves and calculate the positions). Is this correct or not possible to implement his own homing?

Many thanks, Thomas

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

Time to create page: 0.215 seconds
Powered by Kunena Forum