Access QtSignals from external module / script #48
-
Hello everyone, I struggle to find out if and how it is possible to access QtSignals from an external python script to controll QUDI functionality from an external script. I'd like to incorporate some QUDI functionality like POIs and the Optimizer in Python Code that controls other non-QUDI hardware. Is it possible to connect a "fresh" python instance to the pyqt Signals / Threads? I started using the jupyter kernel as a "workaround" by sending manual jupyter commands via a python script, but this feels... wrong. Thank you for any help! Best wishes |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
This is might be dangerous… better call certain functions in the logic
module or hardware module..
Hundsraudigerrotzbua ***@***.***>于2023年4月25日 周二17:26写道:
… Hello everyone,
I struggle to find out if and how it is possible to access QtSignals from
an external python script to controll QUDI functionality from an external
script. I'd like to incorporate some QUDI functionality like POIs and the
Optimizer in Python Code that controls other non-QUDI hardware.
Is it possible to connect a "fresh" python instance to the pyqt Signals /
Threads? I started using the jupyter kernel as a "workaround" by sending
manual jupyter commands via a python script, but this feels... wrong.
Thank you for any help!
Best wishes
—
Reply to this email directly, view it on GitHub
<#48>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHRIQPSMYGUSBFYRVUXCUB3XC6KERANCNFSM6AAAAAAXKXEQZE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
You can import the related module ie xxx, and call the function
xxx.function (), just like you use other python modules.
Hundsraudigerrotzbua ***@***.***>于2023年4月25日 周二18:48写道:
… How would I go about this? I can't just import a function from a logic
module into a python script and call it. How do I ensure a connection to
the running QUDI Application?
—
Reply to this email directly, view it on GitHub
<#48 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHRIQPVRNZVPHGGQXP2GPFDXC6TZXANCNFSM6AAAAAAXKXEQZE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@Hundsraudigerrotzbua , did any of the answers above help you or do you need more info? Please mark an answer if it was helpful or post your solution to the problem. |
Beta Was this translation helpful? Give feedback.
I've been successfully using the rpyc client connection from outside qudi. Took me a bit of tinkering, as the documentation wasn't too explicit, but managed to get it working like this:
Its neither the prettiest and might be prone to errors, but it works like…