Bug #63

First power and Speed setting seem to be ignored

Added by t-oster over 10 years ago. Updated about 10 years ago.

Target version:
Start date:
Due date:
% Done:



Steps to reproduce:
- Power on your Lasercutter
- Send the attached LGC file (a simple job which contains lines with 2 different powers: 98% and 2%)

Result: Everything works as excpected.

- Send the same file again

Result: The job is executed with the same power (2%) for all lines.

laos.lgc (250 Bytes) t-oster, 2012-12-27 14:59

laos.lgc (278 Bytes) t-oster, 2012-12-27 16:00

laoslaser-29-12-2012.bin (147 KB) peter, 2012-12-29 13:31


#1 Updated by t-oster over 10 years ago

If I re-send the speed and frequency on every power-change (see attached LGC file), it works. Seems as if there is some bug in the firmware, which expects always getting speed,power,frequency in the same order.

#2 Updated by t-oster over 10 years ago

I'm trying to track down the bug. It seems as if the first "7 101 XXX" line in my files is not recognized, if the job is not the first one. It starts with the last power from the last job. Further "7 101" statements seem to be read correctly.

I am now able to compile the source on my own, so I will send a pull-request, as soon as I found the bug. Also there are a number of "break" statements missing in the LaosMotion.cpp... but they don't seem to do any harm as far as I can tell.

BTW: I'm using the firmware without a display.

#3 Updated by t-oster over 10 years ago

I think there is a general bug, which causes the beginning of all not-first files to be misinterpreted.
I can see the following behavior:
  • Laser powered on
    • laser moves to home (top-right in my case)
  • Send a job containing 2 rectangles with different power
    • laser executes job properly
    • laser moves to rest (top-left in my case)
  • Send same job again
    • laser moves to (0,0) (lower-left in my case) !!!! why?
    • laser executes job, but both rectangles with the power of the second rectangle
    • laser moves to rest (top-left in my case)

If I continue sending this job, the behavior stays the same.
My guess is, that there is some problem with reading the file, such that the first lines somehow yield the "goto 0,0" and the power is ignored. Or is the going to 0,0 somewhere in the code? I can't find it.

#4 Updated by t-oster over 10 years ago

  • Status changed from New to In Progress
  • Priority changed from Urgent to High

I added a workaround in LibLaserCut/VisiCut, which causes the first "7 101" aka setPower command to be sent twice. This seems to work around this bug. However, it still moves to (0,0) so I guess the bug can be found there. May have something to do with the LAOS-FileSystem (just a wild guess).

#5 Updated by t-oster over 10 years ago

  • Subject changed from Laser power is only correct in the first job to First power and Speed setting seem to be ignored

The same seems to happen to the speed

#6 Updated by peter about 10 years ago

Problem is confirmed. Only happens on systems without a display.

Cause: State of the motion system was not reset after a job.
Fixed with this commit:
Attached compiled binary.

#7 Updated by t-oster about 10 years ago

  • Status changed from Resolved to Closed

I can confirm, that it works correctly now.

Also available in: Atom PDF