wavefrontshaping / ALP4lib

Python control module for Vialux DMDs based on ALP4.X API.
MIT License
54 stars 37 forks source link

Use DMD in Slave Mode #24

Open dataricerunner opened 2 weeks ago

dataricerunner commented 2 weeks ago

Hi,

Thanks for creating this package! I am trying to use a Vialux DMD in slave mode such that an external trigger signal can be used to display the next image. I've seen some hints in the code about this, but I'm unsure about how to apply it. Also, do you know if there's a method to externally trigger the DMD to turn off? Would appreciate any help!

Best,

Felix & Gordon :D

cc: @roflmaostc

roflmaostc commented 1 week ago

Hi @wavefrontshaping,

I wanted to see if there is any news? Otherwise we probably use this librarry: https://gitlab.phys.ethz.ch/mohanj/holography/-/blob/096ce42d18efc5f4eda14a53013a4cffb3220830/dmd/communication.py

Best,

Felix

wavefrontshaping commented 3 days ago

Hi,

Have you check the ALP API documentation?

It seems that, according to Section 2.14 AlpProjControl of the API description, that one can change such parameters using the C function ALPProjControl, which you can call using DMD.ProjControl(...) in Python.

Never done it but according to the doc, you should simply use DMD.ProjControl(ALP_PROJ_MODE, ALP_SLAVE) to put it in slave mode.

from ALP4 import *
...
DMD.ProjControl(ALP_PROJ_MODE, ALP_SLAVE)

Of course, you should then configure the timings according to your needs.