Python API for VibrationVIEW software
Project description
VibrationVIEW Python API
A Python API wrapper for interfacing with Vibration Research Corporation's VibrationVIEW software.
Source Code: https://github.com/vibrationresearch/vibrationview-api
Overview
This package provides a thread-safe Python interface to VibrationVIEW, allowing for:
- Test automation and control (start, stop, pause, resume)
- Data acquisition and analysis (vectors, report fields, time history)
- Window management
- Channel configuration and calibration
- Input/output monitoring
- TEDS (Transducer Electronic Data Sheet) support
- Transducer database integration
- Virtual channel management
- Recording control
- Specialized test controls (e.g., sine sweep functions)
- Multi-threaded application support (Flask, web services)
The API wraps the COM interface provided by VibrationVIEW to enable seamless integration with Python scripts and applications.
Installation
pip install vibrationview-api
Note:
- Version 0.1.6 supports VibrationVIEW 2018-2025
- Version 0.1.7+ includes VibrationVIEW 2026 functionality
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)
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, pause, and resume tests
- Run and edit tests from specified file paths
- Monitor test status (running, starting, changing level, hold, open loop, aborted)
- Close tests by name or tab index
- List all open tests
Data Acquisition
- Retrieve vector data (time history, frequency, waveform)
- Get channel, control, demand, and output readings
- Access vector properties (units, labels, length)
- Report fields and vectors with history support
- Rear input monitoring
Window Management
- Minimize, maximize, restore, and activate application windows
- Send menu commands programmatically
Channel Configuration
- Read and configure channel settings
- Input calibration (sensitivity, serial number, calibration date)
- Configure input modes (power source, capacitor coupled, differential)
- Hardware capability queries
- Load input configuration files
TEDS Support
- Read TEDS data from hardware
- Verify and apply TEDS data
- Lookup transducers by URN (Unique Registration Number)
Transducer Database
- Query channel database IDs
- Retrieve transducer database records
- Check and update channel configuration from database
Virtual Channels
- Import virtual channel definitions from VCHAN files
- Remove all virtual channels
Recording
- Start, stop, and pause recordings
- Retrieve recording filenames
Sine-Specific Functions
- Control sweep direction (up/down, step up/down)
- Hold at current frequency or resonance
- Control sweep rate multiplier and amplitude multiplier
- Get/set sine frequency
System Check
- Configure system check frequency
- Set system check output voltage
Thread Safety
- Thread-safe COM object management
- Connection pooling for web applications
- Context manager support for easy resource cleanup
API Documentation
For detailed documentation of all available methods, refer to the VibrationVIEW help file included with the software. The latest version of VibrationVIEW can be downloaded from: VibrationVIEW Download
Examples
Running a Sine Test and Recording Data
from vibrationviewapi import VibrationVIEW
import time
# Connect to VibrationVIEW
vv = VibrationVIEW()
# Wait for VibrationVIEW to be ready
while not vv.IsReady():
time.sleep(0.5)
# Open a sine test
vv.OpenTest("C:\\VibrationVIEW\\Profiles\\sine_sweep.vsp")
# Start the test
vv.StartTest()
# 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
import time
# Connect to VibrationVIEW
vv = VibrationVIEW()
# Wait for VibrationVIEW to be ready
while not vv.IsReady():
time.sleep(0.5)
# 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 len(teds_info) > 0 and isinstance(teds_info[0], dict) and "Teds" in teds_info[0]:
print(f" TEDS data available: {len(teds_info[0]['Teds'])} entries")
Retrieving Report Fields
from vibrationviewapi import VibrationVIEW
import time
# Connect to VibrationVIEW
vv = VibrationVIEW()
# Wait for VibrationVIEW to be ready
while not vv.IsReady():
time.sleep(0.5)
# Open a test file
vv.OpenTest("C:\\VibrationVIEW\\Profiles\\sine_sweep.vsp")
# Get report fields - returns 2D array of (parameter, value) pairs
field_names = "ChName1,ChAcp1,ChSensitivity1,StopCode,TestType"
fields = vv.ReportFields(field_names, None)
# Print each field
for field in fields:
print(f"{field[0]}: {field[1]}")
Retrieving Report Vectors
from vibrationviewapi import VibrationVIEW
import time
# Connect to VibrationVIEW
vv = VibrationVIEW()
# Wait for VibrationVIEW to be ready
while not vv.IsReady():
time.sleep(0.5)
# Open a test file
vv.OpenTest("C:\\VibrationVIEW\\Profiles\\sine_sweep.vsp")
# Start and run the test to generate data
vv.StartTest()
time.sleep(5)
vv.StopTest()
# Get report vectors - comma-separated list of vector names
vector_names = "Index,Frequency,Demand,Control,Drive,Channel1,Channel2"
vectors = vv.ReportVector(vector_names, None)
# Get vector headers (column names and units)
headers = vv.ReportVectorHeader(vector_names, None)
column_names = headers[0] # First row contains column names
units = headers[1] # Second row contains units
# Print headers
for i, name in enumerate(column_names):
print(f"{name} ({units[i]})")
# Print first few data rows
for row in vectors[:5]:
print(row)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vibrationview_api-0.1.14.tar.gz.
File metadata
- Download URL: vibrationview_api-0.1.14.tar.gz
- Upload date:
- Size: 64.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9682b32b58595998b8cfe75b9df64424252b2d17b573a91668a8f5cb212fe139
|
|
| MD5 |
2ed4f5b1dc23112669331d9e27d76700
|
|
| BLAKE2b-256 |
a1685492aa7808c16d5f0c338d70d274f09d6f3a630c18c5d46cd25c04a58700
|
Provenance
The following attestation bundles were made for vibrationview_api-0.1.14.tar.gz:
Publisher:
workflow.yml on VibrationResearch/vibrationview-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vibrationview_api-0.1.14.tar.gz -
Subject digest:
9682b32b58595998b8cfe75b9df64424252b2d17b573a91668a8f5cb212fe139 - Sigstore transparency entry: 2037536952
- Sigstore integration time:
-
Permalink:
VibrationResearch/vibrationview-api@3e3b6d36ac8723b49d7b6ff0df2cd1e39e2ded60 -
Branch / Tag:
refs/tags/0.1.14 - Owner: https://github.com/VibrationResearch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@3e3b6d36ac8723b49d7b6ff0df2cd1e39e2ded60 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vibrationview_api-0.1.14-py3-none-any.whl.
File metadata
- Download URL: vibrationview_api-0.1.14-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f1b0acb965c97f4baaadf0a3e95b2f220325bacc191355f518d2880042b1e59
|
|
| MD5 |
54f853d82622a0993b000c40a0c038a9
|
|
| BLAKE2b-256 |
543eeedc95a8260341289322151ce531db9a52d710bc76c367af291a801c835b
|
Provenance
The following attestation bundles were made for vibrationview_api-0.1.14-py3-none-any.whl:
Publisher:
workflow.yml on VibrationResearch/vibrationview-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vibrationview_api-0.1.14-py3-none-any.whl -
Subject digest:
1f1b0acb965c97f4baaadf0a3e95b2f220325bacc191355f518d2880042b1e59 - Sigstore transparency entry: 2037537097
- Sigstore integration time:
-
Permalink:
VibrationResearch/vibrationview-api@3e3b6d36ac8723b49d7b6ff0df2cd1e39e2ded60 -
Branch / Tag:
refs/tags/0.1.14 - Owner: https://github.com/VibrationResearch
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@3e3b6d36ac8723b49d7b6ff0df2cd1e39e2ded60 -
Trigger Event:
push
-
Statement type: