RS232 Spindle control

More
27 Apr 2019 19:14 #132114 by Mike_Eitel
Replied by Mike_Eitel on topic RS232 Spindle control
OK
Best would be to find somebody that could help you to get a hal module.

Second I would use normal pwm and send that puls stream to an pwm/0-xV on an arduino analog input. Plus the hal start and eventually direction digital signal.
= 3 outputs from linuxcnc via lpt - > 2 digital inputs plus 1 analog input of Arduino.
Inside Arduino you have to transform the voltage to number. Than you have to write a "gluing" soft that decides in dependance of the inputs which stream is send to the VFD.
I think you can keep it simple and ignore the responses.
Mike
The following user(s) said Thank You: marq_torque

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

More
27 Apr 2019 19:24 #132116 by marq_torque
Replied by marq_torque on topic RS232 Spindle control
Excellent,

I got direction now, Will now start figuring arduino to work with 0-10v output of EMC

Thanks :)

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

More
27 Apr 2019 19:47 #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
27 Apr 2019 20:22 #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
28 Apr 2019 02:01 #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
28 Apr 2019 09:02 #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
28 Apr 2019 11:33 #132167 by Tower
Replied by Tower 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.


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

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
28 Apr 2019 11:56 #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.

More
28 Apr 2019 12:15 - 28 Apr 2019 12:17 #132169 by bevins
Replied by bevins on topic RS232 Spindle control
The easiest would be to energize a relay on spindle on and send that into an arduino.
Use the arduino with a pot to set speed and have arduino send out rs232 message depending on where the pot is set at or even a switch with preset speeds 10 for example. Surely you don't need that much rpm control, its just a drilling machine unless you want to use it for something else.

Who cares if you have to go to Germany before heading back to France. You will get there either way.

Just my 2 cents.

Bob
Last edit: 28 Apr 2019 12:17 by bevins.
The following user(s) said Thank You: marq_torque

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

More
28 Apr 2019 12:24 #132170 by rodw
Replied by rodw on topic RS232 Spindle control
[quote="Mike_Eitel" post=132168
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[/quote]

Yes, I'm much more comfortable with C, but with Python you can get done in 50-100 lines in Python can take over 1000 in C. Particularly if you start playing with API's out there on cloud based systems.
The following user(s) said Thank You: marq_torque

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

Time to create page: 0.103 seconds
Powered by Kunena Forum