-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZMQ Serial driver #35
base: development
Are you sure you want to change the base?
Conversation
…rds on Git for now
@thomaslima @jclederman just wondering if you have some comments before I merge to development |
I think this makes sense. What happens if two Piezo controllers are connected to the same pi? Is there a way of specifying some local USB address (like the GPIB address)? I'm picturing something similar to the prologix, where there is a pi prefix, the ip address, then the local address |
Yes sorry should have linked the notebook. Look at the function call for the driver/ZMQclient here |
+1 for decentralization! This will be useful. Could you put some things in the automated test? It could be very simple like launching a server process, then pinging it at "localhost". @simbilod I have just shared some code to your email with similar examples. |
@jclederman in your example you would spin two servers on two different @atait yes I was thinking about that (it's on the TODO). Thanks for the example. I will add this before I merge. |
New driver class for serial connections that occur through an intermediate server, for instance
User <--> Client (e.g. instrumentation server) <--ZMQ--> Server/controller (e.g. Raspberry PI) <--Serial/USB--> Instrument
There is also an example of a driver leveraging this (MDT693B, Thorlabs Piezo Controller)
As described in the example notebook, the user experience is setup to be identical to other lightlab drivers. The user only needs to connect the server/controller machine to the instrument, and setup passwordless SSH access from the client machine to it. Then, for the user it is as if the instrument is directly connected to the client, with simple execution such as
This is enabled by the fact that, when instanciating an instrument subclassed from this driver type, ZMQ server code is automatically uploaded and then persistently executed on the server/controller. The client can then use ZMQclient methods such as
request
andwrite
to send commands to the instrument, relayed through the server/controller. The user can then entirely focus on adapting the serial commands from the instrument manual:TODO: