Lagging Code

Post general discussions on using our drivers to write your own software here
Post Reply
smat
User
User
Posts: 2
Joined: Mon Jun 11, 2007 3:17 pm

Lagging Code

Post by smat »

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?

smat
User
User
Posts: 2
Joined: Mon Jun 11, 2007 3:17 pm

Post by smat »

Nevermind, threading appears to be the answer.

Post Reply