Re: Pronterface Macro for Reading Data

512 views
Skip to first unread message

Gary Schwartz

unread,
Aug 15, 2012, 4:28:12 PM8/15/12
to make...@googlegroups.com
 
It looks like entering   M114    in the box in the lower right & "Send" will do the job.
 
M114: Get Current Position  This causes the RepRap machine to report its current X, Y, Z and E coordinates to the host.

For example, the machine returns a string such as:   ok C: X:0.00 Y:0.00 Z:0.00 E:0.00


On Wednesday, August 15, 2012 11:36:12 AM UTC-4, mrtm3050 wrote:
Hey All,

I'm very new to the 3D printing world but I wanted to ask if anyone has any experience writing a python MACRO that lets you read the position data of the extruder head. The examples are very minimal online and I can't really find anything to receive the serial data. I want to be able to send and receive position data through the MACRO and then send the read position data via OSC.

Thanks!

NCBob

unread,
Aug 15, 2012, 6:47:57 PM8/15/12
to make...@googlegroups.com
I think he's looking for python script to send the m114 and read the results from the serial port.

Nolan Poe

unread,
Aug 16, 2012, 4:14:03 PM8/16/12
to make...@googlegroups.com
It's pretty doable, you just have to send the command and read on the serial port. But the problem is during the print, the host software will be using the serial port. What is the application of this script?

Nolan Poe

unread,
Aug 16, 2012, 4:30:13 PM8/16/12
to make...@googlegroups.com
Wait, nevermind... totally misinterpreted this. OP wants to make a plugin/macro for pronterface. I can't really offer any meaningful tips, other than using M114. Maybe somebody else with pronterface experience can help you out.

mrtm3050

unread,
Aug 17, 2012, 3:41:14 PM8/17/12
to make...@googlegroups.com
Thanks for the replies guys. To be clear, I'm looking to write a pronterface macro, which must be done in Python to interface with the motors, send M114 signals to the motors to change it's position for example, but most importantly, then read the current position. That's the part I don't know how to do. How do you write a macro in python that can read the current position data? This data is normally output via the serial console, I just need programmatic access to it. 

The purpose of this is to send the current position of the motors to completely separate program via a network library (Open Sound Control). 
Reply all
Reply to author
Forward
0 new messages