[Complete script] Using matlab to control Makergear
Posted: Tue Jul 18, 2017 8:57 pm
Here is the matlab code to operate makergear.
Use at your own risk!!!
https://github.com/hanmingz/matlabmakergear
=====================================original questions=============================================
Hi guys,
I'm trying to control Makergear M2 using matlab for material science specific applications. In order for the fiber in our paste to align, we need to print in a specific path. I wonder if we can use matlab to send Gcode commands to makergear via serial communication and control the printing, then we can integrate other parts of our system better.
Matlab can control an arduino, sending strings via serial communication. This matlab code on an ordinary arduino would make the arduino receive string G28.
Ideally, this should send the G28 string to home the printer, which is essentially an arduino, but the printer just blows its electronics and extruder fan and does nothing. Is there anything wrong with my understanding that the firmware is a Gcode interpreter that reads gcode via serial com? Or must connection be established in another way and firmware changes need to be made?
Thanks in advance!
Hanming
Use at your own risk!!!
https://github.com/hanmingz/matlabmakergear
=====================================original questions=============================================
Hi guys,
I'm trying to control Makergear M2 using matlab for material science specific applications. In order for the fiber in our paste to align, we need to print in a specific path. I wonder if we can use matlab to send Gcode commands to makergear via serial communication and control the printing, then we can integrate other parts of our system better.
Matlab can control an arduino, sending strings via serial communication. This matlab code on an ordinary arduino would make the arduino receive string G28.
Code: Select all
clear all
clc
arduino=serial('COM3','BaudRate',9600); % create serial communication object on port COM4
fopen(arduino); % initiate arduino communication
fprintf(arduino,'%s','G28');
pause(5);
fclose(arduino); % end communication with arduino
Thanks in advance!
Hanming