Variable of measurement result is generated by SKS_MEAS_RESULTIn this case, there is no
alignment designated for 1nm spectral data, 5nm spectral data, Color Rendering Index and
TM-30 Hue Bins(Available in C-7000 SDK V2.00 or higher.), thus alignment area needs to be
initialized.
Private C7000Device As New C7000.SDK ' generate instance of SDK
Private Sub Sample()
Dim SDKResult As Long
Dim DeviceInfo As C7000.SDK.SKS_DEVICE_INFO
Dim MeasResult As C7000.SDK.SKS_MEAS_RESULT
' >>>>> alignment initialized <<<<<
ReDim MeasResult.SpectralData_1nm(C7000.SDK.SKF_WAVELENGTH_1NM_COUNT - 1)
ReDim MeasResult.SpectralData_5nm(C7000.SDK.SKF_WAVELENGTH_5NM_COUNT - 1)
ReDim MeasResult.ColorRenditionIndexes.Ri(C7000.SDK.SKF_CRI_COUNT - 1)
ReDim MeasResult.TM30.HueBins(C7000.SDK.SKF_TM30_BINS_COUNT - 1) ' SDK V2.00
~
' >>>>> start measuremet <<<<<
SDKResult = C7000Device.SK_StartMeasuring ()
If C7000.SDK.SKF_STATUS_COM.SUCCESS <> SDKResult Then ' start measurement
error ?!
' add error processing...
End If
' >>>>> wait for completion of measurement <<<<<
Do
System.Threading.Thread.Sleep(100)
SDKResult = C7000Device.SK_GetDeviceInfo(DeviceInfo)
If C7000.SDK.SKF_STATUS_COM.SUCCESS <> SDKResult Then 'get device info ?!
' add error processing...
End If
Loop While (C7000.SDK.SKF_STATUS_DEVICE.IDLE <> DeviceInfo.Status And
C7000.SDK.SKF_STATUS_DEVICE.IDLE_OUT_MEAS <> DeviceInfo.Status)
' >>>>> get measurement result <<<<<
SDKResult = C7000Device.SK_GetMeasuringResult(MeasResult)
If C7000.SDK.SKF_STATUS_COM.SUCCESS <> SDKResult Then ' get measurement
result error ?!
' add error processing...
End If
End Sub