Unit OP930MDLL

Uses
Classes, Interfaces, Objects and Records
Constants
Variables

Description

OP930/OP940 DLL Functions

Overview

Functions and Procedures

function OP930_AbortRLReference(): integer; stdcall;
function OP930_ActiveModule(m: integer): integer; stdcall;
function OP930_Backlight(state: integer): integer; stdcall;
function OP930_BidirectionalMode(mode: integer): integer; stdcall;
function OP930_CheckDCOffsetDisplacement(measDist: double; dcDisplacement: double): integer; stdcall;
function OP930_CloseDriver: integer; stdcall;
function OP930_FastRLReference(cDel, iStart, iEnd: byte; thresh: Integer; var refPos: Integer; highPulse: boolean = false; gain: integer = 0): boolean; stdcall;
function OP930_GetActiveChannel(var channel: integer): integer; stdcall;
function OP930_GetChannelBuffer(): integer; stdcall;
function OP930_GetDLLRev: integer; stdcall;
function OP930_GetDLLStatus: integer; stdcall;
function OP930_GetDUTLength(var dutLength: double): integer; stdcall;
function OP930_GetExternalSwitch(var mode: byte): integer; stdcall;
function OP930_GetFrontpanel(var frontPanelZero: byte): integer; stdcall;
function OP930_GetFWRevision: integer; stdcall;
function OP930_GetModuleID(var id: integer): integer; stdcall;
function OP930_GetModuleNumber(var num: integer): integer; stdcall;
function OP930_GetReturnLossAB(var returnLossA,returnLossB: double): integer; stdcall;
function OP930_GetRLCorrection(ch: integer; wave: integer; var val: double; var ref: double): integer; stdcall;
function OP930_GetSamplerData(var sStartFixed, sStart, repRate, cDel, mode: byte): integer; stdcall;
function OP930_GetTemperature(var tempC: double; units: integer): integer; stdcall;
function OP930_GetUSBDeviceCount(var deviceCount: integer): integer; stdcall;
function OP930_GetUSBDeviceDescription(deviceNumber: integer; var deviceDescription: pansichar): integer; stdcall;
function OP930_GetUSBSerialNumber(deviceNumber: integer; var serialNumber: pansichar): integer; stdcall;
function OP930_GetUSBStatus(var haveError: boolean):integer; stdcall;
function OP930_GetWavelength(var wavelength: integer; var wIndex: integer; var count: integer): integer; stdcall;
function OP930_LoadModuleParameters: integer; stdcall;
function OP930_NextWavelength(var wavelength: integer; var wIndex: integer; var count: integer): integer; stdcall;
function OP930_OpenDriver(USBhandle: TFT_HANDLE): integer; stdcall;
function OP930_OpenUSBDevice(deviceNumber: integer; var handle: TFT_HANDLE):integer; stdcall;
function OP930_OperationMode(mode: integer): integer; stdcall;
function OP930_ReadAnalog(var analog:integer; var gain: integer; var mode: integer): integer; stdcall;
function OP930_ReadChannelBuffer(channel: integer; var power: double): integer; stdcall;
function OP930_ReadLoss(var loss: double): integer; stdcall;
function OP930_ReadPower(var power: double): integer; stdcall;
function OP930_ReferenceDUT(repRate : integer): integer; stdcall;
function OP930_ReferencePower(var refPower: double): integer; stdcall;
function OP930_ReferenceRefCable(var refPos: double): integer; stdcall;
function OP930_ReferenceReturnLoss(var refPosA, refPosB: byte): integer; stdcall;
function OP930_ReferenceReturnLoss_Scan(var refPosA, refPosB: byte; startPos: double = 0; stopPos: double = 0; gain: integer = 0; hvac: boolean = false): integer; stdcall;
function OP930_RemoteMode(mode: integer): integer; stdcall;
function OP930_RLCorrectionMode(mode: integer): integer; stdcall;
function OP930_ScanDCOffsetDisplacement(measDist: double; var dcDisplacement: double): integer; stdcall;
function OP930_ScanRLWindow(coarseDelay : integer; startPos : byte; endPos : byte; hvac: byte; var buffer: TSCANBUFFER): integer; stdcall;
function OP930_SelectModule(m: integer): integer; stdcall;
function OP930_SetAbsolute(): integer; stdcall;
function OP930_SetActiveChannel(channel: integer): integer; stdcall;
function OP930_SetAdditionalDisplacement(disp: byte): integer; stdcall;
function OP930_SetAutoRange(state: integer): integer; stdcall;
function OP930_SetCoarseDelay(d: byte): integer; stdcall;
function OP930_SetDCOffsetDisplacement(dcDisplacement: double): integer; stdcall;
function OP930_SetDirection(dir: integer): integer; stdcall;
function OP930_SetGain(gain: integer): integer; stdcall;
function OP930_SetNoiseThreshold(noise_threshold: byte): integer; stdcall;
function OP930_SetRefAutoRange(state: byte): integer; stdcall;
function OP930_SetReference(): integer; stdcall;
function OP930_SetRepRate(r: byte): integer; stdcall;
function OP930_SetRLCorrection(ch: integer; wave: integer; val: double; ref: double): integer; stdcall;
function OP930_SetRLLimit(limit: double): integer; stdcall;
function OP930_SetRLMeasurementPosition(refPosA, refPosB: byte): integer; stdcall;
function OP930_SetScanOffset(dist: double):integer; stdcall;
function OP930_SetSourceMode(mode: byte): integer; stdcall;
function OP930_SetSwitchChannel(channel: integer): integer; stdcall;
function OP930_SetWavelength(wavelength: integer): integer; stdcall;
function OP930_SourceON(source: integer; state: byte): integer; stdcall;
function OP930_UseSwitchOffsetTable(mode: integer): integer; stdcall;

Types

TFT_HANDLE = Uint32;
TFT_HANDLE_PTR = PUint32;

Description

Functions and Procedures

function OP930_AbortRLReference(): integer; stdcall;

Abort currently in-progress RL scan reference.

This requires driver initialization with OP930_OpenDriver.

Returns

1: OK, -1: fail

function OP930_ActiveModule(m: integer): integer; stdcall;

Check if module is active and returns USB Handle for that module if it is.

Parameters
module:
module number
Returns

USB Handle: module has been initialized, 0: module has not been initialized

function OP930_Backlight(state: integer): integer; stdcall;

Turn the front panel display backlight on or off.

This requires driver initialization with OP930_OpenDriver.

Parameters
state:
0: OFF, 1: ON
Returns

1: OK, -1: fail

function OP930_BidirectionalMode(mode: integer): integer; stdcall;

Toggle BiDi (Bidirectional) mode. When ON, internal OPM is used. When OFF, external OPM is used (if available).

This requires driver initialization with OP930_OpenDriver.

Parameters
mode:
0: OFF, 1: ON
Returns

1: OK, -1: fail

function OP930_CheckDCOffsetDisplacement(measDist: double; dcDisplacement: double): integer; stdcall;

Check the specified DC Offset Displacement.

This requires driver initialization with OP930_OpenDriver.

Parameters
measDist:
measurement distance (in meters)
dcDisplacement:
DC Offset Displacement (distance from measurement in meters)
Returns

1: DC OFFSET OK, -1: DC OFFSET HIGH

function OP930_CloseDriver: integer; stdcall;

Close the driver, closing the connection and communication with the device. Device must be reinitialized after calling this.

This requires driver initialization with OP930_OpenDriver.

Returns

1: OK, -1: fail

function OP930_FastRLReference(cDel, iStart, iEnd: byte; thresh: Integer; var refPos: Integer; highPulse: boolean = false; gain: integer = 0): boolean; stdcall;

Perform a fast, RL scan reference. This is faster than the internal reference using OP930_ReferenceReturnLoss and allows open APC referencing.

This requires driver initialization with OP930_OpenDriver.

Parameters
cDel:
coarse delay (scan window)
iStart:
start position
iEnd:
end position
thresh:
reflection threshold value
refPos:
reference position, if found (by ref)
highPulse:
true: high pulse, false: low pulse
gain:
gain stage (0-3)
Returns

1: OK, -1: fail

function OP930_GetActiveChannel(var channel: integer): integer; stdcall;

Get the current active channel.

This requires driver initialization with OP930_OpenDriver.

Parameters
channel:
active channel (by ref)
Returns

1: OK, -1: fail

function OP930_GetChannelBuffer(): integer; stdcall;

Measure power from all channels simultaneously.

This requires driver initialization with OP930_OpenDriver.

Returns

1: OK, -1: fail

function OP930_GetDLLRev: integer; stdcall;

Get the revision number of DLL

Returns

revision number

function OP930_GetDLLStatus: integer; stdcall;

Get the initialization status of the DLL and USB device

Returns

1: OK, -5: no USB device found, -4: communication error, -3: USB Read Error, -2: USB Write Error

function OP930_GetDUTLength(var dutLength: double): integer; stdcall;

Calculate the DUT length. Must call OP930_ReferenceRefCable and OP930_ReferenceDUT first.

This requires driver initialization with OP930_OpenDriver.

Parameters
dutLength:
length of the DUT in meters (by ref)
Returns

1: OK, -1: fail

function OP930_GetExternalSwitch(var mode: byte): integer; stdcall;

Check if an external switch is attached (for OP940 with OP725).

This requires driver initialization with OP930_OpenDriver.

Parameters
mode:
1: using external switch, otherwise, no external switch (by ref)
Returns

1: OK, -1: fail

function OP930_GetFrontpanel(var frontPanelZero: byte): integer; stdcall;

Get the frontpanel position. The frontpanel is typically in coarse delay = 4. Use this value to convert coarse position/delay and fine position into meters.

rlPosMeters = (coarse_delay - 4) * 10.0 + rlPos - frontpanelZero

This requires driver initialization with OP930_OpenDriver.

Parameters
frontPanelZero:
frontpanel zero position
Returns

1: OK, -1: fail

function OP930_GetFWRevision: integer; stdcall;

Get the device's firmware revision

Returns

firmware revision number

function OP930_GetModuleID(var id: integer): integer; stdcall;

Get the Module ID (internal product code) of the device.

This requires driver initialization with OP930_OpenDriver.

Module IDs

  • 10 – OP250

  • 11 – OP510

  • 12 – OP710

  • 13 – OP831

  • 14 – OP930

  • 15 – OP750

  • 16 – OP815

  • 17 – OP1100

  • 18 – OP1021

  • 19 – OP1302

  • 20 – OP815D

  • 21 – OP720

  • 22 – OP850

  • 23 – OP280

  • 24 – OP715

  • 25 – OP712

  • 26 – OP931

  • 27 – OP931-FTTX

  • 28 – OP480

Parameters
id:
Module ID (by ref)
function OP930_GetModuleNumber(var num: integer): integer; stdcall;

Get the module number of currently selected module.

Parameters
num:
module number (by ref)
Returns

1: module has been initialized, -1: module has not been initialized

function OP930_GetReturnLossAB(var returnLossA,returnLossB: double): integer; stdcall;

Measure Return Loss for the current source pair (AB or CD) simultaneously. Must perform a reference with OP930_ReferenceReturnLoss and set the measurement position with OP930_SetRLMeasurementPosition.

This requires driver initialization with OP930_OpenDriver.

Parameters
returnLossA:
return loss for Wave A (by ref)
returnLossB:
return loss for Wave B (by ref)
Returns

1: OK, -1: fail

function OP930_GetRLCorrection(ch: integer; wave: integer; var val: double; var ref: double): integer; stdcall;

Get RL measurement correction values per channel per wavelength.

This requires driver initialization with OP930_OpenDriver.

Parameters
ch:
channel to apply this correction to
wave:
wavelength to apply this correction to
val:
intended/corrected reference reflection value (by ref)
ref:
measured reference reflection value (by ref)
Returns

1: OK, -1: fail

function OP930_GetSamplerData(var sStartFixed, sStart, repRate, cDel, mode: byte): integer; stdcall;

Get Return Loss sampler data.

This requires driver initialization with OP930_OpenDriver.

Parameters
sStartFixed:
fixed scan start (by ref)
sStart:
scan start (by ref)
repRate:
repetition rate (by ref)
cDel:
coarse delay (by ref)
mode:
sampler mode (by ref)
Returns

1: OK, -1: fail

function OP930_GetTemperature(var tempC: double; units: integer): integer; stdcall;

Get the temperature in the specified units.

This requires driver initialization with OP930_OpenDriver.

Parameters
tempC:
temperature value (by ref)
units:

  • 0 – raw digital value

  • 1 – Celsius

  • 2 – Fahrenheit

Returns

1: OK, -1: fail

function OP930_GetUSBDeviceCount(var deviceCount: integer): integer; stdcall;

Get the number of connected compatible USB devices.

Parameters
devCount:
USB device count (by ref)
Returns

1: OK, -1: fail

function OP930_GetUSBDeviceDescription(deviceNumber: integer; var deviceDescription: pansichar): integer; stdcall;

Get the USB Device Description (up to 16 characters) of the specified device. Caller must allocate memory for deviceDescription buffer (16 characters + 1 null-terminator).

Parameters
deviceNumber:
the USB device number
deviceDescription:
a pointer to a null-terminated character array (by ref)
Returns

1: OK, -1: fail

function OP930_GetUSBSerialNumber(deviceNumber: integer; var serialNumber: pansichar): integer; stdcall;

Get the USB Device Serial Number (8 characters) of the specified device. Caller must allocate memory for serialNumber buffer (8 characters + 1 null-terminator).

Parameters
deviceNumber:
the USB device number
serialNumber:
a pointer to a null-terminated character array (by ref)
Returns

1: OK, -1: fail

function OP930_GetUSBStatus(var haveError: boolean):integer; stdcall;

Get the USB error flag of last operation as well as the error code.

Parameters
haveError:
error flag (by ref)
Returns

0: OK, 1: invalid handle, 2: device not found, 3: device not opened, 4: IO error

function OP930_GetWavelength(var wavelength: integer; var wIndex: integer; var count: integer): integer; stdcall;

Get the active channel's current wavelength information.

This requires driver initialization with OP930_OpenDriver.

Parameters
wavelength:
wavelength value in nanometers (by ref)
wIndex:
the index in the list of wavelengths (by ref)
count:
the number of available wavelengths (by ref)
Returns

1: OK, -1: fail

function OP930_LoadModuleParameters: integer; stdcall;

@ exclude

function OP930_NextWavelength(var wavelength: integer; var wIndex: integer; var count: integer): integer; stdcall;

Set wavelenght to the next one the active channel's list of available measurement wavelength.

This requires driver initialization with OP930_OpenDriver.

Parameters
wavelength:
wavelength value in nanometers (by ref)
wIndex:
the index in the list of wavelengths (by ref)
count:
the number of available wavelengths (by ref)
Returns

1: OK, -1: fail

function OP930_OpenDriver(USBhandle: TFT_HANDLE): integer; stdcall;

Initialize the device with the given USB Handle.

Parameters
USBHandle:
USB Handle for the device. Optionally, 0 can be used as a shortcut to open the first USB device detected.
Returns

1: OK, -5: no USB device found, -4: communication error, -3: USB Read Error, -2: USB Write Error

function OP930_OpenUSBDevice(deviceNumber: integer; var handle: TFT_HANDLE):integer; stdcall;

Open the specified USB device and get a USB Handle. The device is specified by USB Device Number. The USB Handle is used with OP930_OpenDriver.

Parameters
deviceNumber:
USB device number
handle:
USB Handle (by ref)
Returns

1: OK, -1: open device failed

function OP930_OperationMode(mode: integer): integer; stdcall;

Toggle the source pair (A/B, C/D) for FTTX devices.

This requires driver initialization with OP930_OpenDriver.

Parameters
mode:
1: A/B Pair, 2: C/D Pair
Returns

1: OK, -1: fail

function OP930_ReadAnalog(var analog:integer; var gain: integer; var mode: integer): integer; stdcall;

Read raw ADC values for current active OPM channel.

This requires driver initialization with OP930_OpenDriver.

Parameters
analog:
raw analog-to-digital converter value (by ref)
gain:
raw gain value (by ref)
mode:
power measurement mode (by ref)
Returns

1: OK, -1: fail

function OP930_ReadChannelBuffer(channel: integer; var power: double): integer; stdcall;

Read the power measured by OP930_GetChannelBuffer for the specified channel. Must call OP930_GetChannelBuffer first.

This requires driver initialization with OP930_OpenDriver.

Parameters
channel:
channel to read
power:
power measurement (by ref)
Returns

1: OK, -1: fail

function OP930_ReadLoss(var loss: double): integer; stdcall;

Read power loss from active channel. Must use OP930_SetReference or OP930_ReferencePower to perform a reference beforehand.

This requires driver initialization with OP930_OpenDriver.

Parameters
loss:
power loss measurement (by ref)
Returns

1: OK, -1: fail

function OP930_ReadPower(var power: double): integer; stdcall;

Read power from active channel.

This requires driver initialization with OP930_OpenDriver.

Parameters
power:
power measurement (by ref)
Returns

1: OK, -1: fail

function OP930_ReferenceDUT(repRate : integer): integer; stdcall;

Perform a software-based RL scan reference to the end of the DUT. This is used in conjunction with OP930_GetDUTLength to quickly measure the length of the DUT.

This requires driver initialization with OP930_OpenDriver.

Parameters
repRate:
repetition rate, larger values allow for scanning longer distances
Returns

1: OK, -1: fail

function OP930_ReferencePower(var refPower: double): integer; stdcall;

Perform internal power reference for active OPM channel.

This requires driver initialization with OP930_OpenDriver.

Parameters
refPower:
reference power in dBm (by ref)
Returns

1: OK, -1: fail

function OP930_ReferenceRefCable(var refPos: double): integer; stdcall;

Perform a software-based RL scan reference (instead of the internal reference).

This requires driver initialization with OP930_OpenDriver.

Parameters
refPos:
reference position (by ref)
Returns

1: OK, -1: fail

function OP930_ReferenceReturnLoss(var refPosA, refPosB: byte): integer; stdcall;

Reference Return Loss for current source pair (AB or CD) simultaneously. Must perform OP930_GetSamplerData after calling this to get the scan window (coarse position/delay). The positions from this function represent the fine position (0.1 meter interval) within the scan window (coarse position/delay).

This requires driver initialization with OP930_OpenDriver.

Parameters
refPosA:
Wave A fine position (by ref)
refPosB:
Wave B fine position (by ref)
Returns

1: OK, -1: fail

function OP930_ReferenceReturnLoss_Scan(var refPosA, refPosB: byte; startPos: double = 0; stopPos: double = 0; gain: integer = 0; hvac: boolean = false): integer; stdcall;

Perform a software-based RL scan reference (instead of the internal reference). This is usually faster than the internal reference and allows for open APC Referencing

This requires driver initialization with OP930_OpenDriver.

Parameters
refPosA:
wavelength A reference position (by ref)
refPosB:
wavelength B reference position (by ref)
startPos:
scan start position (meters)
stopPos:
scan stop position (meters)
gain:
0-7 (0 for PC, 6 for APC)
hvac:
false: LOW, true: HIGH (set to LOW for PC Reference, HIGH for APC Reference)
Returns

1: OK, -1: fail

function OP930_RemoteMode(mode: integer): integer; stdcall;

Set Remote Mode. This will display a static logo and locks out user interaction from the front-panel.

This requires driver initialization with OP930_OpenDriver.

Parameters
mode:
0: Remote Mode OFF, 1: Remote Mode ON
Returns

1: OK, -1: fail

function OP930_RLCorrectionMode(mode: integer): integer; stdcall;

Use RL Correction specified from OP930_SetRLCorrection.

This requires driver initialization with OP930_OpenDriver.

Parameters
ch:
channel to apply this correction to
wave:
wavelength to apply this correction to
val:
intended/corrected reference reflection value
ref:
measured reference reflection value
Returns

1: OK, -1: fail

function OP930_ScanDCOffsetDisplacement(measDist: double; var dcDisplacement: double): integer; stdcall;

Scan for an appropriate DC Offset Displacement from the specified.

Example usage:

// ...

// Scan for a good DC Offset then set that as the new DC Offset Displacmeent


if (OP930_ScanDCOffsetDisplacement(refDistance, dcDistance) = 1)
begin

	OP930_SetDCOffsetDisplacement(dcDistance);
	
end;

// ...

This requires driver initialization with OP930_OpenDriver.

Parameters
measDist:
measurement distance (in meters)
dcDisplacement:
Valid DC Offset Displacement, if found (distance from measurement in meters, by ref)
Returns

1: DC OFFSET FOUND, -1: NO DC OFFSET FOUND

function OP930_ScanRLWindow(coarseDelay : integer; startPos : byte; endPos : byte; hvac: byte; var buffer: TSCANBUFFER): integer; stdcall;

Perform a scan across the specified scan window from a specified start position to an end position.

This requires driver initialization with OP930_OpenDriver.

Parameters
coarseDelay:
coarse delay/scan window
startPos:
start position for the scan from 0-255
endPos:
end position for the scan from 0-255, must be greater than startPos
hvac:
0: Low pulse, 1: High pulse
buffer:
array of 8 raw 2-byte ADC values (in wavelength pairs for 4 gain levels) for each of the positions in a scan window (by ref)
Returns

1: OK, -1: fail

function OP930_SelectModule(m: integer): integer; stdcall;

Select the specified module. All subsequent USB commands will be directed to the seleted module. The module number corresponds to the device number.

Parameters
module:
module number
Returns

1: module has been initialized, 0: module has not been initialized

function OP930_SetAbsolute(): integer; stdcall;

Set active channel to absolute (dBm) measurement mode.

This requires driver initialization with OP930_OpenDriver.

Returns

1: OK, -1: fail

function OP930_SetActiveChannel(channel: integer): integer; stdcall;

Set the current active channel.

This requires driver initialization with OP930_OpenDriver.

Parameters
channel:
active channel
Returns

1: OK, -1: fail

function OP930_SetAdditionalDisplacement(disp: byte): integer; stdcall;

Set additional displacement for Return Loss DC offset measurement.

This requires driver initialization with OP930_OpenDriver.

Parameters
disp:
displacement amount, 1 = 0.1 meters, 2 = 0.2 meters, etc.
Returns

1: OK, -1: fail

function OP930_SetAutoRange(state: integer): integer; stdcall;

Set the Auto-Range on or off (Range-Hold).

This requires driver initialization with OP930_OpenDriver.

Parameters
state:
0: Auto-Range OFF (Range-Hold), 1: Auto-Range ON
Returns

1: OK, -1: fail

function OP930_SetCoarseDelay(d: byte): integer; stdcall;

Set the scan window (coarse position/delay) for Return Loss measurements. Increasing this value by 1 moves the window forward by 10 meters. The window contains 0-255 fine position intervals (0.1 meters) where 0-100 overlaps with the previous window and 200-255 overlaps with the next window. Subsequent calls to OP930_SetRLMeasurementPosition will change the fine position within this window.

This requires driver initialization with OP930_OpenDriver.

Parameters
d:
coarse delay (min 4)
Returns

1: OK, -1: fail

function OP930_SetDCOffsetDisplacement(dcDisplacement: double): integer; stdcall;

Set the DC Offset Displacement to the one specified.

This requires driver initialization with OP930_OpenDriver.

Parameters
dcDisplacement:
DC Offset Displacement (distance from measurement in meters)
Returns

1: OK, -1: fail

function OP930_SetDirection(dir: integer): integer; stdcall;

Set the A-B or B-A direction for BiDi devices.

This requires driver initialization with OP930_OpenDriver.

Parameters
mode:
1: A-B Direction, 2: B-A Direction
Returns

1: OK, -1: fail

function OP930_SetGain(gain: integer): integer; stdcall;

Set the current gain (must have Auto-Range set to off).

This requires driver initialization with OP930_OpenDriver.

Parameters
gain:
gain value from 0 to 7
Returns

1: OK, -1: fail

function OP930_SetNoiseThreshold(noise_threshold: byte): integer; stdcall;

Set the ADC value max delta (0-255) when comparing the DC Offset ADC value to the noise ADC (typically 400).

This requires driver initialization with OP930_OpenDriver.

Parameters
noise_threshold:
noise threshold (0-255)
Returns

1: OK, -1: fail

function OP930_SetRefAutoRange(state: byte): integer; stdcall;

Set Return Loss reference autoranging ON or OFF. When ON, the Return Loss reference will automatically move the scan window forward when no reference is found in the current one. When OFF, only the current scan window is scanned for a reference position.

This requires driver initialization with OP930_OpenDriver.

Parameters
state:
0: OFF, 1: ON
Returns

1: OK, -1: fail

function OP930_SetReference(): integer; stdcall;

Perform internal power reference then set active channel to relative (dB) measurement mode.

This requires driver initialization with OP930_OpenDriver.

Returns

1: OK, -1: fail

function OP930_SetRepRate(r: byte): integer; stdcall;

Set the repetition rate of the pulsed source.

This requires driver initialization with OP930_OpenDriver.

Parameters
r:
rate between 1-100
Returns

1: OK, -1: fail

function OP930_SetRLCorrection(ch: integer; wave: integer; val: double; ref: double): integer; stdcall;

Set RL measurement correction values per channel per wavelength. This is used to adjust the reflection value (RL measurement offset).

This requires driver initialization with OP930_OpenDriver.

Parameters
ch:
channel to apply this correction to
wave:
wavelength to apply this correction to
val:
intended/corrected reference reflection value
ref:
measured reference reflection value
Returns

1: OK, -1: fail

function OP930_SetRLLimit(limit: double): integer; stdcall;

Set RL measurement limit/cap. RL measurements that are greater than this value will be set to this value.

This requires driver initialization with OP930_OpenDriver.

Parameters
limit:
RL limit in dB
Returns

1: OK, -1: fail

function OP930_SetRLMeasurementPosition(refPosA, refPosB: byte): integer; stdcall;

Set the Return Loss measurement position for current source pair (AB or CD) simultaneously. Must perform OP930_SetCoarseDelay before calling this to set the scan window (coarse position/delay). The positions from this function represent the fine position (0.1 meter interval) within the scan window (coarse position/delay).

This requires driver initialization with OP930_OpenDriver.

Parameters
refPosA:
Wave A fine position
refPosB:
Wave B fine position
Returns

1: OK, -1: fail

function OP930_SetScanOffset(dist: double):integer; stdcall;

Set the Return Loss reference scan offset distance in meters. This is the distance from the front panel that is skipped when an RL reference is performed.

This requires driver initialization with OP930_OpenDriver.

Parameters
dist:
distance in meters
Returns

1: OK, -1: fail

function OP930_SetSourceMode(mode: byte): integer; stdcall;

Toggle source between IL Mode (CW) and RL Mode (Pulsed). When used with OperationMode(2), this changes to Waves C and D.

This requires driver initialization with OP930_OpenDriver.

Parameters
mode:
0: Sources OFF, 1: Wave A CW, 2: Wave B CW, 2: Pulsed A & B
Returns

1: OK, -1: fail

function OP930_SetSwitchChannel(channel: integer): integer; stdcall;

Set the source switch channel.

This requires driver initialization with OP930_OpenDriver.

Parameters
channel:
source switch channel (1-indexed)
Returns

1: OK, -1: fail

function OP930_SetWavelength(wavelength: integer): integer; stdcall;

Set the active channel's measurement wavelength. This will attempt to find the closest match from the internally defined list of discrete wavelengths.

This requires driver initialization with OP930_OpenDriver.

Parameters
wavelength:
wavelength value in nanometers
Returns

1: OK, -1: fail

function OP930_SourceON(source: integer; state: byte): integer; stdcall;

Directly toggle a source ON or OFF.

This requires driver initialization with OP930_OpenDriver.

Parameters
source:
source number
state:
0: OFF, 1: ON
Returns

1: OK, -1: fail

function OP930_UseSwitchOffsetTable(mode: integer): integer; stdcall;

Toggle usage of the Switch Offset Table (SWOT).

This requires driver initialization with OP930_OpenDriver.

Parameters
mode:
0: OFF, 1: ON
Returns

1: OK, -1: fail

Types

TFT_HANDLE = Uint32;

USB Handle Type. (Use Uint64 (64-bit unsigned int) for 64-bit version)

TFT_HANDLE_PTR = PUint32;

USB Handle Pointer Type. (Use PUint64 (64-bit unsigned integer pointer) for 64-bit version)


Generated by PasDoc 0.15.0.