Real-time data acquisition code