DeviceReadLatest
This feature is not supported on the Wolfram Cloud.

DeviceReadLatest[device]
returns the most recently collected default item from a device.

DeviceReadLatest[device,n]
returns a list of the n most recently collected items.

DeviceReadLatest[device,n,param]
returns the n most recently collected values of param.

DeviceReadLatest[device,n,{param1,param2,}]
returns a list of the most recently collected values of the .

DetailsDetails

  • A device can be specified either by a DeviceObject or by a string representing a device class.
  • Only devices from which data is continuously collected support DeviceReadLatest.
  • DeviceReadLatest is a non-blocking function. It uses data already collected from a device, and does not request additional data.
  • DeviceReadLatest[device,n] may return a list shorter than n elements if not enough pre-collected data is available.
  • DeviceReadLatest[device,n] returns data with the oldest first in the list.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Continuously read random numbers from a demo device and plot the latest points dynamically:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Remove the task and close the device connection:

In[4]:=
Click for copyable input
In[5]:=
Click for copyable input
Introduced in 2014
(10.0)