Mill atc configuration
So the HAL pins should be just orient not orient.0
Also, I think that line should be orient.command not orient.0.position.
Please Log in or Create an account to join the conversation.
- Artur_1617
- Topic Author
- Offline
- Premium Member
- Posts: 143
- Thank you received: 4
Attachments:
Please Log in or Create an account to join the conversation.
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.
- Artur_1617
- Topic Author
- Offline
- Premium Member
- Posts: 143
- Thank you received: 4
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
Please Log in or Create an account to join the conversation.
- Artur_1617
- Topic Author
- Offline
- Premium Member
- Posts: 143
- Thank you received: 4
Any example?
net o_fwd wcomp.0.under => Use this pin to move the spindle FWD
Try
net o_fwd wcomp.0.under => spindle-cw but not working
Please Log in or Create an account to join the conversation.
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.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
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
Please Log in or Create an account to join the conversation.
- Artur_1617
- Topic Author
- Offline
- Premium Member
- Posts: 143
- Thank you received: 4
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.
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.
- Artur_1617
- Topic Author
- Offline
- Premium Member
- Posts: 143
- Thank you received: 4
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
Please Log in or Create an account to join the conversation.
- Artur_1617
- Topic Author
- Offline
- Premium Member
- Posts: 143
- Thank you received: 4
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
Please Log in or Create an account to join the conversation.