Specify hardware device starts at manual trigger
Note: You cannot use the legacy interface on 64–bit MATLAB®. See Session-Based Interface to acquire and generate data.
You can set ManualTriggerHwOn to Start or Trigger, and it has an effect only when the TriggerType property value is Manual. If ManualTriggerHwOn is Start, then the hardware device associated with your device object starts running after you issue the start function. If ManualTriggerHwOn is Trigger, then the hardware device associated with your device object starts acquiring after you issue both the start function and you execute a manual trigger with the trigger function. You can use trigger only when you configure the TriggerType property to Manual.
You should configure ManualTriggerHwOn to Trigger when you want to synchronize the input and output of data, or you require more control over when your hardware starts. Note that you cannot use peekdata or acquire pretrigger data when you use this value. Additionally, you should not use this value with repeated triggers because the subsequent behavior is undefined.
AI, common to all channels
Read-only when running
Start the hardware after the start function is issued.
Start the hardware after the trigger function is issued.
Create the analog input object ai and the analog output object ao for a sound card and add two channels to each device object.
ai = analoginput('winsound'); addchannel(ai,1:2); ao = analogoutput('winsound'); addchannel(ao,1:2);
To operate the sound card in full duplex mode, and to minimize the time between when ai starts and ao starts, you configure ManualTriggerHwOn to Trigger for ai and TriggerType to Manual for both ai and ao.
set([ai ao],'TriggerType','Manual') ai.ManualTriggerHwOn = 'Trigger';