Instrument control package: Difference between revisions

Line 43: Line 43:
{{Code|Check for interface support|<syntaxhighlight lang="octave" style="font-size:13px">
{{Code|Check for interface support|<syntaxhighlight lang="octave" style="font-size:13px">
pkg load instrument-control
pkg load instrument-control
supportedinterfaces = instrhwinfo().SupportedInterfaces


if (exist("serial") == 3)
if ! isempty(strfind (supportedinterfaces , "serial"))
     disp("Serial: Supported")
     disp("Serial: Supported")
else
else
Line 51: Line 52:


#similarly with:
#similarly with:
#exist("parallel") == 3
# ! isempty(strfind (supportedinterfaces , "parallel"))
#exist("i2c") == 3
# ! isempty(strfind (supportedinterfaces , "i2c"))
</syntaxhighlight>}}
</syntaxhighlight>}}


Anonymous user