For the latest version of JMP Help, visit JMP.com/help.


JSL Syntax Reference > JSL Messages > Data Feed (Windows Only)
Publication date: 11/29/2021

Data Feed (Windows Only)

feed<<Close

Closes the data feed object and its window.

feed<<Connect(port settings)

Sets up port settings for the connection to the device.

feed<<Disconnect

Disconnects the device from the data feed queue but leaves the data feed object active.

feed<<EOL("CR", "LF", "CRLF")

Sets the line ending value used as a separator when parsing incoming lines of data. The value is also used as the terminator in outgoing lines of data.

"CR": ASCII character 13 (carriage return)

"LF": ASCII character 10 (line feed)

"CRLF": Uses both CR and LF in sequence.

feed<<Get Line

Returns and removes one line from the data feed queue.

feed<<Get Lines

Returns as a list and removes all lines from the data feed queue.

feed<<Print Queue

Prints the internal queue of messages to the log window.

feed<<Queue Line(quoted string)

Sends one quoted string (or line) to the end of the data feed queue. Queue Line is primarily useful for testing your script without requiring it to be attached to a device. You can essentially simulate the data coming from the device to make sure the rest of your code handles the values properly when it's really attached to a working device.

feed<<Restart

Restarts processing queued lines.

feed<<Set Script(script)

Assigns the script that is run each time a line of data is received.

feed<<Stop

Stops processing queued lines.

feed<<Write(quoted string)

Description

Sends a quoted string to the data feed device.

Example

exfeed = Open Datafeed(
	Connect( Port( "com1" ), Baud rate( 4800 ), Parity( "even" ), DataBits( 8 ) ),
	Set Script(
		ex = exfeed << Get Line;
		Show( ex );
	)
);
exfeed << Write( "Ready" );
/* Example - send a message to external device over the serial port to trigger data messages. This can be used to send control messages to a sensor or other attached device.*/

feed<<Write Line(quoted string)

Description

Sends a quoted string to the data feed device. If EOL has been set for the data feed, the quoted strings are terminated by the specified EOL value. If EOL has not been set, the line is terminated with CRLF.

Example

exfeed = Open Datafeed(
	Connect( Port( "com1" ), Baud rate( 4800 ), Parity( "even" ), DataBits( 8 ) ),
	Set Script(
		ex = exfeed << Get Line;
		Show( ex );
	)
);
exfeed << Write Line( "Ready" );
/* Example - send a message to external device over the serial port to trigger data messages. This can be used to send control messages to a sensor or other attached device.*/

feed<<Write Lines({quoted string1, quoted string2, quoted string3})

Description

Sends a list of quoted strings to the data feed device. If EOL has been set for the data feed, the quoted strings are terminated by the specified EOL value. If EOL has not been set, the line is terminated with CRLF.

Example

exfeed = Open Datafeed(
	Connect( Port( "com1" ), Baud rate( 4800 ), Parity( "even" ), DataBits( 8 ) ),
	Set Script(
		ex = exfeed << Get Line;
		Show( ex );
	)
);
exfeed << Write Lines( {"Ready", "Set", "Go"} );
/* Example - send a message to external device over the serial port to trigger data messages. This can be used to send control messages to a sensor or other attached device.*/
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).