# An urgent laser issue with the new nightly build version

**URL:** <https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056>\
**Category:** Support\
**Tags:** unsolved-mystery\
**Created:** [October 30, 2024, 6:13pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056 "2024-10-30T18:13:24Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![taylor.xie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@taylor.xie](https://mworks.discourse.group/u/taylor.xie)\
**Post date:** [November 1, 2024, 4:52pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/21 "2024-11-01T16:52:47Z")

</div>

Hi Chris,

We rolled back to Version 0.13.dev (2024.03.13) and it worked.

Best,  
Taylor

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [November 1, 2024, 5:15pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/22 "2024-11-01T17:15:32Z")

</div>

Hi Taylor,

> We just tested the current nightly build. Indeed, the problem still persisted.

OK, thanks for checking.

As I mentioned earlier, I have another build for you to test ([MWorks-qcualor\_debug.dmg](https://www.dropbox.com/scl/fi/dpgblzo8ikiy05cekp7qu/MWorks-qcualor_debug.dmg?rlkey=6cyjy8h1fzwsldai2il9qqwvu&e=1&st=0zf1dypz&dl=1)). For this one, I’ve removed the recent changes to the QCUALOR interface but have left all unrelated changes intact. This should let us distinguish whether the issue is due to the QCUALOR changes (most likely) or some other change (unlikely but possible). When you have a chance, can you try it out?

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![taylor.xie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@taylor.xie](https://mworks.discourse.group/u/taylor.xie)\
**Post date:** [November 1, 2024, 6:09pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/23 "2024-11-01T18:09:51Z")

</div>

Hi Chris,

Yes, this debug version worked.

We are happy to run more tests so please feel free to send any!

Best,  
Taylor

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [November 1, 2024, 6:40pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/24 "2024-11-01T18:40:39Z")

</div>

Great, thanks. We’ve really narrowed it down now, although I’m still at a loss as to how the changes I removed are breaking things. Let me think about what to try next.

Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [November 4, 2024, 7:23pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/25 "2024-11-04T19:23:18Z")

</div>

Hi Taylor,

I have another MWorks build for you to try ([MWorks-qcualor\_debug\_2.dmg](https://www.dropbox.com/scl/fi/e74nkxfbzlflxj3x7l6x4/MWorks-qcualor_debug_2.dmg?rlkey=4oavmwikp0wjafsqovs6nkjir&st=0nuoa6sq&dl=1)). This one is identical to the current nightly build, except that starting/stopping the QCUALOR interface always configures all four channels, instead of only configuring active channels. Can you try this out when you have a chance?

If this new debug build runs without errors, then I have another test for you to try. The attached MATLAB function (`testLaser`) reproduces the sequence of QCUALOR commands from one of your error logs. The point of this is to get MWorks out of the equation and see if the laser itself is responding badly to active-channel-only configuration. To run the test, first quit MWServer, then call the function with the serial port as the only argument, e.g.

```
testLaser /dev/cu.usbserial-AR0JVL1T

```

The function will send on/off commands to the laser at 500ms intervals indefinitely. If the laser fails to respond to a command, the function will quit with an assertion failure. If there are no errors, then you’ll eventually need to quit the function with Control-C.

Thanks,  
Chris  
[testLaser.m](https://mworks.discourse.group/uploads/short-url/dkpHRSHjUjURYbhRyiT0GPXpvLB.m) (1.2 KB)

---

<div class="post-metadata">

**Author:** ![taylor.xie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@taylor.xie](https://mworks.discourse.group/u/taylor.xie)\
**Post date:** [November 4, 2024, 8:21pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/26 "2024-11-04T20:21:10Z")

</div>

Hi Chris,

I just tested both:  
[MWorks-qcualor\_debug\_2.dmg](https://www.dropbox.com/scl/fi/e74nkxfbzlflxj3x7l6x4/MWorks-qcualor_debug_2.dmg?rlkey=4oavmwikp0wjafsqovs6nkjir&st=0nuoa6sq&dl=1) worked fine.  
testLaser also worked. testLaser ran for about 5 minutes without any errors.

Thank you,  
Taylor

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [November 6, 2024, 5:28pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/27 "2024-11-06T17:28:13Z")

</div>

Hi Taylor,

Well, I’m stumped. MWorks is clearly sending and receiving commands correctly, because everything works fine for a while. It’s also clear that it’s handling the distinction between active and inactive channels correctly, because it’s sending all the commands you expect. But at some point, receipt of responses from the laser just stops, even though MWorks isn’t doing anything different.

The fact that always configuring all four channels fixes the issue strongly suggests that the laser doesn’t like when just one channel is configured at a time. But your results with the `testLaser` function don’t support that conclusion.

Is there any chance that some other application is trying to interact with the laser’s serial port? You aren’t, say, running the [Arduino IDE](https://www.arduino.cc/en/software) on that Mac?

At this point, the only solution I can suggest is making the change to always configure all four channels permanent. That will increase the time that it takes to start the laser, but at least it should work. Let me know what you think.

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![taylor.xie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@taylor.xie](https://mworks.discourse.group/u/taylor.xie)\
**Post date:** [November 6, 2024, 8:58pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/28 "2024-11-06T20:58:48Z")

</div>

Hi Chris,

“But at some point, receipt of responses from the laser just stops, even though MWorks isn’t doing anything different.” - Yes, this is what we saw. The response stopped at some point and there was no pattern to when it stopped. It is indeed very confusing.

We do not run Arduino. The only applications that MWork is connected to are EyeLink, BlackRock, and Crist reward system. We don’t think any of these would interact with laser?

We still think configuring the channels individually would be nice. However, if it is truly challenging, we are running a few more tests to see if configuring all four channels interrupts the timing of our protocols. We will discuss and get back to you ASAP.

Best,  
Taylor

---

<div class="post-metadata">

**Author:** ![taylor.xie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@taylor.xie](https://mworks.discourse.group/u/taylor.xie)\
**Post date:** [November 14, 2024, 7:42pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/29 "2024-11-14T19:42:48Z")

</div>

Hi Chris,

We did more tests with the laser and decided that it would still be nice to have each channel be configured individually.

We understand that this could be challenging but would like to follow up again to see if it is still possible and if this issue can be fixed.

Thank you!

Best,  
Taylor

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [November 14, 2024, 10:29pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/30 "2024-11-14T22:29:09Z")

</div>

Hi Taylor,

I would very much like to fix the issue, but at this point, I don’t know what else to try. Should we set up a video call to discuss?

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![taylor.xie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@taylor.xie](https://mworks.discourse.group/u/taylor.xie)\
**Post date:** [November 18, 2024, 3:26pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/31 "2024-11-18T15:26:47Z")

</div>

Hi Chris,

Yes! Does Friday work for you? Chuyi, Ahmad and I are available for a call Friday from 11AM till around 2PM.

Best,  
Taylor

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [November 18, 2024, 3:37pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/32 "2024-11-18T15:37:37Z")

</div>

Sure. How about Friday at 11am?

Chris

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [November 22, 2024, 4:25pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/34 "2024-11-22T16:25:24Z")

</div>

Hi Taylor,

Here’s the updated MATLAB script. It probably will give you the same results, but it seems worth trying.

I will make the change to MWorks to configure two channels at a time and let you know when it’s available.

Thanks,  
Chris  
[testLaser.m](https://mworks.discourse.group/uploads/short-url/fUcvixu4p174swmQEgsKVVU7EeA.m) (1.2 KB)

---

<div class="post-metadata">

**Author:** ![taylor.xie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@taylor.xie](https://mworks.discourse.group/u/taylor.xie)\
**Post date:** [November 22, 2024, 5:03pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/35 "2024-11-22T17:03:46Z")

</div>

Hi Chris,

We just tested using the new testLaser.m. The laser did not turn on at all.

Best,  
Taylor

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [November 22, 2024, 6:52pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/36 "2024-11-22T18:52:37Z")

</div>

Hi Taylor,

Literally the only change between the old and new script was the addition of a 3-second pause after opening the serial port. Does the script produce “SEND” and “RECV” messages showing that I/O is happening? Does the old version of the script turn on the laser?

Chris

---

<div class="post-metadata">

**Author:** ![taylor.xie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@taylor.xie](https://mworks.discourse.group/u/taylor.xie)\
**Post date:** [November 22, 2024, 7:15pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/37 "2024-11-22T19:15:53Z")

</div>

Hi Chris,

The new script did produce “SEND” and “RECV” messages. Same as the old one. And yes, the old script turned on the laser and was working fine.

We are trying to figure out how to give you remote control for the Mac and should get back to you soon.

Best,  
Taylor

---

<div class="post-metadata">

**Author:** ![taylor.xie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@taylor.xie](https://mworks.discourse.group/u/taylor.xie)\
**Post date:** [November 22, 2024, 7:25pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/38 "2024-11-22T19:25:40Z")

</div>

Hi Chris,

We tested two versions of the testLaser.m again with the two lasers just to make sure. Oddly, now neither of the scripts are turning on either laser.

Best,  
Taylor

---

<div class="post-metadata">

**Author:** ![taylor.xie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@taylor.xie](https://mworks.discourse.group/u/taylor.xie)\
**Post date:** [November 22, 2024, 7:45pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/39 "2024-11-22T19:45:08Z")

</div>

Hi Chris,

The remote control software we use is called AnyDesk. Our IP address is 467 425 967. One of the animals working in this rig now will be done around 4:00. I will let you know when the rig is cleared and will give you full access to it.

Best,  
Taylor

---

<div class="post-metadata">

**Author:** ![cstawarz](https://yyz1.discourse-cdn.com/flex031/user_avatar/mworks.discourse.group/cstawarz/32/3_2.png) [@cstawarz](https://mworks.discourse.group/u/cstawarz)\
**Post date:** [November 22, 2024, 7:59pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/40 "2024-11-22T19:59:18Z")

</div>

Sorry, but I don’t think I’m going to have time this afternoon. Can we try sometime next week?

---

<div class="post-metadata">

**Author:** ![taylor.xie](https://avatars.discourse-cdn.com/v4/letter/t/9fc348/32.png) [@taylor.xie](https://mworks.discourse.group/u/taylor.xie)\
**Post date:** [November 22, 2024, 8:22pm UTC](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056/41 "2024-11-22T20:22:37Z")

</div>

Hi Chris,

Yes, of course.

The rig is usually free from 1:00pm to 2:00pm or from 4:00pm until we leave around 5:00pm everyday. We can shift these times by 30 minutes earlier or later. Please let us know what works for you and we can adjust accordingly. Thank you!

Best,  
Taylor

[Previous page](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056.md?page=1)

[Next page](https://mworks.discourse.group/t/an-urgent-laser-issue-with-the-new-nightly-build-version/1056.md?page=3)
