Creating a Graphical User Interface for PicoScope Programming

project 1 part e4 n.w
1 / 7
Embed
Share

"Learn how to build a user interface using Qt Creator/Designer, integrate Python UI templates, implement button functions, and link actions in PicoScope programming. Includes code snippets and UI design insights."

  • User Interface
  • PicoScope Programming
  • Qt Creator
  • Python UI
  • Graphical Interface

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Project 1 Part E4 Programming PicoScope ---Graphical User Interface--- www.LEARNPIEZO.org

  2. Show the program Which includes the user interface 1- Build the user interface using Qt creator/designer 2- Use the template for the python - UI interface/connection 3- Populate the functions and the effects that the buttons and text boxes perform Different sections of code 1. create a .py file from the .ui *****2. import your packages ***** ******import your custom packages (picoscope functions) 3. import your UI ******4. Define your button functions and other functions ******5. Link the buttons to the function 6. Close out your applications

  3. functions.py # -*- coding: utf-8 -*- """ Created on Wed Apr 26 11:37:43 2017 @author: Husain """ import subprocess def getMeasurements(): #read oscilloscope output = subprocess.check_output(['picoscope','/a','Measurements.CSV?']) #split the lines of the measurements output = output.split('\n') #define space space = " " #taking the index, and splitting according to comma channelA = output[1].split(",") channelB = output[2].split(",") #taking index, and splitting according to "space" channelA = channelA[2].split(space)

  4. main.py # -*- coding: utf-8 -*- """ Created on Thu May 04 17:29:43 2017 @author: Husain """ """Section 1- create .py from .ui""" import os os.system('pyuic4 picoscope_ui.ui > picoscope_ui.py') from time import sleep #perform delay sleep(2) """Section 2 - Package import""" import csv import numpy as np #import visa import sys #from time import gmtime, strftime

  5. picoscope_ui.ui <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>MainWindow</class> <widget class="QMainWindow" name="MainWindow"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>467</width> <height>457</height> </rect> </property> <property name="windowTitle"> <string>MainWindow</string> </property> <widget class="QWidget" name="centralwidget"> <widget class="QLineEdit" name="fileName"> <property name="geometry"> <rect> <x>280</x> <y>20</y> <width>161</width>

  6. Complete zip file

More Related Content