A synchronized timing system for Digital Image Correlation (DIC) experiments using Instron testing machines. This system consists of two applications that work together to provide precise timing synchronization between the mechanical testing frame and camera recording systems.
The DIC Timing System enables precise synchronization between:
- Instron mechanical testing frame (data acquisition)
- Camera computer (SpinView or similar DIC recording software)
This ensures accurate correlation between mechanical test data and visual deformation measurements in DIC analysis.
┌─────────────────┐ UDP Events ┌─────────────────┐
│ Frame Computer │ ───────────────► │ Camera Computer │
│ │ │ │
│ frame_forwarder │ │ click_receiver │
│ │ ◄─────────────── │ │
└─────────────────┘ Clock Sync └─────────────────┘
Installed on: Instron Frame Computer
Purpose: Monitors Instron network traffic and forwards START/STOP events to the camera computer.
Key Features:
- Packet Sniffing: Monitors Instron network interface for test start/stop events
- UDP Broadcasting: Sends timing events to camera computer (192.168.1.1:9999)
- Clock Synchronization: Maintains time sync with camera computer for precise timing
- Auto-Detection: Automatically finds Instron network interface
- Logging: Comprehensive session logging and statistics
- Manual Testing: Built-in tools for testing UDP connectivity
Network Configuration:
- Listens on Instron network interface (auto-detected)
- Sends UDP events to:
192.168.1.1:9999(camera computer) - Clock sync service on port:
9998
Installed on: Camera Computer (SpinView/DIC Recording)
Purpose: Receives UDP timing events and automatically controls camera recording software through simulated mouse clicks.
Key Features:
- UDP Event Reception: Listens for START/STOP events from frame computer
- Automated Clicking: Simulates mouse clicks on SpinView START/STOP buttons
- Position Configuration: Visual overlay system for setting click positions
- Clock Synchronization: Syncs with frame computer for accurate timestamps
- Session Logging: Detailed logging of all recording sessions with timing data
- Manual Override: Manual click testing and position adjustment
- Export Capabilities: CSV and TXT export of session data
Network Configuration:
- Listens on UDP port:
9999 - Connects to frame computer:
192.168.1.2:9998(for clock sync)
pip install -r requirements.txtRequired packages:
pyinstaller>=5.0(for building executables)pyautogui>=0.9.54(for automated clicking)pillow>=9.0.0(for image processing)
The project includes PyInstaller spec files for creating standalone executables:
# Build Frame Forwarder
pyinstaller frame_forwarder.spec
# Build Click Receiver
pyinstaller click_receiver.specEnsure both computers are on the same network with these IP addresses:
- Frame Computer:
192.168.1.2 - Camera Computer:
192.168.1.1
- Install
frame_forwarder.exeon the Instron frame computer - Run the application - it will auto-detect the Instron network interface
- Test UDP connectivity using the built-in test functions
- Install
click_receiver.exeon the camera computer - Open SpinView or your DIC recording software
- Run the click receiver application
- Configure click positions:
- Use the visual overlay to set START button position
- Use the visual overlay to set STOP button position
- Test positions using the manual click feature
The system automatically synchronizes clocks between computers:
- Frame computer acts as time reference
- Camera computer adjusts its timestamps accordingly
- Sync accuracy typically <10ms over local network
- Prepare SpinView: Open SpinView and prepare for recording
- Start Click Receiver: Launch the click receiver on camera computer
- Start Frame Forwarder: Launch the frame forwarder on frame computer
- Begin Test: Start your Instron test - the system will automatically:
- Detect test start and send UDP event
- Click START button in SpinView
- Detect test end and send UDP event
- Click STOP button in SpinView
- Log all timing data with synchronized timestamps
Both applications support manual operation for testing and troubleshooting:
- Frame Forwarder: Manual UDP event broadcasting
- Click Receiver: Manual START/STOP button clicking
- Session statistics and packet analysis
- UDP event transmission logs
- Clock synchronization data
- Network interface diagnostics
- Recording session details with precise timestamps
- Click position and timing data
- Clock synchronization status
- Session duration and statistics
Log Location: ~/Documents/DIC Quality Control/[App Name]/
- Session timing data
- Synchronized timestamps (local and remote)
- Click positions and success rates
- Duration calculations
- Human-readable session summaries
- Clock synchronization status
- Statistical analysis
- Complete session logs
-
UDP Events Not Received
- Check network connectivity between computers
- Verify IP addresses in configuration
- Test UDP connectivity using built-in tools
-
Click Positions Incorrect
- Reconfigure click positions using visual overlay
- Test positions manually before starting session
- Ensure SpinView window is visible and not minimized
-
Clock Sync Issues
- Check network latency between computers
- Restart both applications to reset sync
- Verify both computers have stable network connections
-
Instron Interface Not Detected
- Run frame forwarder as administrator
- Check Instron network cable connections
- Manually specify network interface if needed
- Uses NTP-like protocol for time synchronization
- Multiple measurement samples with outlier filtering
- Achieves sub-10ms accuracy over local networks
- Automatic drift compensation
- Monitors Instron UDP traffic patterns
- Distinguishes between background, command, and data packets
- Reliable START/STOP event detection based on packet size analysis
- UDP-based for minimal latency
- JSON message format for events
- Separate sync protocol on dedicated port
- Automatic retry and error handling
DICTiming/
├── frame_forwarder.py # Main forwarder application
├── click_receiver.py # Main receiver application
├── frame_forwarder.spec # PyInstaller spec for forwarder
├── click_receiver.spec # PyInstaller spec for receiver
├── requirements.txt # Python dependencies
├── test_files/ # Development and testing utilities
│ ├── instron_packet_sniffer.py
│ ├── button_capture.py
│ └── mouseclicker.py
└── README.md # This file
The test_files/ directory contains development utilities:
- instron_packet_sniffer.py: Network packet analysis tool
- button_capture.py: Live button detection utility
- mouseclicker.py: Universal click timing tool
When contributing to this project:
- Test on both frame and camera computers
- Verify clock synchronization accuracy
- Test with actual Instron equipment when possible
- Update documentation for any configuration changes
This project is designed for research and educational use in mechanical testing and DIC analysis applications.
For issues or questions:
- Check the troubleshooting section
- Review log files in
~/Documents/DIC Quality Control/ - Test individual components using built-in diagnostic tools
- Verify network configuration and connectivity
Note: This system is designed for local network operation between dedicated testing computers. Ensure proper network security when deploying in production environments.