Code covered by the BSD License  

Highlights from
Matlab LibTiePie 0.4.3 instrument driver for Handyscope HS5

Matlab LibTiePie 0.4.3 instrument driver for Handyscope HS5

by

 

03 Oct 2013 (Updated )

MatlabLibTiePie : TiePie engineering's instrument library for Matlab 7.6 = 2008a and higher.

LibTiePie.Generator
% Use LibTiePie.Generator for controlling LibTiePie arbitrary wavevorm generators.
% Do not create LibTiePie.Generator objects directly, but use Library.List.OpenGenerator().
%
% For more information, see api.tiepie.com and www.tiepie.com/LibTiePie .
%
% (c) 2012-2013 TiePie engineering.

classdef Generator < LibTiePie.Device
  properties ( GetAccess = private )
    Data; % Arbitrary data.
  end
  properties
    OutputOn;
    BurstMode;
    BurstCount;
    FrequencyMode;
    SignalType;
    Frequency;
    Amplitude;
    Offset;
    Phase;
    Symmetry;
    AmplitudeAutoRanging;
    AmplitudeRange;
  end
  properties ( SetAccess = private )
    BurstModes;
    BurstCountMax;
    FrequencyModes;
    SignalTypes;
    FrequencyMin;
    FrequencyMax;
    AmplitudeMin;
    AmplitudeMax;
    AmplitudeRanges;
    OffsetMin;
    OffsetMax;
    PhaseMin;
    PhaseMax;
    SymmetryMin;
    SymmetryMax;
    DataLength;
    DataLengthMin;
    DataLengthMax;
    ConnectorType;
    Impedance;
    Resolution;
  end
  methods
    function obj = Generator( oLibTiePie , hDevice )
      obj = obj@LibTiePie.Device( oLibTiePie , hDevice );
    end

    function Start( self )
      calllib( self.sLibrary , 'GenStart' , self.hDevice );
      self.oLibTiePie.CheckStatus;
    end
    function Stop( self )
      calllib( self.sLibrary , 'GenStop' , self.hDevice );
      self.oLibTiePie.CheckStatus;
    end

    function bIsControllable = IsControllable( self )
      bIsControllable = calllib( self.sLibrary , 'GenIsControllable' , self.hDevice );
    end
    function bIsBurstActive = IsBurstActive( self )
      bIsBurstActive = calllib( self.sLibrary , 'GenIsBurstActive' , self.hDevice );
    end
    function bIsDifferential = IsDifferential( self )
      bIsDifferential = calllib( self.sLibrary , 'GenIsDifferential' , self.hDevice );
    end
  end
  methods
    function set.Data( self , arData )
      calllib( self.sLibrary , 'GenSetData' , self.hDevice , arData , length( arData ) );
      self.oLibTiePie.CheckStatus;
    end

    function bOutputOn = get.OutputOn( self )
      bOutputOn = calllib( self.sLibrary , 'GenGetOutputOn' , self.hDevice );
    end
    function set.OutputOn( self , bOutputOn )
      calllib( self.sLibrary , 'GenSetOutputOn' , self.hDevice , bOutputOn );
      self.oLibTiePie.CheckStatus;
    end

    function arBurstModes = get.BurstModes( self )
      arBurstModes = LibTiePie.Enum.BM( LibTiePie.BitMask2Array( calllib( self.sLibrary , 'GenGetBurstModes' , self.hDevice ) ) );
    end
    function qwBurstMode = get.BurstMode( self )
      qwBurstMode = LibTiePie.Enum.BM( calllib( self.sLibrary , 'GenGetBurstMode' , self.hDevice ) );
    end
    function set.BurstMode( self , qwBurstMode )
      calllib( self.sLibrary , 'GenSetBurstMode' , self.hDevice , uint64( qwBurstMode ) );
      self.oLibTiePie.CheckStatus;
    end

    function qwBurstCountMax = get.BurstCountMax( self )
      qwBurstCountMax = calllib( self.sLibrary , 'GenGetBurstCountMax' , self.hDevice );
    end
    function qwBurstCount = get.BurstCount( self )
      qwBurstCount = calllib( self.sLibrary , 'GenGetBurstCount' , self.hDevice );
    end
    function set.BurstCount( self , qwBurstCount )
      calllib( self.sLibrary , 'GenSetBurstCount' , self.hDevice , qwBurstCount );
      self.oLibTiePie.CheckStatus;
    end

    function arFrequencyModes = get.FrequencyModes( self )
      arFrequencyModes = LibTiePie.Enum.FM( LibTiePie.BitMask2Array( calllib( self.sLibrary , 'GenGetFrequencyModes' , self.hDevice ) ) );
    end
    function dwFrequencyMode = get.FrequencyMode( self )
      dwFrequencyMode = LibTiePie.Enum.FM( calllib( self.sLibrary , 'GenGetFrequencyMode' , self.hDevice ) );
    end
    function set.FrequencyMode( self , dwFrequencyMode )
      calllib( self.sLibrary , 'GenSetFrequencyMode' , self.hDevice , uint32( dwFrequencyMode ) );
      self.oLibTiePie.CheckStatus;
    end

    function arSignalTypes = get.SignalTypes( self )
      arSignalTypes = LibTiePie.Enum.ST( LibTiePie.BitMask2Array( calllib( self.sLibrary , 'GenGetSignalTypes' , self.hDevice ) ) );
    end
    function dwSignalType = get.SignalType( self )
      dwSignalType = LibTiePie.Enum.ST( calllib( self.sLibrary , 'GenGetSignalType' , self.hDevice ) );
    end
    function set.SignalType( self , dwSignalType )
      calllib( self.sLibrary , 'GenSetSignalType' , self.hDevice , uint32( dwSignalType ) );
      self.oLibTiePie.CheckStatus;
    end

    function dFrequencyMin = get.FrequencyMin( self )
      dFrequencyMin = calllib( self.sLibrary , 'GenGetFrequencyMin' , self.hDevice );
    end
    function dFrequencyMax = get.FrequencyMax( self )
      dFrequencyMax = calllib( self.sLibrary , 'GenGetFrequencyMax' , self.hDevice );
    end
    function dFrequency = get.Frequency( self )
      dFrequency = calllib( self.sLibrary , 'GenGetFrequency' , self.hDevice );
    end
    function set.Frequency( self , dFrequency )
      calllib( self.sLibrary , 'GenSetFrequency' , self.hDevice , dFrequency );
      self.oLibTiePie.CheckStatus;
    end

    function dAmplitudeMin = get.AmplitudeMin( self )
      dAmplitudeMin = calllib( self.sLibrary , 'GenGetAmplitudeMin' , self.hDevice );
    end
    function dAmplitudeMax = get.AmplitudeMax( self )
      dAmplitudeMax = calllib( self.sLibrary , 'GenGetAmplitudeMax' , self.hDevice );
    end
    function dAmplitude = get.Amplitude( self )
      dAmplitude = calllib( self.sLibrary , 'GenGetAmplitude' , self.hDevice );
    end
    function set.Amplitude( self , dAmplitude )
      calllib( self.sLibrary , 'GenSetAmplitude' , self.hDevice , dAmplitude );
      self.oLibTiePie.CheckStatus;
    end

    function dOffsetMin = get.OffsetMin( self )
      dOffsetMin = calllib( self.sLibrary , 'GenGetOffsetMin' , self.hDevice );
    end
    function dOffsetMax = get.OffsetMax( self )
      dOffsetMax = calllib( self.sLibrary , 'GenGetOffsetMax' , self.hDevice );
    end
    function dOffset = get.Offset( self )
      dOffset = calllib( self.sLibrary , 'GenGetOffset' , self.hDevice );
    end
    function set.Offset( self , dOffset )
      calllib( self.sLibrary , 'GenSetOffset' , self.hDevice , dOffset );
      self.oLibTiePie.CheckStatus;
    end

    function dPhaseMin = get.PhaseMin( self )
      dPhaseMin = calllib( self.sLibrary , 'GenGetPhaseMin' , self.hDevice );
    end
    function dPhaseMax = get.PhaseMax( self )
      dPhaseMax = calllib( self.sLibrary , 'GenGetPhaseMax' , self.hDevice );
    end
    function dPhase = get.Phase( self )
      dPhase = calllib( self.sLibrary , 'GenGetPhase' , self.hDevice );
    end
    function set.Phase( self , dPhase )
      calllib( self.sLibrary , 'GenSetPhase' , self.hDevice , dPhase );
      self.oLibTiePie.CheckStatus;
    end

    function dSymmetryMin = get.SymmetryMin( self )
      dSymmetryMin = calllib( self.sLibrary , 'GenGetSymmetryMin' , self.hDevice );
    end
    function dSymmetryMax = get.SymmetryMax( self )
      dSymmetryMax = calllib( self.sLibrary , 'GenGetSymmetryMax' , self.hDevice );
    end
    function dSymmetry = get.Symmetry( self )
      dSymmetry = calllib( self.sLibrary , 'GenGetSymmetry' , self.hDevice );
    end
    function set.Symmetry( self , dSymmetry )
      calllib( self.sLibrary , 'GenSetSymmetry' , self.hDevice , dSymmetry );
      self.oLibTiePie.CheckStatus;
    end

    function qwDataLengthMin = get.DataLengthMin( self )
      qwDataLengthMin = calllib( self.sLibrary , 'GenGetDataLengthMin' , self.hDevice );
    end
    function qwDataLengthMax = get.DataLengthMax( self )
      qwDataLengthMax = calllib( self.sLibrary , 'GenGetDataLengthMax' , self.hDevice );
    end
    function qwDataLength = get.DataLength( self )
      qwDataLength = calllib( self.sLibrary , 'GenGetDataLength' , self.hDevice );
    end

    function bAmplitudeAutoRanging = get.AmplitudeAutoRanging( self )
      bAmplitudeAutoRanging = calllib( self.sLibrary , 'GenGetAmplitudeAutoRanging' , self.hDevice );
    end
    function set.AmplitudeAutoRanging( self , bAmplitudeAutoRanging )
      calllib( self.sLibrary , 'GenSetAmplitudeAutoRanging' , self.hDevice , bAmplitudeAutoRanging );
      self.oLibTiePie.CheckStatus;
    end

    function dAmplitudeRange = get.AmplitudeRange( self )
      dAmplitudeRange = calllib( self.sLibrary , 'GenGetAmplitudeRange' , self.hDevice );
    end
    function set.AmplitudeRange( self , dAmplitudeRange )
      calllib( self.sLibrary , 'GenSetAmplitudeRange' , self.hDevice , dAmplitudeRange );
      self.oLibTiePie.CheckStatus;
    end
    function darAmplitudeRanges = get.AmplitudeRanges( self )
      dwLength = calllib( self.sLibrary , 'GenGetAmplitudeRanges' , self.hDevice , [] , 0 );
      [ dwLength , darAmplitudeRanges ] = calllib( self.sLibrary , 'GenGetAmplitudeRanges' , self.hDevice , zeros( dwLength , 1 ) , dwLength );
    end

    function dwConnectorType = get.ConnectorType( self )
      dwConnectorType = LibTiePie.Enum.CONNECTORTYPE( calllib( self.sLibrary , 'GenGetConnectorType' , self.hDevice ) );
    end;

    function dImpedance = get.Impedance( self )
      dImpedance = calllib( self.sLibrary , 'GenGetImpedance' , self.hDevice );
    end;

    function byResolution = get.Resolution( self )
      byResolution = calllib( self.sLibrary , 'GenGetResolution' , self.hDevice );
    end
  end
end

Contact us