
M74050
1/4M IMAGING SPECTROGRAPHS
66
18.4 C++ USERS
Oriel_USB.h file provides a COriel_USB class that links DLL functions to connect and control the
Cornerstone.
Reminder: Verify the DLL is in the same folder or in command path of executable before running.
Summary:
Add Oriel_USB.h, Cornerstone.dll and CyUSB.dll to project
Add Oriel_USB.h to #include in header file of project.
Create class object with “COriel_USB myDevice;”
Call functions in DLL such as write: “myDevice.Send(strCommand);”
Functions Defined in class:
char * GetLibraryVersion(void);
INT32 Send(const char* strCommand);
INT32 Read(LPSTR strReturn);
INT32 Query(const char* strCommand, char* strReturn);
Sample Query code:
void OnBtnQuery()
{
CString strCommand;
CString strCommunication;
char strPass[256];
char strReturn[1024];
// Command to send
GetDlgItemTextW(cntlCommand, strCommand);
strcpy_s(strPass, CStringA(strCommand).GetString());
strcpy_s(strReturn, "");
LPSTR pstrReturn = strReturn; // Response variable
// Query instrument
INT32 bSuccess = myDevice.Query(strPass, pstrReturn);
if (bSuccess)
{
strCommunication.Append(CString(strReturn));
}
else
{
strCommunication.Append(L"Attempting Read... Failed");
}
History.SetWindowTextW(strCommunication);
}
Содержание Oriel MS260i Series
Страница 23: ...M74050 1 4M IMAGING SPECTROGRAPHS 23 Figure 16 Grating Efficiency Curves High Resolution and Holographic Models...
Страница 33: ...M74050 1 4M IMAGING SPECTROGRAPHS 33 Figure 244 Model USFW 100 Filter Wheel...
Страница 46: ...M74050 1 4M IMAGING SPECTROGRAPHS 46 14 DIMENSIONS Figure 33 MS260i Dimensions...