Hi All,
I am a newbie to both hard- and software, so I ask for your patience…
I would like to create a glue dispenser using the SBoard, I will have two dispensing heads, like a laser engraver with two laser diodes mounted.
Obviously I want to control the dispensing action, in sync with the dispenser as it moves over the active area.
I understand that I have two options to do this:
(Please correct me when I’m off the track) Using the Switch block I can define i/o ports on the SBoard, and these I/O ports would (through a FET) turn on the laser/spindle/valve current. If I do this, then I can have G code command sent to the board, embedded into my movement control segments….and probably the synchronization is guaranteed…
I was wondering if there is another way, something like this: I issue my movement G code to the USB mounted SBoard. Depending on the system I have, the completion of this movement will take varying time. Clearly, I don’t want to start pumping the glue (turning on the laser, etc.) until I reach my desired position.
So I would like to poll the SBoard to see if the movement is completed or not and when it is done I will start manipulating my other hardware but not through the SBoard but through other interfaces…… Is this ‘polling’ possible with the SmoothieBoard?
I very much appreciate any help, even just links that point me to the right place to read.
Cheers.
Thanks bouni, if you can confirm that that would be great…
Do I understand correctly: so the SBoard is USB connected, you sending down G code to move the motors and after each move-code (or full line, perhaps with many G command on it ?) the Sboard would send back an OK?
As I understand the beauty of this controller that it thinks ahead, if it can be done, the motion is planned that consecutive move command are tide together…? or something like that… In this case when will the completion be OK-ed?
I need to synchronize some other hardware control with the motion control, and as I learnt, I can do quite a lot using the switch module to define Digital outputs, and perhaps I can define an output to be my custom, G code activatable, " I completed stuff" line from the controller…
Any further points I will very much appreciate.
Cheers
unfortunately i had no time to test over the weekend, but will do that today (hopefully).
You have several methods to run gcode, stream it over the USB (actually serial), through telnet and play it from a file placed on the SD card.
If you need a hardware signal, you could define a switch that allows you to switch on and off a output pin after each completed command.
Edit:
This is what i get if i send the commands by hand (i think its the same behavior as if you stream the commands)
picocom v1.7
port is : /dev/smoothie0
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
escape is : C-a
local echo is : yes
noinit is : no
noreset is : no
nolock is : no
send_cmd is : sz -vv
receive_cmd is : rz -vv
imap is : lfcrlf,
omap is :
emap is : crcrlf,delbs,
Terminal ready
G0 Y2000 F10000
ok
G0 Y2110 F10000
ok
Edit2:
If you play a gcode file from the SD card you can send the progress command to get the current progress:
Playing /sd/servo.nc
File size 120
progress
file: /sd/servo.nc, 40 % complete, elapsed time: 35 s, est time: 72 s