help with ControlP5 - update a chart as data are available
in
Contributed Library Questions
•
8 months ago
Hi,
I am developing an application to interface Processing with a Perkin Elmer Spectrofluorimeter via serial communication.
Data from the instrument come in tandem and each one is called a scan (a series of float values).
Once I have configured all the values for multiple scans, I press a button to start scans.
The problem is the controlEvent commands for that button are a lot (to talk with the instrument, I have to send messages and the read it to confirm the values). While those commands are executing (because the button was released), the rest of the controlP5 elements (buttons, charts) are blocked.
Because all is blocked until the commands for start scans are finished:
- I can't press the Stop button (to cancel the scans in the middle of an adquisition)
- I can't update the chart as data become available. In fact, all collected data is drawn as soon as the commands for the start scans have finished.
Could someone help me? How can I write the commands so as to while data is being collected, I can cancel or update chart or whatever?
Thanks!
Vidusun
I am developing an application to interface Processing with a Perkin Elmer Spectrofluorimeter via serial communication.
Data from the instrument come in tandem and each one is called a scan (a series of float values).
Once I have configured all the values for multiple scans, I press a button to start scans.
The problem is the controlEvent commands for that button are a lot (to talk with the instrument, I have to send messages and the read it to confirm the values). While those commands are executing (because the button was released), the rest of the controlP5 elements (buttons, charts) are blocked.
Because all is blocked until the commands for start scans are finished:
- I can't press the Stop button (to cancel the scans in the middle of an adquisition)
- I can't update the chart as data become available. In fact, all collected data is drawn as soon as the commands for the start scans have finished.
Could someone help me? How can I write the commands so as to while data is being collected, I can cancel or update chart or whatever?
Thanks!
Vidusun
1