Sending gcode to a RepRap Printer? September 28, 2012 06:57AM |
Registered: 12 years ago Posts: 28 |
Re: Sending gcode to a RepRap Printer? September 28, 2012 08:22AM |
Registered: 15 years ago Posts: 3,742 |
Re: Sending gcode to a RepRap Printer? September 28, 2012 09:55AM |
Registered: 14 years ago Posts: 7,616 |
Quote
how do you recommend sending a gcode to the printer once it is ready as an array of string
Generation 7 Electronics | Teacup Firmware | RepRap DIY |
Re: Sending gcode to a RepRap Printer? September 28, 2012 11:14AM |
Registered: 15 years ago Posts: 3,742 |
Quote
how do you recommend sending a gcode to the printer once it is ready as an array of string
Re: Sending gcode to a RepRap Printer? September 28, 2012 05:09PM |
Registered: 15 years ago Posts: 376 |
Re: Sending gcode to a RepRap Printer? September 29, 2012 07:05PM |
Registered: 12 years ago Posts: 28 |
Re: Sending gcode to a RepRap Printer? September 29, 2012 07:27PM |
Registered: 15 years ago Posts: 376 |
Re: Sending gcode to a RepRap Printer? September 29, 2012 07:41PM |
Registered: 12 years ago Posts: 28 |
Re: Sending gcode to a RepRap Printer? September 30, 2012 08:35AM |
Registered: 15 years ago Posts: 376 |
Re: Sending gcode to a RepRap Printer? October 14, 2012 06:01PM |
Registered: 12 years ago Posts: 28 |
//Fields List myReceivedLines = new List(); //subscriber method for the port.DataReceived Event private void DataReceivedHandler(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { SerialPort sp = (SerialPort)sender; while (sp.BytesToRead > 0) { try { myReceivedLines.Add(sp.ReadLine()); } catch (TimeoutException) { break; } } } protected override void SolveInstance(IGH_DataAccess DA) { string selectedportname = default(string); DA.GetData(1, ref selectedportname); int selectedbaudrate = default(int); DA.GetData(2, ref selectedbaudrate); bool connecttodevice = default(bool); DA.GetData(3, ref connecttodevice); bool homeall = default(bool); DA.GetData(5, ref homeall); SerialPort port = new SerialPort(selectedportname, selectedbaudrate, Parity.None, 8, StopBits.One); port.DtrEnable = true; port.Open(); if (connecttodevice == true) { port.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler); DA.SetDataList(0, myReceivedLines); } if (homeall == true) { port.Write("g28"); } }
Re: Sending gcode to a RepRap Printer? October 15, 2012 11:57AM |
Registered: 12 years ago Posts: 28 |
Re: Sending gcode to a RepRap Printer? October 17, 2014 04:02PM |
Registered: 10 years ago Posts: 1 |