G1 command through terminal?

What is the problem?

G1 command has random behavior when sent through Octoprint Terminal

What did you already try to solve it?

Tried sending a G1 command through terminal using various means and applications, such as OctoRemote, Printoid Premium and Octoprint Web Terminal.

Complete Logs

octoprint.log, serial.log or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support! Not log excerpts, complete logs.)

I need some guidance getting the correct log for this, I am not sure where to look.

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

This is going to be a long write.
I have a Creality CR 10 MAX with several upgrades:

  • TM3D firmware (Marlin 2.0.5)
  • Direct Drive upgrade using a Bondtech clone (Trianglelab) and a Volcano hotend
  • Pancake NEMA17 stepper

The printer works fine, prints are of decent quality, I have printed several Kg of PLA and PETG and bought a spool of ABS to try out. However, with the Direct Drive upgrade, I have noticed some quality degrading especially when using sharp corners (90 degrees etc), and determined I should finally start investigating acceleration and jerk settings tuning.
Upon watching Teaching Tech's video I have been reading this great article which tells me how to determine maximum flow rate for my setup. I have a ballpark estimation already but wanted to be sure the values are correct. The first step was simple enough, or so I believed: send G1 commands through Terminal, to determine maximum flow rate.
My printer is connected to Octoprint through USB, and the Pi is connected to 2.4GHz wireless. I have printed many objects using this setup, all successful (except the occasional mess up), so I know for sure the issue I am about to describe is not happening while G-Code is processed.

So I went to the printer room, heated the nozzle to 200 degrees Celsius, extruded 50mm using printer's interface, pulled out my phone (I have OctoRemote and Printoid Pro installed and configured on it), and sent the following command through Printoid terminal:
G1 E100 F180
Received response from printer:
ok P6 B3
...and nothing happened.

Tried again, same command, the extruder started running... in reverse, pulling filament out.
For each G1 command using only the parameters above (various values, e.g. G1 E73 F360, etc), the following outcomes are possible:

  1. Nothing happens. Command apparently goes through, I receive the OK response, but extruder doesn't budge
  2. Extruder moves in reverse, pulling filament out.
  3. Extruder moves in the correct direction, but at either different speed, for a different length or both.
  4. A combination between 2 and 3.

I have tested using the Terminal functionality from Octoremote app, Printoid Pro app and Octoprint Web Interface app. All of them yield the same random results.
I have manually created a GCode file containing "G1 E100 F360" and printed it from OctoPrint with the correct result. The same command sent through Terminal is not working as expected (see the outcomes above).

Terminal log excerpt below:

Recv: Not SD printing
Recv: wait
Recv:  T:195.94 /200.00 B:28.50 /0.00 @:77 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:196.36 /200.00 B:28.50 /0.00 @:75 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:197.27 /200.00 B:28.50 /0.00 @:65 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:198.18 /200.00 B:28.50 /0.00 @:57 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:198.66 /200.00 B:28.50 /0.00 @:56 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:199.26 /200.00 B:28.50 /0.00 @:52 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:199.57 /200.00 B:28.50 /0.00 @:52 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:49 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:53 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.17 /200.00 B:28.50 /0.00 @:51 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.56 /200.00 B:28.50 /0.00 @:46 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.56 /200.00 B:28.50 /0.00 @:48 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.56 /200.00 B:28.50 /0.00 @:49 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.56 /200.00 B:28.50 /0.00 @:49 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.56 /200.00 B:28.50 /0.00 @:49 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.56 /200.00 B:28.50 /0.00 @:48 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.56 /200.00 B:28.50 /0.00 @:48 B@:0
Recv: Not SD printing
Recv: wait
Send: G1 E50 F360
Recv: ok P6 B3
Recv: Not SD printing
Recv:  T:200.52 /200.00 B:28.47 /0.00 @:48 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:200.35 /200.00 B:28.50 /0.00 @:51 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:56 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:199.97 /200.00 B:28.50 /0.00 @:54 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:199.55 /200.00 B:28.50 /0.00 @:60 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:199.09 /200.00 B:28.50 /0.00 @:66 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:199.09 /200.00 B:28.50 /0.00 @:64 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:199.09 /200.00 B:28.50 /0.00 @:64 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:199.26 /200.00 B:28.50 /0.00 @:61 B@:0
Recv: wait
Recv: Not SD printing
Recv: Not SD printing
Recv: wait
Recv:  T:199.60 /200.00 B:28.50 /0.00 @:56 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:52 B@:0
Recv: Not SD printing
Recv: wait
Recv: wait
Recv: Not SD printing
Recv:  T:200.56 /200.00 B:28.50 /0.00 @:45 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:201.01 /200.00 B:28.50 /0.00 @:39 B@:0
Recv: wait
Recv: Not SD printing
Send: G1 E50 F360
Recv: ok P7 B3
Recv: Not SD printing
Recv:  T:201.11 /200.00 B:28.50 /0.00 @:40 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:201.11 /200.00 B:28.50 /0.00 @:41 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:200.76 /200.00 B:28.50 /0.00 @:47 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:200.56 /200.00 B:28.50 /0.00 @:49 B@:0
Recv: wait
Recv: Not SD printing
Send: G1 E50 F360
Recv: ok P7 B3
Recv: Not SD printing
Recv: wait
Recv:  T:200.52 /200.00 B:28.50 /0.00 @:48 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:55 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:53 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:51 B@:0
Recv: Not SD printing
Recv: wait
Send: G1 E10 F360
Recv: ok P6 B3
Recv: Not SD printing
Recv:  T:200.03 /200.00 B:28.50 /0.00 @:50 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:200.45 /200.00 B:28.53 /0.00 @:43 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:200.56 /200.00 B:28.50 /0.00 @:42 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Send: G1 E10 F200
Recv: ok P6 B3
Recv:  T:200.56 /200.00 B:28.53 /0.00 @:43 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.56 /200.00 B:28.50 /0.00 @:43 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.17 /200.00 B:28.50 /0.00 @:49 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:50 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:49 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:49 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:48 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:48 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.53 /0.00 @:48 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.47 /0.00 @:48 B@:0
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv: wait
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:48 B@:0
Send: G1 E50
Recv: ok P6 B3
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:48 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:200.00 /200.00 B:28.47 /0.00 @:48 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:48 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:48 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:200.00 /200.00 B:28.50 /0.00 @:48 B@:0
Recv: wait
Recv: Not SD printing
Send: M104 S0
Recv: //action:notification TM3D Max Ready.
Recv: ok P6 B3
Recv: Not SD printing
Recv:  T:200.00 /0.00 B:28.50 /0.00 @:0 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:199.63 /0.00 B:28.50 /0.00 @:0 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:199.46 /0.00 B:28.50 /0.00 @:0 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:198.64 /0.00 B:28.50 /0.00 @:0 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:197.33 /0.00 B:28.53 /0.00 @:0 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:195.91 /0.00 B:28.53 /0.00 @:0 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:194.55 /0.00 B:28.50 /0.00 @:0 B@:0
Recv: wait
Recv: Not SD printing
Recv: wait
Recv: Not SD printing
Recv:  T:192.76 /0.00 B:28.53 /0.00 @:0 B@:0
Recv: wait

M503 output, in case it's relevant:

Send: M503
Recv: echo:  G21    ; Units in mm (mm)
Recv: 
Recv: echo:; Filament settings: Disabled
Recv: echo:  M200 D1.75
Recv: echo:  M200 D0
Recv: echo:; Steps per unit:
Recv: echo: M92 X80.00 Y80.00 Z400.00 E421.15
Recv: echo:; Maximum feedrates (units/s):
Recv: echo:  M203 X500.00 Y500.00 Z10.00 E50.00
Recv: echo:; Maximum Acceleration (units/s2):
Recv: echo:  M201 X500.00 Y500.00 Z100.00 E5000.00
Recv: echo:; Acceleration (units/s2): P<print_accel> R<retract_accel> T<travel_accel>
Recv: echo:  M204 P500.00 R1000.00 T500.00
Recv: echo:; Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> J<junc_dev>
Recv: echo:  M205 B20000.00 S0.00 T0.00 J0.06
Recv: echo:; Home offset:
Recv: echo:  M206 X0.00 Y-10.00 Z0.00
Recv: echo:; Auto Bed Leveling:
Recv: echo:  M420 S1 Z2.00
Recv: echo:  G29 W I0 J0 Z0.12949
Recv: echo:  G29 W I1 J0 Z0.01099
Recv: echo:  G29 W I2 J0 Z-0.08951
Recv: echo:  G29 W I3 J0 Z0.00749
Recv: echo:  G29 W I4 J0 Z0.14449
Recv: echo:  G29 W I0 J1 Z0.13949
Recv: echo:  G29 W I1 J1 Z0.03349
Recv: echo:  G29 W I2 J1 Z-0.02351
Recv: echo:  G29 W I3 J1 Z0.06549
Recv: echo:  G29 W I4 J1 Z0.20199
Recv: echo:  G29 W I0 J2 Z0.19599
Recv: echo:  G29 W I1 J2 Z0.06799
Recv: echo:  G29 W I2 J2 Z-0.02651
Recv: echo:  G29 W I3 J2 Z0.06899
Recv: echo:  G29 W I4 J2 Z0.13149
Recv: echo:  G29 W I0 J3 Z0.34649
Recv: echo:  G29 W I1 J3 Z0.21399
Recv: echo:  G29 W I2 J3 Z0.06149
Recv: echo:  G29 W I3 J3 Z0.12649
Recv: echo:  G29 W I4 J3 Z0.17849
Recv: echo:  G29 W I0 J4 Z0.43349
Recv: echo:  G29 W I1 J4 Z0.24799
Recv: echo:  G29 W I2 J4 Z0.08949
Recv: echo:  G29 W I3 J4 Z0.09849
Recv: echo:  G29 W I4 J4 Z0.18099
Recv: echo:; PID settings:
Recv: echo:  M301 P16.83 I1.00 D71.01
Recv: echo:  M304 P690.34 I111.47 D1068.83
Recv: echo:; Power-Loss Recovery:
Recv: echo:  M413 S0
Recv: echo:; Z-Probe Offset (mm):
Recv: echo:  M851 X-41.40 Y-10.00 Z-1.45
Recv: echo:; Filament load/unload lengths:
Recv: echo:  M603 L600.00 U700.00
Recv: echo:; Filament runout sensor:
Recv: echo:  M412 S1 D5.00

I am puzzled as to what exactly is causing the G1 command to act completely randomly when sent to the printer. Any pointers to resolving this will be much appreciated!

There are two modes for interpreting coordinates sent via a G1 command, relative and absolute. These are controlled by the G90 and G91 commands (see Marlin G-code for descriptions of these commands). Furthermore, filament extrusion (the E parameter on the G1 command) can be either relative or absolute controlled by the M82 and M83 commands.

You either need to know the default state(s) of the firmware or you should set the state(s) with the above commands before issuing G1 commands. The "randomness" probably occurs because some other gcode sent to the printer changed the state(s) behind your back.

There is no other Gcode sent to my printer. It's idling, no printing in progress. Regardless of the printer state, the commands I am sending should be consistent with that state, which doesn't change (see terminal log, there is no other code being sent, unless the printer sets it itself stealthily and doesn't send the answer back, which is a big problem if so).
I have checked and the printer is consistently in Absolute mode when idling.
Regardless I will try again and post the terminal log.