Search Results (Searched for: )

  • karlhe
07 Nov 2025 13:34 - 07 Nov 2025 14:15
Replied by karlhe on topic booten dauert lange 1min 30 sek , alles ok
  Hallo tommy,ich habe sudo nano /etc/fstab ausgeführt und
das sieht dann so aus:
siehe Foto
der uuid  / ext4  errors=remoundas sollte der sein. der gelöscht werden kann? 
karlhe
  • meister
07 Nov 2025 12:49
Code:
outfile.seek(0) # seek to start of file (keeps only one line in the file) outfile.write(" ".join(row)) outfile.flush() # immediately write to disk / performance warning !!!
  • meister
07 Nov 2025 12:43
better use python3
Code:
#!/usr/bin/env python3 # # import linuxcnc import time stat = linuxcnc.stat() with open("position-log.txt", "w") as outfile:     while True:         stat.poll()         row = []         for n, axis in enumerate("XYZABCUVW"):             stat.actual_position[n]             row.append(f"{axis} {stat.actual_position[n]}")             #print(f"{axis} {stat.actual_position[n]}")             #outfile.write(f"{axis} {stat.actual_position[n]}\n")         print(" ".join(row))         outfile.write(" ".join(row))         outfile.write("\n")         time.sleep(0.1)
  • FPVUALAB
07 Nov 2025 12:42
Replied by FPVUALAB on topic Bricked Mesa 7i92T
Hello! Thank you for your support! I only use 7i91th.
  • fery15sty
07 Nov 2025 12:20 - 07 Nov 2025 12:29
Can someone help me create a Python script to record positions in the event of a power loss or LinuxCNC error?

I plan to create an external real-time position logger with an update interval of 0.001 seconds. I use this feature for a wirecut machine. I'm using a Python script and have tried activating log_position_to_txt.py with the M-code command, but the position logging process results in a code overflow, causing the .txt file to grow uncontrollably.

Here's the code for log_position_to_txt.py:

##############################
#!/usr/bin/env python2.7
import linuxcnc
import time

stat = linuxcnc.stat()

with open("position-log.txt", "w") as outfile:

while True:

stat.poll()
x,y,z,a,b,c,u,v,w = stat.actual_position

outfile.write("X ")
outfile.write("{:.4f}\n".format(x))
outfile.write("Y ")
outfile.write("{:.4f}\n".format(y))

time.sleep(0.001)
####################################


Can someone help me fix my Python script so that... position recording does not result in code accumulation?
Displaying 11296 - 11300 out of 11300 results.
Time to create page: 0.173 seconds
Powered by Kunena Forum