SESTILIO  3.0.2
C Library for SESTILIO a smart A/D and D/A interface on USB 2.0
Expansion board controls

Functions

CTYPE int DLL SE_EspiBusInit (int speed, int usbDevice)
 Init the SPI expansion bus. More...
 
CTYPE int DLL SE_EspiRlInit (int board, int usbDevice)
 Init ESPI-RL board connected on SPI expansion bus. More...
 
CTYPE int DLL SE_EspiOpInit (int board, int usbDevice)
 Init ESPI-OP board connected on SPI expansion bus. More...
 
CTYPE int DLL SE_EspiRlWrite (int board, int value, int usbDevice)
 Write a value on the ESPI-RL board. More...
 
CTYPE int DLL SE_EspiOpWrite (int board, int value, int usbDevice)
 Write a value on the ESPI-OP board. More...
 
CTYPE int DLL SE_EspiRlRead (int board, int usbDevice)
 Read the set relay from the ESPI-RL board. More...
 
CTYPE int DLL SE_EspiOpRead (int board, int usbDevice)
 Read the opto-coupled input from the ESPI-OP board. More...
 
CTYPE int DLL SE_EspiOpOutRead (int board, int usbDevice)
 Read the status of the opto-coupled output port from the ESPI-OP board. More...
 
CTYPE int DLL SE_EspiRlSet (int board, int relay, int ena, int usbDevice)
 Turn on or off a relay on the ESPI-RL board. More...
 
CTYPE int DLL SE_EspiOpSet (int board, int opto, int ena, int usbDevice)
 Turn on or off an opto-coupled power output on the ESPI-OP board. More...
 
CTYPE int DLL SE_LsrDrvSet (int board, double current, int usbDevice)
 Set the current for LSR-PWR1 board on ESPI bus. More...
 
CTYPE double DLL SE_LsrDrvGet (int board, int usbDevice)
 Measure the current set on LSR-PWR1 board on ESPI bus. More...
 

Detailed Description

Functions to control expansion board on SPI bus.

Function Documentation

◆ SE_EspiBusInit()

int SE_EspiBusInit ( int  speed,
int  usbDevice 
)

Init the SPI expansion bus.

Parameters
speedClock selection: 0 = 12.5 MHz, 1 = 6.25 MHz, 2 = 4.08 MHz, 3 = 3.06 MHz, 4 = 2.45 MHz, 5 = 2.04 MHz, 6 = 1.75 MHz, 7 = 1.53 MHz, 8 = 1.36 MHz, 9 = 1.22 MHz. SPI clock
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_EspiRlInit, SE_EspiRlRead, SE_EspiRlWrite, SE_EspiRlSet.
Returns
Operation status. Operation Status

Definition at line 687 of file sestilio.cpp.

◆ SE_EspiOpInit()

int SE_EspiOpInit ( int  board,
int  usbDevice 
)

Init ESPI-OP board connected on SPI expansion bus.

Parameters
boardBoard selection 0-7
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_EspiBusInit.
Returns
Operation status. Operation Status

Definition at line 712 of file sestilio.cpp.

◆ SE_EspiOpOutRead()

int SE_EspiOpOutRead ( int  board,
int  usbDevice 
)

Read the status of the opto-coupled output port from the ESPI-OP board.

Parameters
boardBoard selection 0-7
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_EspiBusInit, SE_EspiOpInit, SE_EspiOpRead.
Returns
Bit status from opto-coupled output.

Definition at line 780 of file sestilio.cpp.

◆ SE_EspiOpRead()

int SE_EspiOpRead ( int  board,
int  usbDevice 
)

Read the opto-coupled input from the ESPI-OP board.

Parameters
boardBoard selection 0-7
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_EspiBusInit, SE_EspiOpInit, SE_EspiOpWrite.
Returns
Bit status from opto-coupled input.

Definition at line 795 of file sestilio.cpp.

◆ SE_EspiOpSet()

int SE_EspiOpSet ( int  board,
int  opto,
int  ena,
int  usbDevice 
)

Turn on or off an opto-coupled power output on the ESPI-OP board.

Parameters
boardBoard selection 0-7
optoControl bit to turn on or off a related opto-coupled output.
enaTurn on (1) or off (0) selected bit.
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_EspiBusInit, SE_EspiOpInit, SE_EspiOpWrite.
Returns
Operation status. Operation Status
#include "sest.h"
if(SE_Open('0', 0) == SE_S_SUCCESS)
{
SE_EspiOpSet(0, 0x0001, 1, 0); // Turn on opto-output 1 on board 0
SE_EspiOpSet(0, 0x0002, 1, 0); // Turn on opto-output 2 on board 0
SE_EspiOpSet(0, 0x8000, 1, 0); // Turn on opto-output 16 on board 0
SE_EspiOpSet(0, 0x4008, 1, 0); // Turn off opto-output 15 and 4 on board 0
}

Definition at line 820 of file sestilio.cpp.

◆ SE_EspiOpWrite()

int SE_EspiOpWrite ( int  board,
int  value,
int  usbDevice 
)

Write a value on the ESPI-OP board.

Parameters
boardBoard selection 0-7
valueData to be written, each bit is a mirror of an opto-coupled output.
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_EspiBusInit, SE_EspiOpInit, SE_EspiOpRead.
Returns
Operation status. Operation Status

Definition at line 751 of file sestilio.cpp.

◆ SE_EspiRlInit()

int SE_EspiRlInit ( int  board,
int  usbDevice 
)

Init ESPI-RL board connected on SPI expansion bus.

Parameters
boardBoard selection 0-7
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_EspiBusInit, SE_EspiRlRead, SE_EspiRlWrite, SE_EspiRlSet.
Returns
Operation status. Operation Status

Definition at line 692 of file sestilio.cpp.

◆ SE_EspiRlRead()

int SE_EspiRlRead ( int  board,
int  usbDevice 
)

Read the set relay from the ESPI-RL board.

Parameters
boardBoard selection 0-7
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_EspiBusInit, SE_EspiRlInit, SE_EspiRlWrite, SE_EspiRlSet.
Returns
Bit (relays) status.

Definition at line 765 of file sestilio.cpp.

◆ SE_EspiRlSet()

int SE_EspiRlSet ( int  board,
int  bit,
int  ena,
int  usbDevice 
)

Turn on or off a relay on the ESPI-RL board.

Parameters
boardBoard selection 0-7
bitControl bit to turn on or off a relay.
enaTurn on (1) or off (0) selected bit.
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_EspiBusInit, SE_EspiRlInit, SE_EspiRlRead.
Returns
Operation status. Operation Status
#include "sest.h"
if(SE_Open('0', 0) == SE_S_SUCCESS)
{
SE_EspiRlSet(0, 0x0001, 1, 0); // Turn on relay 1 on board 0
SE_EspiRlSet(0, 0x0002, 1, 0); // Turn on relay 2 on board 0
SE_EspiRlSet(0, 0x8000, 1, 0); // Turn on relay 16 on board 0
SE_EspiRlSet(0, 0x4008, 1, 0); // Turn off relay 15 and 4 on board 0
}

Definition at line 810 of file sestilio.cpp.

◆ SE_EspiRlWrite()

int SE_EspiRlWrite ( int  board,
int  value,
int  usbDevice 
)

Write a value on the ESPI-RL board.

Parameters
boardBoard selection 0-7
valueData to be written, each bit is a mirror of a relay.
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_EspiBusInit, SE_EspiRlInit, SE_EspiRlRead, SE_EspiRlSet.
Returns
Operation status. Operation Status

Definition at line 737 of file sestilio.cpp.

◆ SE_LsrDrvGet()

SE_LsrDrvGet ( int  board,
int  usbDevice 
)

Measure the current set on LSR-PWR1 board on ESPI bus.

Parameters
boardBoard selection 0-7
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_LsrDrvSet.
Returns
Measured laser current in ampere

Definition at line 841 of file sestilio.cpp.

◆ SE_LsrDrvSet()

int SE_LsrDrvSet ( int  board,
double  current,
int  usbDevice 
)

Set the current for LSR-PWR1 board on ESPI bus.

Parameters
boardBoard selection 0-7
currentValue of current in ampere. Max value is 5A, min value is 0.0000763A
usbDeviceSpecify a SESTILIO USB identifier.
See also
SE_LsrDrvGet.
Returns
Operation status. Operation Status
#include "sest.h"
if(SE_Open('0', 0) == SE_S_SUCCESS)
{
SE_EspiOpSet(0, 1.5, 0); // Set laser current at 1.5A
..
..
..
}

Definition at line 830 of file sestilio.cpp.