Comparisons in hal

More
6 years 9 months ago #154608 by RobotMatic
how can i do conditional type IF
== <= =>.
Is this possible without ladder?

Thak you !

Please Log in to join the conversation.

More
6 years 9 months ago #154610 by Mike_Eitel
Replied by Mike_Eitel on topic Comparisons in hal
AND2 if you have a digital signal.

Please Log in to join the conversation.

More
6 years 9 months ago #154617 by Todd Zuercher
Replied by Todd Zuercher on topic Comparisons in hal
"Near" could be used to compare floats.

Please Log in to join the conversation.

More
6 years 9 months ago #154619 by andypugh
Replied by andypugh on topic Comparisons in hal
or wcomp for nearly the same, bigger and smaller.

linuxcnc.org/docs/2.7/html/man/man9/wcomp.9.html

Please Log in to join the conversation.

More
6 years 9 months ago #154652 by RobotMatic
Replied by RobotMatic on topic Comparisons in hal
I understand now that I can't with hal. !

then it is better to use ladder and voila !!
I am using the encoder component as a counter on channel A.
I wanted to reset the counter to a defined count number
It's just an exercise I wanted to do

Thank you a lot

Please Log in to join the conversation.

More
6 years 9 months ago #154670 by PCW
Replied by PCW on topic Comparisons in hal
Actually you can do this in hal with wcomp
(assuming you want to reset the counter at a given count)

You could also reset it to a given number by using counter reset
and the offset component

Please Log in to join the conversation.

More
6 years 9 months ago #154673 by RobotMatic
Replied by RobotMatic on topic Comparisons in hal

Attachment not found



I could reset! thanks!!

Now I will see if I can change the time-delay on-off times.

I am discovering a new world with HAl.

thannnkkk youuuu

Please Log in to join the conversation.

Time to create page: 0.089 seconds
Powered by Kunena Forum