Oriel Cornerstone 130 Скачать руководство пользователя страница 4

CS API v3.01 QSG  

Programming Interface Manual 

 

 

 

2  INTRODUCTION 

This is a description of low-level drivers for 32 and 64-Bit Windows 7 and newer Operating Systems.  The 
information in this Quick Start Guide is applicable only for version 3.01 of the Cornerstone Series API.  If 
support for a different version is required, contact your Oriel Sales Representative.  
 

2.1  BUILDS 

 

Driver for C++, 
Driver for C#.NET 
 

2.2  GETTING STARTED 

 

Before using any of these projects, the user must first setup and configure their Oriel Cornerstone unit for 
use.  Going through the setup steps in the

ir unit’s User’s Manual is recommended. 

 

 

The correct USB Drivers for their Operating  System also need to be  installed on  the computer intended 
for use with the Cornerstone unit. 
 
Verify  the  DLL  is  in  the  same  folder  or  in  command  path  of  executable  before  running,  or  it  will  not  be 
found.   
 

Note:  The  DLLs  provided  in  the  Cornerstone  Series  API  v3.01  .zip  files  are  not  backwards 
compatible  with  commands  and  project  files  associated  with  previous  versions  of  Cornerstone 
APIs.  

 

2.3  USING IN C#.NET AND C++ 

 

The following pages will detail how to interface with the instrument from either language.   Other .NET 
languages can also interface with the C#.NET DLL, as this is a function of the .NET languages.  Please 
see Microsoft documentation on how to adapt the code accordingly. 

 

3  C# DLL USAGE 

Provided DLL’s: 

-

 

In lib Folder of CornerstoneSample-v3-

01.zip → CornerstoneApp  

 

Cornerstone.dll 

– Specific to Cornerstone 

 

CyUSB.dll 

– Required support DLL 

 

These DLLs are compatible with both 32 and 64-bit versions of Windows 7 and newer operating systems. 
 
See Sample Project File titled CornerstoneApp.sln for functioning C# sample.  

 

Commands Supplied in C# API: 

 

Cornerstone(

Boolean

 connect) 

Cornerstone(

Boolean

 connect, 

Int32

 deviceNumber) 

 

void

 setActiveDevice(

Int32

 deviceNumber) 

 

bool

 connectAll() 

void

 disconnect() 

 

Содержание Cornerstone 130

Страница 1: ...Family of Brands ILX Lightwave New Focus Ophir Corion Richardson Gratings Spectra Physics CS API v3 01 QSG Rev A S Programming Interface Manual Quick Start Guide Cornerstone 130 260 ...

Страница 2: ... 4 2 2 GETTING STARTED 4 2 3 USING IN C NET AND C 4 3 C DLL USAGE 4 3 1 Calling the DLL in C NET 6 4 USAGE C DLL 8 5 WARRANTY AND SERVICE 10 5 1 CONTACTING NEWPORT CORPORATION 10 5 2 REQUEST FOR ASSISTANCE SERVICE 11 5 3 REPAIR SERVICE 11 5 4 NON WARRANTY SERVICE 11 5 5 WARRANTY SERVICE 12 5 6 LOANER DEMO MATERIAL 13 ...

Страница 3: ...ng the equipment In addition please refer to the complete User s Manual and all other documentation provided for additional important notes and cautionary statements regarding the use and operation of the instruments Do not attempt to operate any system without reading all the information provided with each of the components Please read all instructions that were provided prior to operation of the...

Страница 4: ...ore running or it will not be found Note The DLLs provided in the Cornerstone Series API v3 01 zip files are not backwards compatible with commands and project files associated with previous versions of Cornerstone APIs 2 3 USING IN C NET AND C The following pages will detail how to interface with the instrument from either language Other NET languages can also interface with the C NET DLL as this...

Страница 5: ...ble bandpass int getFilter void setFilter int filter string getFilterLabel int filter_position void setFilterLabel int filter_position string label double getWavelength bool setWavelength double wavelength bool getShutter void setShutter bool status string getUnits void setUnits WAVELENGTH_UNITS unit Here is the enum that is used for the above commands enum WAVELENGTH_UNITS NM UM WN int getSlitWid...

Страница 6: ...call the DLL in C NET Below the code is how to add a DLL Reference to a NET project You will need to right click on the project and Add a Reference to the DLL s also to add these references to your project The code below is the clearest way to see how to connect but here are the steps 1 Add Code Reference to both the Cornerstone DLL and the CyUSB Cypress DLL 2 In the Form Designer file Form Design...

Страница 7: ...namic USB plug and unplug events void usbDevices_DeviceRemoved object sender EventArgs e USBEventArgs usbEvent e as USBEventArgs cs disconnect void usbDevices_DeviceAttached object sender EventArgs e USBEventArgs usbEvent e as USBEventArgs cs connect connect void connect cornerstone cs device usbDevices cs usbDevices deviceCount usbDevices Count void toggleButtons Boolean toggle btnResponse Enable...

Страница 8: ...nt cs sendCommand txtComand2 Text txtInfo Text cs getLastMessage cs setActiveDevice nActiveUnit private void btnResponse2_Click object sender EventArgs e cs setActiveDevice cs usbDevices Count txtInfo Text cs getResponse cs setActiveDevice nActiveUnit 4 USAGE C DLL This demonstrates how to call the Oriel Cypress DLL in C Files Oriel_USB h Header file of functions inside a class object that needs t...

Страница 9: ...ion 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 Q...

Страница 10: ...ffices worldwide Every year the Newport Resource catalog is hailed as the premier sourcebook for those in need of advanced technology products and services It is available by mail request or through Newport s website The website is where one will find product updates interactive demonstrations specification charts and more To obtain information regarding sales technical support or factory service ...

Страница 11: ...ntil delivery at Newport s facility Newport is not responsible for product damage once it has left the facility after repair or replacement has been completed Newport is not obligated to accept products returned without an RMA number Any return shipment received by Newport without an RMA number may be reshipped by Newport freight collect to the Owner of the product 5 4 NON WARRANTY SERVICE For Pro...

Страница 12: ...number issued by Newport with freight prepaid by Buyer Newport shall not be responsible for any damage occurring in transit or obligated to accept Products returned for warranty repair without an RMA number The buyer bears all risk of loss or damage to the Products until delivery at Newport s facility Newport shall pay for shipment back to Buyer for Products repaired under warranty WARRANTY PERIOD...

Страница 13: ...crets of Newport and are for use only in the manner expressly permitted Newport claims and reserves all rights and benefits afforded under law in the Programs provided by Newport Corporation Newport shall retain full ownership of Intellectual Property Rights in and to all development process align or assembly technologies developed and other derivative work that may be developed by Newport Custome...

Отзывы: