Python Forum
Automation of GUI by python function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automation of GUI by python function
#1
Hello,
I need to find a way to automate a repetitive process in the GUI of our experimental setup. Some research suggested me to use 'Pyautogui' library, but wasn't fully sure if that will be enough.
So, we need to ask our ThorLab optical camera to capture the image from a DMD (a digital micromirror device (MEMS)) device at a certain repetition rate (let's say half a second or so), while changing different parameters in the GUI like- threshold, slit sizes and pinhole sizes (all by automatic control). Can anyone please help with the coding and related ideas?
Thanks!
Reply
#2
Looking at the Thorlabs website it looks like they have SDK's for their products. For example, these are for their compact USB cameras.

https://www.thorlabs.com/software_pages/...de=ThorCam

And ong github they have examples of how to use the SDK

https://github.com/Thorlabs

It might be easier to use the SDK and control the camera directly instead of trying to write a Python program to fiddle with the camera software GUI. It appears some people have already done som.

https://stackoverflow.com/questions/6463...hon-opencv
Reply
#3
(Aug-17-2023, 02:00 PM)deanhystad Wrote: Looking at the Thorlabs website it looks like they have SDK's for their products. For example, these are for their compact USB cameras.

https://www.thorlabs.com/software_pages/...de=ThorCam

And ong github they have examples of how to use the SDK

https://github.com/Thorlabs

It might be easier to use the SDK and control the camera directly instead of trying to write a Python program to fiddle with the camera software GUI. It appears some people have already done som.

https://stackoverflow.com/questions/6463...hon-opencv

Hi,
many thanks for your response.
Actually we can operate the camera manually with that SDK in our lab. But, at the desired experimental facility, we want to control it remotely, better to be said- to be operated automatically. That is why we were trying for that automatic option if possible to implement.

Thanks.
Reply
#4
In the software downloads, there is "Software" and "Programming Interfaces". The "Software" is what you would use to control the camera "manually". It has graphic controls for setting the camera parameters and capturing images. The "Programming Interfaces" is software that lets you write a program that does the same thing "automatically".

If you don't like operating the camera using the "Software", you can write your own program that uses the "Programming Interface" to control the camera instead. Your program can be anything you want. Maybe you hardcode the operations, or maybe you read the operations from a script. The first is easy, but you have to write a new program if you want to change parameters or sequence. The latter is more complicated, but you'll be able to write a new set of camera instructions using a text editor.
dghosal likes this post
Reply
#5
(Aug-17-2023, 02:53 PM)deanhystad Wrote: In the software downloads, there is "Software" and "Programming Interfaces". The "Software" is what you would use to control the camera "manually". It has graphic controls for setting the camera parameters and capturing images. The "Programming Interfaces" is software that lets you write a program that does the same thing "automatically".

If you don't like operating the camera using the "Software", you can write your own program that uses the "Programming Interface" to control the camera instead. Your program can be anything you want. Maybe you hardcode the operations, or maybe you read the operations from a script. The first is easy, but you have to write a new program if you want to change parameters or sequence. The latter is more complicated, but you'll be able to write a new set of camera instructions using a text editor.

Hi, just to let you know that I found another solution using tkinter, to create a GUI with a button that executes a loop with different parameters. That might serve the automation process.
Thanks again
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  home automation using python barryjo 1 1,201 Jul-24-2022, 09:09 PM
Last Post: Larz60+
  Python Help, New User, Computer Automation hexagonalyeti 2 1,668 Jun-25-2021, 11:43 AM
Last Post: hexagonalyeti
  python automation newcode 3 81,447 Feb-05-2021, 04:59 PM
Last Post: nilamo
  Automation using python Santhosh_Sangar 0 1,607 Mar-11-2020, 01:04 AM
Last Post: Santhosh_Sangar
  loop in pyautogui (python automation GUI application) pyprogrammer 0 4,809 Feb-12-2020, 02:52 PM
Last Post: pyprogrammer
  Python Based Data QA Automation tool suggestion Sonia567 1 1,998 Nov-19-2019, 04:46 PM
Last Post: Larz60+
  Create hybrid automation framework using python. janeho 2 2,440 Mar-20-2019, 05:27 PM
Last Post: DeaD_EyE
  Python automation GET/POST/REQUEST Raki 1 3,102 Sep-22-2017, 06:24 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020