HAL Question

More
03 Jul 2020 01:28 - 03 Jul 2020 01:28 #173477 by snowgoer540
Replied by snowgoer540 on topic HAL Question

It won't work for ohmic2 as its not in the release but if you type "man motion" or any other component name you will get the docs. This is also displayed on the main documentation page on the web site say V2.8 docs (at the bottom). You may have to open up a heading..

The easiest way here would be to review the ohmic2 source as it lists the pins and if they are in or out pins but if you want to learn something, you could use halcompile to create the docs for ohmic2. Good research exercise!

Once run, it will tell you where the man page is and you can type man <path to man file>/<comp_name>
Then you can output it to text and I think PDF using man if you read the man for man!


Oh man. Well I definitely learned another thing I didn’t know. I’ll definitely check it out. Thank you!
Last edit: 03 Jul 2020 01:28 by snowgoer540.

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

More
03 Jul 2020 01:31 #173478 by snowgoer540
Replied by snowgoer540 on topic HAL Question

Not sure what you mean but you can have only one output on a signal.


I guess what I was asking is how do I know what is available to hook to what, maybe rods man explained it?

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

More
03 Jul 2020 01:32 #173479 by snowgoer540
Replied by snowgoer540 on topic HAL Question

I haven't had a look at the ohmic2 component but I think you could do someting like:
Warning: Spoiler!

this way hm2_5i25.0.7i76.0.0.output-01 will only be on while probing is active or while ohmic testing.
The unlinkp line is redundant becuase you don't have debounce.0.2.in connected.


Ok I think this makes sense! I was thinking this is what I wanted to do (conceptually), just confused on the execution.

What is denounce.0.2.in?

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

More
03 Jul 2020 01:35 #173480 by phillc54
Replied by phillc54 on topic HAL Question
debounce.0 is a debounce component

debounce.0.0 is for the float switch
debounce.0.1 is for the breakaway switch
debounce.0.2 is for the ohmic probe
The following user(s) said Thank You: snowgoer540

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

More
03 Jul 2020 02:47 #173481 by snowgoer540
Replied by snowgoer540 on topic HAL Question
net ohmic-true ohmicsense.ohmic-on => debounce.0.2.in
That line doesn’t connect anything to deboune.0.2.in?

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

More
03 Jul 2020 04:10 #173483 by phillc54
Replied by phillc54 on topic HAL Question
Yes, it connects ohmicsense.ohmic-on to debounce.0.2.in using he signal name ohmic-true
If you are referring to me saying that the unlinkp line was redundant then unlinkp is used to disconnect a previously connected pin, debounce.0.2.in was not connected previously.

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

More
03 Jul 2020 20:12 #173545 by snowgoer540
Replied by snowgoer540 on topic HAL Question
Very vaguely starting to make heads or tails of this.

I was able to figure out that the following seems to turn the relay on when you run an NC program, it's on the entire time the program is running:
net ohmic:type  <= motion.motion-type
net ohmic:type  => ohmicsense.motion-type-in
net ohmic:power <= ohmicsense.power-on
net ohmic:power => hm2_5i25.0.7i76.0.0.output-01

This code seems to turn the relay on whenever probing is called for, be it the ohmic test, probe test, or every time it probes in the NC program.
net plasmac:ohmic-enable plasmac.ohmic-enable => ohmicsense.is-probing hm2_5i25.0.7i76.0.0.output-01
or as I found through playing around also works (and seems a bit easier for my brain to understand)
net plasmac:ohmic-enable plasmac.ohmic-enable => ohmicsense.is-probing 
net plasmac:ohmic-enable plasmac.ohmic-enable => hm2_5i25.0.7i76.0.0.output-01

The problem is there is a slight delay, and my Z is capable of moving 400ipm (though I dont see myself setting it that high). My question is, is there a way to either have probing delay a prescribed length of time (not the desireable solution), OR the harder thing is how would I make it so that it does both, meaning ohmic test, and probe test can have a delay, it's probably not that big of a deal, and then the relay would turn on at the beginning of an NC program and stay on until the program culminates. So the best of both worlds?

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

More
03 Jul 2020 20:39 #173548 by rodw
Replied by rodw on topic HAL Question
Great you are getting into HAL. I suspect the source of your delay is outside of hal control and is due to:
a) the Relay turn on time
b) the time it takes for the power supply capacitors to charge.

On a downdraft table, I would just leave the relay out altogether per Mesa's recommendation and have it powered up when the machine is turned on.

But on a water table, I thought it prudent to disable the power when not in use to guard against consumable electrolysis in the torch. I have no Idea if its actually a problem though! I did not really care if the current was there while running a job but I wanted the power to turn off if the machine was left powered up and idle.

The reason why I generated the power on signal from motion.motion-type is that to turn on a relay you need a bit pin type that can only be on or off (0 or 1). But motion.motion-type has several values depending what the machine is doing ( but 0 = idle). So if the machine is not idle, the relay is turned on. So that means if you finish a job or it errors and pauses, the relay will switch off.

And like you, I found it harder than it looked!

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

More
03 Jul 2020 20:44 #173550 by snowgoer540
Replied by snowgoer540 on topic HAL Question

Great you are getting into HAL. I suspect the source of your delay is outside of hal control and is due to:
a) the Relay turn on time
b) the time it takes for the power supply capacitors to charge.

On a downdraft table, I would just leave the relay out altogether per Mesa's recommendation and have it powered up when the machine is turned on.

But on a water table, I thought it prudent to disable the power when not in use to guard against consumable electrolysis in the torch. I have no Idea if its actually a problem though! I did not really care if the current was there while running a job but I wanted the power to turn off if the machine was left powered up and idle.

The reason why I generated the power on signal from motion.motion-type is that to turn on a relay you need a bit pin type that can only be on or off (0 or 1). But motion.motion-type has several values depending what the machine is doing ( but 0 = idle). So if the machine is not idle, the relay is turned on. So that means if you finish a job or it errors and pauses, the relay will switch off.

And like you, I found it harder than it looked!


Yep, you are absolutely right on the cause of the delay, I just am trying to figure out how to work around it. As for using the motion pin, I think that's a really good execution!

The only problem is that it does not turn it on for a probe test, or an ohmic test. So, I think it has to be put in the comp file, and now I'm trying to figure out how to incorporate that into the ohmic2 comp now.

The thing I dont understand is the probe test. Since the machine has motion, and it's probing, it should turn the relay on, but it does not.

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

More
03 Jul 2020 20:47 #173551 by snowgoer540
Replied by snowgoer540 on topic HAL Question
One thing I noticed, in the code below, should (! power_on) really be (!power_on)?:
if(is_probing){
        if(!first_pass){
                first_pass = 1;
                if(! power_on)
                    power_on = 1;

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

Moderators: snowgoer540
Time to create page: 0.098 seconds
Powered by Kunena Forum