Outputting a pulse width for velocity servo control possible?

More
19 Nov 2017 06:47 #101993 by DaOne
I am retrofitting a older 1995 Brushed Haas VF-2. The drive cards use a signal to enable them (High/Low), a direction pin (High/Low) and a velocity signal that is 100ns at holding power all the way up to 16us at full velocity with an update at 16khz. The signal is pulled low (pulse width is at zero volts and remainder is +5)

I am planning to use mesa hardware. Is there a method for creating a signal such as this in hal? I would like to close the loop as well as be able to tune it within LinuxCNC. I am hoping I can use these cards as it will make the retrotit much cheaper and faster to finish.

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

More
20 Nov 2017 17:41 #102078 by andypugh
Any of the Mesa firmwares with "SV" in the name will have a suitable PWM output. Normally those use a daughter card to convert the PWM to +/- 10V, but you can use it directly if you want.

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

More
20 Nov 2017 19:14 #102094 by DaOne
So are you saying I use the 5i25 to directly output this signal without a breakout board?

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

More
20 Nov 2017 19:43 - 20 Nov 2017 19:48 #102096 by andypugh
Not necessarily. But you would want to connect some sort of breakout that doesn't do any processing of the output signal, such as a step/dir board.

This firmware for the 5i25: github.com/LinuxCNC/hostmot2-firmware/bl...rc/PIN_7I78x2_34.vhd and this breakout store.mesanet.com/index.php?route=produc...83_87&product_id=121 would give you 4 channels of step-dir and a PWM (plus a spindle encoder).
For extra GPIO you could add a smart-serial card. (there are connections on the board for that)


[Edit] Sorry, I was wrong. That board converts spindle PWM to analogue voltage, which you appear not to want.

Maybe: PIN_DMMBOB1x2_34 firmware and www.mesanet.com/pdf/parallel/7i75man.pdf
Last edit: 20 Nov 2017 19:48 by andypugh.

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

More
20 Nov 2017 19:57 #102100 by DaOne
Andy, the wave for is very closely resembling that of a RC hobby servo. The "Toff" in this photo is what sets the velocity. It is liner with 100ns being idle and 16us being full speed (Velocity mode) The frequency of this is 16khz. I will need at least 4 output channels for XYZA channels that will be closed loop via the 2000 line encoders they have (8000 counts)


Attachments:

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

More
20 Nov 2017 20:04 #102102 by andypugh
The Mesa PWM has enough resolution to work on a limited range of PWM. You just need to limit the PWM output between 1.6% and 25%. And you need to invert the output.

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

More
20 Nov 2017 21:41 #102109 by DaOne
Andy, do you think I can do this with a parallel port card? 16khz should be OK I would think?

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

More
20 Nov 2017 22:47 #102112 by andypugh
I was about to say that there is no way to do this with a parport because whilst 16kHz is possible, getting any resolution within that won't be.
But then I remembered the "reset" function in the parport driver, which actually waits for a length of time after setting the pins, and resets them. It is possible that you might actually be able to use that, but not simultaneously for step generation (as all pins that are in the reset list get the same reset time).

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

More
21 Nov 2017 03:14 #102120 by Todd Zuercher

I was about to say that there is no way to do this with a parport because whilst 16kHz is possible, getting any resolution within that won't be.
But then I remembered the "reset" function in the parport driver, which actually waits for a length of time after setting the pins, and resets them. It is possible that you might actually be able to use that, but not simultaneously for step generation (as all pins that are in the reset list get the same reset time).


I don't think that would work Andy. Reset-time is a parameter not a hal pin. So you won't be able to change it's value in hal.

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

More
21 Nov 2017 03:25 #102121 by DaOne
I am starting to rethink this a little seeing the prices on some of the new China drives out there. From what I am seeing these are pretty good and the price is amazing. My old system is DC brushed so I am sure just about anything would be a big upgrade. Anyone have any experience with these? I plan to run them in +-10v velocity mode. with a Mesa 7i77


www.ebay.com/itm/15NM-2-3KW-NEMA52-AC-Se...f:g:x6wAAOSwLnBX5KBB

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

Time to create page: 0.094 seconds
Powered by Kunena Forum