SESTILIO  3.0.2
C Library for SESTILIO a smart A/D and D/A interface on USB 2.0
sest.h
Go to the documentation of this file.
1 #ifndef SESTILIO_INCLUDE_FILE
2 #define SESTILIO_INCLUDE_FILE
3 
4 /*****************************************************************************
5  *****************************************************************************
6  ** **
7  ** Definitions for Sestilo interface **
8  ** for Windows or Linux LIB **
9  ** (C) 2019 O.T. All Rights Reserved **
10  ** **
11  ** **
12  ** Develope contributes: Manuele Turini **
13  ** **
14  *****************************************************************************
15  *****************************************************************************/
16 
200 #define PROC_CALL __stdcall
201 
202 /*
203  * For Win32 compilers supporting the "declspec" keyword.
204  */
205 #if defined(_WIN32) || defined(__WIN32__)
206  #if defined(_MSC_VER)
207  #ifdef STATIC_LIBRARY
208  #define DLL
209  #define DLL_P *
210  #define DLL_V
211  #else
212  #ifdef DLL_SOURCE_CODE
213  #define DLL __declspec(dllexport) PROC_CALL
214  #define DLL_P __declspec(dllexport) * PROC_CALL
215  #define DLL_V __declspec(dllexport)
216  #else
217  #define DLL __declspec(dllimport) PROC_CALL
218  #define DLL_P __declspec(dllimport) * PROC_CALL
219  #define DLL_V __declspec(dllimport)
220  #endif
221  #endif
222  #else
223  #if defined(__BORLANDC__)
224  #ifdef DLL_SOURCE_CODE
225  #define DLL _export PROC_CALL
226  #define DLL_P _export * PROC_CALL
227  #define DLL_V _export
228  #else
229  #define DLL _import PROC_CALL
230  #define DLL_P _import * PROC_CALL
231  #define DLL_V _import
232  #endif
233  #endif
234  #endif
235 #else
236  // UNIX
237  #define DLL
238  #define DLL_P *
239  #define DLL_V
240  #define PROC_CALL
241 #endif
242 
243 #ifndef CTYPET
244  #define CTYPET
245  #ifdef __cplusplus
246  #define CTYPE extern "C"
247  #else
248  #define CTYPE
249  #endif
250 #endif
251 
252 #define SE_LIBRARY_REVISION 3.00
253 
254 #define SE_S_SUCCESS 1
257 #define SE_S_RUN 2
258 #define SE_S_FAIL 0
259 #define SE_S_TIMEOUT -1
260 
261 
265 #define SE_K_AD_VOLT 0.1484375
266 #define SE_K_DA_VOLT 1.1875000
267 
268 #define SE_ADV(a) ((a) * SE_K_AD_VOLT / 1000)
269 #define SE_VAD(a) ((a) * 1000 / SE_K_AD_VOLT)
270 #define SE_DAV(a) ((a) * SE_K_DA_VOLT / 1000)
271 #define SE_VDA(a) ((a) * 1000 / SE_K_DA_VOLT)
272 
273 #define SE_ADKT(a) ((a) * 0.037109375 / 5.0)
274 #define SE_ADKC(a) ((a) * 0.037109375 / 5.0 - 273.15)
275 #define SE_ADKF(a) (SE_ADKC(a) * 1.8 - 32.0)
276 
277 
281 #define SE_AD_0 0
282 #define SE_AD_1 1
283 #define SE_AD_DUAL 2
284 
285 
289 #define SE_DA_0 0
290 #define SE_DA_1 1
291 #define SE_DA_DUAL 2
292 
293 
297 #define SE_AD_GAIN_1X 0
298 #define SE_AD_GAIN_2X 1
299 #define SE_AD_GAIN_4X 2
300 #define SE_AD_GAIN_5X 3
301 #define SE_AD_GAIN_8X 4
302 #define SE_AD_GAIN_10X 5
303 #define SE_AD_GAIN_16X 6
304 #define SE_AD_GAIN_32X 7
305 
306 
310 #define SE_RAM_0 0
311 #define SE_RAM_1 1
312 
313 
317 #define SE_P_TB_40_NS 0
318 #define SE_P_TB_1_US 1
319 #define SE_P_TB_1_MS 2
320 
321 
323 
326 #define SE_PORT_P4 0
327 #define SE_PORT_P5 1
328 #define SE_PORT_PA 2
329 #define SE_PORT_PB 3
330 #define SE_PORT_OPTO 4
331 #define SE_PORT_POWER 5
332 #define SE_PORT_OPTO_IN 6
333 
334 
338 #define SE_PORT_IN 0
339 #define SE_PORT_OUT 1
340 
341 
345 #define SE_TRIGGER_DISABLE 0
346 #define SE_TRIGGER_INTA 1
347 #define SE_TRIGGER_INTB 2
348 #define SE_TRIGGER_P4_6_LOW 3
349 #define SE_TRIGGER_P4_6_HIGH 4
350 #define SE_TRIGGER_P4_7_LOW 5
351 #define SE_TRIGGER_P4_7_HIGH 6
352 
353 
357 #define SE_SPI_CK_12_5_MHZ 0
358 #define SE_SPI_CK_6_25_MHZ 1
359 #define SE_SPI_CK_4_08_MHZ 2
360 #define SE_SPI_CK_3_06_MHZ 3
361 #define SE_SPI_CK_2_45_MHZ 4
362 #define SE_SPI_CK_2_04_MHZ 5
363 #define SE_SPI_CK_1_75_MHZ 6
364 #define SE_SPI_CK_1_53_MHZ 7
365 #define SE_SPI_CK_1_36_MHZ 8
366 #define SE_SPI_CK_1_22_MHZ 9
367 
368 
372 #define SE_SPI_POL_PHA_00 0
373 #define SE_SPI_POL_PHA_01 1
374 #define SE_SPI_POL_PHA_10 2
375 #define SE_SPI_POL_PHA_11 3
376 
377 
381 #define SE_PID_KD 0
382 #define SE_PID_KI 1
383 #define SE_PID_KP 2
384 
385 
389 #define SE_PID_OUT_DISABLE 0
390 #define SE_PID_OUT_PWM 1
391 #define SE_PID_OUT_DAC0 2
392 #define SE_PID_OUT_DAC1 3
393 
394 
398 #define SE_PID_UNIT_RAW 0
399 #define SE_PID_UNIT_MV 1
400 #define SE_PID_UNIT_MK 2
401 #define SE_PID_UNIT_MC 3
402 #define SE_PID_UNIT_MF 4
403 
404 
408 #define SE_PID_CHAN_00 1
409 #define SE_PID_CHAN_01 2
410 #define SE_PID_CHAN_02 4
411 #define SE_PID_CHAN_03 8
412 #define SE_PID_CHAN_04 16
413 #define SE_PID_CHAN_05 32
414 #define SE_PID_CHAN_06 64
415 #define SE_PID_CHAN_07 128
416 #define SE_PID_CHAN_08 256
417 #define SE_PID_CHAN_09 512
418 #define SE_PID_CHAN_10 1024
419 #define SE_PID_CHAN_11 2048
420 #define SE_PID_CHAN_12 4096
421 #define SE_PID_CHAN_13 8192
422 #define SE_PID_CHAN_14 16384
423 #define SE_PID_CHAN_15 32768
424 
425 
429 #define SE_MOT_A 0
430 #define SE_MOT_B 1
431 
432 
436 #define SE_MOT_DIR_CW 0
437 #define SE_MOT_DIR_CCW 1
438 
439 
443 #define SE_MOT_ON 1
444 #define SE_MOT_OFF 0
445 
446 
450 #define SE_MOT_SLOPE_1 0
451 #define SE_MOT_SLOPE_2 1
452 #define SE_MOT_SLOPE_3 2
453 #define SE_MOT_SLOPE_4 3
454 #define SE_MOT_SLOPE_5 4
455 #define SE_MOT_SLOPE_6 5
456 #define SE_MOT_SLOPE_7 6
457 #define SE_MOT_SLOPE_8 7
458 #define SE_MOT_SLOPE_9 8
459 #define SE_MOT_SLOPE_10 9
460 
461 
465 #define SE_BRIDGE_NN 0
466 #define SE_BRIDGE_NP 1
467 #define SE_BRIDGE_PN 2
468 #define SE_BRIDGE_PP 3
469 #define SE_BRIDGE_BOOST 4
470 
471 #define SE_BRIDGE_OFF_1 8
472 #define SE_BRIDGE_OFF_2 9
473 #define SE_BRIDGE_OFF_3 10
474 #define SE_BRIDGE_OFF_4 11
475 
476 
480 // ****************************************************************************
481 // C O N T R O L S
482 // ****************************************************************************
483 
500 CTYPE int DLL SE_Open(char sestilioId, int usbDevice);
501 
517 CTYPE int DLL SE_Close(int usbDevice);
518 
534 CTYPE unsigned DLL SE_NumOfDevices();
535 
542 CTYPE int DLL SE_Status(int usbDevice);
543 
551 CTYPE int DLL SE_SetID(char sestilioId, int usbDevice);
552 
569 CTYPE int DLL SE_FirmwareRev(int usbDevice);
570 
587 CTYPE int DLL SE_CPUtemperature(int usbDevice);
588 
595 CTYPE unsigned DLL SE_Counts(int usbDevice);
596 
603 CTYPE int DLL SE_ClrCounts(int usbDevice);
604 
611 CTYPE int DLL SE_WatchDog(int timeout, int usbDevice);
612 
613 CTYPE long DLL SE_DebugData(int dataId, int param0, int param1, int usbDevice);
614 
616 
619 // ****************************************************************************
620 // L O W L E V E L C O M M A N D S
621 // ****************************************************************************
622 
631 CTYPE const char DLL_P SE_ReadData(const char * command, int rxed, int usbDevice);
632 
641 CTYPE long DLL SE_ReadDataNumber(const char * command, int rxed, int usbDevice);
642 
651 CTYPE const char DLL_P SE_ReadDataBinary(const char * command, int rxed, int usbDevice);
652 
662 CTYPE int DLL SE_ReadDataBinaryExt(const char * command, char * outBuf, int rxed, int usbDevice);
663 
673 CTYPE int DLL SE_WriteDataBinary(const char * command, const char * buffer, unsigned length, int usbDevice);
674 
682 CTYPE int DLL SE_Command(const char * command, int usbDevice);
683 
691 CTYPE void DLL SE_CommandDeaf(const char * command, int usbDevice);
692 
699 CTYPE int DLL SE_CheckAck(int usbDevice);
700 
702 
705 // ****************************************************************************
706 // A / D A N D D / A C O N T R O L S
707 // ****************************************************************************
708 
716 CTYPE int DLL SE_SetMux(int chan, int usbDevice);
717 
726 CTYPE int DLL SE_SetGain(int chan, int gain, int usbDevice);
727 
752 CTYPE int DLL SE_FastReadAnalog(int source, int trigger, unsigned period, int samples, int usbDevice);
753 
772 CTYPE unsigned short int DLL SE_ReadAnalog(int source, int average, int usbDevice);
773 
783 CTYPE int DLL SE_FlowReadAnalog(int source, unsigned int num, unsigned short int * outBuffer, int usbDevice);
784 
793 CTYPE int DLL SE_WriteAnalog(int chan, int value, int usbDevice);
794 
803 CTYPE int DLL SE_WriteAnalogDual(int val0, int val1, int usbDevice);
804 
815 CTYPE int DLL SE_FastWriteAnalog(int source, int trigger, unsigned period, int samples, int usbDevice);
816 
818 
821 // ****************************************************************************
822 // M E M O R Y C O N T R O L S
823 // ****************************************************************************
824 
834 CTYPE const char DLL_P SE_ReadRAM(int source, int address, int num, int usbDevice);
835 
846 CTYPE int DLL SE_WriteRAM(int source, int address, int num, const char * buffer, int usbDevice);
847 
858 CTYPE int DLL SE_GetSampleData(int source, int address, int num, unsigned short int * outBuffer, int usbDevice);
859 
870 CTYPE int DLL SE_GetSampleDoubleData(int source, int address, int num, double * outBuffer, int usbDevice);
871 
883 CTYPE int DLL SE_GetSampleDoubleDataSplit(int source, int address, int num, double * outBuffer0, double * outBuffer1, int usbDevice);
884 
895 CTYPE int DLL SE_PutSampleData(int source, int address, int num, unsigned short int * outBuffer, int usbDevice);
896 
905 CTYPE const char DLL_P SE_ReadEEPROM(int address, int num, int usbDevice);
906 
916 CTYPE int DLL SE_WriteEEPROM(int address, int num, const char * buffer, int usbDevice);
917 
919 
922 // ****************************************************************************
923 // P O R T C O N T R O L S
924 // ****************************************************************************
925 
934 CTYPE int DLL SE_WriteKPortConfig(int regAdd, int regValue, int usbDevice);
935 
943 CTYPE int DLL SE_ReadKPortConfig(int regAdd, int usbDevice);
944 
960 CTYPE int DLL SE_SetPortDirection(int port, int bit7, int bit6, int bit5, int bit4, int bit3, int bit2, int bit1, int bit0, int usbDevice);
961 
988 CTYPE int DLL SE_WritePort(int portAddress, int portValue, int usbDevice);
989 
998 CTYPE int DLL SE_SetPortBit(int portAddress, int bit, int usbDevice);
999 
1008 CTYPE int DLL SE_ClrPortBit(int portAddress, int bit, int usbDevice);
1009 
1029 CTYPE int DLL SE_ReadPort(int portAddress, int usbDevice);
1030 
1052 CTYPE int DLL SE_PortPulse(int port, int initialValue, int finalValue, int pulseWidth, int timeBase, int usbDevice);
1053 
1062 CTYPE int DLL SE_CheckPortBit(int port, int bit, int usbDevice);
1063 
1074 CTYPE int DLL SE_PwmOptoCoupledPowerPort(int bitSelect, int enable, int lowWidth, int highWidth, int usbDevice);
1075 
1076 
1083 CTYPE int DLL SE_AuxPower(int pwrCtrl, int usbDevice);
1084 
1086 
1089 // ****************************************************************************
1090 // S P I C O N T R O L S
1091 // ****************************************************************************
1092 
1103 CTYPE int DLL SE_WriteSPI(int address, int slaveAddress, int num, const char * buffer, int usbDevice);
1104 
1114 CTYPE const char DLL_P SE_ReadSPI(int address, int slaveAddress, int num, int usbDevice);
1115 
1126 CTYPE const char DLL_P SE_ReadWriteSPI(int address, int slaveAddress, int num, const char * buffer, int usbDevice);
1127 
1136 CTYPE int DLL SE_SetClockSPI(int speed, int mode, int usbDevice);
1137 
1146 CTYPE int DLL SE_CheckSPI(int address, int slaveAddress, int usbDevice);
1147 
1149 
1152 // ****************************************************************************
1153 // I N S T R U M E N T S A N D A N A L Y S I S
1154 // ****************************************************************************
1155 
1166 CTYPE int DLL SE_TransientResponse(int da, int daValue, unsigned period, int samples, int usbDevice);
1167 
1193 CTYPE int DLL SE_LinearScanner(int dir, long rows, unsigned short int * outBuffer, int usbDevice);
1194 
1210 CTYPE unsigned int DLL SE_ReadTemperature(int adSource, int muxChan, int average, int usbDevice);
1211 
1228 CTYPE unsigned int DLL SE_ReadCurrent(int adSource, int highVoltChan, int lowVoltChan, int range, double refResistence, int average, int usbDevice);
1229 
1231 
1234 // ****************************************************************************
1235 // T E M P E R A T U R E C O N T R O L L E R
1236 // ****************************************************************************
1237 
1267 CTYPE int DLL SE_SetPID(int pidID, int controlOutput, int adChannels, int measureUnit, int targetValue, int controlMaxValue, int behavior, int usbDevice);
1268 
1279 CTYPE int DLL SE_SetPIDconstants(int pidID, int constantId, int constantBase, int constantDivider, int usbDevice);
1280 
1288 CTYPE int DLL SE_SetPIDtimeBase(int timeBaseMultiplier, int usbDevice);
1289 
1297 CTYPE unsigned short int DLL SE_PIDdata(int channel, int usbDevice);
1298 
1300 
1303 // ****************************************************************************
1304 // S T E P M O T O R C O N T R O L
1305 // ****************************************************************************
1306 
1338 CTYPE int DLL SE_MotorPositioning(int dir0, long steps0, int dir1, long steps1, int usbDevice);
1339 
1362 CTYPE int DLL SE_SetMotorSlope(int axis, int slopeIndex, int slope, int usbDevice);
1363 
1377 CTYPE int DLL SE_SetMotorSpeed(int axis, int startDelay, int endDelay, int usbDevice);
1378 
1387 CTYPE long DLL SE_ReadMotorCount(int axis, int usbDevice);
1388 
1403 CTYPE void DLL SE_MotorCalibrate(int dir0, long steps0, int dir1, long steps1, int bitAxis0, int bitAxis1, int usbDevice);
1404 
1413 CTYPE int DLL SE_SetMotorEnable(int axis, int enable, int usbDevice);
1414 
1447 CTYPE int DLL SE_AuxMotorPositioning(int id, int dir, int steps, int delay, int usbDevice);
1448 
1473 CTYPE int DLL SE_AuxMotorPositCalib(int id, int dir, int steps, int delay, int fcLevel, int usbDevice);
1474 
1476 
1477 
1480 // ****************************************************************************
1481 // B R I D G E C O N T R O L S
1482 // ****************************************************************************
1483 
1505 CTYPE int DLL SE_BridgePulse(int bridge, int activation, int deactivation, int activationWidth, int deactivationWidth, int timeBase, int usbDevice);
1506 
1530 CTYPE int DLL SE_BridgeUntil(int bridge, int activation, int portId, int portBit, int bitTrue, int timeout, int usbDevice);
1531 
1533 
1534 
1537 // ****************************************************************************
1538 // E X P A N S I O N B O A R D C O N T R O L
1539 // ****************************************************************************
1540 
1548 CTYPE int DLL SE_EspiBusInit(int speed, int usbDevice);
1549 
1557 CTYPE int DLL SE_EspiRlInit(int board, int usbDevice);
1558 
1566 CTYPE int DLL SE_EspiOpInit(int board, int usbDevice);
1567 
1576 CTYPE int DLL SE_EspiRlWrite(int board, int value, int usbDevice);
1577 
1586 CTYPE int DLL SE_EspiOpWrite(int board, int value, int usbDevice);
1587 
1595 CTYPE int DLL SE_EspiRlRead(int board, int usbDevice);
1596 
1604 CTYPE int DLL SE_EspiOpRead(int board, int usbDevice);
1605 
1613 CTYPE int DLL SE_EspiOpOutRead(int board, int usbDevice);
1614 
1635 CTYPE int DLL SE_EspiRlSet(int board, int relay, int ena, int usbDevice);
1636 
1657 CTYPE int DLL SE_EspiOpSet(int board, int opto, int ena, int usbDevice);
1658 
1678 CTYPE int DLL SE_LsrDrvSet(int board, double current, int usbDevice);
1679 
1687 CTYPE double DLL SE_LsrDrvGet(int board, int usbDevice);
1688 
1690 
1691 
1692 #endif
CTYPE int DLL SE_FirmwareRev(int usbDevice)
Check Sestilio firmware revision number.
Definition: sestilio.cpp:327
CTYPE const char DLL_P SE_ReadWriteSPI(int address, int slaveAddress, int num, const char *buffer, int usbDevice)
Write and at the same time read a stream of data from the SPI expansion bus.
Definition: sestilio.cpp:491
CTYPE int DLL SE_SetPIDconstants(int pidID, int constantId, int constantBase, int constantDivider, int usbDevice)
Set some intrinsic PID constants.
Definition: sestilio.cpp:548
CTYPE long DLL SE_ReadDataNumber(const char *command, int rxed, int usbDevice)
Send a command and get it's relative answer as long.
Definition: sestilio.cpp:145
CTYPE int DLL SE_Open(char sestilioId, int usbDevice)
Open the connection with SESTILIO.
Definition: sestilio.cpp:14
CTYPE int DLL SE_FastReadAnalog(int source, int trigger, unsigned period, int samples, int usbDevice)
Start a buffered sampling with one or two A/D converters. Sampled data is stored into RAM 0.
Definition: sestilio.cpp:253
CTYPE int DLL SE_ReadPort(int portAddress, int usbDevice)
Allow to read of the selected port.
Definition: sestilio.cpp:395
CTYPE unsigned int DLL SE_ReadTemperature(int adSource, int muxChan, int average, int usbDevice)
This command enables the realization of an accurate thermometer employing a AD590 sensor to that end.
Definition: sestilio.cpp:650
CTYPE int DLL SE_GetSampleDoubleDataSplit(int source, int address, int num, double *outBuffer0, double *outBuffer1, int usbDevice)
RAM0 and RAM1 are used for sampling data, this command allow to read these devices.
Definition: sestilio.cpp:303
CTYPE int DLL SE_SetPortDirection(int port, int bit7, int bit6, int bit5, int bit4, int bit3, int bit2, int bit1, int bit0, int usbDevice)
Allow to set direction (Input or Output) of the selected port.
Definition: sestilio.cpp:351
CTYPE int DLL SE_BridgePulse(int bridge, int activation, int deactivation, int activationWidth, int deactivationWidth, int timeBase, int usbDevice)
Generate a pulse on the specified bridge.
Definition: sestilio.cpp:629
CTYPE int DLL SE_EspiBusInit(int speed, int usbDevice)
Init the SPI expansion bus.
Definition: sestilio.cpp:687
CTYPE int DLL SE_WatchDog(int timeout, int usbDevice)
Set watchdog.
Definition: sestilio.cpp:867
CTYPE int DLL SE_ClrPortBit(int portAddress, int bit, int usbDevice)
Allow to clear a bit on the selected port.
Definition: sestilio.cpp:384
CTYPE int DLL SE_ReadDataBinaryExt(const char *command, char *outBuf, int rxed, int usbDevice)
Send a command and get it's relative answer to store in a buffer specified as parameter.
Definition: sestilio.cpp:115
CTYPE int DLL SE_SetPID(int pidID, int controlOutput, int adChannels, int measureUnit, int targetValue, int controlMaxValue, int behavior, int usbDevice)
Enable SESTILIO as a temperature controller. Four simultaneous temperature controls are performed at ...
Definition: sestilio.cpp:532
CTYPE int DLL SE_CheckAck(int usbDevice)
Check if an ACK is received from SESTILIO.
Definition: sestilio.cpp:178
CTYPE int DLL SE_SetMotorSpeed(int axis, int startDelay, int endDelay, int usbDevice)
This command effects the speed setting of the motor on the selected axis. The setting adopts an accel...
Definition: sestilio.cpp:601
CTYPE int DLL SE_SetMotorSlope(int axis, int slopeIndex, int slope, int usbDevice)
If the number of steps is sufficient, the setting command realizes an accelerating and decelerating r...
Definition: sestilio.cpp:594
CTYPE int DLL SE_Status(int usbDevice)
Return the status of the last execute operation.
Definition: sestilio.cpp:53
CTYPE int DLL SE_WriteRAM(int source, int address, int num, const char *buffer, int usbDevice)
RAM0 and RAM1 are used for sampling or signal generation, this command allow to write these devices.
Definition: sestilio.cpp:274
CTYPE int DLL SE_EspiRlSet(int board, int relay, int ena, int usbDevice)
Turn on or off a relay on the ESPI-RL board.
Definition: sestilio.cpp:810
CTYPE int DLL SE_FlowReadAnalog(int source, unsigned int num, unsigned short int *outBuffer, int usbDevice)
Maximum speed for A/D sample read. Is a procedure that sample the A/D converter at the maximum speed ...
Definition: sestilio.cpp:260
CTYPE int DLL SE_TransientResponse(int da, int daValue, unsigned period, int samples, int usbDevice)
Perform transient response analysis. Sampling of data is performed with AD0 and AD1,...
Definition: sestilio.cpp:525
CTYPE int DLL SE_AuxMotorPositCalib(int id, int dir, int steps, int delay, int fcLevel, int usbDevice)
Executes a positioning on specified axes in the direction of and by a maximum number of steps to find...
Definition: sestilio.cpp:580
CTYPE long DLL SE_ReadMotorCount(int axis, int usbDevice)
After having launched a setting, it may be necessary to know how much time is needed to complete the ...
Definition: sestilio.cpp:608
CTYPE const char DLL_P SE_ReadData(const char *command, int rxed, int usbDevice)
Send a command and get it's relative answer as character string.
Definition: sestilio.cpp:58
CTYPE int DLL SE_PortPulse(int port, int initialValue, int finalValue, int pulseWidth, int timeBase, int usbDevice)
Generate a pulse on the specified port.
Definition: sestilio.cpp:402
CTYPE unsigned DLL SE_Counts(int usbDevice)
Some procedures are long task, with this command is possible to check a countdown to the end of task.
Definition: sestilio.cpp:317
CTYPE int DLL SE_PutSampleData(int source, int address, int num, unsigned short int *outBuffer, int usbDevice)
RAM0 and RAM1 are used for signal generation, this command allow to write these devices.
Definition: sestilio.cpp:281
CTYPE const char DLL_P SE_ReadDataBinary(const char *command, int rxed, int usbDevice)
Send a command and get it's relative answer as a buffer of bytes.
Definition: sestilio.cpp:90
CTYPE int DLL SE_EspiOpWrite(int board, int value, int usbDevice)
Write a value on the ESPI-OP board.
Definition: sestilio.cpp:751
CTYPE const char DLL_P SE_ReadEEPROM(int address, int num, int usbDevice)
SESTILIO have an EEPROM of 128Kbyte for user data, this command allow to read this devices.
Definition: sestilio.cpp:417
CTYPE int DLL SE_WriteEEPROM(int address, int num, const char *buffer, int usbDevice)
SESTILIO have an EEPROM of 128Kbyte for user data, this command allow to write this devices.
Definition: sestilio.cpp:441
CTYPE int DLL SE_EspiOpOutRead(int board, int usbDevice)
Read the status of the opto-coupled output port from the ESPI-OP board.
Definition: sestilio.cpp:780
CTYPE int DLL SE_PwmOptoCoupledPowerPort(int bitSelect, int enable, int lowWidth, int highWidth, int usbDevice)
Start (or stop) a PWM the optically decoupled power port.
Definition: sestilio.cpp:463
CTYPE int DLL SE_WritePort(int portAddress, int portValue, int usbDevice)
Allow to write on the selected port.
Definition: sestilio.cpp:366
CTYPE int DLL SE_SetMux(int chan, int usbDevice)
Select a multiplexer channel.
Definition: sestilio.cpp:202
CTYPE int DLL SE_CPUtemperature(int usbDevice)
Read Sestilio CPU temperature.
Definition: sestilio.cpp:332
CTYPE int DLL SE_LinearScanner(int dir, long rows, unsigned short int *outBuffer, int usbDevice)
With the optional module LINCAM-1 SESTILIO can be used to implement an image scanner....
Definition: sestilio.cpp:643
CTYPE unsigned short int DLL SE_ReadAnalog(int source, int average, int usbDevice)
Start a sampling with a selected A/D converters.
Definition: sestilio.cpp:212
CTYPE int DLL SE_GetSampleData(int source, int address, int num, unsigned short int *outBuffer, int usbDevice)
RAM0 and RAM1 are used for sampling data, this command allow to read these devices.
Definition: sestilio.cpp:286
CTYPE int DLL SE_EspiRlInit(int board, int usbDevice)
Init ESPI-RL board connected on SPI expansion bus.
Definition: sestilio.cpp:692
CTYPE int DLL SE_SetPortBit(int portAddress, int bit, int usbDevice)
Allow to set a bit on the selected port.
Definition: sestilio.cpp:373
CTYPE int DLL SE_ClrCounts(int usbDevice)
Clear the countdown.
Definition: sestilio.cpp:322
CTYPE unsigned int DLL SE_ReadCurrent(int adSource, int highVoltChan, int lowVoltChan, int range, double refResistence, int average, int usbDevice)
This command enables the realization of an accurate ammeter using an external resistance and two A/D ...
Definition: sestilio.cpp:661
CTYPE int DLL SE_AuxPower(int pwrCtrl, int usbDevice)
Turn on/off the power on Y4.16, maximum allowed current is 50mA.
Definition: sestilio.cpp:470
CTYPE int DLL SE_Command(const char *command, int usbDevice)
Send a specified command without any parameters.
Definition: sestilio.cpp:153
CTYPE int DLL SE_SetGain(int chan, int gain, int usbDevice)
Select a gain for specified channel. Gain control is available for group of channels 0-7 and 8-15.
Definition: sestilio.cpp:244
CTYPE int DLL SE_Close(int usbDevice)
Close the connection with SESTILIO. This procedure must be execute at the end of your program.
Definition: sestilio.cpp:38
CTYPE int DLL SE_CheckSPI(int address, int slaveAddress, int usbDevice)
Return the logic level of the MISO line.
Definition: sestilio.cpp:508
CTYPE int DLL SE_SetMotorEnable(int axis, int enable, int usbDevice)
Turn on/off the motor. After a positioning the motor is always on, this can be useful for a great hol...
Definition: sestilio.cpp:622
CTYPE int DLL SE_WriteKPortConfig(int regAdd, int regValue, int usbDevice)
Allow to write a register of the Port Expander (MCP23S17) used for PORT A and B.
Definition: sestilio.cpp:337
CTYPE int DLL SE_SetPIDtimeBase(int timeBaseMultiplier, int usbDevice)
The PID is a preset value and runs a cycle every 100 mS.This command enables modification of before m...
Definition: sestilio.cpp:555
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.
Definition: sestilio.cpp:820
CTYPE int DLL SE_WriteAnalogDual(int val0, int val1, int usbDevice)
Set all DACs to a requested value at the same time.
Definition: sestilio.cpp:230
CTYPE unsigned short int DLL SE_PIDdata(int channel, int usbDevice)
Read the PID data value.
Definition: sestilio.cpp:562
CTYPE int DLL SE_EspiRlRead(int board, int usbDevice)
Read the set relay from the ESPI-RL board.
Definition: sestilio.cpp:765
CTYPE int DLL SE_FastWriteAnalog(int source, int trigger, unsigned period, int samples, int usbDevice)
Is a function generator on one or two DACs at the same time.
Definition: sestilio.cpp:237
CTYPE int DLL SE_ReadKPortConfig(int regAdd, int usbDevice)
Allow to read a register of the Port Expander (MCP23S17) used for PORT A and B.
Definition: sestilio.cpp:344
CTYPE int DLL SE_CheckPortBit(int port, int bit, int usbDevice)
Check a bit of the opto-coupled port.
Definition: sestilio.cpp:409
CTYPE int DLL SE_EspiOpRead(int board, int usbDevice)
Read the opto-coupled input from the ESPI-OP board.
Definition: sestilio.cpp:795
CTYPE int DLL SE_WriteDataBinary(const char *command, const char *buffer, unsigned length, int usbDevice)
Send a specified command and it's buffer of parameters.
Definition: sestilio.cpp:130
CTYPE int DLL SE_EspiRlWrite(int board, int value, int usbDevice)
Write a value on the ESPI-RL board.
Definition: sestilio.cpp:737
CTYPE void DLL SE_CommandDeaf(const char *command, int usbDevice)
Send a specified command without any parameters and without wait ACK from SESTILIO.
Definition: sestilio.cpp:169
CTYPE int DLL SE_GetSampleDoubleData(int source, int address, int num, double *outBuffer, int usbDevice)
RAM0 and RAM1 are used for sampling data, this command allow to read these devices.
Definition: sestilio.cpp:292
CTYPE const char DLL_P SE_ReadSPI(int address, int slaveAddress, int num, int usbDevice)
Read a stream of data from the SPI expansion bus.
Definition: sestilio.cpp:484
CTYPE int DLL SE_AuxMotorPositioning(int id, int dir, int steps, int delay, int usbDevice)
Executes a positioning on specified axes in the direction of and by the specified number of steps....
Definition: sestilio.cpp:573
CTYPE int DLL SE_BridgeUntil(int bridge, int activation, int portId, int portBit, int bitTrue, int timeout, int usbDevice)
Activate a specified bridge until a bit on specified port is true or forever.
Definition: sestilio.cpp:636
CTYPE int DLL SE_SetID(char sestilioId, int usbDevice)
Set a new ID for connected SESTILIO. As factory setting the ID is set to '0'.
Definition: sestilio.cpp:194
CTYPE void DLL SE_MotorCalibrate(int dir0, long steps0, int dir1, long steps1, int bitAxis0, int bitAxis1, int usbDevice)
Command allowing calibration of one or more axes at a time. Executes a maximum number of steps until ...
Definition: sestilio.cpp:615
CTYPE double DLL SE_LsrDrvGet(int board, int usbDevice)
Measure the current set on LSR-PWR1 board on ESPI bus.
Definition: sestilio.cpp:841
CTYPE int DLL SE_WriteSPI(int address, int slaveAddress, int num, const char *buffer, int usbDevice)
Write a stream of data on SPI expansion bus.
Definition: sestilio.cpp:477
CTYPE int DLL SE_LsrDrvSet(int board, double current, int usbDevice)
Set the current for LSR-PWR1 board on ESPI bus.
Definition: sestilio.cpp:830
CTYPE unsigned DLL SE_NumOfDevices()
How many SESTILIO are connected?.
Definition: sestilio.cpp:48
CTYPE int DLL SE_EspiOpInit(int board, int usbDevice)
Init ESPI-OP board connected on SPI expansion bus.
Definition: sestilio.cpp:712
CTYPE int DLL SE_WriteAnalog(int chan, int value, int usbDevice)
Set a specified DAC to a requested value.
Definition: sestilio.cpp:223
CTYPE int DLL SE_SetClockSPI(int speed, int mode, int usbDevice)
Set the SPI clock.
Definition: sestilio.cpp:518
CTYPE const char DLL_P SE_ReadRAM(int source, int address, int num, int usbDevice)
RAM0 and RAM1 are used for sampling or signal generation, this command allow to read these devices.
Definition: sestilio.cpp:267
CTYPE int DLL SE_MotorPositioning(int dir0, long steps0, int dir1, long steps1, int usbDevice)
Executes a positioning on two axes in the direction of and by the specified number of steps.
Definition: sestilio.cpp:587