Test and Measurement Forum

More info on adc11_set_trigger function

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

More info on adc11_set_trigger function

Postby mentalsurge » Wed Nov 27, 2002 4:27 pm

Hello,

Can you please give me some more info on the set_trigger function.
I cannot get it to work correctly in my program. (C++)
I need it to trigger when I get a voltage on channel 11, but it seems to just return straight away.

I was using the following syntax:

adc11_set_trigger(true, false, 0, 11, false, 300, 0);


The voltage that is my trigger is around 1V. My adc11 is V3, and I am using Visual C++ for windows.

Many thanks


Dan Tallentire.
mentalsurge
 

ADC11 Set Trigger Values

Postby Guest » Fri Nov 29, 2002 2:40 pm

Hello,

It looks like you have scaled the 1V into adc counts incorrectly so the unit is trigger early.

A description of the function is given below
Code: Select all
adc11_set_trigger(
                           true,           //trigger enabled
                           false,          // Auto trigger, not enabled
                           0,               //Auto trigger set to false
                           11,             //Chosen Channel
                           false,          // Trigger direction, rising selected, select true for falling
                           300,            //Trigger value in ADC counts
                           0);               //Delay in percent, set to zero


As you have a V3 ADC11, this returns adc values between 0 and 4096.

To convert voltages to ADC counts, divide the voltage by 2.5 and then multply by 4096 i.e. for 1V the ADC count value is 1638, not 300.

Best regards
James
Guest
 

ADC11 Set Trigger Values

Postby mentalsurge » Mon Dec 02, 2002 6:36 pm

Thankyou for the response, but this still does not seem to be working.

It does not matter what I set the trigger value to, it still does not wait for the trigger. I know my ADC11 is working, as it intializes correctly in the code, and I have used the digital output from the code also.

I have also checked the channel using the Picoscope, and this shows the voltage change from the channel.

Changing the trigger value to well above the level of my voltage does not make any difference, as it still triggers straight away.

Any ideas?

Thanks,

Dan Tallentire.
mentalsurge
 

Postby matthew » Tue Dec 10, 2002 6:00 pm

Hi Dan,

Does the ADC-11 trigger correctly in PicoScope (you hint at this but do not state it explicitly)?
Try it in Auto-Trigger mode.

Regards,
Matt Everett

Pico Software Engineer
User avatar
matthew
Guru
Guru
 
Posts: 109
Joined: Wed Sep 25, 2002 9:35 am
Location: Cambridgeshire, UK


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 1 guest