Closed loop servo control with custom driver board

More
5 years 8 months ago - 5 years 8 months ago #199092 by HerrNamenlos123
Thank you for your answers!

The thing with the emergency stop was just an example for an input, i was thinking of a physical button like a limit switch. Forget about that.

I have now installed LinuxCNC and i am trying around with different mesa card configurations and decided i want to emulate the Mesa 7i80HD ethernet card. I would use a laptop with software to emulate it and when it's finished, i would port the code to the microcontroller, just like i did with the PoKeys device.

I can set the ip address of the card and when LinuxCNC is started, it stops right away and says it can't find the card.

Does anyone know some kind of specification for the ethernet interface, which exact packets need to be sent? Is it even open source? I can't really find anything helpful...
Last edit: 5 years 8 months ago by HerrNamenlos123. Reason: Added information

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

More
5 years 8 months ago #199098 by PCW
Did you look at the 7I80 manual?
It describes the interface protocol

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

More
5 years 8 months ago #199103 by HerrNamenlos123
I am reading through it and it does give some good hints, but sadly it doesn't give me the information i need...

Like it for example specifies all eeprom addresses and what specific bits it the message mean and the UDP port, but it mostly doesn't specify what should come back from the board: If it's the same socket, what packet length, ...

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

More
5 years 8 months ago #199104 by PCW
It returns data to the requesting socket
And the returned packet size depends on how much
read data has been requested in the request packet

(this can also be determined by looking at the hm2_eth driver source)

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

More
5 years 8 months ago #199108 by HerrNamenlos123
Hmm, i'm close.

I am looking through the hm2_eth driver source, but i can't find exactly where packet data is inserted/parsed...

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

More
5 years 8 months ago #199653 by HerrNamenlos123
Alright, i finally have the ability to exchange packets with LinuxCNC.

Everytime i start LinuxCNC it stops right away with an error message after sending dozens of requests. When looking through the source code, i found there is a

" if (debug) "

and lots of log levels everywhere, which prints additional debug information, which would be really valuable to me.

Is there a way to launch LinuxCNC in debug mode to print all messages or to increase the log level?

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

Moderators: PCW, jmelson
Time to create page: 0.247 seconds
Powered by Kunena Forum