Commit acfdc767 authored by Lars Bittrich's avatar Lars Bittrich

WITecCOM untested changes to adapt WITec control 5.1 -> will be tested 26th of Oktober

parent 1030dbc7
......@@ -47,6 +47,17 @@ class WITecCOM(RamanBase):
return False
IBUCSCore = win32com.client.CastTo(self.IBUCSAccess, 'IBUCSCore')
self.VersionInterface = IBUCSCore.GetSubSystemDefaultInterface("Status|Software|Application|ProgramVersion")
self.VersionMan = win32com.client.CastTo(self.ImageNameInterface, 'IBUCSString')
version = self.VersionMan.GetValue()
print(version)
vnr = version.split(",")[1].split(" Release")[0].strip()
try:
vnr = float(vnr)
except ValueError:
print("WITec: unknown version format:", version)
vnr = 0.0 # version format unknown
self.PosXInterface = IBUCSCore.GetSubSystemDefaultInterface("UserParameters|SamplePositioning|AbsolutePositionX")
self.PosYInterface = IBUCSCore.GetSubSystemDefaultInterface("UserParameters|SamplePositioning|AbsolutePositionY")
self.PosZInterface = IBUCSCore.GetSubSystemDefaultInterface("UserParameters|ScanTable|PositionMicroscopeZ")
......@@ -65,17 +76,30 @@ class WITecCOM(RamanBase):
self.PosZCurUserFloatMan = win32com.client.CastTo(self.PosZCurUserInterface, 'IBUCSStatusContainer')
self.GoToTrigger = win32com.client.CastTo(self.GoToInterface, 'IBUCSTrigger')
self.ImageNameInterface = IBUCSCore.GetSubSystemDefaultInterface("MultiComm|MultiCommVideoSystem|BitmapFileName")
self.ImageNameMan = win32com.client.CastTo(self.ImageNameInterface, 'IBUCSString')
self.ImageSaveInterface = IBUCSCore.GetSubSystemDefaultInterface("MultiComm|MultiCommVideoSystem|SaveColorBitmapToFile")
self.ImageSaveMan = win32com.client.CastTo(self.ImageSaveInterface, 'IBUCSTrigger')
self.ImageHeightInterface = IBUCSCore.GetSubSystemDefaultInterface("MultiComm|MicroscopeControl|Video|Calibration|ImageHeightMicrons")
self.ImageHeightMan = win32com.client.CastTo(self.ImageHeightInterface, 'IBUCSFloat')
self.ImageWidthInterface = IBUCSCore.GetSubSystemDefaultInterface("MultiComm|MicroscopeControl|Video|Calibration|ImageWidthMicrons")
self.ImageWidthMan = win32com.client.CastTo(self.ImageWidthInterface, 'IBUCSFloat')
self.ImageRotationInterface = IBUCSCore.GetSubSystemDefaultInterface("MultiComm|MicroscopeControl|Video|Calibration|RotationDegrees")
self.ImageRotationMan = win32com.client.CastTo(self.ImageRotationInterface, 'IBUCSFloat')
if vnr<5.1:
self.ImageNameInterface = IBUCSCore.GetSubSystemDefaultInterface("MultiComm|MultiCommVideoSystem|BitmapFileName")
self.ImageNameMan = win32com.client.CastTo(self.ImageNameInterface, 'IBUCSString')
self.ImageSaveInterface = IBUCSCore.GetSubSystemDefaultInterface("MultiComm|MultiCommVideoSystem|SaveColorBitmapToFile")
self.ImageSaveMan = win32com.client.CastTo(self.ImageSaveInterface, 'IBUCSTrigger')
self.ImageHeightInterface = IBUCSCore.GetSubSystemDefaultInterface("MultiComm|MicroscopeControl|Video|Calibration|ImageHeightMicrons")
self.ImageHeightMan = win32com.client.CastTo(self.ImageHeightInterface, 'IBUCSFloat')
self.ImageWidthInterface = IBUCSCore.GetSubSystemDefaultInterface("MultiComm|MicroscopeControl|Video|Calibration|ImageWidthMicrons")
self.ImageWidthMan = win32com.client.CastTo(self.ImageWidthInterface, 'IBUCSFloat')
self.ImageRotationInterface = IBUCSCore.GetSubSystemDefaultInterface("MultiComm|MicroscopeControl|Video|Calibration|RotationDegrees")
self.ImageRotationMan = win32com.client.CastTo(self.ImageRotationInterface, 'IBUCSFloat')
else:
self.ImageNameInterface = IBUCSCore.GetSubSystemDefaultInterface("Video|VideoImageFileName")
self.ImageNameMan = win32com.client.CastTo(self.ImageNameInterface, 'IBUCSString')
self.ImageSaveInterface = IBUCSCore.GetSubSystemDefaultInterface("Video|AquireVideoImageToFile")
self.ImageSaveMan = win32com.client.CastTo(self.ImageSaveInterface, 'IBUCSTrigger')
self.ImageHeightInterface = IBUCSCore.GetSubSystemDefaultInterface("Video|Calibration|ImageHeightMicrons")
self.ImageHeightMan = win32com.client.CastTo(self.ImageHeightInterface, 'IBUCSFloat')
self.ImageWidthInterface = IBUCSCore.GetSubSystemDefaultInterface("Video|Calibration|ImageWidthMicrons")
self.ImageWidthMan = win32com.client.CastTo(self.ImageWidthInterface, 'IBUCSFloat')
self.ImageRotationInterface = IBUCSCore.GetSubSystemDefaultInterface("Video|Calibration|RotationDegrees")
self.ImageRotationMan = win32com.client.CastTo(self.ImageRotationInterface, 'IBUCSFloat')
self.SequencerStartInterface = IBUCSCore.GetSubSystemDefaultInterface("UserParameters|SequencerSingleSpectrum|Start")
self.SequencerStartTrigger = win32com.client.CastTo(self.SequencerStartInterface, 'IBUCSTrigger')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment