O'Reilly logo

JMP 11 Scripting Guide, Second Edition, 2nd Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required