problem with thcud.velocity-tol

More
04 Jan 2018 22:57 - 04 Jan 2018 22:59 #104034 by Grotius
Hi Nerd here again,

I have big problem.

This is working good, i can turn the thc on and of via glade panel button :
#THC enable 
net systemlink0 thc.enable thcud.enable grotius_gui.hal_led_thc_on

Now this is problem :
#THC value
net systemlink1 thcud.velocity-tol thc.velocity

What ever i do, it is not working. The message is mostly, thcud.velocity-tol does not exist's...
Both pin's are available in halmeter in section pins

Orginal the example is setp, this works good, but is not handy in practice way's :
setp thcud.velocity-tol 0.05


Please help me.
Attachments:
Last edit: 04 Jan 2018 22:59 by Grotius.

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

More
05 Jan 2018 00:51 #104038 by PCW
Replied by PCW on topic problem with thcud.velocity-tol
looks like thcud.velocity-tol is a parameter rather than a pin so can only be setp'ed

If changing this "live" doesn't cause any issues the easiest fix would be to change it to a pin

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

More
05 Jan 2018 20:56 - 05 Jan 2018 21:08 #104059 by Grotius
@PCW,

Thank you for the comment. I have tried to fix it to make the connection as a pin output and also as a variable output.
I see it the value's are available in halmeter, but the connection can not be made in the hal file section.
Maybe i must try to connect them with python script.

Now i was looking at the thc when the program is working. The z-axis motor is responding normally on the thc up and down input signal. So this go's well. But the Z-axis dro on the screen is not changing when the TCH is enabled.
It looks like the correction value of the THCUD is not linked to the actual z position.
When the THC is disabeld, the Z-axis dro value is oke en normal responding.

thcud.z.pos-out value is about -1600 at the screenpicture. This value should be on the z axis dro displayed.

See also the picture of the z axis output value's

This is my hal section, i looked a long time to look what is wrong, i have cleaned it up :
setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 35000
setp stepgen.2.dirsetup 35000
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL

net zpos-cmd     thcud.z-pos-in        => axis.2.motor-pos-cmd
net thc-pos-out  thcud.z-pos-out       => stepgen.2.position-cmd 
net thc-pos-fb   axis.2.motor-pos-fb   <= thcud.z-fb-out

net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable  
net requested-vel thcud.requested-vel <= motion.requested-vel
net current-vel thcud.current-vel <= motion.current-vel



Is it possible for me to experiment with the THCUD.comp file? Is it only possible to make a comp file with halcomp in terminal?
Or is it possible to change some code directly in the THCUD file? This is new for me, but maybe good to practice.
Attachments:
Last edit: 05 Jan 2018 21:08 by Grotius.

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

More
05 Jan 2018 23:41 #104064 by Grotius
Update :

I was trying to solve the thc z axis dro value problem, but that is not as easy as it looks.

So now i have made a real time hal component file with : sudo halcompile --install grotiusthc.comp

Hopely now i can get the z-axis dro value on the screen.

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

Time to create page: 0.081 seconds
Powered by Kunena Forum