Spindle reverse speed using parallel breakout board

More
05 Sep 2021 10:32 #219661 by frayja2002
Hi all

I am using a parallel port breakout board with linuxcnc using pwm on pin 1 to drive the vfd for the spindle.
When I tell it to turn on in the forward direction everything seems to work as expected. Pin 1 reads about 2.5v & the spindle run at about 50% of speed as expected.
If I then stop it & try to run it in reverse the spindle turns on in reverse but only runs at about 25% of speed (instead of the commanded 50%)
When I measure the voltage it is correspondingly lower.

This would seem to be something to do with the software rather than the hardware.
Does anyone have any ideas where to start?

Attached are some photos of my setup & components.
 
Attachments:

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

More
06 Sep 2021 22:48 #219800 by frayja2002
Has no-one had this problem, or is it something I'm missing?

I should pint out that I am using the latest development version of linuxcnc

I have tried a different type of parallel BOB (& other user interfaces) and the it still seems to be the same.

Can anyone else verify what I am saying? Is this normal behaviour?

Thanks

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

More
06 Sep 2021 23:51 #219804 by tommylight
Might not like it but get rid of the BOB, use a 100 ohm resistor on pin 1 and test .

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

More
07 Sep 2021 01:25 #219807 by frayja2002
I have tried what you suggested. 

I used a 200 ohm resistor between pin 1 & ground & measured the voltage across the resistor.
The results still look the same. A higher voltage in the forward direction than the reverse.
Please see attached photos.
 
Attachments:

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

More
07 Sep 2021 01:42 #219809 by PCW
Is the PWMgen set to PWM/DIR (1) mode?
If not, negative spindle speeds will set the PWMgen
to the minimum PWM setting

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

More
07 Sep 2021 02:09 #219810 by frayja2002
I'm not sure exactly how to check this but looking in the hal file this appears to be correct.

I have attached my hal & ini file.
 
Attachments:

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

More
07 Sep 2021 02:56 #219811 by PCW
Yes the mode is correct, but I think this statement will not do the
expected thing with negative numbers:

setp pwmgen.0.offset 0.11428571428571428

Probably the simplest fix is to change:

net spindle-cmd-rpm => pwmgen.0.value

to

net spindle-cmd-rpm-abs => pwmgen.0.value

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

More
07 Sep 2021 05:45 #219815 by frayja2002
Just to let you know that I have done a quick test & That definitely looks like the fix I was after.

Something so simple! 

Thanks for you help.

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

Time to create page: 0.164 seconds
Powered by Kunena Forum