RS232 Spindle control

More
7 years 6 months ago #132255 by pl7i92
Replied by pl7i92 on topic RS232 Spindle control
the spindle is 110V and got the standard UVW
so there is a pretty good chance that all the standard VFD can run it

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

More
7 years 6 months ago #132258 by marq_torque
Replied by marq_torque on topic RS232 Spindle control
I tried 3 different VFD with diff VF curve, acc settings, without even turning a single turn its getting Over current error, this spindle looks like BLDC motor to me, atleast it should run for few turns but its not turning at all, and throwing an error

Sir, its 44V 1000HZ spindle.... VFD support team from my country's authorized stockist said we cant go down this low voltage and this high frequency, VFD supply voltage is 240V single phase and output is 1000HZ max

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

More
7 years 6 months ago #132279 by bevins
Replied by bevins on topic RS232 Spindle control

Tower wrote:

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.


Maybe I should have said easier for me. I do not have experience in the areas of linuxcnc this covers, but if it is anything like some of the black holes that no one can explain, sometimes the easiest route would be to do it the fastest way possible. You can get caught up for weeks at a time trying to figure something out when it can be done a different way, maybe not the most efficient way but one that works, why not? I don't know if this is for a customer or for him, but I know what I would do. sometimes a customer doesn't want to wait an extra 2 weeks or maybe months. Just saying.

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

More
7 years 2 months ago #143511 by marq_torque
Replied by marq_torque on topic RS232 Spindle control
Hello everyone,

After long struggle i am successful to figure out Terminal command from Termite application in windows


A can send start stop signal and speed command in hex format.


Now can someone guide me how to connect python with Ini, Hal files so it can communicate with this driver.


Thanks in advance
Ankit,

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

More
7 years 2 months ago #143600 by andypugh
Replied by andypugh on topic RS232 Spindle control
Sounds like a job for a Python component.

linuxcnc.org/docs/2.8/html/hal/halmodule.html

Create pins to accept the spindle speed and (potentially) on/off commands, and to supply any data back from the drive that you might get. Then inside the Python code format the command strings and output them to the chosen serial port.

That last bit is a bit handwavey, I haven't tried sending data to the serial port from Python, but the internet can probably help.
www.google.com/search?q=python+linux+serial+example

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

More
6 years 11 months ago #151315 by ississ
Replied by ississ on topic RS232 Spindle control
Serial communication from python is quite simple (altough I may be a bit late now).

I made a tool changer controller for my lathe with an atmega88 (little brother to atmega 328 used in Arduino). The controller accepts normal Tx and M6 commands on serial line and responds with OK or ERROR (timeouts, etc).
This is driven from linuxcnc/AXIS with a python module.

Just in case someone is interested I'll attach the code as an example.
ini:
Code:
[SERIAL_TOOLCHANGE] # Custom toolchange controller on serial port SERIAL_PORT = /dev/ttyS0 SERIAL_SPEED = 9600 MIN_TOOL = 1 MAX_TOOL = 8 FAKE_TOOL = 9

hal:
Code:
loadusr -W /linuxcnc/bin/hal_serialtoolchange net tool-change-request iocontrol.0.tool-change => hal_serialtoolchange.change net tool-change-confirmed iocontrol.0.tool-changed <= hal_serialtoolchange.changed net tool-number iocontrol.0.tool-prep-number => hal_serialtoolchange.number net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

And the python toolchange controller (.txt added to be able to attach):

File Attachment:

File Name: hal_serial...ange.txt
File Size:8.87 KB
The following user(s) said Thank You: andypugh, tommylight

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

Time to create page: 0.378 seconds
Powered by Kunena Forum