2012/3/4 Peter C. Wallace <[email protected]>

> >>> I found sum2 description. That's what I added to custom.hal:
> >>>
> >>> loadrt sum2 count=1
> >>> addf sum2.0 servo-thread
> >>> setp sum2.0.gain0 -1
> >>> net sum2.0.in0 <= hm2_7i43.0.encoder.00.position
> >>> net sum2.0.in1 <= hm2_7i43.0.encoder.01.position
> >>>
> >>> But, there's an error:
> >>> custom.hal:6: Pin 'hm2_7i43.0.encoder.00.position' was already linked
> to
> >>> signal 'x-pos-fb'
> >>>
> >>> So, how can I use hm2_7i43.0.encoder.00.position and keep its other
> >>> connections?
> >>
> >> Use the x-pos-fb net instead of the hardware pin?
> >>
> >> net sum2.0.in0 <= x-pos-fb
> >>
> >
> > It won't work either:
> >
> > custom.hal:6: Pin 'x-pos-fb' does not exist
> >
> > Andrew
>
>
> x-pos-fb should exist as it was created by the net command that assigned
> the x-pos-fb signal the encoder position value:
>
> net x-pos-fb <= hm2_7i43.0.encoder.00.position
>

Tried many versions, and at last this works:

net x-pos-fb               =>  sum2.0.in0
net y-pos-fb               =>  sum2.0.in1

Thanks for your help!

Another question: how can I watch encoder index pulse? Which pin is it?

Andrew
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to