Hi Chris,
We rolled back to Version 0.13.dev (2024.03.13) and it worked.
Best,
Taylor
Hi Chris,
We rolled back to Version 0.13.dev (2024.03.13) and it worked.
Best,
Taylor
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). 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
Hi Chris,
Yes, this debug version worked.
We are happy to run more tests so please feel free to send any!
Best,
Taylor
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
Hi Taylor,
I have another MWorks build for you to try (MWorks-qcualor_debug_2.dmg). 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 (1.2 KB)
Hi Chris,
I just tested both:
MWorks-qcualor_debug_2.dmg worked fine.
testLaser also worked. testLaser ran for about 5 minutes without any errors.
Thank you,
Taylor
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 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
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
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
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
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
Sure. How about Friday at 11am?
Chris
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 (1.2 KB)
Hi Chris,
We just tested using the new testLaser.m. The laser did not turn on at all.
Best,
Taylor
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
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
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
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
Sorry, but I don’t think I’m going to have time this afternoon. Can we try sometime next week?
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