Real-Time Data Capture
A Datafeed is a real-time method to read data continuously, such as from a laboratory measurement device connected to a serial port. A Datafeed object sets up a concurrent thread with a queue for input lines that arrive in real time and are processed with background events. You set up scripts to interpret the lines and push the data to data tables, or do whatever else your process requires.
For example, submit this to get records from com1: and list them in the log.
feed = Open Datafeed(
Connect( Port( "com1:" ), Baud( 9600 ), DataBits( 7 ) ),
Set Script( Print( feed << getLine ) )
);
Figure 14.1 A Datafeed Window Shows the Status and Offers Controls
Create a Datafeed Object
To create a DataFeed object, use the

Get JMP 11 Scripting Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.