Hi there,
Got a question, as i am getting closer to the programming and controlling my motors i have to think about controlling the motors. The first thing i did is making a program to build up the accelleration curve for starting and stopping the motor, that was realy a **** job, but it works. The next thing i need to do is controlling the stepper by pc. I did some research about the native port on the Due, Zero and the Teensy 3.6 and if im understanding it correct it can handle over the 400mbit/s, thats great!
But...
Is this direct usb or is this a serial usb connection by using the com (virtual)port?!
The thing is to drive the motors i need to send 3 bytes for doing one step at the time, why? becourse i have to control more than one moter. 2 bytes for the pulse speed and one packet as indentifier. (0-256*256 and 0-256).
The lowest pulse speed is 12uS the largest 37500uS. The problem what i have is can it be done to send a data train to the arduino and can it handle the speed?! Or should i use something like ethernet to send the data stream.
An example of the data
12us motor 1 0x01000C
12us motor 1 0x01000C
12us motor 1 0x01000C etc...
that means that the arduino must handle a HIGH and delay from 12uS en then the next so on so on. And the best language for the pc is in this case #C? or can it be done with something like Perl. I know that Perl is not able to pulse data higher than 180khz. So i dont know if it is even possible to use Perl/PHP for direct data to the motors. But #C must do!
So im not shure what the best thing is to use for direct pc control for controlling the steppers.
Pfff im a bit out of options.
Ok the arduino side,
The only thing the arduino must do is collecting 3 bytes each time, use 2 bytes for the delaytime in microSeconds. And the 3th byte for the digital port handling. thats everything the arduino must do and of course the native port handling/handshake etc...
Are there any samples to look for or is there someone who have done this?! PC -> Arduino -> Stepper?!
Motors that i user are 7x 3Nm Nema 24 Closed Loop from Leadshine running at 48-75 volt. Speeds to archive 1 to 3000rpm. (37500us -> 12us) Running on 1/8 microstepping and the greatest reduction 50:1. So the pulse train is quite large. 1 revolution = 80,000 pulses.
Thanks,
Nena
PS or should i first upload the data to an SD card and then handle it all on the arduino?! What is faster Native USB, Ethernet or SD card?!
And a New Photo from the machine im building Its taking form