spindle turns when energized, should not
28 Nov 2015 17:01 #65957
by andypugh
Replied by andypugh on topic spindle turns when energized, should not
[quote="comjon" post=65945I assume with pwmgen input you are asking me to look for something like pwmgen.0.spindle-speed <= input, but I am not familair enough with Hal syntax to discern..[/quote]
Halmeter lets you look at live values in HAL in real time on a working machine. It's a very useful way to watch what is going on inside HAL.
Note that you can open as many halmeters as you want, all looking at different things.
Halmeter lets you look at live values in HAL in real time on a working machine. It's a very useful way to watch what is going on inside HAL.
Note that you can open as many halmeters as you want, all looking at different things.
Please Log in or Create an account to join the conversation.
28 Nov 2015 17:08 #65958
by comjon
Replied by comjon on topic spindle turns when energized, should not
Halmeter showed 1 for the pwmgen.0.max-dc, therefore I the duty cycle is 100% on that setting.
Attached id my current hal file, short, and not worred about the X,Y,Z axes at the moment.
Thank you.
Attached id my current hal file, short, and not worred about the X,Y,Z axes at the moment.
Thank you.
Please Log in or Create an account to join the conversation.
28 Nov 2015 21:02 #65974
by andypugh
Just because the PWM is allowed to go to 1, that doesn't mean that it is set to 1. You need to look at the pwmgen.0.value pin to see what duty cycle is being requested. If you see "5000" there, that should be giving full speed at the spindle. (because you have set pwmgen.0.scale to 5000)
You might need to un-comment the line that sets the pwmgen frequency, but the current value (1) is much too low. 50 Hz should work.
Replied by andypugh on topic spindle turns when energized, should not
Halmeter showed 1 for the pwmgen.0.max-dc, therefore I the duty cycle is 100% on that setting.
Just because the PWM is allowed to go to 1, that doesn't mean that it is set to 1. You need to look at the pwmgen.0.value pin to see what duty cycle is being requested. If you see "5000" there, that should be giving full speed at the spindle. (because you have set pwmgen.0.scale to 5000)
You might need to un-comment the line that sets the pwmgen frequency, but the current value (1) is much too low. 50 Hz should work.
Please Log in or Create an account to join the conversation.
29 Nov 2015 02:16 #65989
by comjon
Replied by comjon on topic spindle turns when energized, should not
Changed the pwm-freq to 50.0, no change. Don't know what to try nexr?.
Please Log in or Create an account to join the conversation.
29 Nov 2015 03:16 #65993
by andypugh
Replied by andypugh on topic spindle turns when energized, should not
I can only really help with HAL, You need PCW for the hardware side.
Have you read www.mesanet.com/pdf/adapter/spinx1man.pdf ?
Using Halmeter, when you think that the spindle should be on.
What is the value of the parport pin connected to the Spinx1 "Enable" pin. It needs to be 0 / low / false to enable the SPINX1 (it is active-low)
What is the value of the pwmgen.N.enable pin?
What is the value of the pwmgen.N.value pin?
What is the value of the pwmgen.N.scale parameter?
What is the value of the parport pins connected to the SPINX1 "DIR" pin?
If you open a terminal, type halcmd -kf, then type "show thread" what do you see? Then try "show funct". Paste both outputs here.
Have you read www.mesanet.com/pdf/adapter/spinx1man.pdf ?
Using Halmeter, when you think that the spindle should be on.
What is the value of the parport pin connected to the Spinx1 "Enable" pin. It needs to be 0 / low / false to enable the SPINX1 (it is active-low)
What is the value of the pwmgen.N.enable pin?
What is the value of the pwmgen.N.value pin?
What is the value of the pwmgen.N.scale parameter?
What is the value of the parport pins connected to the SPINX1 "DIR" pin?
If you open a terminal, type halcmd -kf, then type "show thread" what do you see? Then try "show funct". Paste both outputs here.
Please Log in or Create an account to join the conversation.
29 Nov 2015 11:37 - 29 Nov 2015 11:38 #65997
by cncbasher
Replied by cncbasher on topic spindle turns when energized, should not
you appear to be showing errors in your hal file
and listing pins twice, and the spindle enable is commented out
so this file could never work .
you may also need to invert the spindle enable pin .
try and have it all working without the enable connected ( connect the enable on the spinx to gnd )
then once everything is working then bring the enable pin into play
the enable pin is either at 5v to disable or 0v to enable , if it is the opposite way round you will need to invert the output
and listing pins twice, and the spindle enable is commented out
so this file could never work .
you may also need to invert the spindle enable pin .
try and have it all working without the enable connected ( connect the enable on the spinx to gnd )
then once everything is working then bring the enable pin into play
the enable pin is either at 5v to disable or 0v to enable , if it is the opposite way round you will need to invert the output
Last edit: 29 Nov 2015 11:38 by cncbasher.
Please Log in or Create an account to join the conversation.
29 Nov 2015 14:18 #66003
by comjon
Replied by comjon on topic spindle turns when energized, should not
parport.1.pin-17.out = FALSE
pwmgen.0.enable = TRUE
pwmgen.0.value = 500 (with M03 S500 passed through the MDI)
pwmgen.0.scale = 5000
parport.1.pin-14.out = TRUE (this is the Enable pin)
animalmother@animalmother:~$ halcmd -kf
halcmd: show thread
Realtime Threads:
Period FP Name ( Time, Max-Time )
998336 YES servo-thread ( 12888, 134300 )
1 stepgen.capture-position
2 pwmgen.update
3 motion-command-handler
4 motion-controller
5 stepgen.update-freq
6 abs.0
7 scale.0
62396 NO base-thread ( 23916, 45544 )
1 parport.0.read
2 parport.1.read
3 stepgen.make-pulses
4 pwmgen.make-pulses
5 parport.0.write
6 parport.1.write
halcmd: show funct
Exported Functions:
Owner CodeAddr Arg FP Users Name
00013 f8854000 f8797658 YES 1 abs.0
00009 f8809ae0 00000000 YES 1 motion-command-handler
00009 f880c830 00000000 YES 1 motion-controller
00011 f883b000 f87971a0 NO 1 parport.0.read
00011 f883b280 f87971a0 NO 0 parport.0.reset
00011 f883b3a0 f87971a0 NO 1 parport.0.write
00011 f883b000 f87972a8 NO 1 parport.1.read
00011 f883b280 f87972a8 NO 0 parport.1.reset
00011 f883b3a0 f87972a8 NO 1 parport.1.write
00011 f883b0f0 f87971a0 NO 0 parport.read-all
00011 f883b570 f87971a0 NO 0 parport.write-all
00014 f885e000 f8797680 NO 1 pwmgen.make-pulses
00014 f885e180 f8797680 YES 1 pwmgen.update
00015 f8869000 f8797708 YES 1 scale.0
00012 f8848320 f87973d0 YES 1 stepgen.capture-position
00012 f8848000 f87973d0 NO 1 stepgen.make-pulses
00012 f8848440 f87973d0 YES 1 stepgen.update-freq
halcmd:
pwmgen.0.enable = TRUE
pwmgen.0.value = 500 (with M03 S500 passed through the MDI)
pwmgen.0.scale = 5000
parport.1.pin-14.out = TRUE (this is the Enable pin)
animalmother@animalmother:~$ halcmd -kf
halcmd: show thread
Realtime Threads:
Period FP Name ( Time, Max-Time )
998336 YES servo-thread ( 12888, 134300 )
1 stepgen.capture-position
2 pwmgen.update
3 motion-command-handler
4 motion-controller
5 stepgen.update-freq
6 abs.0
7 scale.0
62396 NO base-thread ( 23916, 45544 )
1 parport.0.read
2 parport.1.read
3 stepgen.make-pulses
4 pwmgen.make-pulses
5 parport.0.write
6 parport.1.write
halcmd: show funct
Exported Functions:
Owner CodeAddr Arg FP Users Name
00013 f8854000 f8797658 YES 1 abs.0
00009 f8809ae0 00000000 YES 1 motion-command-handler
00009 f880c830 00000000 YES 1 motion-controller
00011 f883b000 f87971a0 NO 1 parport.0.read
00011 f883b280 f87971a0 NO 0 parport.0.reset
00011 f883b3a0 f87971a0 NO 1 parport.0.write
00011 f883b000 f87972a8 NO 1 parport.1.read
00011 f883b280 f87972a8 NO 0 parport.1.reset
00011 f883b3a0 f87972a8 NO 1 parport.1.write
00011 f883b0f0 f87971a0 NO 0 parport.read-all
00011 f883b570 f87971a0 NO 0 parport.write-all
00014 f885e000 f8797680 NO 1 pwmgen.make-pulses
00014 f885e180 f8797680 YES 1 pwmgen.update
00015 f8869000 f8797708 YES 1 scale.0
00012 f8848320 f87973d0 YES 1 stepgen.capture-position
00012 f8848000 f87973d0 NO 1 stepgen.make-pulses
00012 f8848440 f87973d0 YES 1 stepgen.update-freq
halcmd:
Please Log in or Create an account to join the conversation.
29 Nov 2015 14:27 #66004
by comjon
Replied by comjon on topic spindle turns when energized, should not
CNCBasher,
A "working" hal file is an elusive goal I am (hopefully) achieving in stages. My file currently works with respect to being able to enter M03 S commands and seeing changes in the rpms on the spindle. I ought have clarified that I have been able to "move the needle off zero" so to speak and make some progress.
I understand what you are saying. I am circumventing the typical approach to learning and coding a hal file, and "taking the long way around" to get where I am going.
Thank you for your ongoing support.
A "working" hal file is an elusive goal I am (hopefully) achieving in stages. My file currently works with respect to being able to enter M03 S commands and seeing changes in the rpms on the spindle. I ought have clarified that I have been able to "move the needle off zero" so to speak and make some progress.
I understand what you are saying. I am circumventing the typical approach to learning and coding a hal file, and "taking the long way around" to get where I am going.
Thank you for your ongoing support.
Please Log in or Create an account to join the conversation.
29 Nov 2015 14:54 - 29 Nov 2015 14:54 #66007
by andypugh
The SPINX1 needs the enable pin to be driven low to enable it.
setp parport.1.pin-14.invert-output true
Replied by andypugh on topic spindle turns when energized, should not
parport.1.pin-14.out = TRUE (this is the Enable pin)
The SPINX1 needs the enable pin to be driven low to enable it.
setp parport.1.pin-14.invert-output true
Last edit: 29 Nov 2015 14:54 by andypugh.
Please Log in or Create an account to join the conversation.
29 Nov 2015 15:18 #66009
by PCW
Replied by PCW on topic spindle turns when energized, should not
Do you have a link to the spindle drive manual?
Please Log in or Create an account to join the conversation.
Time to create page: 0.142 seconds