triggerconfig
Configure video input object trigger properties
Syntax
triggerconfig(obj,
type
)
triggerconfig(obj,type
,condition
)
triggerconfig(obj,type
,condition
,source
)
config = triggerconfig(obj)
triggerconfig(obj,config)
Description
triggerconfig(obj,
configures the value of the type
)TriggerType
property
of the video input object obj
to the value specified
by the character vector type
. For a list
of valid TriggerType
values, use triggerinfo(obj)
. type
must
specify a unique trigger configuration.
obj
can be either a single video input object
or an array of video input objects. If an error occurs, any video
input objects in the array that have already been configured are returned
to their original configurations.
triggerconfig(obj,
configures the values of the type
,condition
)TriggerType
and TriggerCondition
properties
of the video input object obj
to the values specified
by the character vectors type
and condition
.
For a list of valid TriggerType
and TriggerCondition
values,
use triggerinfo(obj)
. type
and condition
must
specify a unique trigger configuration.
triggerconfig(obj,
configures the values of the type
,condition
,source
)TriggerType
, TriggerCondition
,
and TriggerSource
properties of the video input
object obj
to the values specified by the character
vectors type
, condition
,
and source
, respectively. For a list of
valid TriggerType
, TriggerCondition
,
and TriggerSource
values, use triggerinfo(obj)
.
config = triggerconfig(obj)
returns
a MATLAB® structure config
containing
the object's current trigger configuration. obj
must
be a 1-by-1 video input object. The field names of config
are TriggerType
, TriggerCondition
,
and TriggerSource
. Each field contains the current
value of the object's property.
triggerconfig(obj,config)
configures
the TriggerType
, TriggerCondition
,
and TriggerSource
property values for video input
object obj
using config
, a MATLAB structure with field names TriggerType
, TriggerCondition
,
and TriggerSource
, each containing the desired
property value.
Note
To get a list of options you can use on a function, press the Tab key after entering a function on the MATLAB command line. The list expands, and you can scroll to choose a property or value. For information about using this advanced tab completion feature, see Using Tab Completion for Functions.
Examples
Example 1
Construct a video input object.
vid = videoinput('winvideo', 1);
Configure trigger properties for the object.
triggerconfig(vid, 'manual')
Trigger the acquisition.
start(vid) trigger(vid)
Remove video input object from memory.
delete(vid);
Example 2
This example uses a structure returned from triggerinfo
to
configure trigger parameters.
Create a video input object.
vid = videoinput('winvideo', 1);
Use triggerinfo
to get all valid configurations
for the trigger properties for the object.
config = triggerinfo(vid);
Pass one of the configurations to the triggerconfig
function.
triggerconfig(vid,config(2));
Remove video input object from memory.
delete(vid);
Version History
Introduced before R2006a
See Also
imaqhelp
| trigger
| triggerinfo
| videoinput