![Oriel Cornerstone 130 Quick Start Manual Download Page 6](http://html.mh-extra.com/html/oriel/cornerstone-130/cornerstone-130_quick-start-manual_1650790006.webp)
CS API v3.01 QSG
Programming Interface Manual
6
string
getGratingLabel(
int
grating)
void
setGratingLabel(
int
grating,
string
label)
double
getGratingOffset(
int
grating)
int
getGratingLines(
int
grating)
void
setGratingLines(
int
grating,
int
lines)
double
getFactor(
int
grating)
void
setFactor(
int
grating,
double
factor)
void
handshake(
bool
on)
void
setStep(
int
step)
void
setWaitTime(
int
wait)
Set communication timeout, it defaults to 10 (ms).
int
getWaitTime()
Get current communication timeout
3.1 CALLING THE DLL IN C#.NET
This demonstrates how to 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.Designer} add the ‘using’ sections
3. {Form.Designer} Create new Cornerstone object
4. {Form.Designer} Connect and verify instrument responds
Changes to (Form Designer) file:
– Abbreviated to show added code snippets
//…
using CyUSB;
using CornerstoneDll;
namespace CornerstoneApp
{
partial class MainForm
{
/// <summary>
//….
USBDeviceList usbDevices;
CyUSBDevice cornerstone;