sebleedelisle / ofxLaser

An openFrameworks addon for controlling multiple lasers.
Mozilla Public License 2.0
258 stars 32 forks source link

Resets, blanks and laser shutter clicking with etherdream 2 and 4 on macbook pro #51

Open robin-price opened 2 weeks ago

robin-price commented 2 weeks ago

I'm compiling just the hello laser but I get the same in my own code. I can hear the blanking shutter click and the green box next to the etherdream name turns red. This happens once every few seconds when something is being drawn and constantly if the screen is blank (like it is at the beginning of my own code). Changing the point rate seems to improve things a little when drawing is taking place but the problem never goes away completely and is always present when the laser is not drawing anything.

I get this with either my etherdream 2 or my etherdream 4 talking to a clubmax 6800 with saturn galvos that go to 60k. I'm still in bigsur and using of_0.12 and the latest ofxLaser. The laser displays all its internal test displays flawlessly.

I'm starting to wonder if its my usb-c to ethernet converyer and will rule that out next.

Can I ask a dumb question, what is my network topology supposed to look like? The etherdream manual says that if it can't connect over DHCP it will self assign and advertise on port whatever, ofxLaser will detect it but it never connects. I normally just manually assign ips to both the ethedream and the mac.

[notice ] RESET DAC--------------------------------: -26284 23059 0 0 0 framePoints size :1 buffered points size : 0 [notice ] sendPrepare() [notice ] waitForAck('p') success: [notice ] sendBegin() [notice ] response : I command : d

protocol : 0 light_engine_state : ready 0 playback_state : idle 0 source : 0 light_engine_flags : 00000 playback_flags : 000 shutter : open underflow : false e-stop : false source_flags : 0 buffer_fullness : 670 point_rate : 0 point_count : 55016039

sebleedelisle commented 2 weeks ago

Hi Robin,

the symptoms you're getting are usually caused by some kind of network issue and therefore a buffer under-run (or sometimes in rarer cases, very poor CPU performance but that's usually only if your computer is very old and would be indicated by a very slow oF frame rate).

It can be caused by the USB-C network dongle for sure. Or a dodgy network cable.

A note about point rate - you do not need to increase the point rate to match those of your scanners, you can run them at 30,000pps and increase the speed setting for the laser - it has the same effect as running the scanners at 60k, but with less bandwidth.

Re topology I always put a router on the network and use DHCP to assign IP addresses but manually assigning addresses should also work.

Let me know if you figure it out!

Seb

robin-price commented 2 weeks ago

So running 200% speed at 30k is the same as running 100% at 60k but with less bandwidth? Good to know.

I'm going to try and get an apple approved ethernet dongle as after running inet in the terminal while the program is running I can see the Ierrs stat ratcheting up in real time so something feels off there. Will let you know if that sorts it. Will also try the code on the raspberry pi 5 and see if it is any better coming out of that ethernet port, I've had much more luck compiling the latest version on that platform after a little libusb wrangling.

Name       Mtu   Network       Address            Ipkts Ierrs    Opkts Oerrs  Coll Drop
en9   1500  <Link#22>   20:7b:d2:ca:ab:e9  2570302     0  4837554   211     0   4
en9   1500  fe80::142d: fe80:16::142d:7eb  2570302     -  4837554     -     -   -
en9   1500  192.168.2     192.168.2.1      2570302     -  4837554     -     -   -

One last question do you have any experience what the difference is between the etherdream 2 and the 4? I'm trying to workout if it's worth upgrading my 2 but until I get rid of the under run problem I can't really compare the two DACS

sebleedelisle commented 2 weeks ago

The main difference between the 2 and the 4 (apart from hardware, on-board sockets, physical size etc) is that the 4 has a bigger buffer size.

On Wed, 6 Nov 2024 at 15:36, Robin Price @.***> wrote:

So running 200% speed at 30k is the same as running 100% at 60k but with less bandwidth? Good to know.

I'm going to try and get an apple approved ethernet dongle as after running inet in the terminal while the program is running I can see the Ierrs stat ratcheting up in real time so something feels off there. Will let you know if that sorts it. Will also try the code on the raspberry pi 5 and see if it is any better coming out of that ethernet port, I've had much more luck compiling the latest version on that platform after a little libusb wrangling.

Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll Drop en9 1500 <Link#22> 20:7b:d2:ca:ab:e9 2570302 0 4837554 211 0 4 en9 1500 fe80::142d: fe80:16::142d:7eb 2570302 - 4837554 - - - en9 1500 192.168.2 192.168.2.1 2570302 - 4837554 - - -

One last question do you have any experience what the difference is between the etherdream 2 and the 4? I'm trying to workout if it's worth upgrading my 2 but until I get rid of the under run problem I can't really compare the two DACS

— Reply to this email directly, view it on GitHub https://github.com/sebleedelisle/ofxLaser/issues/51#issuecomment-2460093775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA3CETDDXDEN4Q4CMDPTKTZ7IZRRAVCNFSM6AAAAABRE3WQOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRQGA4TGNZXGU . You are receiving this because you commented.Message ID: @.***>