Search the Community
Showing results for tags 'live display'.
Found 1 result
I've created a set of Actors that pick up data from a hardware source and display that data live in a Chart indicator. The organization is pretty simple: 1) Controller Actor: Launches the Hardware, Plotter, and Analysis actors. Mediates messages between them. 2) Hardware Actor: responsible for setup and shutdown of communication with the DUT. As it picks up data, passes them up to the Controller. 3) Plotter Actor: picks up hardware data from the Controller and plots the data to the Chart. Also provides controls that let the user change what signals are plotting and what they look like. 4) Analysis Actor: picks up hardware data from the Controller for analysis; results and/or raw data can be saved to file. The DUT produces data at a rate of 1kHz. It's theoretically possible to stream about 200 signals at this rate, though in practice it would be exceptional if someone were to gather more than 50 at once. At first, I had the Hardware Actor pick up each data-point individually and immediately forward each point to the Controller. But the Plotter Actor down-stream had trouble keeping up with the 1kHz rate. My fix was to have the Controller "batch" the messages. The Hardware Actor is still producing at 1kHz, but the Controller builds an array until 30 data-points have been received and then forwards the 2D array to the Plotter. Now the system was fast enough for a few signals, maybe 5-10. But as I add more signals, I find that my software starts to fall behind the hardware data. A colleague suggested using a DVR to store the picked up data and passing the reference around instead of the data array. My concern is that this breaks the "contract" of Actors communicating only through Actor Messages. This thread was helpful, but I thought I'd start a new thread for this particular use-case. I imagine others have used Actors for streaming hardware data and have come up with better, more elegant solutions than I could!