Lagging Code

 
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
Author Message
smat
User
User


Joined: 11 Jun 2007
Posts: 2

PostPosted: Mon Jun 11, 2007 3:53 pm    Post subject: Lagging Code Reply with quote

I've written a class file which controls the picoscope 2105 for use in another application. I'm using the C++ language.

On class instantiation: The 2105 is opened and a handle value is recieved.

Then, calls to these functions are placed inside the main loop of the application which means they will be called every so often. This is the order in which they are called:

-ps2000_set_trigger
-ps2000_run_block
-ps2000_get_timebase
-ps2000_get_times_and_values

On class deconstruction: The 2105 is closed.

The problem lies in the fact that running the application with this code causes sever lag and often crashes the application outright.

I know that my class is working as intended--when I wrote it I tested it using a standard main function application and it went smoothly.

Is there something wrong? Is it possible the cpu cannot process calls to the scope and the needs of the application which is also running? Any suggestions on how to increase performance?
Back to top
smat
User
User


Joined: 11 Jun 2007
Posts: 2

PostPosted: Tue Jun 12, 2007 2:36 pm    Post subject: Reply with quote

Nevermind, threading appears to be the answer.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> General Software Discussions
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group