Using a FELIX 3.0 with LabVIEW

Discussions about firmware/slicing software, tweaks and settings
Post Reply
bob75
Posts: 2
Joined: Wed Jan 10, 2018 9:26 pm

Using a FELIX 3.0 with LabVIEW

Post by bob75 » Wed Jan 10, 2018 9:41 pm

Hi,

I am trying to make a LabVIEW VI to control the build plate of a FELIX 3.0 3D printer. It's not for printing; the build plate actually makes a pretty good 2-axis mobile stage for a camera.
I am able to control the motion of the plate using some very simple G code using Repeteir-Host (eg. "G1 Y50 F200", nothing more complex than that) and this works fine, but I want to incorporate it into my LabVIEW code.

I looked into G code interpreters for LabVIEW but they all cost money.... I also tried sending G code commands directly to the instrument via serial using NI MAX.
However, since I only want linear motion along the z- and y-directions, I was thinking there must be a simpler way.

Are there any serial commands that I can send directly to the printer, to avoid using G code completely?

Or maybe I just need to add some syntax that I am missing?

Thanks,

Steve

Dreide
Posts: 176
Joined: Sun Sep 29, 2013 12:32 am
Location: Lausanne, Switzerland

Post by Dreide » Thu Jan 11, 2018 12:33 am

I don't get it. What could be simpler than sending G-code over the serial port? Or did you try and it didn't work, possibly because you forgot to end each G-code line with a line feed character (ASCII-code 10, or "\n" when using fprintf in C)? The printer firmware is a G-code interpreter. It only gets a bit more complicated when having to interpret what the printer sends back, but in simple use cases you can ignore this and just make sure to add a pause here and there to prevent the printer's G-code input queue from overflowing. If you want to see what the printer sends back, its maybe easiest to use a terminal program instead of Repetier-Host (e.g. Termite).
EDIT: The Arduino IDE provides a terminal window as well (under Tools->Serial Monitor). Importantly, you have to set the baudrate to 250'000 (or whatever you have set it to in Repetier-Host, see under Config->Printer Settings).
Felix 2.0->3.0dual * Repetier (host+firmware) * KISSlicer Pro, Simplify3D * Cubify Design

bob75
Posts: 2
Joined: Wed Jan 10, 2018 9:26 pm

Post by bob75 » Thu Jan 11, 2018 1:39 am

I tried just sending the G code directly over serial, changing the baud rate, and a few different termination characters.
It seems like simply opening the COM port connected to the printer doesn't initialise the stepper motors (I can push against the stepper motor with little resistance), but connecting to it with Repeteir-Host does.

Is there some initialisation command that Repeteir-Host sends to the printer? That may be the only thing I am missing.

Dreide
Posts: 176
Joined: Sun Sep 29, 2013 12:32 am
Location: Lausanne, Switzerland

Post by Dreide » Thu Jan 11, 2018 10:58 am

You should first verify that the serial communication is okay. Normally, upon opening the port, the printer will reset and send some messages. Then you can enter commands, e.g. "G28 X0" for homing X or "M114" for making the printer send the current coordinates. Repetier sends some initialization commands like M220, for example, to set the speed factor; but you can do well without.
I attached a screenshot showing how it should look like with Arduino's Serial Monitor. First make sure that no other program has the port open. Obviously, you first have to select the correct port in the ArduinoIDE (Tools->Port), then open the Serial Monitor (Tools->Serial Monitor) and choose "Newline" and "250000 baud" at the bottom right. The printer should reset and print some messages. You can then enter "G28 X0" at the very top and click "Send" or press "Enter" on the keyboard. This should cause the printer to home the X axis and report the current coordinates (I first did a "G28 X0", then a "M114", that is why there are two coordinate reports in the output).
Note regarding printer reset: The printer resets when it sees DTR switching from inactive to activate, which normally is the case when opening the port, even if DTR/DSR hardware handshake is disabled. When playing with your own software, you might prefer leaving DTR untouched when opening/closing the port in order to prevent the printer from resetting each time.
Attachments
Arduino Serial Monitor.PNG
Felix 2.0->3.0dual * Repetier (host+firmware) * KISSlicer Pro, Simplify3D * Cubify Design

Post Reply