diff --git a/wavelengthTrace_Wavemeter.py b/wavelengthTrace_Wavemeter.py new file mode 100644 index 0000000..fe0e9d3 --- /dev/null +++ b/wavelengthTrace_Wavemeter.py @@ -0,0 +1,53 @@ +import wlmData +import time +import csv +from datetime import datetime + +#time buffer btw measurements +buffer = 1e-3 #s + +#stops automatically after T seconds +T = 10 #s + +#change the path to the local wlmData.dll location +# Load the DLL +# DLL_PATH = "/home/fabio/Programs/HighFinesse/Wavelength Meter WS6 4572/Projects/DataDemo/Python/lib/libwlmData.so" # linux +DLL_PATH = "C:\Windows\SysWOW64\wlmData.dll" # windows +# DLL_PATH = "C:\Program Files (x86)\HighFinesse\Wavelength Meter WS6 4572\Projects\NetworkAccess\NetworkAccess_0007\Client_Windows\x64/wlmData.dll" # NetAccessFolder +wlmData.LoadDLL(DLL_PATH) + +# File to store the data +current_time = datetime.now().strftime("%Y%m%d_%H%M") +output_file = f"data/wavelength_data_{current_time}_buf{buffer}s_{T}s.csv" + +# Open the file for writing +with open(output_file, mode='w', newline='') as file: + writer = csv.writer(file) + writer.writerow([f'buffer btw datapoints {buffer} s', '']) + writer.writerow(["timestamp", "Wavelength (nm)"]) # Header + + print(f"Reading wavelength data for {T} seconds. Wait or Press Ctrl+C to stop.") + + start_time = time.time() + + try: + while True: + + # Get the current timestamp + elapsed_time = time.time() - start_time + + if elapsed_time > T: + print("Measurement completed!") + break + + # Get the wavelength + wavelength = wlmData.dll.GetWavelengthNum(4,0.0) + + # Log the data + writer.writerow([elapsed_time, wavelength]) + print(f"Time: {elapsed_time}, Wavelength: {wavelength} nm") + + # Wait for a short interval before the next reading + time.sleep(buffer) + except KeyboardInterrupt: + print("Measurement stopped.") diff --git a/wlmConst.py b/wlmConst.py new file mode 100644 index 0000000..3f259e7 --- /dev/null +++ b/wlmConst.py @@ -0,0 +1,489 @@ +###################################################################################################### +# @package wlmData +# @file wlmConst.py +# @copyright HighFinesse GmbH. +# @date 2018.09.15 +# @version 0.1 +# +# Homepage: http://www.highfinesse.com/ +# +# @brief Constant values for wlmData.dll API. +# +# Changelog: +# ---------- +# 2018.09.15 +# v0.1 - Initial release +#/ + +## ########### Constants ############################################## +## Instantiating Constants for 'RFC' parameter +cInstCheckForWLM = -1 +cInstResetCalc = 0 +cInstReturnMode = cInstResetCalc +cInstNotification = 1 +cInstCopyPattern = 2 +cInstCopyAnalysis = cInstCopyPattern +cInstControlWLM = 3 +cInstControlDelay = 4 +cInstControlPriority = 5 + +## Notification Constants for 'Mode' parameter +cNotifyInstallCallback = 0 +cNotifyRemoveCallback = 1 +cNotifyInstallWaitEvent = 2 +cNotifyRemoveWaitEvent = 3 +cNotifyInstallCallbackEx = 4 +cNotifyInstallWaitEventEx = 5 + +## ResultError Constants of Set...-functions +ResERR_NoErr = 0 +ResERR_WlmMissing = -1 +ResERR_CouldNotSet = -2 +ResERR_ParmOutOfRange = -3 +ResERR_WlmOutOfResources = -4 +ResERR_WlmInternalError = -5 +ResERR_NotAvailable = -6 +ResERR_WlmBusy = -7 +ResERR_NotInMeasurementMode = -8 +ResERR_OnlyInMeasurementMode = -9 +ResERR_ChannelNotAvailable = -10 +ResERR_ChannelTemporarilyNotAvailable = -11 +ResERR_CalOptionNotAvailable = -12 +ResERR_CalWavelengthOutOfRange = -13 +ResERR_BadCalibrationSignal = -14 +ResERR_UnitNotAvailable = -15 +ResERR_FileNotFound = -16 +ResERR_FileCreation = -17 +ResERR_TriggerPending = -18 +ResERR_TriggerWaiting = -19 +ResERR_NoLegitimation = -20 + +## Mode Constants for Callback-Export and WaitForWLMEvent-function +cmiResultMode = 1 +cmiRange = 2 +cmiPulse = 3 +cmiPulseMode = cmiPulse +cmiWideLine = 4 +cmiWideMode = cmiWideLine +cmiFast = 5 +cmiFastMode = cmiFast +cmiExposureMode = 6 +cmiExposureValue1 = 7 +cmiExposureValue2 = 8 +cmiDelay = 9 +cmiShift = 10 +cmiShift2 = 11 +cmiReduce = 12 +cmiReduced = cmiReduce +cmiScale = 13 +cmiTemperature = 14 +cmiLink = 15 +cmiOperation = 16 +cmiDisplayMode = 17 +cmiPattern1a = 18 +cmiPattern1b = 19 +cmiPattern2a = 20 +cmiPattern2b = 21 +cmiMin1 = 22 +cmiMax1 = 23 +cmiMin2 = 24 +cmiMax2 = 25 +cmiNowTick = 26 +cmiCallback = 27 +cmiFrequency1 = 28 +cmiFrequency2 = 29 +cmiDLLDetach = 30 +cmiVersion = 31 +cmiAnalysisMode = 32 +cmiDeviationMode = 33 +cmiDeviationReference = 34 +cmiDeviationSensitivity = 35 +cmiAppearance = 36 +cmiAutoCalMode = 37 +cmiWavelength1 = 42 +cmiWavelength2 = 43 +cmiLinewidth = 44 +cmiLinewidthMode = 45 +cmiLinkDlg = 56 +cmiAnalysis = 57 +cmiAnalogIn = 66 +cmiAnalogOut = 67 +cmiDistance = 69 +cmiWavelength3 = 90 +cmiWavelength4 = 91 +cmiWavelength5 = 92 +cmiWavelength6 = 93 +cmiWavelength7 = 94 +cmiWavelength8 = 95 +cmiVersion0 = cmiVersion +cmiVersion1 = 96 +cmiPulseDelay = 99 +cmiDLLAttach = 121 +cmiSwitcherSignal = 123 +cmiSwitcherMode = 124 +cmiExposureValue11 = cmiExposureValue1 +cmiExposureValue12 = 125 +cmiExposureValue13 = 126 +cmiExposureValue14 = 127 +cmiExposureValue15 = 128 +cmiExposureValue16 = 129 +cmiExposureValue17 = 130 +cmiExposureValue18 = 131 +cmiExposureValue21 = cmiExposureValue2 +cmiExposureValue22 = 132 +cmiExposureValue23 = 133 +cmiExposureValue24 = 134 +cmiExposureValue25 = 135 +cmiExposureValue26 = 136 +cmiExposureValue27 = 137 +cmiExposureValue28 = 138 +cmiPatternAverage = 139 +cmiPatternAvg1 = 140 +cmiPatternAvg2 = 141 +cmiAnalogOut1 = cmiAnalogOut +cmiAnalogOut2 = 142 +cmiMin11 = cmiMin1 +cmiMin12 = 146 +cmiMin13 = 147 +cmiMin14 = 148 +cmiMin15 = 149 +cmiMin16 = 150 +cmiMin17 = 151 +cmiMin18 = 152 +cmiMin21 = cmiMin2 +cmiMin22 = 153 +cmiMin23 = 154 +cmiMin24 = 155 +cmiMin25 = 156 +cmiMin26 = 157 +cmiMin27 = 158 +cmiMin28 = 159 +cmiMax11 = cmiMax1 +cmiMax12 = 160 +cmiMax13 = 161 +cmiMax14 = 162 +cmiMax15 = 163 +cmiMax16 = 164 +cmiMax17 = 165 +cmiMax18 = 166 +cmiMax21 = cmiMax2 +cmiMax22 = 167 +cmiMax23 = 168 +cmiMax24 = 169 +cmiMax25 = 170 +cmiMax26 = 171 +cmiMax27 = 172 +cmiMax28 = 173 +cmiAvg11 = cmiPatternAvg1 +cmiAvg12 = 174 +cmiAvg13 = 175 +cmiAvg14 = 176 +cmiAvg15 = 177 +cmiAvg16 = 178 +cmiAvg17 = 179 +cmiAvg18 = 180 +cmiAvg21 = cmiPatternAvg2 +cmiAvg22 = 181 +cmiAvg23 = 182 +cmiAvg24 = 183 +cmiAvg25 = 184 +cmiAvg26 = 185 +cmiAvg27 = 186 +cmiAvg28 = 187 +cmiPatternAnalysisWritten = 202 +cmiSwitcherChannel = 203 +cmiStartCalibration = 235 +cmiEndCalibration = 236 +cmiAnalogOut3 = 237 +cmiAnalogOut4 = 238 +cmiAnalogOut5 = 239 +cmiAnalogOut6 = 240 +cmiAnalogOut7 = 241 +cmiAnalogOut8 = 242 +cmiIntensity = 251 +cmiPower = 267 +cmiActiveChannel = 300 +cmiPIDCourse = 1030 +cmiPIDUseTa = 1031 +cmiPIDUseT = cmiPIDUseTa +cmiPID_T = 1033 +cmiPID_P = 1034 +cmiPID_I = 1035 +cmiPID_D = 1036 +cmiDeviationSensitivityDim = 1040 +cmiDeviationSensitivityFactor = 1037 +cmiDeviationPolarity = 1038 +cmiDeviationSensitivityEx = 1039 +cmiDeviationUnit = 1041 +cmiDeviationBoundsMin = 1042 +cmiDeviationBoundsMax = 1043 +cmiDeviationRefMid = 1044 +cmiDeviationRefAt = 1045 +cmiPIDConstdt = 1059 +cmiPID_dt = 1060 +cmiPID_AutoClearHistory = 1061 +cmiDeviationChannel = 1063 +cmiPID_ClearHistoryOnRangeExceed = 1069 +cmiAutoCalPeriod = 1120 +cmiAutoCalUnit = 1121 +cmiAutoCalChannel = 1122 +cmiServerInitialized = 1124 +cmiWavelength9 = 1130 +cmiExposureValue19 = 1155 +cmiExposureValue29 = 1180 +cmiMin19 = 1205 +cmiMin29 = 1230 +cmiMax19 = 1255 +cmiMax29 = 1280 +cmiAvg19 = 1305 +cmiAvg29 = 1330 +cmiWavelength10 = 1355 +cmiWavelength11 = 1356 +cmiWavelength12 = 1357 +cmiWavelength13 = 1358 +cmiWavelength14 = 1359 +cmiWavelength15 = 1360 +cmiWavelength16 = 1361 +cmiWavelength17 = 1362 +cmiExternalInput = 1400 +cmiPressure = 1465 +cmiBackground = 1475 +cmiDistanceMode = 1476 +cmiInterval = 1477 +cmiIntervalMode = 1478 +cmiCalibrationEffect = 1480 +cmiLinewidth1 = cmiLinewidth +cmiLinewidth2 = 1481 +cmiLinewidth3 = 1482 +cmiLinewidth4 = 1483 +cmiLinewidth5 = 1484 +cmiLinewidth6 = 1485 +cmiLinewidth7 = 1486 +cmiLinewidth8 = 1487 +cmiLinewidth9 = 1488 +cmiLinewidth10 = 1489 +cmiLinewidth11 = 1490 +cmiLinewidth12 = 1491 +cmiLinewidth13 = 1492 +cmiLinewidth14 = 1493 +cmiLinewidth15 = 1494 +cmiLinewidth16 = 1495 +cmiLinewidth17 = 1496 +cmiTriggerState = 1497 +cmiDeviceAttach = 1501 +cmiDeviceDetach = 1502 +cmiAutoExpoMin = 1517 +cmiAutoExpoMax = 1518 +cmiAutoExpoStepUp = 1519 +cmiAutoExpoStepDown = 1520 +cmiAutoExpoAtSaturation = 1521 +cmiAutoExpoAtLowSignal = 1522 +cmiAutoExpoFeedback = 1523 +cmiAveragingCount = 1524 +cmiAveragingMode = 1525 +cmiAveragingType = 1526 + +## Index constants for Get- and SetExtraSetting +cesCalculateLive = 4501 + +## WLM Control Mode Constants +cCtrlWLMShow = 1 +cCtrlWLMHide = 2 +cCtrlWLMExit = 3 +cCtrlWLMStore = 4 +cCtrlWLMCompare = 5 +cCtrlWLMWait = 0x0010 +cCtrlWLMStartSilent = 0x0020 +cCtrlWLMSilent = 0x0040 +cCtrlWLMStartDelay = 0x0080 + +## Operation Mode Constants (for "Operation" and "GetOperationState" functions) +cStop = 0 +cAdjustment = 1 +cMeasurement = 2 + +## Base Operation Constants (To be used exclusively, only one of this list at a time, +## but still can be combined with "Measurement Action Addition Constants". See below.) +cCtrlStopAll = cStop +cCtrlStartAdjustment = cAdjustment +cCtrlStartMeasurement = cMeasurement +cCtrlStartRecord = 0x0004 +cCtrlStartReplay = 0x0008 +cCtrlStoreArray = 0x0010 +cCtrlLoadArray = 0x0020 + +## Additional Operation Flag Constants (combine with "Base Operation Constants" above.) +cCtrlDontOverwrite = 0x0000 +cCtrlOverwrite = 0x1000 ## don't combine with cCtrlFileDialog +cCtrlFileGiven = 0x0000 +cCtrlFileDialog = 0x2000 ## don't combine with cCtrlOverwrite and cCtrlFileASCII +cCtrlFileBinary = 0x0000 ## *.smr, *.ltr +cCtrlFileASCII = 0x4000 ## *.smx, *.ltx, don't combine with cCtrlFileDialog + +## Measurement Control Mode Constants +cCtrlMeasDelayRemove = 0 +cCtrlMeasDelayGenerally = 1 +cCtrlMeasDelayOnce = 2 +cCtrlMeasDelayDenyUntil = 3 +cCtrlMeasDelayIdleOnce = 4 +cCtrlMeasDelayIdleEach = 5 +cCtrlMeasDelayDefault = 6 + +## Measurement Triggering Action Constants +cCtrlMeasurementContinue = 0 +cCtrlMeasurementInterrupt = 1 +cCtrlMeasurementTriggerPoll = 2 +cCtrlMeasurementTriggerSuccess = 3 +cCtrlMeasurementEx = 0x0100 + +## ExposureRange Constants +cExpoMin = 0 +cExpoMax = 1 +cExpo2Min = 2 +cExpo2Max = 3 + +## Amplitude Constants +cMin1 = 0 +cMin2 = 1 +cMax1 = 2 +cMax2 = 3 +cAvg1 = 4 +cAvg2 = 5 + +## Measurement Range Constants +cRange_250_410 = 4 +cRange_250_425 = 0 +cRange_300_410 = 3 +cRange_350_500 = 5 +cRange_400_725 = 1 +cRange_700_1100 = 2 +cRange_800_1300 = 6 +cRange_900_1500 = cRange_800_1300 +cRange_1100_1700 = 7 +cRange_1100_1800 = cRange_1100_1700 + +## Measurement Range Model Constants +cRangeModelOld = 65535 +cRangeModelByOrder = 65534 +cRangeModelByWavelength = 65533 + +## Unit Constants for Get-/SetResultMode, GetLinewidth, Convert... and Calibration +cReturnWavelengthVac = 0 +cReturnWavelengthAir = 1 +cReturnFrequency = 2 +cReturnWavenumber = 3 +cReturnPhotonEnergy = 4 + +## Power Unit Constants +cPower_muW = 0 +cPower_dBm = 1 + +## Source Type Constants for Calibration +cHeNe633 = 0 +cHeNe1152 = 0 +cNeL = 1 +cOther = 2 +cFreeHeNe = 3 + +## Unit Constants for Autocalibration +cACOnceOnStart = 0 +cACMeasurements = 1 +cACDays = 2 +cACHours = 3 +cACMinutes = 4 + +## ExposureRange Constants +cGetSync = 1 +cSetSync = 2 + +## Pattern- and Analysis Constants +cPatternDisable = 0 +cPatternEnable = 1 +cAnalysisDisable = cPatternDisable +cAnalysisEnable = cPatternEnable + +cSignal1Interferometers = 0 +cSignal1WideInterferometer = 1 +cSignal1Grating = 1 +cSignal2Interferometers = 2 +cSignal2WideInterferometer = 3 +cSignalAnalysis = 4 +cSignalAnalysisX = cSignalAnalysis +cSignalAnalysisY = cSignalAnalysis + 1 + +## State constants used with AutoExposureSetting functions +cJustStepDown = 0 +cRestartAtMinimum = 1 +cJustStepUp = 0 +cDriveToLevel = 1 +cConsiderFeedback = 1 +cDontConsiderFeedback = 0 + +## State constants used with AveragingSetting functions +cAvrgFloating = 1 +cAvrgSucceeding = 2 +cAvrgSimple = 0 +cAvrgPattern = 1 + +## Return errorvalues of GetFrequency, GetWavelength and GetWLMVersion +ErrNoValue = 0 +ErrNoSignal = -1 +ErrBadSignal = -2 +ErrLowSignal = -3 +ErrBigSignal = -4 +ErrWlmMissing = -5 +ErrNotAvailable = -6 +InfNothingChanged = -7 +ErrNoPulse = -8 +ErrChannelNotAvailable = -10 +ErrDiv0 = -13 +ErrOutOfRange = -14 +ErrUnitNotAvailable = -15 +ErrMaxErr = ErrUnitNotAvailable + +## Return errorvalues of GetTemperature and GetPressure +ErrTemperature = -1000 +ErrTempNotMeasured = ErrTemperature + ErrNoValue +ErrTempNotAvailable = ErrTemperature + ErrNotAvailable +ErrTempWlmMissing = ErrTemperature + ErrWlmMissing + +## Return errorvalues of GetDistance +## real errorvalues are ErrDistance combined with those of GetWavelength +ErrDistance = -1000000000 +ErrDistanceNotAvailable = ErrDistance + ErrNotAvailable +ErrDistanceWlmMissing = ErrDistance + ErrWlmMissing + +## Return flags of ControlWLMEx in combination with Show or Hide, Wait and Res = 1 +flServerStarted = 0x00000001 +flErrDeviceNotFound = 0x00000002 +flErrDriverError = 0x00000004 +flErrUSBError = 0x00000008 +flErrUnknownDeviceError = 0x00000010 +flErrWrongSN = 0x00000020 +flErrUnknownSN = 0x00000040 +flErrTemperatureError = 0x00000080 +flErrPressureError = 0x00000100 +flErrCancelledManually = 0x00000200 +flErrWLMBusy = 0x00000400 +flErrUnknownError = 0x00001000 +flNoInstalledVersionFound = 0x00002000 +flDesiredVersionNotFound = 0x00004000 +flErrFileNotFound = 0x00008000 +flErrParmOutOfRange = 0x00010000 +flErrCouldNotSet = 0x00020000 +flErrEEPROMFailed = 0x00040000 +flErrFileFailed = 0x00080000 +flDeviceDataNewer = 0x00100000 +flFileDataNewer = 0x00200000 +flErrDeviceVersionOld = 0x00400000 +flErrFileVersionOld = 0x00800000 +flDeviceStampNewer = 0x01000000 +flFileStampNewer = 0x02000000 + +## Return file info flags of SetOperationFile +flFileInfoDoesntExist = 0x0000 +flFileInfoExists = 0x0001 +flFileInfoCantWrite = 0x0002 +flFileInfoCantRead = 0x0004 +flFileInfoInvalidName = 0x0008 +cFileParameterError = -1 diff --git a/wlmData.ini b/wlmData.ini new file mode 100644 index 0000000..64fa606 --- /dev/null +++ b/wlmData.ini @@ -0,0 +1,21 @@ +; ################################################################################################### +; @file wlmData.ini +; @brief Example configuration file for HighFinesse NetAccess WLM/LSA network solution +; client side library +; @date: 2021.03.10 +; @version: 0.1 +; ################################################################################################### + +; wlmData.ini example scenario 1 configuration file +; ################################################# + +[default] ; Default settings (it match with all measurement applications) +version = 4 ; IPv4 +address = 10.44.1.179 ; Instrument server IP address +port = 3601 ; Set/Get TCP Port number +port2 = 3602 ; CallbackProc/Ex TCP Port number +offload = 1 ; ConvertUnit / ConvertDeltaUnit functions + ; network offload (1=On, 0=Off) +;loglevel = 3 ; Loglevel: Warning +;errormode = 9 ; Error signaling: Log+EXIT 1 + 8 = 9 + diff --git a/wlmData.py b/wlmData.py new file mode 100644 index 0000000..7a61d43 --- /dev/null +++ b/wlmData.py @@ -0,0 +1,659 @@ +###################################################################################################### +# @package wlmData +# @file wlmData.py +# @copyright HighFinesse GmbH. +# @date 2020.06.02 +# @version 0.4 +# +# Homepage: http://www.highfinesse.com/ +# +# @brief Python wrapper for wlmData.dll. +# +# Changelog: +# ---------- +# 2018.09.12 +# v0.1 - Initial release +# 2018.09.14 +# v0.2 - Constant values added +# 2018.09.15 +# v0.3 - Constant values separated to wlmConst.py, LoadDLL() added +# 2020.06.02 +# v0.4 - GetPattern... and GetAnalysisData argtypes adapted +#/ + +import ctypes + +dll = None + +def LoadDLL(DLL_Path): + global dll + dll = ctypes.CDLL(DLL_Path) + + # LONG_PTR Instantiate(long RFC, long Mode, LONG_PTR P1, long P2) + dll.Instantiate.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.POINTER(ctypes.c_long), ctypes.c_long ] + dll.Instantiate.restype = ctypes.POINTER(ctypes.c_long) + + # long WaitForWLMEvent(lref Mode, lref IntVal, dref DblVal) + dll.WaitForWLMEvent.argtypes = [ ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_double) ] + dll.WaitForWLMEvent.restype = ctypes.c_long + + # long WaitForWLMEventEx(lref Ver, lref Mode, lref IntVal, dref DblVal, lref Res1) + dll.WaitForWLMEventEx.argtypes = [ ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_long) ] + dll.WaitForWLMEventEx.restype = ctypes.c_long + + # long WaitForNextWLMEvent(lref Mode, lref IntVal, dref DblVal) + dll.WaitForNextWLMEvent.argtypes = [ ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_double) ] + dll.WaitForNextWLMEvent.restype = ctypes.c_long + + # long WaitForNextWLMEventEx(lref Ver, lref Mode, lref IntVal, dref DblVal, lref Res1) + dll.WaitForNextWLMEventEx.argtypes = [ ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_long) ] + dll.WaitForNextWLMEventEx.restype = ctypes.c_long + + # void ClearWLMEvents(void) + dll.ClearWLMEvents.argtypes = [ ] + dll.ClearWLMEvents.restype = None + + # long ControlWLM(long Action, LONG_PTR App, long Ver) + dll.ControlWLM.argtypes = [ ctypes.c_long, ctypes.POINTER(ctypes.c_long), ctypes.c_long ] + dll.ControlWLM.restype = ctypes.c_long + + # long ControlWLMEx(long Action, LONG_PTR App, long Ver, long Delay, long Res) + dll.ControlWLMEx.argtypes = [ ctypes.c_long, ctypes.POINTER(ctypes.c_long), ctypes.c_long, ctypes.c_long, ctypes.c_long ] + dll.ControlWLMEx.restype = ctypes.c_long + + # __int64 SynchroniseWLM(long Mode, __int64 TS) + dll.SynchroniseWLM.argtypes = [ ctypes.c_long, ctypes.c_longlong ] + dll.SynchroniseWLM.restype = ctypes.c_longlong + + # long SetMeasurementDelayMethod(long Mode, long Delay) + dll.SetMeasurementDelayMethod.argtypes = [ ctypes.c_long, ctypes.c_long ] + dll.SetMeasurementDelayMethod.restype = ctypes.c_long + + # long SetWLMPriority(long PPC, long Res1, long Res2) + dll.SetWLMPriority.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long ] + dll.SetWLMPriority.restype = ctypes.c_long + + # long PresetWLMIndex(long Ver) + dll.PresetWLMIndex.argtypes = [ ctypes.c_long ] + dll.PresetWLMIndex.restype = ctypes.c_long + + # long GetWLMVersion(long Ver) + dll.GetWLMVersion.argtypes = [ ctypes.c_long ] + dll.GetWLMVersion.restype = ctypes.c_long + + # long GetWLMIndex(long Ver) + dll.GetWLMIndex.argtypes = [ ctypes.c_long ] + dll.GetWLMIndex.restype = ctypes.c_long + + # long GetWLMCount(long V) + dll.GetWLMCount.argtypes = [ ctypes.c_long ] + dll.GetWLMCount.restype = ctypes.c_long + + # double GetWavelength(double WL) + dll.GetWavelength.argtypes = [ ctypes.c_double ] + dll.GetWavelength.restype = ctypes.c_double + + # double GetWavelength2(double WL2) + dll.GetWavelength2.argtypes = [ ctypes.c_double ] + dll.GetWavelength2.restype = ctypes.c_double + + # double GetWavelengthNum(long num, double WL) + dll.GetWavelengthNum.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.GetWavelengthNum.restype = ctypes.c_double + + # double GetCalWavelength(long ba, double WL) + dll.GetCalWavelength.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.GetCalWavelength.restype = ctypes.c_double + + # double GetCalibrationEffect(double CE) + dll.GetCalibrationEffect.argtypes = [ ctypes.c_double ] + dll.GetCalibrationEffect.restype = ctypes.c_double + + # double GetFrequency(double F) + dll.GetFrequency.argtypes = [ ctypes.c_double ] + dll.GetFrequency.restype = ctypes.c_double + + # double GetFrequency2(double F2) + dll.GetFrequency2.argtypes = [ ctypes.c_double ] + dll.GetFrequency2.restype = ctypes.c_double + + # double GetFrequencyNum(long num, double F) + dll.GetFrequencyNum.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.GetFrequencyNum.restype = ctypes.c_double + + # double GetLinewidth(long Index, double LW) + dll.GetLinewidth.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.GetLinewidth.restype = ctypes.c_double + + # double GetLinewidthNum(long num, double LW) + dll.GetLinewidthNum.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.GetLinewidthNum.restype = ctypes.c_double + + # double GetDistance(double D) + dll.GetDistance.argtypes = [ ctypes.c_double ] + dll.GetDistance.restype = ctypes.c_double + + # double GetAnalogIn(double AI) + dll.GetAnalogIn.argtypes = [ ctypes.c_double ] + dll.GetAnalogIn.restype = ctypes.c_double + + # double GetTemperature(double T) + dll.GetTemperature.argtypes = [ ctypes.c_double ] + dll.GetTemperature.restype = ctypes.c_double + + # long SetTemperature(double T) + dll.SetTemperature.argtypes = [ ctypes.c_double ] + dll.SetTemperature.restype = ctypes.c_long + + # double GetPressure(double P) + dll.GetPressure.argtypes = [ ctypes.c_double ] + dll.GetPressure.restype = ctypes.c_double + + # long SetPressure(long Mode, double P) + dll.SetPressure.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.SetPressure.restype = ctypes.c_long + + # double GetExternalInput(long Index, double I) + dll.GetExternalInput.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.GetExternalInput.restype = ctypes.c_double + + # long SetExternalInput(long Index, double I) + dll.SetExternalInput.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.SetExternalInput.restype = ctypes.c_long + + # long GetExtraSetting(long Index, lref lGet, dref dGet, sref sGet) + dll.GetExtraSetting.argtypes = [ ctypes.c_long, ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_double), ctypes.c_char_p ] + dll.GetExtraSetting.restype = ctypes.c_long + + # long SetExtraSetting(long Index, long lSet, double dSet, sref sSet) + dll.SetExtraSetting.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_double, ctypes.c_char_p ] + dll.SetExtraSetting.restype = ctypes.c_long + + # unsigned short GetExposure(unsigned short E) + dll.GetExposure.argtypes = [ ctypes.c_ushort ] + dll.GetExposure.restype = ctypes.c_ushort + + # long SetExposure(unsigned short E) + dll.SetExposure.argtypes = [ ctypes.c_ushort ] + dll.SetExposure.restype = ctypes.c_long + + # unsigned short GetExposure2(unsigned short E2) + dll.GetExposure2.argtypes = [ ctypes.c_ushort ] + dll.GetExposure2.restype = ctypes.c_ushort + + # long SetExposure2(unsigned short E2) + dll.SetExposure2.argtypes = [ ctypes.c_ushort ] + dll.SetExposure2.restype = ctypes.c_long + + # long GetExposureNum(long num, long arr, long E) + dll.GetExposureNum.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long ] + dll.GetExposureNum.restype = ctypes.c_long + + # long SetExposureNum(long num, long arr, long E) + dll.SetExposureNum.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long ] + dll.SetExposureNum.restype = ctypes.c_long + + # double GetExposureNumEx(long num, long arr, double E) + dll.GetExposureNumEx.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_double ] + dll.GetExposureNumEx.restype = ctypes.c_double + + # long SetExposureNumEx(long num, long arr, double E) + dll.SetExposureNumEx.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_double ] + dll.SetExposureNumEx.restype = ctypes.c_long + + # bool GetExposureMode(bool EM) + dll.GetExposureMode.argtypes = [ ctypes.c_bool ] + dll.GetExposureMode.restype = ctypes.c_bool + + # long SetExposureMode(bool EM) + dll.SetExposureMode.argtypes = [ ctypes.c_bool ] + dll.SetExposureMode.restype = ctypes.c_long + + # long GetExposureModeNum(long num, bool EM) + dll.GetExposureModeNum.argtypes = [ ctypes.c_long, ctypes.c_bool ] + dll.GetExposureModeNum.restype = ctypes.c_long + + # long SetExposureModeNum(long num, bool EM) + dll.SetExposureModeNum.argtypes = [ ctypes.c_long, ctypes.c_bool ] + dll.SetExposureModeNum.restype = ctypes.c_long + + # long GetExposureRange(long ER) + dll.GetExposureRange.argtypes = [ ctypes.c_long ] + dll.GetExposureRange.restype = ctypes.c_long + + # long GetAutoExposureSetting(long num, long AES, lref iVal, dref dVal) + dll.GetAutoExposureSetting.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_double) ] + dll.GetAutoExposureSetting.restype = ctypes.c_long + + # long SetAutoExposureSetting(long num, long AES, long iVal, double dVal) + dll.SetAutoExposureSetting.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long, ctypes.c_double ] + dll.SetAutoExposureSetting.restype = ctypes.c_long + + # unsigned short GetResultMode(unsigned short RM) + dll.GetResultMode.argtypes = [ ctypes.c_ushort ] + dll.GetResultMode.restype = ctypes.c_ushort + + # long SetResultMode(unsigned short RM) + dll.SetResultMode.argtypes = [ ctypes.c_ushort ] + dll.SetResultMode.restype = ctypes.c_long + + # unsigned short GetRange(unsigned short R) + dll.GetRange.argtypes = [ ctypes.c_ushort ] + dll.GetRange.restype = ctypes.c_ushort + + # long SetRange(unsigned short R) + dll.SetRange.argtypes = [ ctypes.c_ushort ] + dll.SetRange.restype = ctypes.c_long + + # unsigned short GetPulseMode(unsigned short PM) + dll.GetPulseMode.argtypes = [ ctypes.c_ushort ] + dll.GetPulseMode.restype = ctypes.c_ushort + + # long SetPulseMode(unsigned short PM) + dll.SetPulseMode.argtypes = [ ctypes.c_ushort ] + dll.SetPulseMode.restype = ctypes.c_long + + # long GetPulseDelay(long PD) + dll.GetPulseDelay.argtypes = [ ctypes.c_long ] + dll.GetPulseDelay.restype = ctypes.c_long + + # long SetPulseDelay(long PD) + dll.SetPulseDelay.argtypes = [ ctypes.c_long ] + dll.SetPulseDelay.restype = ctypes.c_long + + # unsigned short GetWideMode(unsigned short WM) + dll.GetWideMode.argtypes = [ ctypes.c_ushort ] + dll.GetWideMode.restype = ctypes.c_ushort + + # long SetWideMode(unsigned short WM) + dll.SetWideMode.argtypes = [ ctypes.c_ushort ] + dll.SetWideMode.restype = ctypes.c_long + + # long GetDisplayMode(long DM) + dll.GetDisplayMode.argtypes = [ ctypes.c_long ] + dll.GetDisplayMode.restype = ctypes.c_long + + # long SetDisplayMode(long DM) + dll.SetDisplayMode.argtypes = [ ctypes.c_long ] + dll.SetDisplayMode.restype = ctypes.c_long + + # bool GetFastMode(bool FM) + dll.GetFastMode.argtypes = [ ctypes.c_bool ] + dll.GetFastMode.restype = ctypes.c_bool + + # long SetFastMode(bool FM) + dll.SetFastMode.argtypes = [ ctypes.c_bool ] + dll.SetFastMode.restype = ctypes.c_long + + # bool GetLinewidthMode(bool LM) + dll.GetLinewidthMode.argtypes = [ ctypes.c_bool ] + dll.GetLinewidthMode.restype = ctypes.c_bool + + # long SetLinewidthMode(bool LM) + dll.SetLinewidthMode.argtypes = [ ctypes.c_bool ] + dll.SetLinewidthMode.restype = ctypes.c_long + + # bool GetDistanceMode(bool DM) + dll.GetDistanceMode.argtypes = [ ctypes.c_bool ] + dll.GetDistanceMode.restype = ctypes.c_bool + + # long SetDistanceMode(bool DM) + dll.SetDistanceMode.argtypes = [ ctypes.c_bool ] + dll.SetDistanceMode.restype = ctypes.c_long + + # long GetSwitcherMode(long SM) + dll.GetSwitcherMode.argtypes = [ ctypes.c_long ] + dll.GetSwitcherMode.restype = ctypes.c_long + + # long SetSwitcherMode(long SM) + dll.SetSwitcherMode.argtypes = [ ctypes.c_long ] + dll.SetSwitcherMode.restype = ctypes.c_long + + # long GetSwitcherChannel(long CH) + dll.GetSwitcherChannel.argtypes = [ ctypes.c_long ] + dll.GetSwitcherChannel.restype = ctypes.c_long + + # long SetSwitcherChannel(long CH) + dll.SetSwitcherChannel.argtypes = [ ctypes.c_long ] + dll.SetSwitcherChannel.restype = ctypes.c_long + + # long GetSwitcherSignalStates(long Signal, lref Use, lref Show) + dll.GetSwitcherSignalStates.argtypes = [ ctypes.c_long, ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_long) ] + dll.GetSwitcherSignalStates.restype = ctypes.c_long + + # long SetSwitcherSignalStates(long Signal, long Use, long Show) + dll.SetSwitcherSignalStates.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long ] + dll.SetSwitcherSignalStates.restype = ctypes.c_long + + # long SetSwitcherSignal(long Signal, long Use, long Show) + dll.SetSwitcherSignal.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long ] + dll.SetSwitcherSignal.restype = ctypes.c_long + + # long GetAutoCalMode(long ACM) + dll.GetAutoCalMode.argtypes = [ ctypes.c_long ] + dll.GetAutoCalMode.restype = ctypes.c_long + + # long SetAutoCalMode(long ACM) + dll.SetAutoCalMode.argtypes = [ ctypes.c_long ] + dll.SetAutoCalMode.restype = ctypes.c_long + + # long GetAutoCalSetting(long ACS, lref val, long Res1, lref Res2) + dll.GetAutoCalSetting.argtypes = [ ctypes.c_long, ctypes.POINTER(ctypes.c_long), ctypes.c_long, ctypes.POINTER(ctypes.c_long) ] + dll.GetAutoCalSetting.restype = ctypes.c_long + + # long SetAutoCalSetting(long ACS, long val, long Res1, long Res2) + dll.SetAutoCalSetting.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long, ctypes.c_long ] + dll.SetAutoCalSetting.restype = ctypes.c_long + + # long GetActiveChannel(long Mode, lref Port, long Res1) + dll.GetActiveChannel.argtypes = [ ctypes.c_long, ctypes.POINTER(ctypes.c_long), ctypes.c_long ] + dll.GetActiveChannel.restype = ctypes.c_long + + # long SetActiveChannel(long Mode, long Port, long CH, long Res1) + dll.SetActiveChannel.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long, ctypes.c_long ] + dll.SetActiveChannel.restype = ctypes.c_long + + # long GetChannelsCount(long C) + dll.GetChannelsCount.argtypes = [ ctypes.c_long ] + dll.GetChannelsCount.restype = ctypes.c_long + + # unsigned short GetOperationState(unsigned short OS) + dll.GetOperationState.argtypes = [ ctypes.c_ushort ] + dll.GetOperationState.restype = ctypes.c_ushort + + # long Operation(unsigned short Op) + dll.Operation.argtypes = [ ctypes.c_ushort ] + dll.Operation.restype = ctypes.c_long + + # long SetOperationFile(sref lpFile) + dll.SetOperationFile.argtypes = [ ctypes.c_char_p ] + dll.SetOperationFile.restype = ctypes.c_long + + # long Calibration(long Type, long Unit, double Value, long Channel) + dll.Calibration.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_double, ctypes.c_long ] + dll.Calibration.restype = ctypes.c_long + + # long RaiseMeasurementEvent(long Mode) + dll.RaiseMeasurementEvent.argtypes = [ ctypes.c_long ] + dll.RaiseMeasurementEvent.restype = ctypes.c_long + + # long TriggerMeasurement(long Action) + dll.TriggerMeasurement.argtypes = [ ctypes.c_long ] + dll.TriggerMeasurement.restype = ctypes.c_long + + # long GetTriggerState(long TS) + dll.GetTriggerState.argtypes = [ ctypes.c_long ] + dll.GetTriggerState.restype = ctypes.c_long + + # long GetInterval(long I) + dll.GetInterval.argtypes = [ ctypes.c_long ] + dll.GetInterval.restype = ctypes.c_long + + # long SetInterval(long I) + dll.SetInterval.argtypes = [ ctypes.c_long ] + dll.SetInterval.restype = ctypes.c_long + + # bool GetIntervalMode(bool IM) + dll.GetIntervalMode.argtypes = [ ctypes.c_bool ] + dll.GetIntervalMode.restype = ctypes.c_bool + + # long SetIntervalMode(bool IM) + dll.SetIntervalMode.argtypes = [ ctypes.c_bool ] + dll.SetIntervalMode.restype = ctypes.c_long + + # long GetBackground(long BG) + dll.GetBackground.argtypes = [ ctypes.c_long ] + dll.GetBackground.restype = ctypes.c_long + + # long SetBackground(long BG) + dll.SetBackground.argtypes = [ ctypes.c_long ] + dll.SetBackground.restype = ctypes.c_long + + # long GetAveragingSettingNum(long num, long AS, long Value) + dll.GetAveragingSettingNum.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long ] + dll.GetAveragingSettingNum.restype = ctypes.c_long + + # long SetAveragingSettingNum(long num, long AS, long Value) + dll.SetAveragingSettingNum.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long ] + dll.SetAveragingSettingNum.restype = ctypes.c_long + + # bool GetLinkState(bool LS) + dll.GetLinkState.argtypes = [ ctypes.c_bool ] + dll.GetLinkState.restype = ctypes.c_bool + + # long SetLinkState(bool LS) + dll.SetLinkState.argtypes = [ ctypes.c_bool ] + dll.SetLinkState.restype = ctypes.c_long + + # void LinkSettingsDlg(void) + dll.LinkSettingsDlg.argtypes = [ ] + dll.LinkSettingsDlg.restype = None + + # long GetPatternItemSize(long Index) + dll.GetPatternItemSize.argtypes = [ ctypes.c_long ] + dll.GetPatternItemSize.restype = ctypes.c_long + + # long GetPatternItemCount(long Index) + dll.GetPatternItemCount.argtypes = [ ctypes.c_long ] + dll.GetPatternItemCount.restype = ctypes.c_long + + # ULONG_PTR GetPattern(long Index) + dll.GetPattern.argtypes = [ ctypes.c_long ] + dll.GetPattern.restype = ctypes.POINTER(ctypes.c_ulong) + + # ULONG_PTR GetPatternNum(long Chn, long Index) + dll.GetPatternNum.argtypes = [ ctypes.c_long, ctypes.c_long ] + dll.GetPatternNum.restype = ctypes.POINTER(ctypes.c_ulong) + + # long GetPatternData(long Index, ULONG_PTR PArray) + dll.GetPatternData.argtypes = [ ctypes.c_long, ctypes.POINTER(ctypes.c_short) ] + dll.GetPatternData.restype = ctypes.c_long + + # long GetPatternDataNum(long Chn, long Index, ULONG_PTR PArray) + dll.GetPatternDataNum.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.POINTER(ctypes.c_short) ] + dll.GetPatternDataNum.restype = ctypes.c_long + + # long SetPattern(long Index, long iEnable) + dll.SetPattern.argtypes = [ ctypes.c_long, ctypes.c_long ] + dll.SetPattern.restype = ctypes.c_long + + # long SetPatternData(long Index, ULONG_PTR PArray) + dll.SetPatternData.argtypes = [ ctypes.c_long, ctypes.POINTER(ctypes.c_ulong) ] + dll.SetPatternData.restype = ctypes.c_long + + # bool GetAnalysisMode(bool AM) + dll.GetAnalysisMode.argtypes = [ ctypes.c_bool ] + dll.GetAnalysisMode.restype = ctypes.c_bool + + # long SetAnalysisMode(bool AM) + dll.SetAnalysisMode.argtypes = [ ctypes.c_bool ] + dll.SetAnalysisMode.restype = ctypes.c_long + + # long GetAnalysisItemSize(long Index) + dll.GetAnalysisItemSize.argtypes = [ ctypes.c_long ] + dll.GetAnalysisItemSize.restype = ctypes.c_long + + # long GetAnalysisItemCount(long Index) + dll.GetAnalysisItemCount.argtypes = [ ctypes.c_long ] + dll.GetAnalysisItemCount.restype = ctypes.c_long + + # ULONG_PTR GetAnalysis(long Index) + dll.GetAnalysis.argtypes = [ ctypes.c_long ] + dll.GetAnalysis.restype = ctypes.POINTER(ctypes.c_ulong) + + # long GetAnalysisData(long Index, ULONG_PTR PArray) + dll.GetAnalysisData.argtypes = [ ctypes.c_long, ctypes.POINTER(ctypes.c_double) ] + dll.GetAnalysisData.restype = ctypes.c_long + + # long SetAnalysis(long Index, long iEnable) + dll.SetAnalysis.argtypes = [ ctypes.c_long, ctypes.c_long ] + dll.SetAnalysis.restype = ctypes.c_long + + # long GetMinPeak(long M1) + dll.GetMinPeak.argtypes = [ ctypes.c_long ] + dll.GetMinPeak.restype = ctypes.c_long + + # long GetMinPeak2(long M2) + dll.GetMinPeak2.argtypes = [ ctypes.c_long ] + dll.GetMinPeak2.restype = ctypes.c_long + + # long GetMaxPeak(long X1) + dll.GetMaxPeak.argtypes = [ ctypes.c_long ] + dll.GetMaxPeak.restype = ctypes.c_long + + # long GetMaxPeak2(long X2) + dll.GetMaxPeak2.argtypes = [ ctypes.c_long ] + dll.GetMaxPeak2.restype = ctypes.c_long + + # long GetAvgPeak(long A1) + dll.GetAvgPeak.argtypes = [ ctypes.c_long ] + dll.GetAvgPeak.restype = ctypes.c_long + + # long GetAvgPeak2(long A2) + dll.GetAvgPeak2.argtypes = [ ctypes.c_long ] + dll.GetAvgPeak2.restype = ctypes.c_long + + # long SetAvgPeak(long PA) + dll.SetAvgPeak.argtypes = [ ctypes.c_long ] + dll.SetAvgPeak.restype = ctypes.c_long + + # long GetAmplitudeNum(long num, long Index, long A) + dll.GetAmplitudeNum.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long ] + dll.GetAmplitudeNum.restype = ctypes.c_long + + # double GetIntensityNum(long num, double I) + dll.GetIntensityNum.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.GetIntensityNum.restype = ctypes.c_double + + # double GetPowerNum(long num, double P) + dll.GetPowerNum.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.GetPowerNum.restype = ctypes.c_double + + # unsigned short GetDelay(unsigned short D) + dll.GetDelay.argtypes = [ ctypes.c_ushort ] + dll.GetDelay.restype = ctypes.c_ushort + + # long SetDelay(unsigned short D) + dll.SetDelay.argtypes = [ ctypes.c_ushort ] + dll.SetDelay.restype = ctypes.c_long + + # unsigned short GetShift(unsigned short S) + dll.GetShift.argtypes = [ ctypes.c_ushort ] + dll.GetShift.restype = ctypes.c_ushort + + # long SetShift(unsigned short S) + dll.SetShift.argtypes = [ ctypes.c_ushort ] + dll.SetShift.restype = ctypes.c_long + + # unsigned short GetShift2(unsigned short S2) + dll.GetShift2.argtypes = [ ctypes.c_ushort ] + dll.GetShift2.restype = ctypes.c_ushort + + # long SetShift2(unsigned short S2) + dll.SetShift2.argtypes = [ ctypes.c_ushort ] + dll.SetShift2.restype = ctypes.c_long + + # bool GetDeviationMode(bool DM) + dll.GetDeviationMode.argtypes = [ ctypes.c_bool ] + dll.GetDeviationMode.restype = ctypes.c_bool + + # long SetDeviationMode(bool DM) + dll.SetDeviationMode.argtypes = [ ctypes.c_bool ] + dll.SetDeviationMode.restype = ctypes.c_long + + # double GetDeviationReference(double DR) + dll.GetDeviationReference.argtypes = [ ctypes.c_double ] + dll.GetDeviationReference.restype = ctypes.c_double + + # long SetDeviationReference(double DR) + dll.SetDeviationReference.argtypes = [ ctypes.c_double ] + dll.SetDeviationReference.restype = ctypes.c_long + + # long GetDeviationSensitivity(long DS) + dll.GetDeviationSensitivity.argtypes = [ ctypes.c_long ] + dll.GetDeviationSensitivity.restype = ctypes.c_long + + # long SetDeviationSensitivity(long DS) + dll.SetDeviationSensitivity.argtypes = [ ctypes.c_long ] + dll.SetDeviationSensitivity.restype = ctypes.c_long + + # double GetDeviationSignal(double DS) + dll.GetDeviationSignal.argtypes = [ ctypes.c_double ] + dll.GetDeviationSignal.restype = ctypes.c_double + + # double GetDeviationSignalNum(long Port, double DS) + dll.GetDeviationSignalNum.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.GetDeviationSignalNum.restype = ctypes.c_double + + # long SetDeviationSignal(double DS) + dll.SetDeviationSignal.argtypes = [ ctypes.c_double ] + dll.SetDeviationSignal.restype = ctypes.c_long + + # long SetDeviationSignalNum(long Port, double DS) + dll.SetDeviationSignalNum.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.SetDeviationSignalNum.restype = ctypes.c_long + + # double RaiseDeviationSignal(long iType, double dSignal) + dll.RaiseDeviationSignal.argtypes = [ ctypes.c_long, ctypes.c_double ] + dll.RaiseDeviationSignal.restype = ctypes.c_double + + # long GetPIDCourse(sref PIDC) + dll.GetPIDCourse.argtypes = [ ctypes.c_char_p ] + dll.GetPIDCourse.restype = ctypes.c_long + + # long SetPIDCourse(sref PIDC) + dll.SetPIDCourse.argtypes = [ ctypes.c_char_p ] + dll.SetPIDCourse.restype = ctypes.c_long + + # long GetPIDCourseNum(long Port, sref PIDC) + dll.GetPIDCourseNum.argtypes = [ ctypes.c_long, ctypes.c_char_p ] + dll.GetPIDCourseNum.restype = ctypes.c_long + + # long SetPIDCourseNum(long Port, sref PIDC) + dll.SetPIDCourseNum.argtypes = [ ctypes.c_long, ctypes.c_char_p ] + dll.SetPIDCourseNum.restype = ctypes.c_long + + # long GetPIDSetting(long PS, long Port, lref iSet, dref dSet) + dll.GetPIDSetting.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_double) ] + dll.GetPIDSetting.restype = ctypes.c_long + + # long SetPIDSetting(long PS, long Port, long iSet, double dSet) + dll.SetPIDSetting.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long, ctypes.c_double ] + dll.SetPIDSetting.restype = ctypes.c_long + + # long GetLaserControlSetting(long PS, long Port, lref iSet, dref dSet, sref sSet) + dll.GetLaserControlSetting.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.POINTER(ctypes.c_long), ctypes.POINTER(ctypes.c_double), ctypes.c_char_p ] + dll.GetLaserControlSetting.restype = ctypes.c_long + + # long SetLaserControlSetting(long PS, long Port, long iSet, double dSet, sref sSet) + dll.SetLaserControlSetting.argtypes = [ ctypes.c_long, ctypes.c_long, ctypes.c_long, ctypes.c_double, ctypes.c_char_p ] + dll.SetLaserControlSetting.restype = ctypes.c_long + + # long ClearPIDHistory(long Port) + dll.ClearPIDHistory.argtypes = [ ctypes.c_long ] + dll.ClearPIDHistory.restype = ctypes.c_long + + # double ConvertUnit(double Val, long uFrom, long uTo) + dll.ConvertUnit.argtypes = [ ctypes.c_double, ctypes.c_long, ctypes.c_long ] + dll.ConvertUnit.restype = ctypes.c_double + + # double ConvertDeltaUnit(double Base, double Delta, long uBase, long uFrom, long uTo) + dll.ConvertDeltaUnit.argtypes = [ ctypes.c_double, ctypes.c_double, ctypes.c_long, ctypes.c_long, ctypes.c_long ] + dll.ConvertDeltaUnit.restype = ctypes.c_double + + # bool GetReduced(bool R) + dll.GetReduced.argtypes = [ ctypes.c_bool ] + dll.GetReduced.restype = ctypes.c_bool + + # long SetReduced(bool R) + dll.SetReduced.argtypes = [ ctypes.c_bool ] + dll.SetReduced.restype = ctypes.c_long + + # unsigned short GetScale(unsigned short S) + dll.GetScale.argtypes = [ ctypes.c_ushort ] + dll.GetScale.restype = ctypes.c_ushort + + # long SetScale(unsigned short S) + dll.SetScale.argtypes = [ ctypes.c_ushort ] + dll.SetScale.restype = ctypes.c_long +