Comparisons in hal

More
11 Jan 2020 14:04 #154608 by RobotMatic
how can i do conditional type IF
== <= =>.
Is this possible without ladder?

Thak you !

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

More
11 Jan 2020 14:17 #154610 by Mike_Eitel
Replied by Mike_Eitel on topic Comparisons in hal
AND2 if you have a digital signal.

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

More
11 Jan 2020 15:11 #154617 by Todd Zuercher
Replied by Todd Zuercher on topic Comparisons in hal
"Near" could be used to compare floats.

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

More
11 Jan 2020 15:26 #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 or Create an account to join the conversation.

More
11 Jan 2020 22:52 #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 or Create an account to join the conversation.

More
12 Jan 2020 13:44 #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 or Create an account to join the conversation.

More
12 Jan 2020 14:44 #154673 by RobotMatic
Replied by RobotMatic on topic Comparisons in hal

File Attachment:

File Name: custom.hal
File Size:3 KB


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
Attachments:

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

Time to create page: 0.069 seconds
Powered by Kunena Forum