or2 example correct ? need to flip on VFD with coolant requests
- smc.collins
- Offline
- Platinum Member
Less
More
- Posts: 677
- Thank you received: 117
08 Dec 2022 01:09 #258860
by smc.collins
loadrt or2 2, or2.in0 , or2.1.in1
addf or2
net coolant-pump-vfd
# --- COOLANT-FLOOD ---
net coolant-flood => or2.1.in0
# ---- Coolant-Mist ----
net coolant-mist => or2.1.in1
or2.1.in0 bit in coolant-flood
or2.1.in1 bit in coolant-flood
or2.1.out bit out coolant-pump-vfd
#
Coolant Pump
net coolant-pump-vfd <= or2.1.our bit out => hm2_5i25.0.7i77.0.0.output-07
does this look right ? documentation is a bit light on the addf call
addf or2
net coolant-pump-vfd
# --- COOLANT-FLOOD ---
net coolant-flood => or2.1.in0
# ---- Coolant-Mist ----
net coolant-mist => or2.1.in1
or2.1.in0 bit in coolant-flood
or2.1.in1 bit in coolant-flood
or2.1.out bit out coolant-pump-vfd
#
Coolant Pump
net coolant-pump-vfd <= or2.1.our bit out => hm2_5i25.0.7i77.0.0.output-07
does this look right ? documentation is a bit light on the addf call
Please Log in or Create an account to join the conversation.
08 Dec 2022 05:47 #258871
by spumco
Replied by spumco on topic or2 example correct ? need to flip on VFD with coolant requests
addf or2.in0 servo-thread
addf or2.in1 servo-thread
addf or2.in1 servo-thread
The following user(s) said Thank You: smc.collins
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
Less
More
- Posts: 677
- Thank you received: 117
08 Dec 2022 23:03 - 08 Dec 2022 23:06 #258926
by smc.collins
Replied by smc.collins on topic or2 example correct ? need to flip on VFD with coolant requests
I attached the preliminary hal file, but to my eyes it looks correct now, lmk if I missed something. I am however trying to figure out the best way to call additional coolant dialogs from Gcode. there's a lot more than just flood and mist in coolant options these day.
Last edit: 08 Dec 2022 23:06 by smc.collins.
Please Log in or Create an account to join the conversation.
09 Dec 2022 01:05 #258952
by andypugh
Replied by andypugh on topic or2 example correct ? need to flip on VFD with coolant requests
That file is only partly valid HAL.
loadrt or2 2, or2.in0 , or2.1.in1
What is this meant to do? Maybe you want
loadrt or2 names=or2.0,or2.1 ?
But those would be the default names anyway.
So why not
loadrt or2 count=2 ?
or2.1.in0 bit in coolant-flood
or2.1.in1 bit in coolant-flood
or2.1.out bit out coolant-pump-vfd
No idea where you got this syntax from. It looks like it's partly from the comp file syntax.
net coolant-flood or2.1.in0
net coolant-mist or2.1.in1
net coolant-pump-vfd or2.1.out
(assuming that all these signals are linked to other things elsewhere)
loadrt or2 2, or2.in0 , or2.1.in1
What is this meant to do? Maybe you want
loadrt or2 names=or2.0,or2.1 ?
But those would be the default names anyway.
So why not
loadrt or2 count=2 ?
or2.1.in0 bit in coolant-flood
or2.1.in1 bit in coolant-flood
or2.1.out bit out coolant-pump-vfd
No idea where you got this syntax from. It looks like it's partly from the comp file syntax.
net coolant-flood or2.1.in0
net coolant-mist or2.1.in1
net coolant-pump-vfd or2.1.out
(assuming that all these signals are linked to other things elsewhere)
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
Less
More
- Posts: 677
- Thank you received: 117
09 Dec 2022 01:34 #258955
by smc.collins
Replied by smc.collins on topic or2 example correct ? need to flip on VFD with coolant requests
I'm asking because your documentation is clear as mud.
. it's unbearably bad, I'm not saying this to be a dick, but it's absolutely awful. your man pages are circular word salads. I'm assuming several reasons,
1. written by programmers
2. a lot of non native English speakers
it's bad when i have a professional automation engineer going wtf, and he works for a very big company, and he's highly skilled.
so yes, I'm asking for feedback, because I'm trying to learn. i need to turn on 1 output with 2 inputs, and per the man pages this is the least convoluted path.
if my interpretation of the man page is incorrect, explain why, in plain English, stop writing hal commands, you're obfuscating the problem
. BTW I'm happy to help rewrite the man pages as i can.
. it's unbearably bad, I'm not saying this to be a dick, but it's absolutely awful. your man pages are circular word salads. I'm assuming several reasons,
1. written by programmers
2. a lot of non native English speakers
it's bad when i have a professional automation engineer going wtf, and he works for a very big company, and he's highly skilled.
so yes, I'm asking for feedback, because I'm trying to learn. i need to turn on 1 output with 2 inputs, and per the man pages this is the least convoluted path.
if my interpretation of the man page is incorrect, explain why, in plain English, stop writing hal commands, you're obfuscating the problem
. BTW I'm happy to help rewrite the man pages as i can.
Please Log in or Create an account to join the conversation.
09 Dec 2022 07:27 #258968
by rodw
Replied by rodw on topic or2 example correct ? need to flip on VFD with coolant requests
The issue causing people to write replys in hal is you have written questions in hal.
So how about a paragraph or 2 writing about what you want to achieve. Mist and coolant are already supported pretty well...
Its never a good idea to fight the paradigm
Keep perservering with hal. On day it will just click. I spent hours reading the man pages for components (after clicking on expand man pages) when I got going.
There is also the mux2 component (and other muxes) that could still use the coolant pin but select different coolant methods based on the select state.
So how about a paragraph or 2 writing about what you want to achieve. Mist and coolant are already supported pretty well...
Its never a good idea to fight the paradigm
Keep perservering with hal. On day it will just click. I spent hours reading the man pages for components (after clicking on expand man pages) when I got going.
There is also the mux2 component (and other muxes) that could still use the coolant pin but select different coolant methods based on the select state.
Please Log in or Create an account to join the conversation.
09 Dec 2022 10:10 #258983
by andypugh
Replied by andypugh on topic or2 example correct ? need to flip on VFD with coolant requests
The or2 manpage is brief, admittedly, but it is a manpage. It simply lists the function and pin names, and describes what the functions do. It is not the purpose of individual manpages to explain how HAL works or what the available commands are.
Have you read the main HAL documents?
linuxcnc.org/docs/stable/html/hal/intro.html
linuxcnc.org/docs/stable/html/hal/basic-hal.html
The following section runs through operating a standalone HAL session. It's useful to get a feeling for what HAL is, and does, but isn't how it is normally used. Normally the system loads a HAL file of these commands to set up the system once.
linuxcnc.org/docs/stable/html/hal/tutorial.html
Have you read the main HAL documents?
linuxcnc.org/docs/stable/html/hal/intro.html
linuxcnc.org/docs/stable/html/hal/basic-hal.html
The following section runs through operating a standalone HAL session. It's useful to get a feeling for what HAL is, and does, but isn't how it is normally used. Normally the system loads a HAL file of these commands to set up the system once.
linuxcnc.org/docs/stable/html/hal/tutorial.html
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
Less
More
- Posts: 677
- Thank you received: 117
10 Dec 2022 01:10 - 10 Dec 2022 01:12 #259056
by smc.collins
Replied by smc.collins on topic or2 example correct ? need to flip on VFD with coolant requests
My need, is to turn on the coolant pump, alongside of the solenoids to direct flow. I have a single coolant pump and 2 flow circuits. or2 appears to be the correct path for this. I can also add more or2 inputs as I add more gcode coolant flow options.
so when I call for mist I need my pump to turn on, when I call for flood, I need my pump to turn on. if I call for both, I need the coolant pump to turn on. pretty simple really. I need to add the through tool in place of the mist at some point, but I have more reading to do that. there are many places in the operation of this lathe, where I need to call turn on 1 output for multiple inputs. I have been using machine enable for most of the common must be on options for operation.
from my reading, mux looks like a bit more complexity than I need. I want to keep the function of the machine as stone simple as possible. I can add more complexity as I learn.
so when I call for mist I need my pump to turn on, when I call for flood, I need my pump to turn on. if I call for both, I need the coolant pump to turn on. pretty simple really. I need to add the through tool in place of the mist at some point, but I have more reading to do that. there are many places in the operation of this lathe, where I need to call turn on 1 output for multiple inputs. I have been using machine enable for most of the common must be on options for operation.
from my reading, mux looks like a bit more complexity than I need. I want to keep the function of the machine as stone simple as possible. I can add more complexity as I learn.
Last edit: 10 Dec 2022 01:12 by smc.collins.
Please Log in or Create an account to join the conversation.
10 Dec 2022 02:03 - 10 Dec 2022 02:12 #259058
by rodw
Replied by rodw on topic or2 example correct ? need to flip on VFD with coolant requests
That does sound right. I know Andy has given his idea. Here is how I would do it.
A lot of the examples have 2 pins on the one line. I have found its much easier (particularly in the beginning) to only have one pin per lline. eg
first create your signal from the pin you want
Then send it where you want toThis makes it much easier to send the signal to another pin without a jumble of pins on one line....
loadrt or2 names=pump-or2
addf pump-or2 servo-thread
net cool-on <= iocontrol.0.coolant-flood
net mist-on <= iocontrol.0.coolant-mist
net cool-on => pump-or2.in0
net mist-on => pump-or2.in1
net pump-on <= pump-or2.out
net-pump-on => my-pump-pin
net cool-on => my-coolant-pin
net mist-on => my-mist-pin
A lot of the examples have 2 pins on the one line. I have found its much easier (particularly in the beginning) to only have one pin per lline. eg
first create your signal from the pin you want
net cool-on <= iocontrol.0.coolant-flood
net cool-on => pump-or2.in0
net cool-on => my-coolant-pin
Last edit: 10 Dec 2022 02:12 by rodw.
The following user(s) said Thank You: smc.collins
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
Less
More
- Posts: 677
- Thank you received: 117
10 Dec 2022 22:31 - 10 Dec 2022 22:32 #259147
by smc.collins
Replied by smc.collins on topic or2 example correct ? need to flip on VFD with coolant requests
thanks Rod, finally got a chance to read this today. that's where I was heading with my configuration idea. and now there's a little thread about or2 other people can search and use !. I agree with the jumble of pins on a line thing. Also commenting, I am adding loads of commenting to my config files now.
Last edit: 10 Dec 2022 22:32 by smc.collins.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
Time to create page: 0.150 seconds