RS232 Spindle control

More
7 years 6 months ago #132119 by Mike_Eitel
Replied by Mike_Eitel on topic RS232 Spindle control
Good luck.
I think this can be easier for a not (jet) specialist :-)
Mike
The following user(s) said Thank You: marq_torque

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

More
7 years 6 months ago #132121 by Tower
Replied by Tower on topic RS232 Spindle control
I couldn't be bothered to translate that document but at first glance, it looks quite straight forward.

Forget the analog signal control loop or Arduino, as that looks like trying to travel from Paris to London by stopover in Vladivostok. (And it's just clear nonsense.)

Sorry, I didn't understand: Are you able to connect the drive to your computer via serial port and successfully communicate with it? So are you able to start the spindle, set speed and stop the spindle with the help of some serial communication software?
The following user(s) said Thank You: marq_torque

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

More
7 years 6 months ago #132141 by marq_torque
Replied by marq_torque on topic RS232 Spindle control
Yes i am able to start stop set speed via RS232 software, i have attached command list in first post but dont know how to append them with other softwares.

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

More
7 years 6 months ago #132164 by Mike_Eitel
Replied by Mike_Eitel on topic RS232 Spindle control
I agree with your judgment tower, but are you the guy who helps him out in giving him a helping hand to write a component that "jumps" between real-time hal and serial communication with its non real-time (eventually) jittering character interface?

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

More
7 years 6 months ago #132167 by Tower
Replied by Tower on topic RS232 Spindle control

marq_torque wrote: Yes i am able to start stop set speed via RS232 software, i have attached command list in first post but dont know how to append them with other softwares.


Great. And that RS232 software was something from the producer (i.e. it has only GUI with buttons) or was it something like RealTerm ?

Mike_Eitel wrote: I agree with your judgment tower, but are you the guy who helps him out in giving him a helping hand to write a component that "jumps" between real-time hal and serial communication with its non real-time (eventually) jittering character interface?


It does not need to be deterministic real-time. It is just a drilling machine for PCBs. My version has start/stop Proxxon on it. Basically what marq_torque needs is userspace (loaded by loadusr) component in python like this doc page describes (and I say it as a person who doesn't like Python).

The drive can be polled only for example every half second. I don't know if the author is on friendly terms with at least basic programming but it should not be hard with some googling and reading a few introduction tutorials to Python. Then it's needed to look at the PySerial library or similar and try to communicate with the drive from Python.

As a basic way of action, I would recommend creating a python HAL module with one boolean input pin and one output boolean pin. The input will be for start/stop command and the output will be status running/not running. Then from the main loop, it would every 0.5s send start command if the input pin is true (drive needs at least every 4s to receive any command when running, otherwise will shut itself down) and will send stop command once on a crossing of the command pin from true->false. Will receive a response (all aforementioned communication is request-reply) and write status pin.

When this is working, adding speed command and other whistles would be pretty straightforward.

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

More
7 years 6 months ago #132168 by Mike_Eitel
Replied by Mike_Eitel on topic RS232 Spindle control
Hi tower. I completely agree with your way.
Have never read that doc. ;-( Will keep it in mind if I ever want to do something unusual.

It's really what I would call a starter. Unhazels all kind of real-time problems.

And I also agree to your not very positive judgment towards python. A language that does not force you to make declarations is bitting you sooner or later ;-)
Mike

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

Time to create page: 0.493 seconds
Powered by Kunena Forum