Project

General

Profile

Actions

Bug #63

closed

First power and Speed setting seem to be ignored

Added by t-oster almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
firmware
Target version:
-
Start date:
2012-12-27
Due date:
% Done:

0%

Estimated time:

Description

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.


Files

laos.lgc (250 Bytes) laos.lgc t-oster, 2012-12-27 14:59
laos.lgc (278 Bytes) laos.lgc t-oster, 2012-12-27 16:00
laoslaser-29-12-2012.bin (147 KB) laoslaser-29-12-2012.bin peter, 2012-12-29 13:31
Actions #1

Updated by t-oster almost 12 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.

Actions #2

Updated by t-oster almost 12 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.

Actions #3

Updated by t-oster almost 12 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.

Actions #4

Updated by t-oster almost 12 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).

Actions #5

Updated by t-oster almost 12 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

Actions #6

Updated by peter almost 12 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: https://github.com/LaosLaser/Firmware/commit/afd7bf485eb7fd842b82c757de59bd6c1c0f7c0d
Attached compiled binary.

Actions #7

Updated by t-oster almost 12 years ago

  • Status changed from Resolved to Closed

I can confirm, that it works correctly now.

Actions

Also available in: Atom PDF