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.