Initial commit: merge nuescan, pymso, pybbd202, and pypewpewhops into scanengine-3
- Merged four separate hardware control projects into unified platform - Created unified requirements.txt with all dependencies - Added comprehensive .gitignore - Added project overview README Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Simple test to debug query timeout issues.
|
||||
"""
|
||||
|
||||
from tektronix_base import TektronixOscilloscopeBase
|
||||
import time
|
||||
|
||||
|
||||
def main():
|
||||
"""Test simple queries with the oscilloscope"""
|
||||
|
||||
scope_ip = "192.168.10.105"
|
||||
|
||||
print(f"Connecting to oscilloscope at {scope_ip}...")
|
||||
|
||||
scope = TektronixOscilloscopeBase(resource_name=scope_ip, timeout=10.0)
|
||||
|
||||
try:
|
||||
# Connect
|
||||
scope.connect()
|
||||
print("✓ Connected")
|
||||
|
||||
# Wait a moment to ensure connection is stable
|
||||
time.sleep(0.5)
|
||||
|
||||
# Try a simple query
|
||||
print("\nSending *IDN? query...")
|
||||
idn = scope.query("*IDN?")
|
||||
print(f"✓ Response: {idn}")
|
||||
|
||||
# Try acquisition mode query
|
||||
print("\nSending ACQuire:MODe? query...")
|
||||
mode = scope.query("ACQuire:MODe?")
|
||||
print(f"✓ Current mode: {mode}")
|
||||
|
||||
# Set mode to sample using short form
|
||||
print("\nSetting mode to SAM (short form)...")
|
||||
scope.set_acquire_mode("SAM")
|
||||
|
||||
# Verify
|
||||
mode = scope.get_acquire_mode()
|
||||
print(f"✓ Mode is now: {mode}")
|
||||
|
||||
except Exception as e:
|
||||
print(f"✗ Error: {type(e).__name__}: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
finally:
|
||||
if scope.is_connected:
|
||||
scope.disconnect()
|
||||
print("\n✓ Disconnected")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user