Test and Measurement Forum

ADC212 Trigger Event in VB6

Post general discussions on using our drivers to write your own software here

ADC212 Trigger Event in VB6

Postby MSaran » Fri Jul 08, 2005 6:45 pm

Hello all

I'm using VB6 to make a program that captures a block of data at 50MS/s after a trigger event, with an ADC212/100 unit.
But the unit wasn't waiting for the trigger event to occur before capturing data.
What's wrong?
How can I do it?

This is the code:
Trigger_Result = adc200_set_trigger(1, 0, ADC200_TrigDir, ADC200_TrigDelay, ADC200_Threshold)
Run_Result = adc200_run(ADC200_Samples)
Do While Not (Ready_Result)
Ready_Result = adc200_ready()
DoEvents
Loop
NumSamples = adc200_get_times_and_values(BufferT(0), BufferA(0), BufferB(0), ADC200_Samples)

Thank you.

Marco Saran
development@msaran.com
MSaran
 

Postby Sarah » Wed Jul 13, 2005 10:15 am

Hi

Thank you for your post.

We are not too sure why the trigger should not be happening correctly here. If you try the same settings in Picoscope does it trigger corerctly? What settings are you using?

Check and ensure that Ready_Result is defined as FALSE to begin with.

Let me know how you get on with this.

Best Regards
Sarah
 

I've found out!!!

Postby MSaran » Wed Jul 13, 2005 7:24 pm

Hi

I changed the loop code and it work fine.
It's just a little mistake, sorry.
I’ve been blind for it because of hardworking.

There's the new code:

adc200_set_ets 0, 0, 0
Trigger_Result = adc200_set_trigger(1, 0, ADC200_TrigDir, ADC200_TrigDelay, ADC200_Threshold)
Run_Result = adc200_run(ADC200_Samples)
Ready_Result = 0
Do While (Ready_Result = 0)
Ready_Result = adc200_ready()
DoEvents
Loop

Thank you.

Best regards
MSaran
Newbie
 
Posts: 1
Joined: Fri Jul 08, 2005 6:47 pm
Location: Brazil


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 1 guest