Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: scope.commands.measurement.deleteall.write() can not work on MSO5 #280

Open
HippeLv opened this issue Aug 22, 2024 · 3 comments
Open
Labels
bug Something isn't working SCPI Standard Commands for Programmable Instruments

Comments

@HippeLv
Copy link

HippeLv commented Aug 22, 2024

Description of the bug

scope.write("MEASurement:DELete:ALL")
scope.write("MEASUREMENT:DELETEALL")
scope.commands.measurement.deleteall.write()
scope.commands.measurement.delete.write(num_measurements)
all the upper commends can't work effectively on MSO5

Steps To Reproduce

1.connect to the ocs using IP
2.set meausrement on the MSO5
3.run the upper commend to delete the measurement, none of them works.

from tm_devices import DeviceManager
from tm_devices.drivers import MSO5
from tm_devices.helpers import PYVISA_PY_BACKEND
import time

with DeviceManager(verbose=True) as device_manager:
    # Enable resetting the devices when connecting and closing
    device_manager.setup_cleanup_enabled = True
    device_manager.teardown_cleanup_enabled = True

    # Use the PyVISA-py backend
    device_manager.visa_library = PYVISA_PY_BACKEND

    # Creating Scope driver object by providing ip address.
    scope: MSO5 = device_manager.add_scope("192.168.1.100",alias="scope1") 
    print(scope) # print scope relagated information


    print("add measurement manually and then press Enter to continue...")
    input()


    time.sleep(2)


    list_measurements = scope.commands.measurement.list.query()
    print(list_measurements)
    num_measurements = len(scope.commands.measurement.list.query().split(","))
    print(num_measurements)
    try:
        #scope.write("MEASurement:DELete:ALL")  # CANNOT DELETE ALL MEASUREMENTS
        #scope.write("MEASUREMENT:DELETEALL")  # CANNOT DELETE ALL MEASUREMENTS
        #scope.commands.measurement.deleteall.write()  # CANNOT DELETE ALL MEASUREMENTS
        #scope.commands.measurement.delete.write(num_measurements)# CANNOT DELETE ALL MEASUREMENTS
    except Exception as e:
        print(f"Error executing command: {e}")
    print("Executing deleteall command...")
    time.sleep(200)        

Environment Information

No response

Additional Information

No response

@HippeLv HippeLv added the bug Something isn't working label Aug 22, 2024
@nfelt14
Copy link
Collaborator

nfelt14 commented Aug 22, 2024

@HippeLv, can you edit the description to include the code as text instead of an image? That way it can be copy-pasted to verify and try to solve the issue.

@nfelt14 nfelt14 added the SCPI Standard Commands for Programmable Instruments label Aug 22, 2024
@HippeLv
Copy link
Author

HippeLv commented Aug 23, 2024

delete all test case in scope.txt

all the commands in the try: part doesn't work.

@nfelt14
Copy link
Collaborator

nfelt14 commented Aug 26, 2024

delete all test case in scope.txt

all the commands in the try: part doesn't work.

I copied the contents of the txt file into the main issue description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SCPI Standard Commands for Programmable Instruments
Projects
None yet
Development

No branches or pull requests

2 participants