diff --git a/Scripts/Temperatur_logger.py b/Scripts/Temperatur_logger.py deleted file mode 100644 index 3d1d16e..0000000 --- a/Scripts/Temperatur_logger.py +++ /dev/null @@ -1,43 +0,0 @@ -import sys -from pathlib import Path -import threading -import queue -import paho.mqtt.client as mqtt -import time - -# Global variable to store received message -received_data = None - -def __on_connect(client, userdata, flags, rc): - print("Connected with result code " + str(rc)) - client.subscribe("test/topic") # Change this to your topic - -def __on_message(client, userdata, msg): - global received_data - received_data = msg.payload.decode() - #TODO: Write data to pickle and in queue - print(f"Message received on {msg.topic}: {received_data}") - -def __mqtt_thread(): - client = mqtt.Client() - client.on_connect = __on_connect - client.on_message = __on_message - - client.connect("broker.hivemq.com", 1883, 60) # Replace with your broker address and port - client.loop_forever() - -def start_mqtt_in_thread(): - thread = threading.Thread(target=__mqtt_thread, daemon=True) - thread.start() - -# Example usage -if __name__ == "__main__": - start_mqtt_in_thread() - - # Simulate main thread work - while True: - if received_data: - print(f"Main thread sees data: {received_data}") - received_data = None # Reset after handling - time.sleep(1) - diff --git a/Scripts/Test_y.py b/Scripts/Test_y.py deleted file mode 100644 index 18c6276..0000000 --- a/Scripts/Test_y.py +++ /dev/null @@ -1,66 +0,0 @@ -from time import sleep -from pathlib import Path -import sys - -import pyads - - -def check_path(path_str): - try: - path = Path(path_str) - if not path.exists(): - raise FileNotFoundError(f"Path does not exist: {path_str}") - print(f"Path exists: {path_str}") - except FileNotFoundError as e: - print(f"Error: {e}") -config_path = r"C:\Users\berti_r\Python_Projects\StagePerformaceDocu\Config\config.json" -check_path(config_path) - - - -library_path = r"C:\Users\berti_r\Python_Projects\templates\motion_libs" -check_path(library_path) -sys.path.append(library_path) -measurement_mov_path = r"C:\Users\berti_r\Python_Projects\StagePerformaceDocu\Config\measurement.json" -check_path(measurement_mov_path) - - -import motionFunctionsLib as mfl -import time - - -plc = mfl.plc('5.67.222.118.1.1', 852) - -plc.connect() -axis1 = mfl.axis(plc, 1) -axis4 = mfl.axis(plc, 4) - -print(axis4.getCoupledGear1()) -axis1.setAcceleration(10000.0) -axis1.setDeceleration(10000.0) -axis1.setVelocity(3) - - -axis4.setAcceleration(10000.0) -axis4.setDeceleration(10000.0) -axis4.setVelocity(3) - - - -axis1.enableAxis() -axis4.enableAxis() -sleep(1) -print("coupling: ",axis4.getCoupledGear1()) -for i in range(3): - axis4.moveRelative(0.5) - axis1.moveRelative(0.5) - sleep(5) - axis4.moveRelative(-0.5) - axis1.moveRelative(-0.5) - sleep(5) - - - - -axis1.disableAxis() -axis4.disableAxis() diff --git a/Scripts/cureent_data_buffer.py b/Scripts/cureent_data_buffer.py deleted file mode 100644 index 2d50393..0000000 --- a/Scripts/cureent_data_buffer.py +++ /dev/null @@ -1,36 +0,0 @@ -import os -import numpy as np - -FIFO_BUFFER_SIZE = 30 - - -def write_to_fifo_file(filepath, x, y, timestamp): - """ - Appends (x, y, time) to a .dat file, keeping only the most recent FIFO_BUFFER_SIZE entries. - - Parameters: - - filepath: Path to the .dat file. - - x: X position (float) - - y: Y position (float) - - timestamp: Unix time (float or int) - """ - new_entry = np.array([[x, y, timestamp]]) - - # Load existing data - if os.path.exists(filepath): - try: - data = np.loadtxt(filepath) - if data.ndim == 1 and data.size == 3: - data = data.reshape(1, 3) - except Exception: - data = np.empty((0, 3)) - else: - data = np.empty((0, 3)) - - # Append and trim oldest if needed - data = np.vstack((data, new_entry)) - if len(data) > FIFO_BUFFER_SIZE: - data = data[-FIFO_BUFFER_SIZE:] - - # Save updated buffer - np.savetxt(filepath, data, fmt="%.6f %.6f %.6f") \ No newline at end of file diff --git a/Scripts/myAnalysis.py b/Scripts/myAnalysis.py deleted file mode 100644 index e69de29..0000000 diff --git a/notebooks/Messbericht190825.html b/notebooks/Messbericht190825.html deleted file mode 100644 index 13a15e8..0000000 --- a/notebooks/Messbericht190825.html +++ /dev/null @@ -1,7738 +0,0 @@ - - - - - -Messbericht190825 - - - - - - - - - - - - -
-
- -
- -
- -
-
- - diff --git a/notebooks/Messbericht26725.html b/notebooks/Messbericht26725.html deleted file mode 100644 index cec9319..0000000 --- a/notebooks/Messbericht26725.html +++ /dev/null @@ -1,7630 +0,0 @@ - - - - - -Messbericht26725 - - - - - - - - - - - - -
-
- -
- -
-
- - diff --git a/notebooks/example_02.png b/notebooks/example_02.png deleted file mode 100644 index f35edae..0000000 Binary files a/notebooks/example_02.png and /dev/null differ diff --git a/notebooks/sample.html b/notebooks/sample.html deleted file mode 100644 index 91225ed..0000000 --- a/notebooks/sample.html +++ /dev/null @@ -1,8595 +0,0 @@ - - - - - -sample - - - - - - - - - - - - -
-
- -
- - -
-
- -
- -
- - -
-
- -
- - -
-
- -
- - -
-
- -
- - -
- -
- -
- -
- -
-
- -