|
|
| Author |
Message |
MSaran Guest
|
Posted: Fri Jul 08, 2005 6:45 pm Post subject: ADC212 Trigger Event in VB6 |
|
|
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 |
|
| Back to top |
|
 |
Sarah Guest
|
Posted: Wed Jul 13, 2005 10:15 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
MSaran Newbie
Joined: 08 Jul 2005
Posts: 1
Location: Brazil
|
Posted: Wed Jul 13, 2005 7:24 pm Post subject: I've found out!!! |
|
|
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 |
|
| Back to top |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group
|