ps3000_run_block Question

Forum for discussing PicoScope (version 5)
Post Reply
JSmith
User
User
Posts: 6
Joined: Tue Dec 07, 2004 3:14 am

ps3000_run_block Question

Post by JSmith »

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

Sarah

Post by Sarah »

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

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

Post by JSmith »

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
User
User
Posts: 6
Joined: Tue Dec 07, 2004 3:14 am

Post by JSmith »

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
User
User
Posts: 6
Joined: Tue Dec 07, 2004 3:14 am

Post by JSmith »

Hello Sarah

I would still like some help with the VB code or to be able to download a vb example that actually works.

Sarah

Post by Sarah »

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

Post Reply