> Thanks, > I attached my code. at the moment I am just working on the protocol, without > stm, so this code runs on a pc. > my code runs without changes in linuxcnc, but for some reason I do not get > data from the stepgens, but tcpdump confirms I am parsing all packages send > by linuxcnc. > to get it to work, you only need to change the mac address in the code, and > create a 7I92 config with 3 stepgens. > your idea of using the pwm module to send the data seems better, the stepgen > module is to complicated. > I then thought of implementing my own module, but after all I think the > hostmot stuff is too complicated, and too mesa specific, and I am going to > implement my own protocol. > I would appreciate if we could stay in touch about progress on this. > you only build a encoder interface, and send back pwm, and use the pid in > linuxcnc you will not get a very good result, as you do not have cascaded > pid.(been there, done that) > I recommend you put at least one pid in the stm32. > > Rene
Code is run on a STM32F407 discovery board and a base board for the Ethernet communication. The discovery board is very cheap although the base board cost a little bit more. For development i use openocd, Eclipse, binutils and gcc which are freely available. It is rather simple to exchange the real motor to a software motor during protocol testing by integrating pwm signal once or twice possible with some scaling and send it back into the encoder value. There is no problem to add pid or cascaded pid on the stm32 and a reasonably well tuned current control loop usually required to keep the current within what the transistors can tolerate. The hostmot stuff is a little bit complicated but driver in linuxcnc is ready to use. The protocol with a pwm value to control the motor current or speed and an encoder value sent back will work for an arbitrary motor and angle sensor. I also plan to change protocol but this is left as an improvement then machines I have are up and running. I would suggest to investigate the standard industrial protocols available before you start a new protocol. Nicklas Karlsson ------------------------------------------------------------------------------ _______________________________________________ Emc-developers mailing list Emc-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-developers