Jump to content
Private Messaging is activated - check "How to" on how to disable it ×

How to programmatically trigger Zeiss dialog's abort function


---
 Share

Recommended Posts

Hi everyone,


I'm working on implementing a stop feature that monitors a PLC signal. When the signal is triggered, I want to automatically stop any running Zeiss software commands. I know there's an abort button in the Zeiss dialog that can stop running commands. I'd like to trigger this abort function programmatically when a PLC signal is detected.

Here's my current code for monitoring the PLC signal:

def monitor_stop_signal():
    while True:
        try:
            if read_plc_bool(plc_client, 'Q', 600, 0):
                print("Stop signal triggered!")
                """Abort here"""
                os._exit(0)
        except Exception as e:
            print(f"Stop signal monitoring error: {e}")
            break
        time.sleep(0.1)   
        
# Start monitoring thread
monitoring_thread = threading.Thread(target=monitor_stop_signal, daemon=True)
monitoring_thread.start()


Is there a way to programmatically trigger the dialog's abort function when the PLC signal is detected? How can I call this abort function from my code?
Thank you for your help

Edited
Link to comment
Share on other sites

  • 3 weeks later...

Hi

Please sign in to view this username.

,

do you want to stop your ZEISS INSPECT Python script or are you looking for a generic method for stopping a ZEISS INSPECT command?

Best regards,

Matthias

 

Link to comment
Share on other sites

Hi 

Please sign in to view this username.

,


I'm looking for a generic method to stop ZEISS INSPECT commands. Right now, even if I send a stop signal during the scan, it will still finish the whole scan before processing my signal. I want to be able to abort the scan immediately when I need to stop it, just like an abort button does. However, I don't know how to use commands to trigger the same action as the abort button. Do you have any suggestions?

Link to comment
Share on other sites

Go to the Python editor. Create a new script. Hit record. Start a process. Hit abort. Stop recording. What does the script say?

Edited
Link to comment
Share on other sites

Hi

Please sign in to view this username.

,

There does not seem to be an integrated solution for what you want to achieve, but you could try to use PyAutoGUI · PyPI to emulate clicking the abort button (or pressing the 'ESC' key) from a Python script running externally.

Best regards,

Matthias

 

Edited
Link to comment
Share on other sites

Please sign in to view this quote.

Hello

Please sign in to view this username.

,

I already tried that before but unfortunately nothing was recorded.

Please sign in to view this quote.

Hello

Please sign in to view this username.

,

Thank you for your suggestion but due to security policies, we are unable to implement external automation tools like this. It would be very helpful if the abort function could be integrated into the system natively in the future, as it would help us avoid unnecessary waiting time during process execution.

Link to comment
Share on other sites

 Share

×
×
  • Create New...