0

I am attempting to read a RS232/USB input from a Gcode script. Is it possible to perform this from GCode or am I going to have to wrap it in python or something?

For reference, my algorithm is essentially:

-Perform some CNC movements

-Read/store/record variable from RS232 peripheral

-Repeat a bunch of times in marginally different ways

  • What information are you reading via RS232? Does it need to be read before the program starts, or could you pre-process the gcode file to populate the data before it starts. – FraggaMuffin Apr 15 '18 at 09:14

1 Answers1

2

Gcode per se doesn't support reading anything from any peripheral. Gcode is nothing more than a line-oriented textual machine command format, and is typically fed from a storage medium or file into an interpreter. This interpreter determines the axes movements, usually incorporating some trajectory planner. Then the interpreter emits signals to a peripheral device (LPT port, special card, etc.) that are fed to motor controllers. So without more details, based on your question, I think you're going to need something else to handle any serial connection. If you could clarify or add more details a solution may become apparent.

TomServo
  • 7,248
  • 5
  • 30
  • 47