Hello,
I'm going to state my issue in brief way. I receive data from Serial port by trapping number of characters ended with termination character. I expect 6 values arriving at different time intervals. I then transfer those 6 parameters using channel wires to another consumer loop for computation. So the producer loop sends data at different time intervals (upon data arrival).
My problem comes when I want to plot constant value on a chart (like zeros) until I receive incoming data. As I mentioned, I can not move plot to Producer loop as it will wait (hangs) for reception of incoming data at any time and won't move from current iteration until termination character is received.
So, just to simplify the issue, I created a simple example with no serial data reception which a sine is sent every 5 seconds while plot on consumer should plot zero every 100 ms until receiving new data. Could channel wires be configured in a way to allow loop of consumer to move on until new data arrives?
The difficulty is consumer loop should be faster than producer loop and hence a constant value is plotted until data arrives and sent from producer.
KInd regards,
Waleed El-Badry, MSc., CLAD MCPD