Skip to content

Fixed the Hamamatsu SLM functionality, no working close function#178

Open
philip-rk wants to merge 2 commits intoholodyne:mainfrom
philip-rk:main
Open

Fixed the Hamamatsu SLM functionality, no working close function#178
philip-rk wants to merge 2 commits intoholodyne:mainfrom
philip-rk:main

Conversation

@philip-rk
Copy link
Copy Markdown
Contributor

I implemented a couple minor changes in order to use the Hamamatsu SLM via USB.
In order:

  • Added an empty close function, because it needs to exist.
    I tried simply wrapping the _Close_Device() function, but that didn't completely work, i.e. I couldn't reopen the slm.
  • Fixed the type conversion of the mode variable
  • Fixed the array_size
    I also replaced line 176 [array = display.astype(c_uint8) # TODO: check if this is necessary] with [array = display] and it seems like the conversion isn't necessary. From what I've seen it doesn't even convert the data-type anyway.

@ichristen
Copy link
Copy Markdown
Collaborator

Hi @philip-rk , thanks much for testing this!

I added a few changes, including a close() method that I think will work according to the USB documentation.

I was wondering if you could test the following:

  • Could you test the new close method, get_temperature, and get_led_status methods?
  • Could you try to open the device with a board ID size > 1? This will help us see if supporting many SLMs at the same time is easy. n_dev, board_ids = Hamamatsu._Open_Device(bID_size=2) If this command errors with one connected SLM, then it's annoying to deal with. If it returns n_dev = 1 and fills in only the 0th index of board_ids, then we can handle it similar to other SLMs. Though the SDK is a bit odd in the sense that open opens everything, but close has an option to close a subset... How does one close one device and then reopen that device, if open expects to open all devices? This is part of the reason why the class doesn't support multiple SLMs at the moment. It's difficult for us to test these corner cases without access to the exact hardware.
  • Could you test how long it takes to send an image to the SLM over USB? If this is <<1 second, then I don't think there's a strong reason to implement the SD card methods (e.g. Check_SD_Slot) which are available to the SLM. If it's >>1 second, then I think we should implement this as well, though it falls outside the standard slmsuite SLM spec.

@ichristen
Copy link
Copy Markdown
Collaborator

Oh, also, could you list the model of SLM you're using for testing? (e.g. LCOS-SLM X15213-02).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants