Skip to main content

Python API for VibrationVIEW software

Project description

VibrationVIEW Python API

A Python API wrapper for interfacing with Vibration Research Corporation's VibrationVIEW software.

PyPI version License: MIT

Overview

This package provides a Python interface to VibrationVIEW, allowing for:

  • Test automation and control (start, stop, pause)
  • Data acquisition and analysis
  • Window management
  • Channel configuration
  • Input/output monitoring
  • File operations
  • Specialized test controls (e.g., sine sweep functions)

The API wraps the COM interface provided by VibrationVIEW to enable seamless integration with Python scripts and applications.

Installation

pip install vibrationview-api

Requirements

  • Windows operating system (compatible with Windows 10 and Windows 11)
  • VibrationVIEW software installed
  • VibrationVIEW automation option (VR9604) - OR - VibrationVIEW may be run in Simulation mode without any additional hardware or software
  • Python 3.7 or higher
  • pywin32 (automatically installed as a dependency)
  • psutil (automatically installed as a dependency)

Quick Start

from vibrationviewapi import VibrationVIEW

# Test basic functionality
try:
    # Connect to VibrationVIEW
    vv = VibrationVIEW()
    
    # Print connection status
    if vv.vv is None:
        print("Failed to connect to VibrationVIEW")
    else:
        print("Connected to VibrationVIEW")
        
        # Get software version
        version = vv.GetSoftwareVersion()
        print(f"VibrationVIEW version: {version}")
        
        # Get hardware info
        input_channels = vv.GetHardwareInputChannels()
        output_channels = vv.GetHardwareOutputChannels()
        print(f"Hardware: {input_channels} input channels, {output_channels} output channels")
        
except Exception as e:
    print(f"Error: {e}")
finally:
    # Clean up resources
    if 'vv' in locals() and vv is not None:
        vv.close()
        print("Connection closed")

## Key Features

### Test Control
- Open, start, stop, and pause tests
- Run tests from specified file paths
- Monitor test status

### Data Acquisition
- Retrieve vector data (time, frequency, waveform)
- Get channel readings and control values
- Access vector properties (units, labels, length)

### Window Management
- Minimize, maximize, restore and activate application windows
- Control window state programmatically

### Channel Configuration
- Read and configure channel settings
- Access TEDS data
- Configure input properties (sensitivity, coupling, etc.)

### Sine-Specific Functions
- Control sweep direction and rate
- Adjust sweep and demand multipliers
- Hold at specific frequencies or resonances

### File Operations
- Save test data
- Export data to various formats using the command-line utilities

## API Documentation

For detailed documentation of all available methods, please visit:
[VibrationVIEW API Documentation](https://www.vibrationresearch.com/vibrationview-api/)

## Examples

### Running a Sine Test and Recording Data

```python
from vibrationviewapi import VibrationVIEW
import time
import os

# Connect to VibrationVIEW
vv = VibrationVIEW()

# Open a sine test
vv.OpenTest("C:\\VibrationVIEW\\Profiles\\sine_sweep.vsp")

# Start the test
vv.StartTest()

# Wait for test to enter running state
time.sleep(2)

# Start recording
vv.RecordStart()

# Let test run for 30 seconds
time.sleep(30)

# Stop recording
vv.RecordStop()

# Get the recording filename
recording_file = vv.RecordGetFilename()
print(f"Recording saved to: {recording_file}")

# Stop the test
vv.StopTest()

Accessing Channel Information

from vibrationviewapi import VibrationVIEW

# Connect to VibrationVIEW
vv = VibrationVIEW()

# Get number of hardware channels
num_channels = vv.GetHardwareInputChannels()
print(f"Hardware has {num_channels} input channels")

# Print information for each channel
for i in range(num_channels):
    channel_num = i + 1  # 1-based for display
    label = vv.ChannelLabel(i)
    unit = vv.ChannelUnit(i)
    sensitivity = vv.InputSensitivity(i)
    
    print(f"Channel {channel_num}:")
    print(f"  Label: {label}")
    print(f"  Unit: {unit}")
    print(f"  Sensitivity: {sensitivity}")
    
    # Try to get TEDS information if available
    teds_info = vv.Teds(i)
    if teds_info and teds_info[0] and "Teds" in teds_info[0]:
        print(f"  TEDS data available: {len(teds_info[0]['Teds'])} entries")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vibrationview_api-0.1.6.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vibrationview_api-0.1.6-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file vibrationview_api-0.1.6.tar.gz.

File metadata

  • Download URL: vibrationview_api-0.1.6.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for vibrationview_api-0.1.6.tar.gz
Algorithm Hash digest
SHA256 914577f775334c91390ab37320bd557cc8159c2f849b8e51219dd543d15a4a9e
MD5 592b7bdf8c04136c499df624ba09d887
BLAKE2b-256 e02af2007d8e44eb59f13c574d8c037313f4501c5ad68fa664c48462453b5d6d

See more details on using hashes here.

File details

Details for the file vibrationview_api-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for vibrationview_api-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c79e6f14af975d99c613b708a6b88640123f373281daa8de5d715e6697021eab
MD5 97a2cd5c57008f545cf94f4fdd5df4f8
BLAKE2b-256 8f3aa8d38e27532f15440c274217b26c60786d3d9917e2edd53bd1fc5b5a12fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page