Jump to content
  • 0

Matlab support on MCC USB-1604HS-2AO with digital trigger




I would like to use Matlab to control my MCC USB-1604HS-2AO, which will operate in a digital trigger mode. The trigger TTL voltage is from 0 to 5 V. I want one data point collected in BNC channel 0 at every rising edge of the trigger. The input voltage is from -1 V to +1 V. The trigger frequency is around 65 kHz.

How should I code it in Matlab?

Thank you!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

If you were writing a program using Python or C/C++/C#, I recommend using the external clock instead of the external trigger. The external trigger starts an acquisition, while the external (pacer) clock input controls sampling. Unfortunately, neither the trigger nor the external clock is supported when using MCC devices and the MatLab Data Acquisition Toolbox. Contact the Mathwork if you have questions or need support.

Another approach is to access our API from within Matlab. The following provides a brief example of what I mean: https://digilent.com/reference/daq-and-datalogging/documents/using-ul-for-dotnet-with-matlab

To enable the external clock, include ExtClock in myscanoptions:

myscanoptions = MccDaq.ScanOptions.ScaleData | MccDaq.ScanOptions.ExtClock;

The UL Help documentation download can be found here: https://digilent.com/reference/software/universal-library/windows/start


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...