- Posts: 13
- Thank you received: 4
dm17ry wrote: servos are in position control mode. they accept a 32-bit position command and return a 32-bit feedback. plus a number of boolean flags. interfacing to linuxcnc is really straightforward, no linuxcnc's PIDs or stepgens are used. basically a few HAL connections like:
joint.x.amp-enable-out => nyx.0.servo-xx.enable
joint.x.motor-pos-cmd => nyx.0.servo-xx.pos-cmd
joint.x.motor-pos-fb <= nyx.0.servo-xx.pos-fb
joint.x.amp-fault-in <= nyx.0.servo-xx.alarm
the spindle is similar, but with a speed command instead. the driver also provides a spindle encoder interface in linuxcnc style with a index-enable pin. see sample configs...
I would definitely keep 24VDC circuits as they are and use compatible I/O cards. mesa or my YIO.1
another compelling option i'm thinking about is to keep the base and RIO units in place and interface them directly. they use a half-duplex serial rs-485 interface, just like my YIO modules. i have an idea about the protocol used. so theoretically i can implement it in the card firmware...
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
dm17ry wrote: In position control mode the commanded resolution is 23,040,000 cpr regardless of what kind of encoder is used.
when the spindle is used as a C-axis they usually use a really high resolution encoder. also, the controller explicitly signals the spindle drive that it is currently in C-axis mode. i believe to set PID gains which match other axes to achieve better synchronicity.
yeah, the common practice to use generic 24V I/O modules is kinda wasteful price-wise. with all those input optocouplers and protected driver ICs. i wanted to come up with something more optimal, but it hasn't happen so far.
i did a control panel controller a while ago using a $2 STM32 controller [...] i can share the code and configs, but they are not documented apart from some comments in the code...
i can also share my YIO modules firmware which use STM32F030 MCUs. it's a really simple serial protocol on RS-485 half-duplex bus @5Mbps. if you're willing to make your own interface hardware - it is surely doable, no problem
those MM64 connectors are documented in the manual. i believe 64ins/64outs on the base I/O card should be present on the RIO1 bus.
Please Log in or Create an account to join the conversation.
it's the spindle drive and its control protocol.MulBe039 wrote:
Is this a limitation imposed by linuxCNC or the Mitsubishi Drives?dm17ry wrote: In position control mode the commanded resolution is 23,040,000 cpr regardless of what kind of encoder is used.
does the lathe has a spindle encoder connected to the spindle drive? in addition to the PLG on the spindle motor...I probably wouldn't use this for synchronized motion between the A axis and other axies, all the operations would be:
rotate A by X degrees--> lock spindle-->machine feature--> unlock spindle --> rotate ....
kinda. the MCU presents itself as a composite USB HID device. it emulates a normal PC keyboard, a wheel mouse (with joystick and MPG) and a few more buttons. linuxcnc gets them using the hidcomp. i wanted to have an ability to use the alphanumeric membrane keyboard anywhere including BIOS SETUP. is the goal is only a few buttons - i think it will be easier to implement a custom HID device and a userspace linuxcnc component which will poll it for keypresses...Is this what you have done here? If so please do post your code and config, it will certainly help to have a working example that works on a recent-ish version of linuxcnc.
If not, could you still post the code, and I will have a look at it and see if I can figure out what you have done.
if you want more I/O points than available on the card you'll need some way to bring them to the PC. the parallel port is kinda limited. adding another PCI/ethernet card may bring some compatibility issues. there's a serial YIO protocol already present in the firmware which supports up to 256 I/O points at 0.88ms poll cycle. so yes, i think you can use a $2 MCU to talk to the card and any I/O interfaces you like. with shift registers as you suggested, or whatever...Not sure what you mean by this?
Are you suggesting I build your YIO modules myself?
Or that I use that firmware to build a 'clone' for the baseIo & RemoteI/O boards?
not really. my card only implements the "SV1" part of the CF10 connectorHave a look at page 14 of the electronics manual I uploaded. II'm not sure how cf31-34 are supposed to be adressed trough that cf10 connection, but if I see this correclty, we could ignore most of the pins, as they are already being handled trough the sh21 port on your card.
i'd like to implement it, because i think it will save a lot of rewiring and keep the possibility to instantly fall back to the original control for whatever reason... but need to evaluate how much time it will take. recently i've got a retrofit candidate with similar base I/O and RIO. will do some tests in week or two and decide if it's feasible.However, I suggest we only do this if you actually WANT to do that. I am aware that I am basically a stranger who came onto this forum asking for free help with a problem. I don't want anyone doing work which he doesn't want to do, just because that was the more convenient solution for me.
Please Log in or Create an account to join the conversation.
dm17ry wrote: does the lathe has a spindle encoder connected to the spindle drive? in addition to the PLG on the spindle motor...
i will publish the code to the github in a few days after a bit of cleanup
if you want more I/O points than available on the card you'll need some way to bring them to the PC. the parallel port is kinda limited. adding another PCI/ethernet card may bring some compatibility issues. there's a serial YIO protocol already present in the firmware which supports up to 256 I/O points at 0.88ms poll cycle. so yes, i think you can use a $2 MCU to talk to the card and any I/O interfaces you like. with shift registers as you suggested, or whatever...
not really. my card only implements the "SV1" part of the CF10 connector
i'd like to implement it, because i think it will save a lot of rewiring and keep the possibility to instantly fall back to the original control for whatever reason... but need to evaluate how much time it will take. recently i've got a retrofit candidate with similar base I/O and RIO. will do some tests in week or two and decide if it's feasible.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.