Message Boards Message Boards

RunScheduledTask outputting more data than programmed to

Posted 9 years ago

I'm having difficulty with RunScheduledTask. I'm working on a cooling project for a class and I am getting many more data points than I want. I used the project outline from this post: http://community.wolfram.com/groups/-/m/t/196759

temp := N[ ToExpression[ StringTake[ Import["/sys/bus/w1/devices/28-02146790bbff/w1_slave"], -5]]/ 1000]

wig = {} RunScheduledTask[(deg = temp; AppendTo[wig, deg]), {60, 60}]

I only need to read the temperature every 60 seconds and only need sixty repetitions, but when I evaluate wig, I get many more than that. As a result, it's scaling my ListLinePlot for visual analysis. Instead of the time axis only have 60 data points, some have 120+.

wig = {87., 86.562, 86.437, 85.312, 85., 84.75, 83.125, 82.937, 82.625, 81.625, 81.187, 80.937, 80.062, 79.875, 79.437, 78.5, 78., 77.937, 77.312, 77., 76.562, 76., 75.437, 75.312, 74.562, 74.25, 74., 73.375, 73.125, 72.937, 72.25, 71.875, 71.687, 71.062, 70.812, 70.625, 70.062, 69.75, 69.562, 69., 68.75, 68.5, 68., 67.812, 67.562, 67.062, 66.812, 66.687, 66.187, 65.875, 65.75, 65.25, 65., 64.875, 64.312, 64.187, 64., 63.562, 63.375, 63.187, 62.75, 62.5, 62.437, 61.937, 61.812, 61.562, 61.125, 61., 60.875, 60.437, 60.312, 60.187, 59.75, 59.625, 59.562, 59.125, 58.812, 58.687, 58.312, 58.125, 58., 57.75, 57.5, 57.375, 57., 56.875, 56.75, 56.437, 56.25, 56.125, 55.75, 55.625, 55.562, 55.187, 55.062, 54.937, 54.625, 54.5, 54.375, 54.062, 53.875, 53.812, 53.5, 53.375, 53.312, 53., 52.875, 52.812, 52.5, 52.375, 52.25, 52., 51.875, 51.75, 51.5, 51.375, 51.25, 51., 50.875, 50.812, 50.562, 50.437, 50.312, 50.125, 50., 49.875, 49.625, 49.562, 49.5, 49.25, 49.125, 49.062, 48.812, 48.687, 48.625, 48.375, 48.312, 48.187, 48.062, 47.875, 47.812, 47.562, 47.5, 47.437, 47.25, 47.125, 47., 46.812, 46.687, 46.687, 46.5, 46.375, 46.312, 46.125, 46., 45.937, 45.75, 45.625, 45.562, 45.375, 45.312, 45.25, 45.062, 45., 44.937, 44.75, 44.625, 44.562, 44.437, 44.312, 44.312, 44.062, 44., 43.937, 43.625, 43.312 };

enter image description here

Does anyone have any advice? I've attempting to contact my professor and have yet to hear back. I've also searched all over the internet for the solution and I can't find one. I'm desperate.

POSTED BY: Alexis Ploss
2 Replies
Posted 9 years ago

Thank you for your helpful response Bob. I was able to get it working on a preliminary basis (I ran some trials and got the expected number of data points)!

POSTED BY: Alexis Ploss
POSTED BY: BoB LeSuer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract