Spindle Encoder

More
3 years 8 months ago #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 to join the conversation.

More
3 years 8 months ago #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 to join the conversation.

More
3 years 8 months ago #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 to join the conversation.

More
3 years 8 months ago #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 to join the conversation.

More
3 years 8 months ago #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

Please Log in to join the conversation.

More
3 years 8 months ago #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
 
 

Please Log in to join the conversation.

More
3 years 8 months ago #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

Please Log in to join the conversation.

More
3 years 8 months ago #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 to join the conversation.

More
3 years 8 months ago #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

Please Log in to join the conversation.

More
3 years 8 months ago #263879 by Stefan321
Replied by Stefan321 on topic Spindle Encoder
Thanks for all the help I will test it tomorrow.

Please Log in to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum