Mill atc configuration

More
20 Jul 2023 10:34 #275884 by andypugh
Replied by andypugh on topic Mill atc configuration
OK, I see you have loaded orient with names=

So the HAL pins should be just orient not orient.0

Also, I think that line should be orient.command not orient.0.position.
The following user(s) said Thank You: Artur_1617

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

More
20 Jul 2023 11:06 - 20 Jul 2023 11:14 #275887 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
Another

Try to change to command and get error to
 
Attachments:
Last edit: 20 Jul 2023 11:14 by Artur_1617.

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

More
20 Jul 2023 13:30 #275897 by andypugh
Replied by andypugh on topic Mill atc configuration
Yes, so, fix the issues as described. I did say that my example would need to be altered to suit your HAL.

Also, it's not the best idea to have signal names identical to pin names, it causes confusion.

Also: I forgot the "loadrt" lines for the wcomp and sum2 components.

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

More
21 Jul 2023 10:39 - 23 Jul 2023 09:53 #275947 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
I cant get it working. And for now only want turn on relay when start Orient.
Why this dont working?
After or2.2.out must add another Output pin 'spindle.0.on' to connect with spindle-enable-all . But get error pin already has Out pin 'or2.2.out'
Try to use to 'net spindle-enable-all  <= spindle.on.enable' linuxcnc start without error but spindle dont start.
net spindle-orient         <=   orient.enable
net spindle-orient         =>   or2.2.in0 
net spindle-enable       =>   or2.2.in1 
net spindle-enable-all  <=   or2.2.out     
net spindle-enable-all  <=   spindle.0.on
 

 
Last edit: 23 Jul 2023 09:53 by Artur_1617.

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

More
23 Jul 2023 09:52 #276062 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration

 
net o_fwd wcomp.0.under => Use this pin to move the spindle FWD
 


 

Any example?
Try  
net o_fwd wcomp.0.under => spindle-cw   but not working
 

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

More
23 Jul 2023 11:00 - 23 Jul 2023 13:29 #276065 by Aciera
Replied by Aciera on topic Mill atc configuration

After or2.2.out must add another Output pin 'spindle.0.on' to connect with spindle-enable-all . But get error pin already has Out pin 'or2.2.out'
Try to use to 'net spindle-enable-all  <= spindle.on.enable' linuxcnc start without error but spindle dont start.
net spindle-orient         <=   orient.enable
net spindle-orient         =>   or2.2.in0 
net spindle-enable       =>   or2.2.in1 
net spindle-enable-all  <=   or2.2.out     
net spindle-enable-all  <=   spindle.0.on

The error tells you that you are trying to connect two output pins. You will need to use an OR,AND or whatever else in between according to the logic you need.

There is a fair bit of documentation that may help to get a basic understanding of HAL usage:
linuxcnc.org/docs/html/hal/basic-hal.html
linuxcnc.org/docs/html/hal/intro.html
Last edit: 23 Jul 2023 13:29 by Aciera.

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

More
24 Jul 2023 08:43 #276134 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
In this topic forum.linuxcnc.org/10-advanced-configura...ent-revised?start=60
Serg452 using spindle inventer almost like my. With two relays for spindle cw and cww.
This compile well be better for my setup? 

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

More
24 Jul 2023 10:01 #276142 by andypugh
Replied by andypugh on topic Mill atc configuration
I don't think that there is any need to start again, but you do need to understand why your current config isn't working.

There are four basic things to know about HAL.

1) The net statement is "net signal pin" or "net signal pin pin" or as man pins as you need.
2) All pins connected to the same signal will have the same numeric value and you can use the same signal name on as many lines in the HAL file as you need to, and in multiple HAL files.
3) Each signal can only have one "output" pin which writes the value to the signal
4) You can use any name you want for a signal, but pin names are fixed by the software.

Your problems at the moment come from trying to connect spindle.0.on and or2.2.out to the same signal. But both of those are output pins.
And, also. spindle.0.on is already being used as an input to the or2 chain, isn't it?

If you rewind a bit, you probably just need to change some _signal_ names in my HAL snippet to match the ones in your actual HAL file.

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

More
24 Jul 2023 11:12 - 24 Jul 2023 19:32 #276145 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
For now I dont work more with spindle.0.on think dont need ON this, only need turn on relays cw, cww when start orient. 
I spent many time in the weekend try to get it working but not lucky. For You maybe is one minute to write this.
This morning start to make compile from topic but make halcmd show pin dont see any aditional pin and starting get many errors 'Pin does not exist'
net o_fwd wcomp.0.under => Here try to put spindle-cw, spindle.0.forward(this is Out pin and now this not work), halui.spindle.0.forward
 
 
Last edit: 24 Jul 2023 19:32 by Artur_1617.

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

More
25 Jul 2023 07:17 - 25 Jul 2023 08:45 #276205 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
All my in/out for spindle.
Dont see anything I can use for turn spindle cw or ccw with wcomp. I cant use spindle.0.forward becouse this is Output pin like wcomp.0.under
Found one setup using  wcomp.0.under       net spindle-slow wcomp.0.under  => pwmgen.0.enable
My need by something like this     net o_fwd wcomp.0.under => spindle.cw.enable ?  But dont see any pin in cw or ccw I can use.
edi@frezarka:~$ halcmd show pin spi
Component Pins:
Owner   Type  Dir         Value  Name
    19  bit   IN          FALSE  spindle.0.amp-fault-in
    19  bit   IN           TRUE  spindle.0.at-speed <== spindle-at-speed
    19  bit   OUT          TRUE  spindle.0.brake ==> spindle-brake
    19  bit   OUT         FALSE  spindle.0.forward ==> spindle-cw
    19  bit   I/O         FALSE  spindle.0.index-enable <=> spindle-index-enable
    19  bit   IN          FALSE  spindle.0.inhibit
    19  bit   IN          FALSE  spindle.0.is-oriented <== spindle-is-oriented
    19  bit   OUT         FALSE  spindle.0.locked ==> orient-lock
    19  bit   OUT         FALSE  spindle.0.on ==> spindle-enable
    19  bit   OUT         FALSE  spindle.0.orient ==> spindle-orient
    19  float OUT             0  spindle.0.orient-angle ==> orient-angle
    19  s32   IN              0  spindle.0.orient-fault
    19  s32   OUT             0  spindle.0.orient-mode ==> orient-mode
    19  bit   OUT         FALSE  spindle.0.reverse ==> spindle-ccw
    19  float IN             -0  spindle.0.revs <== spindle-revs
    19  float OUT             0  spindle.0.speed-cmd-rps
    19  float IN              0  spindle.0.speed-in <== spindle-vel-fb-rps
    19  float OUT             0  spindle.0.speed-out ==> spindle-vel-cmd-rpm
    19  float OUT             0  spindle.0.speed-out-abs ==> spindle-vel-cmd-rpm-abs
    19  float OUT             0  spindle.0.speed-out-rps ==> spindle-vel-cmd-rps
    19  float OUT             0  spindle.0.speed-out-rps-abs ==> spindle-vel-cmd-rps-abs
 


 
Last edit: 25 Jul 2023 08:45 by Artur_1617.

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

Time to create page: 0.156 seconds
Powered by Kunena Forum