Test and Measurement Forum

ps3000_run_block Question

Forum for discussing PicoScope (version 5)

ps3000_run_block Question

Postby JSmith » Mon Apr 04, 2005 6:51 am

Hello,

When ever I run the following code in VB it always returns 0 for ps3000_run_block and I can't figure out why. (I have the 3206)

ok = ps3000_get_timebase(ps3000_handle, 5, 100, time_interval, time_units, 4, max_samples)
freq = ps3000_set_siggen(ps3000_handle, 2, 1000, 1000, 1, 100, False, False)
running = ps3000_run_block(ps3000_handle, 100, 5, 4, time_indisposed)
If ok Then
Do
ready = ps3000_ready(ps3000_handle)
If ready Then
Exit Do
End If
Loop
Call ps3000_stop(ps3000_handle)
ok = ps3000_get_values(ps3000_handle, Values_a(0), Values_b(0), values_c(0), values_d(0), overflow, 1000)
Else
List1.AddItem ("Error running PicoScope")
End If

Are there any more examples of VB code avaliable?

Cheers
JSmith
Active User
Active User
 
Posts: 6
Joined: Tue Dec 07, 2004 3:14 am

Postby Sarah » Mon Apr 04, 2005 9:38 am

Hi

Thank you for your post.

You can download our VB examples from http://www.picotech.com/software.html if these do not help then please let me know.

Best Regards
Sarah
 

Postby JSmith » Mon Apr 04, 2005 11:14 pm

Hello Sarah,

I downloaded the vb driver again to see if it would work and it crashes at the same point as the vb driver that I received with my Picoscope. I suspect it is crashing at the line ps3000_run_block, this is why I tried it myself but with no success :( Are you able to replicate this problem? If not could you send me a different piece of code to try or suggest any corrections to the code in post 1?

Cheers
JSmith
Active User
Active User
 
Posts: 6
Joined: Tue Dec 07, 2004 3:14 am

Postby JSmith » Tue Apr 05, 2005 1:05 am

I have been playing around with the code a bit more and found that it is actually crashing at the ps3000_get_timebase command.

I still haven't been able to fix it so any help is appreciated.

Cheers
JSmith
Active User
Active User
 
Posts: 6
Joined: Tue Dec 07, 2004 3:14 am

Postby JSmith » Thu Apr 07, 2005 5:24 am

Hello Sarah

I would still like some help with the VB code or to be able to download a vb example that actually works.
JSmith
Active User
Active User
 
Posts: 6
Joined: Tue Dec 07, 2004 3:14 am

Postby Sarah » Thu Apr 07, 2005 8:07 am

Hi

Thank you for your post.

My apologises for the delay in reply, I needed to consult one of our software engineers regarding this.

We have tried this example and found that there is a trigger setting.

You need to change the trigger line in the example we provide to the following:

ok = ps3000_set_trigger(ps3000_handle, 5, 0, 0, 0, 0)

Now try running the code, we have tried this and it worked with a PS3206.

Hope this helps

Best Regards
Sarah
 


Return to PicoScope 5

Who is online

Users browsing this forum: No registered users and 0 guests