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 (compatible with version 10.0 and above)
  • 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")

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 (compatible with version 10.0 and above)
  • 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")

# Get TEDS information for all channels
teds_data = vv.Teds()  # This calls the Teds method without a channel parameter to get all 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}")
    
    # Find the corresponding TEDS data for this channel
    channel_teds = next((item for item in teds_data if item.get("Channel") == channel_num), None)
    
    if channel_teds and "Teds" in channel_teds:
        teds_entries = channel_teds["Teds"]
        print(f"  TEDS data available: {len(teds_entries)} entries")
        
        # List all TEDS entries
        print("  TEDS entries:")
        for key, value in teds_entries:
            print(f"    {key}: {value}")
    else:
        print("  No TEDS data available")

Contributing

This is an official software distribution repository maintained by Vibration Research Corporation. It is not actively monitored for community contributions. If you encounter issues or have feature requests, please contact Vibration Research Corporation directly through our support channels.

For any questions or support regarding this API, please visit our website or contact our technical support team.

License

This project is licensed under the MIT License with VibrationVIEW Attribution - see the LICENSE file for details.

Acknowledgements

  • VibrationVIEW is a registered trademark of Vibration Research Corporation.
  • This API is developed and maintained by Vibration Research Corporation.

License

This project is licensed under the MIT License with VibrationVIEW Attribution - see the LICENSE file for details.

Acknowledgements

  • VibrationVIEW is a registered trademark of Vibration Research Corporation.
  • This API is developed and maintained by Vibration Research Corporation.

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.3.tar.gz (33.5 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.3-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vibrationview_api-0.1.3.tar.gz
  • Upload date:
  • Size: 33.5 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.3.tar.gz
Algorithm Hash digest
SHA256 d5fe13593f4b6ba13af642e3ef2e76f6761b7b8c47c10a10ca042ffc90d5a139
MD5 7686c3ca5536f03c8caacb16131539f0
BLAKE2b-256 a197bb19a0b607dac69fbef84c7c372082289b414e4f384ef8dfbd66ca7fd3ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vibrationview_api-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 110bc4321c6f2848d153f2a11b8a599296fe3e545aadf8322560247603aeb340
MD5 1b6852a1c17736375e4cd49d65e59548
BLAKE2b-256 bbbbd19e941b8ef7779c6af5b098141b24d1f2d8875bbbdb9b151e9922e75d62

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