Homing to heidenhain linear scales index reference

01 May 2010 21:45 - 01 May 2010 21:50 #2770 by grd246507
Hi all

My machine has heidenhain linear scales with index reference marks inboard at each end of the scales travel, the sinewave outputs are decoded into standard encoder signals by heidenhain 612 EXE modules giving an encoder index pulse at the reference marker positions.

I would like to home my machine to these only without the use of a home switch, and use these as software limit switches if possible ?.
As the machine has hard limit switches after the reference marks that are in the full estop chain that activates the servo braking resistors and disables the power to to drives.

Has anyone done this before, and could please advise me on how this can be implemented / worded in hal to achieve at least the homing ?

My servo hardware is setup is mesa 5i20 + 7i33 / 7i37 with the hostmot2 driver.

Kind Regards

Last edit: 01 May 2010 21:50 by grd246507.

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

04 May 2010 12:07 #2800 by andypugh
It should be very easy. Assuming that the index signal is available on a parallel port pin you can just tell Stepconf that that is the home and index switch input.
If you are not using The p-port you could still use Stepconf to create a dummy configuration and see what the HAL would look like, then modify that to suit.

It is possible that the home signal might not last long enough to satisfy the homing sequence (you might get "home switch released before start of latch move" or some similarly worded error. In that case you might have to add a hal "toggle" function.

This will need lines in the hal including, but not limited to
loadrt toggle count=3

addf toggle.0 servo-thread
addf toggle.1 servo-thread
addf toggle.2 servo-thread

net home-to-toggle toggle.0.in <= parport.0.pin-15-in
net toggled-home toggle.0.out => axis.0.home-switch-in axis.0.pos-limit-in

(and so on for the other axes)

Note that the first name in the "net" statement is something you can choose freely, the other elements need to correspond to actual "pin" names and I have written the above from memory and the pin names are almost certainly incorrect. I suggest a line in the hal file:
halcmd show all
(or possibly just "show all", I am working from iperfect memory here)
before the net commands and after the addf commands. That prints the full list of pin names to the terminal (or dmesg, I am not sure) and you can see what pins are available to wire.
The following user(s) said Thank You: besriworld

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

10 May 2010 09:34 #2833 by grd246507
Thankyou for your reply, and thoughts.

The idea would make the linear scales index reference pulse into a toggled switch as i read it.

Not sure how accurate / repeatable this would be as to be triggered / toggled it has to pass the index pulse, it would work as a soft limit
at the other end well I think.

I am looking at the possibility of putting home / soft limit switches between the scales index reference mark and the hard Estop limits, there is just enough travel
to do this between them, this would then enable the homing to work like a rotary encoder setup with the switches connected in hal to the mesa 5i20 gpio pins.
Then it would hit the home switch reverse and emc sould actually count the linear scales index pulse, this would be my favoured route.

Regards Gary

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

11 Jun 2010 03:56 #3104 by Zig
I am using Renishaw scales with a home index pulse equivalent to 1/4 of the scale resolution.

I have simply included a monostable which extends the reference pulse . This is equivalent to having a microswitch at the position.
Emc therefore drives the axis towards homing position. The position is reached and a long pulse is detected. This is equivalent to a close reverse back to open microswitch.
Once the axis reverses away from the initial contact position and the pulse goes low the axis then goes into homing position search velocity, finds the same edge of the pulse , identifies it as the homing pulse and then continues on towards the specified home position with respect to the start of pulse position.

I do have a set of RFS Elektronik ( Austrian made glass scales ) whom Heidenhain had bought out. I expect they will behave just like the above Renishaw solution.

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

11 Jun 2010 19:07 #3111 by grd246507
Many thanks for the reply.

Yes your solution sounds exactly whats needed :)

I dismissed the idea of the index pulse being only used as a toggle switch initally because I felt that it would just pass the index pulse and not be as repetable and accurate as counting the index pulse as a position but your solution is using it as a home switch and the index pulse, which is what I wandered if this could be achieved.

I had put the homing down for a bit ,while doing some mechanical improvements /repairs to my machine, moving the machine around under emc control with the linear scales highlighted some wear to the ballscrew thrust bearings causing backlash and some small servo hunting at rest.

Are you using the 5i20 with the hostmot2 driver as me, and how would I need to word my hal config to include the monostable in my index, home / limit switch, line ?.

Kind Regards


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

11 Jun 2010 22:29 #3113 by Zig
Hello Gary,

On this particular machine I am using LPT intrface. Conventional set up for stepper motors but the linear scales are in the loop via the external servo driver. In other words EMC sets up the trajectory and thinks its driving stepper motors but in reality its driving a servo loop which contains the linear scale.

My next machine ( one I am currently building will use 5i20 linear motors and RFS linear glass scales. I too need to think about the intrefacing of glass scales through 5i20.

That headache is coming onto my radar as I have had to build and design a tacho so as to be able to change from current drive to voltage ( velocity ) drive to obtain smoother less coggy operation of the linear motors.
Just yesterday I fired up the tacho combination and the improvement over current drive is appreciable. I am now in the proces of tuning the servo amp.

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

12 Jun 2010 06:41 #3115 by grd246507
Yes, servo loops are not stable with just linear scales and a drive in torque mode, my bosch drives are in velocity mode with tachos on the
motors, adding a velocity loop to your drive will give you a much more control over it and a stable loop.

I have used the mesa 7i33 to interface the linear scales and output the +/- 0 -10v for the drives this is working well, you can also move away from
stepper setups and use emc s proper servo loop with this and the 5i20.

Regards Gary

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

12 Jun 2010 06:58 #3116 by Zig
That just about sums up the setup.

Just testing my tacho circuit. It decodes the quadrature signal from the linear scales and produces =/- 5V analoguvoltage corresponding to velocity of linear motors.

The loop is much tighter although it is a bit of a job to tune it all up since the servo amp manufacturer gave me no structured way of tackling the tuning issues.

Presently the axis drops out with following error every now and then. This is not surprising , I am trying to get an iron core brushless linear motor to step with a resolution of 5 micron. Problem is the motor is quite coggy and tends to drop out a low speeds.

My minimum following error is equivalent to ten counts of the scale ( 0.05mm on a 5 micron scale)and as is presently ( after a days worth of scratching areas which dont itch) the motor does not object to runing at about 3000mm/min doing 200 mm strokes under G61 regime. But that is about the limit . I can either increase following error budget or do some more gestimating.

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

12 Jun 2010 12:35 #3119 by grd246507
You may find that the 5v velocity input to your drive depending on the frequency that it corsiponds to, may not be quite a large enough span for your drive to see.
Most tacho generators I have come across give out around 7v / 1000rpm this value is normally set by a resistor on the drive board value depending on the tachos output per / 1000rpm, if work on say a 3000rpm motor max speed this gives 21volt span to max motor speed, scaling this to your linear motors min to max speed would have a big effect on how the servo amp
performs at low speeds as it is trying to produce constant velocity to its set tacho input proportional to the 0/10v input velocity demand.
I to spent many hours reading and testing before even making an axis move your not alone on that one.

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

12 Jun 2010 21:47 #3125 by Zig

That question of the tacho transfer function had bothered me as well initially.

I have no information on the internal gain chain within the servo so i decided to match the tacho to the input range notionally.

In other words tacho circuit is designed to produce 10 v max at the maximum linear speed.

There is a gain factor in host mot i have not investigated yet whihc may serve to match the two characteristics.

In any case Increasing the gain on the servo amp ( this is the gain of the error integrator) seems to pull it in.

Early days but i am emboldened by the initial outcome.

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

Time to create page: 0.070 seconds
Powered by Kunena Forum