RS232 Spindle control

More
7 years 6 months ago - 7 years 6 months ago #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: 7 years 6 months ago by bevins.
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 #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.

More
7 years 6 months ago #132172 by Mike_Eitel
Replied by Mike_Eitel on topic RS232 Spindle control
Yes rodw, but there can be crazy effects. I've got made complex development around special developed atmel based Linux embedded systems. They do: tty and rs485; 3964r plus modbus, simple plc, SMTP messaging, webserver, multiple ethernet with complex natting plus multiple vpns, and some other minor of my crazy ideas. Lot of that written in python. And the real pain always starts when we were forced to change Linux version.
More than once we found that python had his own way of understanding. Especially when you are near to the os.
Me personally, I do not code a lot anymore, and I do not care the language, but if then I prefere iec61131. Or of it is simple avr, I love Mark Albert's compiler Bascom.
Mike
The following user(s) said Thank You: rodw

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

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

Mike_Eitel wrote: 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.

Yeah, reading the docs tends to be fundamental when trying to solve problems. But I also started studying source codes (of Machinekit) first and it was infinite loop of Go to definitions and I have seen this 50 Go to definitions ago, what does this do again, so I get you.

Mike_Eitel wrote: 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


Python has huge problems, the versioning is complete (...obscene and profane expletive...). But for this, it is the right tool for the job. With the existence of HAL bindings library and the Serial communication library, it will make the task easier.

The task doesn't look that hard, it should be doable even for a beginner (in a week or so). A nice introduction to problem-solving machine setup.

rodw wrote: 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.


That doesn't really matter. What matter is access to general functionality ready-made libraries with the right licenses. In the aerospace field, where one cannot use non-in-house library even if it is completely free and open, you won't do it in 50 lines even if you stood on your head.

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

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

bevins wrote: 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.

What I don't understand is how it can be easier? You still have to implement the serial communication protocol, but this time on Arduino. And then you have to implement the digital input, the potentiometer input and transformation function for resistance-to-speed, error digital output for communication error and maybe more.

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


Well, if you are on foot (you have to program all of it yourself), then I would care.

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

More
7 years 6 months ago #132248 by marq_torque
Replied by marq_torque on topic RS232 Spindle control
After reading all, i find 232 communication little difficult compared to ghetto 0-10v to rs232 converter. I m in persuit of finding a friend can help me with Arduino or micro controller, also digging if i can do anything in hal and python

Thanks everyone for your inputs
Ankit

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

Time to create page: 0.429 seconds
Powered by Kunena Forum