Products for USB Sensing and Control
It is currently Wed Nov 26, 2014 8:31 pm

All times are UTC - 7 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue Feb 07, 2012 4:16 pm 
Offline
Phidgetly

Joined: Sun Jun 05, 2011 5:15 am
Posts: 32
Hello,

I'm having some code / threading issues using a DC controller (detailed here: http://www.phidgets.com/phorum/viewtopic.php?f=22&t=5258). In an effort to trouble shoot I was hoping to turn down the sensitivity of my temp sensor hooked up to the DC Motor Controller .. however I can't find an option to do this .. is it possible ?

many thanks
ben


Top
 Profile Send private message  
 
PostPosted: Wed Feb 08, 2012 5:20 pm 
Offline
Phidgetly

Joined: Sun Jun 05, 2011 5:15 am
Posts: 32
Hello,

I'm still struggling with this problem. After a lot of debugging and asking questions on StackOverflow (http://stackoverflow.com/questions/9202685/continuous-monitoring-of-data-using-backgroundworker-c), I'm pretty sure that the temperature sensor event handlers are what's stalling my background worker, if I write out to the Console I see that they coincide exactly with the gaps in the stopwatch.

So, my guess is that even though the Phidgets events are called on other threads they're still interrupting my execution far more than I expected. If I can't turn down the sensitivity of the temp sensor then I might just have to remove it from my project.

cheers
ben


Top
 Profile Send private message  
 
PostPosted: Thu Feb 09, 2012 9:15 am 
Offline
Engineering

Joined: Thu Nov 19, 2009 4:41 pm
Posts: 192
I am assuming you are using a 1065 and an analog temp sensor(1124?). You shouldn't have to remove it, I recommend polling the temperature instead if you think the events are causing the problem.


Top
 Profile Send private message  
 
PostPosted: Thu Feb 09, 2012 9:33 am 
Offline
Phidgetly

Joined: Sun Jun 05, 2011 5:15 am
Posts: 32
Of course .. didn't think of that !

I think also the problem was me trying to create too tight a loop. I've now slowed it to 10ms rather than 1ms and everything is behaving a lot better.

Many thanks.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group