getvalue - Read values from lines

Syntax

out = getvalue(obj)
out = getvalue(obj.Line(index))

Arguments

obj

A digital I/O object.

obj.Line(index)

One or more lines contained by obj.

out

A binary vector.

Description

out = getvalue(obj) returns the current value from all lines contained by obj as a binary vector to out.

out = getvalue(obj.Line(index)) returns the current value from the lines specified by obj.Line(index).

Remarks

More About Reading Values from Lines

Examples

Create the digital I/O object dio and add eight input lines to it.

dio = digitalio('nidaq','Dev1');
lines = addline(dio,0:7,'in');

To return the current values from all lines contained by dio as a binvec value:

out = getvalue(dio);

See Also

Functions

binvec2dec

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS