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.4.tar.gz (36.6 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.4-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vibrationview_api-0.1.4.tar.gz
  • Upload date:
  • Size: 36.6 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.4.tar.gz
Algorithm Hash digest
SHA256 ca0df8d3ee65e613ad21e1ec0afb0c4c937e65f364dc734b1807d3d876650acf
MD5 4b5a84568a0601114140ded40729ad82
BLAKE2b-256 60c99bcbe673e4c034f8aae6f30decfa21d4c36e14111e9fbd7df210a28f3aef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vibrationview_api-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 64ea59f6b621f0576586320bcf2d7fc1990a1f075cc109cf9a9784f0aac19987
MD5 84021c292f6c7f89cbfe34914ae9d2d9
BLAKE2b-256 baad7b21d0765090bbdbd23405ecc0a8db3de17006d5a5f2c94d704c06af5d40

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