Spindle Encoder

More
05 Feb 2023 19:13 #263766 by Stefan321
Replied by Stefan321 on topic Spindle Encoder
Ok, I don't think the G43 is the reason at all, but the G0 on G1 and I think that's related to the G94

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

More
05 Feb 2023 20:42 #263770 by Stefan321
Replied by Stefan321 on topic Spindle Encoder
Unfortunately I didn't manage to set the index to true. I thought I would know the command but there was always an error

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

More
06 Feb 2023 13:20 #263821 by andypugh
Replied by andypugh on topic Spindle Encoder
What is the error?

You might have to "sets" the signal that is attached to the index-enable rather than "setp" the pin if it is already connected in the HAL.

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

More
06 Feb 2023 21:04 #263868 by Stefan321
Replied by Stefan321 on topic Spindle Encoder
So I tried a few things today with no success.for basic info the 5v is switched with 10ohm with the index . and the npn sensor also goes to the index . according to talla83, this should pull the index signal down to 0.today I tested the 5v and the 10ohm resistor to endfern no improvement. I've also inventoried the signal, I've put the encoder scale down but there's no improvement either. I still haven't figured out how to manually set the index to true. and I also don't understand when this is set to true?

Error unknow command hm2_7i96s.0.encoder.04.index-enable.1

Sry the pictures is to big.

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

More
06 Feb 2023 22:16 - 06 Feb 2023 22:18 #263872 by PCW
Replied by PCW on topic Spindle Encoder
1. A 10 Ohm resistor is _WAY_ too low a value for a pullup/pulldown and may damage your encoder.
2. You should not need an external resistor for a NPN output as the 7I96S has a built-in 2K Ohm pullup resistor to 5V.
3. To test the index input, you must "sets" the signal connected to
hm2_7i96s.0.encoder.04.index-enable (probably spindle-index-enable but
you can check in your hal file) something like:

halcmd sets spindle-index-enable
Last edit: 06 Feb 2023 22:18 by PCW.

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

More
06 Feb 2023 22:51 - 06 Feb 2023 23:31 #263874 by Stefan321
Replied by Stefan321 on topic Spindle Encoder
okey if i understand correctly just index + signal npn sensor and 24+ extra and 0v is extra too.

I still don't quite understand the Hal thing.

so I only have to enter "halcmd sets spindle-index-enable" in the hal or what?


I tried enabling it on the Hal show

this is in the Hal

net spindle-index-enable => pid.s.index-enable

net spindle-index-enable <=> [HMOT](CARD0).encoder.04.index-enable

net spindel-index-enable <=> spindel.0.index-enable


what strikes me right now there is still a 0 in the block but I found out that it is encoder block 4 and not 0

but that only refers to the spindle or and it is spindle 0?

# ---Spindelsteuersignale einrichten---

net spindel-vel-cmd-rps <= spindel.0.speed-out-rps
net spindel-vel-cmd-rps-abs <= spindel.0.speed-out-rps-abs
net spindel-vel-cmd-rpm <= spindel.0.speed-out
net spindel-vel-cmd-rpm-abs <= spindel.0.speed-out-abs
Netz-Spindelfreigabe <= spindel.0.on
net spindel-cw <= spindel.0.vorwärts
net spindel-ccw <= spindel.0.reverse
net spindelbremse <= spindel.0.bremse
Netto-Spindelumdrehungen => spindel.0.revs
Netto-Spindel-bei-Geschwindigkeit => Spindel.0.bei-Geschwindigkeit
net spindel-vel-fb-rps => spindel.0.speed-in
net spindel-index-enable <=> spindel.0.index-enable

# ---Spindel bei Drehzahlsignalen einrichten---

Netzspindel-vel-cmd-rps => near.0.in1
Netzspindel-vel-fb-rps => near.0.in2
Nettospindeldrehzahl <= near.0.out
setp near.0.scale 1.000000
setp near.0.difference 3.333333
 
 
Last edit: 06 Feb 2023 23:31 by Stefan321.

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

More
06 Feb 2023 23:05 - 06 Feb 2023 23:06 #263875 by PCW
Replied by PCW on topic Spindle Encoder
in halshow's command window, you would type:

sets spindle-index-enable 1

in a terminal window you would type:

halcmd sets spindle-index-enable 1

spindle.0 is LinuxCNCs name for the first spindle
Last edit: 06 Feb 2023 23:06 by PCW.

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

More
06 Feb 2023 23:21 #263877 by Stefan321
Replied by Stefan321 on topic Spindle Encoder
okey so I have to write "sets" in front of it then I'll test it again.

how can I call the halcmd? or is that the normal terminal?

As you can see, I still have a lot of questions

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

More
06 Feb 2023 23:48 - 06 Feb 2023 23:56 #263878 by PCW
Replied by PCW on topic Spindle Encoder
"sets" is a hal command that means "set signal"

sets spindle-index-enable 1

means set the signal "spindle-index-enable" to 1 (or true)


Yes, if LinuxCNC is installed, halcmd is a standard command you can run from a terminal
Last edit: 06 Feb 2023 23:56 by PCW.

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

More
06 Feb 2023 23:53 #263879 by Stefan321
Replied by Stefan321 on topic Spindle Encoder
Thanks for all the help I will test it tomorrow.

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

Time to create page: 0.093 seconds
Powered by Kunena Forum