ECMC: EtherCAT open source motion control.
Motion control based on the open source EtherCAT master (www.etherlab.org). The motion package is integerated into the ESS EPCIS environment (E3).
Loading...
Searching...
No Matches
ecmcPLC.h
Go to the documentation of this file.
1/*************************************************************************\
2* Copyright (c) 2019 European Spallation Source ERIC
3* ecmc is distributed subject to a Software License Agreement found
4* in file LICENSE that is included with this distribution.
5*
6* ecmcPLC.h
7*
8* Created on: Oct 5, 2018
9* Author: anderssandstrom
10*
11\*************************************************************************/
12
18#ifndef ECMC_PLC_H_
19#define ECMC_PLC_H_
20
21#define CHECK_PLCS_RETURN_IF_ERROR()\
22 {\
23 if (!plcs) {\
24 return ERROR_MAIN_PLCS_NULL;\
25 }\
26 }
27
28# ifdef __cplusplus
29extern "C" {
30# endif // ifdef __cplusplus
31
47int createPLC(int index,
48 double cycleTime,
49 int axisPLC);
50
63int deletePLC(int index);
64
83int setPLCExpr(int index,
84 char *expr);
85
410int appendPLCExpr(int index,
411 char *expr);
412
428int loadPLCFile(int index,
429 char *fileName);
430
443int writePLCVar(int index,
444 const char *varName,
445 double value);
446
459int readPLCVar(int index,
460 const char *varName,
461 double *value);
462
474int clearPLCExpr(int index);
475
487int compilePLCExpr(int index);
488
501int setPLCEnable(int index,
502 int enable);
503
516int getPLCEnable(int index,
517 int *enabled);
518
531const char* getPLCExpr(int axisIndex,
532 int *error);
533
534
535# ifdef __cplusplus
536}
537# endif // ifdef __cplusplus
538
539#endif /* ECMC_PLC_H_ */
int deletePLC(int index)
Delete PLC. .
int writePLCVar(int index, const char *varName, double value)
Write to PLC variable. .
int compilePLCExpr(int index)
Compile PLC expression. .
int createPLC(int index, double cycleTime, int axisPLC)
Create a PLC object called. .
int setPLCEnable(int index, int enable)
Set enable of PLC. .
int loadPLCFile(int index, char *fileName)
Load PLC file. .
int getPLCEnable(int index, int *enabled)
Set enable of PLC. .
int clearPLCExpr(int index)
Clear PLC expression. .
int appendPLCExpr(int index, char *expr)
Append Line to PLC expression. .
int setPLCExpr(int index, char *expr)
Set PLC expression. .
int readPLCVar(int index, const char *varName, double *value)
Read PLC variable. .
const char * getPLCExpr(int axisIndex, int *error)
Get PLC expression. .