This commit is contained in:
2023-04-18 11:22:02 +02:00
parent ba06bed614
commit 6665424d61
803 changed files with 52065 additions and 0 deletions

16
KD_ADS_ELM_EC.apj Normal file
View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio Version="4.11.4.55 SP" WorkingVersion="4.11"?>
<Project Description="ELM Europa Clipper" Version="1.00.0" Edition="Standard" EditionComment="Standard" xmlns="http://br-automation.co.at/AS/Project">
<Communication />
<ANSIC DefaultIncludes="true" />
<IEC ExtendedConstants="true" IecExtendedComments="true" KeywordsAsStructureMembers="false" NamingConventions="true" Pointers="true" Preprocessor="false" />
<Motion RestartAcoposParameter="true" RestartInitParameter="true" />
<Project StoreRuntimeInProject="false" />
<Variables DefaultInitValue="0" DefaultRetain="false" DefaultVolatile="true" />
<TechnologyPackages>
<mapp Version="5.20.0" />
<mappCockpit Version="5.20.0" />
<mappMotion McAcpDrv="5.20.1" McAcpSim="5.20.1" McAcpSys="5.20.1" McDriveLog="5.20.1" Version="5.20.1" />
<mappView Version="5.20.0" />
</TechnologyPackages>
</Project>

7
LastUser.set Normal file
View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio Version="4.11.4.55 SP"?>
<ProjectSettings xmlns="http://br-automation.co.at/AS/ProjectSettings">
<ConfigurationManager ActiveConfigurationName="Config1" />
<Deployment Value="ActiveCpu" />
<Print Footer="%cPage: %p" Header="%lProject: %n%c%x" />
</ProjectSettings>

View File

@@ -0,0 +1,10 @@
TYPE
gtyp_Blinker : STRUCT
bBlink0_1 : BOOL; (*Blinker 0,1Hz*)
bBlink0_5 : BOOL; (*Blinker 0,5Hz*)
bBlink1_0 : BOOL; (*Blinker 1Hz*)
bBlink2_0 : BOOL; (*Blinker 2Hz*)
bBlink5_0 : BOOL; (*Blinker 5Hz*)
END_STRUCT;
END_TYPE

View File

@@ -0,0 +1,17 @@
(*//Blinker*)
VAR
gBlinker : gtyp_Blinker; (*Blinbits*)
END_VAR
(*//Zeiten*)
VAR
gdtCurrentTime : DATE_AND_TIME; (*Current Date and Time*)
gDTstrucCurrentTime : DTStructure := (0); (*Current Date and Time as DTStructure*)
gsCurrentTime : STRING[25] := ''; (*Current Date and Time as String*)
gTCurrentTime : TIME := T#0ms; (*Current Time*)
END_VAR
(*//Konstanten*)
VAR CONSTANT
gAInNull : INT := 0; (*O FOR Analog Input*)
iAIVoltageOverflow : INT := 16#7FFF; (* Analog Input Voltage Mode,Overflow *)
iAIVoltageUnderflow : INT := -32767; (* Analog Input Voltage Underflow *)
END_VAR

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Package xmlns="http://br-automation.co.at/AS/Package">
<Objects>
<Object Type="File">GlobalCommon.typ</Object>
<Object Type="File">GlobalComon.var</Object>
<Object Type="Program" Language="IEC" Description="Current Date_And_Time / DT Struct">get_dt</Object>
<Object Type="Program" Language="IEC" Description="Blinker 0,1 -0,5s (f. 100ms Task) !!!">blinker</Object>
</Objects>
</Package>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Program SubType="IEC" xmlns="http://br-automation.co.at/AS/Program">
<Files>
<File Description="Local variables" Private="true">blinker.var</File>
<File Description="Initialization code">blinkerInit.ab</File>
<File Description="Cyclic code">blinkerCyclic.st</File>
</Files>
</Program>

View File

@@ -0,0 +1,13 @@
(********************************************************************
* COPYRIGHT -- kA
********************************************************************
* Program: blinker
* File: blinker.var
* Author: michi
* Created: November 23, 2009
********************************************************************
* Local variables of program blinker
********************************************************************)
VAR
iCount : USINT;
END_VAR

View File

@@ -0,0 +1,18 @@
PROGRAM _CYCLIC
//Must be taskclass 100ms
gBlinker.bBlink0_1 := NOT gBlinker.bBlink0_1;
iCount := iCount + 1;
IF ((iCount MOD 5) = 0) THEN
gBlinker.bBlink0_5 := NOT gBlinker.bBlink0_5;
END_IF
IF ((iCount MOD 10) = 0) THEN
gBlinker.bBlink1_0 := NOT gBlinker.bBlink1_0;
END_IF
IF ((iCount MOD 20) = 0) THEN
gBlinker.bBlink2_0 := NOT gBlinker.bBlink2_0;
END_IF
IF ((iCount MOD 50) = 0) THEN
gBlinker.bBlink5_0 := NOT gBlinker.bBlink5_0;
iCount := 0;
END_IF
END_PROGRAM

View File

@@ -0,0 +1,4 @@
PROGRAM _INIT
iCount := 0;
END_PROGRAM

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Program SubType="IEC" xmlns="http://br-automation.co.at/AS/Program">
<Files>
<File>get_dtCyclic.ab</File>
<File Private="true">get_dt.var</File>
<File>get_dtInit.ab</File>
</Files>
</Program>

View File

@@ -0,0 +1,6 @@
VAR
sTemp : STRING[10] := '';
lDTStructureGetTime : DTStructureGetTime := (0);
lDTGetTime : DTGetTime := (0);
lTimeStructure : TIMEStructure := (0);
END_VAR

View File

@@ -0,0 +1,57 @@
PROGRAM _CYCLIC
(* cyclic program *)
lDTGetTime.enable = true
lDTGetTime FUB DTGetTime()
gdtCurrentTime = lDTGetTime.DT1
lDTStructureGetTime.enable = true
lDTStructureGetTime FUB DTStructureGetTime ()
lDTStructureGetTime.pDTStructure = adr (gDTstrucCurrentTime)
ascDTStructure (ADR (gDTstrucCurrentTime), ADR (gsCurrentTime), 25)
brsstrcpy (ADR (gsCurrentTime), "")
brsitoa (gDTstrucCurrentTime.year, ADR (sTemp))
brsstrcat (ADR (gsCurrentTime), ADR (sTemp))
IF (gDTstrucCurrentTime.month < 10) THEN
brsstrcat (ADR (gsCurrentTime), "0")
ENDIF
brsitoa (gDTstrucCurrentTime.month, ADR (sTemp))
brsstrcat (ADR (gsCurrentTime), ADR (sTemp))
IF (gDTstrucCurrentTime.day < 10) THEN
brsstrcat (ADR (gsCurrentTime), "0")
ENDIF
brsitoa (gDTstrucCurrentTime.day, ADR (sTemp))
brsstrcat (ADR (gsCurrentTime), ADR (sTemp))
brsstrcat (ADR (gsCurrentTime), "_")
IF (gDTstrucCurrentTime.hour < 10) THEN
brsstrcat (ADR (gsCurrentTime), "0")
ENDIF
brsitoa (gDTstrucCurrentTime.hour, ADR (sTemp))
brsstrcat (ADR (gsCurrentTime), ADR (sTemp))
brsstrcat (ADR (gsCurrentTime), "-")
IF (gDTstrucCurrentTime.minute < 10) THEN
brsstrcat (ADR (gsCurrentTime), "0")
ENDIF
brsitoa (gDTstrucCurrentTime.minute, ADR (sTemp))
brsstrcat (ADR (gsCurrentTime), ADR (sTemp))
brsstrcat (ADR (gsCurrentTime), "-")
IF (gDTstrucCurrentTime.second < 10) THEN
brsstrcat (ADR (gsCurrentTime), "0")
ENDIF
brsitoa (gDTstrucCurrentTime.second, ADR (sTemp))
brsstrcat (ADR (gsCurrentTime), ADR (sTemp))
brsstrcat (ADR (gsCurrentTime), "_")
brsitoa (gDTstrucCurrentTime.millisec, ADR (sTemp))
brsstrcat (ADR (gsCurrentTime), ADR (sTemp))
lTimeStructure.day = gDTstrucCurrentTime.day
lTimeStructure.hour = gDTstrucCurrentTime.hour
lTimeStructure.minute = gDTstrucCurrentTime.minute
lTimeStructure.second = gDTstrucCurrentTime.second
lTimeStructure.millisec = gDTstrucCurrentTime.millisec
lTimeStructure.microsec = gDTstrucCurrentTime.microsec
gTCurrentTime = TIMEStructure_TO_TIME (adr (lTimeStructure))
END_PROGRAM

View File

@@ -0,0 +1,4 @@
PROGRAM _INIT
(* init program *)
END_PROGRAM

4
Logical/Global.typ Normal file
View File

@@ -0,0 +1,4 @@
TYPE
END_TYPE

3
Logical/Global.var Normal file
View File

@@ -0,0 +1,3 @@
VAR
gbSPLC_EStopOk : BOOL;
END_VAR

View File

@@ -0,0 +1,8 @@
(*================================================================================================================*)
(*CPU (PWLnk Node 240)*)
(*----------------------------------------------------------------------------------------------------------------*)
VAR
gudSerialNr : UDINT; (*Seriennummer*)
gdiSystemTime : DINT; (*Systemzeit [<5B>s]*)
END_VAR
(*----------------------------------------------------------------------------------------------------------------*)

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Package xmlns="http://br-automation.co.at/AS/Package">
<Objects>
<Object Type="File" Description="Global variables / IOs">GlobalVar.var</Object>
</Objects>
</Package>

View File

@@ -0,0 +1,80 @@
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsftoa : UINT (*converts a REAL value into a character string*)
VAR_INPUT
value :REAL; (*REAL (FLOAT) value to be converted into a character string*)
pString :UDINT; (*pointer to the destination character string*)
END_VAR
END_FUNCTION
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsatof : REAL (*converts a character string into a REAL (FLOAT) value*)
VAR_INPUT
pString :UDINT; (*pointer to the character string to be converted*)
END_VAR
END_FUNCTION
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsatod : LREAL (*converts a character string into a LREAL (DOUBLE) value*)
VAR_INPUT
pString :UDINT; (*pointer to the character string to be converted*)
END_VAR
END_FUNCTION
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsitoa : UINT (*converts a DINT value into a character string*)
VAR_INPUT
value :DINT; (*numerical value to be converted into a string*)
pString :UDINT; (*pointer to the destination character string*)
END_VAR
END_FUNCTION
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsatoi : DINT (*converts a character string into a DINT value*)
VAR_INPUT
pString :UDINT; (*pointer to the character string to be converted*)
END_VAR
END_FUNCTION
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsmemset : UDINT (*fills the memory area with specific values*)
VAR_INPUT
pDest :UDINT; (*pointer to the destination memory*)
value :USINT; (*initialization value*)
length :UDINT; (*number of bytes to be initialized*)
END_VAR
END_FUNCTION
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsmemcpy : UDINT (*copies the memory area*)
VAR_INPUT
pDest :UDINT; (*pointer to the destination memory*)
pSrc :UDINT; (*pointer to the data to be copied*)
length :UDINT; (*size of bytes to be copied*)
END_VAR
END_FUNCTION
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsmemmove : UDINT (*copies the memory area (even if the memory areas overlap)*)
VAR_INPUT
pDest :UDINT; (*pointer to the destination memory*)
pSrc :UDINT; (*pointer to the data to be copied*)
length :UDINT; (*size of bytes to be copied*)
END_VAR
END_FUNCTION
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsmemcmp : DINT (*compares memory areas*)
VAR_INPUT
pMem1 :UDINT; (*pointer to the memory area 1*)
pMem2 :UDINT; (*pointer to the memory area 2*)
length :UDINT; (*size of bytes to be checked*)
END_VAR
END_FUNCTION
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsstrcat : UDINT (*attaches character strings to one another*)
VAR_INPUT
pDest :UDINT; (*pointer to the destination character string*)
pSrc :UDINT; (*pointer to the source character string*)
END_VAR
END_FUNCTION
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsstrlen : UDINT (*provides the length of a character string*)
VAR_INPUT
pString :UDINT; (*pointer to the source character string*)
END_VAR
END_FUNCTION
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsstrcpy : UDINT (*copies one character string into another*)
VAR_INPUT
pDest :UDINT; (*pointer to the destination character string*)
pSrc :UDINT; (*pointer to the source character string*)
END_VAR
END_FUNCTION
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION brsstrcmp : DINT (*compares two character strings*)
VAR_INPUT
pString1 :UDINT; (*pointer to the first character string*)
pString2 :UDINT; (*pointer to the second character string*)
END_VAR
END_FUNCTION

View File

@@ -0,0 +1,4 @@
TYPE
END_TYPE

View File

@@ -0,0 +1,4 @@
VAR CONSTANT
END_VAR

View File

@@ -0,0 +1,39 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _ASBRSTR_
#define _ASBRSTR_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#ifndef _IEC_CONST
#define _IEC_CONST _WEAK const
#endif
/* Prototyping of functions and function blocks */
unsigned short brsftoa(float value, unsigned long pString);
float brsatof(unsigned long pString);
unsigned short brsitoa(signed long value, unsigned long pString);
signed long brsatoi(unsigned long pString);
unsigned long brsmemset(unsigned long pDest, unsigned char value, unsigned long length);
unsigned long brsmemcpy(unsigned long pDest, unsigned long pSrc, unsigned long length);
unsigned long brsmemmove(unsigned long pDest, unsigned long pSrc, unsigned long length);
signed long brsmemcmp(unsigned long pMem1, unsigned long pMem2, unsigned long length);
unsigned long brsstrcat(unsigned long pDest, unsigned long pSrc);
unsigned long brsstrlen(unsigned long pString);
unsigned long brsstrcpy(unsigned long pDest, unsigned long pSrc);
signed long brsstrcmp(unsigned long pString1, unsigned long pString2);
#ifdef __cplusplus
};
#endif
#endif /* _ASBRSTR_ */

View File

@@ -0,0 +1,39 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _ASBRSTR_
#define _ASBRSTR_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#ifndef _BUR_PUBLIC
#define _BUR_PUBLIC
#endif
/* Prototyping of functions and function blocks */
_BUR_PUBLIC unsigned short brsftoa(float value, unsigned long pString);
_BUR_PUBLIC float brsatof(unsigned long pString);
_BUR_PUBLIC double brsatod(unsigned long pString);
_BUR_PUBLIC unsigned short brsitoa(signed long value, unsigned long pString);
_BUR_PUBLIC signed long brsatoi(unsigned long pString);
_BUR_PUBLIC unsigned long brsmemset(unsigned long pDest, unsigned char value, unsigned long length);
_BUR_PUBLIC unsigned long brsmemcpy(unsigned long pDest, unsigned long pSrc, unsigned long length);
_BUR_PUBLIC unsigned long brsmemmove(unsigned long pDest, unsigned long pSrc, unsigned long length);
_BUR_PUBLIC signed long brsmemcmp(unsigned long pMem1, unsigned long pMem2, unsigned long length);
_BUR_PUBLIC unsigned long brsstrcat(unsigned long pDest, unsigned long pSrc);
_BUR_PUBLIC unsigned long brsstrlen(unsigned long pString);
_BUR_PUBLIC unsigned long brsstrcpy(unsigned long pDest, unsigned long pSrc);
_BUR_PUBLIC signed long brsstrcmp(unsigned long pString1, unsigned long pString2);
#ifdef __cplusplus
};
#endif
#endif /* _ASBRSTR_ */

View File

@@ -0,0 +1,39 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _ASBRSTR_
#define _ASBRSTR_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#ifndef _IEC_CONST
#define _IEC_CONST _WEAK const
#endif
/* Prototyping of functions and function blocks */
unsigned short brsftoa(float value, unsigned long pString);
float brsatof(unsigned long pString);
unsigned short brsitoa(signed long value, unsigned long pString);
signed long brsatoi(unsigned long pString);
unsigned long brsmemset(unsigned long pDest, unsigned char value, unsigned long length);
unsigned long brsmemcpy(unsigned long pDest, unsigned long pSrc, unsigned long length);
unsigned long brsmemmove(unsigned long pDest, unsigned long pSrc, unsigned long length);
signed long brsmemcmp(unsigned long pMem1, unsigned long pMem2, unsigned long length);
unsigned long brsstrcat(unsigned long pDest, unsigned long pSrc);
unsigned long brsstrlen(unsigned long pString);
unsigned long brsstrcpy(unsigned long pDest, unsigned long pSrc);
signed long brsstrcmp(unsigned long pString1, unsigned long pString2);
#ifdef __cplusplus
};
#endif
#endif /* _ASBRSTR_ */

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Library SubType="binary" Description="The AsBrStr Library contains FBKs for memory and character string handling." xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>AsBrStr.fun</File>
<File>AsBrStr.typ</File>
<File>AsBrStr.var</File>
</Files>
</Library>

View File

@@ -0,0 +1,70 @@
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK AsIOAccRead (*reads noncyclical register (only inputs); asynchronous execution*)
VAR_INPUT
enable :BOOL; (*enables execution*)
pDeviceName :UDINT; (*device name given as a pointer*)
pChannelName :UDINT; (*pointer to the channel name*)
END_VAR
VAR_OUTPUT
status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
value :UDINT; (*value read*)
END_VAR
VAR
intern :IOAC_I_TYPE; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK AsIOAccWrite (*writes noncyclical register (ONLY outputs); asynchronous execution*)
VAR_INPUT
enable :BOOL; (*enables execution*)
pDeviceName :UDINT; (*device name given as a pointer*)
pChannelName :UDINT; (*pointer to the channel name*)
value :UDINT; (*value to be written*)
END_VAR
VAR_OUTPUT
status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
VAR
intern :IOAC_I_TYPE; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK AsIOAccReadReg (*reads noncyclical register (SGC only); asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
nodeNr : USINT; (*node number of x2x module*)
registerNr : UINT; (*register number*)
size : USINT; (*register size*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
value : UDINT; (*regsiter value*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK AsIOAccWriteReg (*writes noncyclical register (SGC only); asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
nodeNr : USINT; (*node number of x2x module*)
registerNr : UINT; (*register number*)
size : USINT; (*register size*)
value : UDINT; (*new register value*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK

View File

@@ -0,0 +1,15 @@
TYPE
IOAC_I_TYPE : STRUCT (*internal use*)
StateMan : UINT ;
ErrMan : UINT ;
Init : UDINT ;
Taskhandle : UDINT ;
Semaphore : UDINT ;
Requestsize : UDINT ;
Answersize : UDINT ;
pAccessObj : UDINT ;
Offset : UDINT ;
flags : UDINT ;
END_STRUCT;
END_TYPE

View File

@@ -0,0 +1,10 @@
VAR CONSTANT
ioacERR_INTERNAL : UINT := 30190; (*internal error*)
ioacERR_DEVICE : UINT := 30191; (*I/O module does not exist*)
ioacERR_CHANNEL : UINT := 30192; (*incorrect channel name specified*)
ioacERR_TIMEOUT : UINT := 30193; (*timeout reached*)
ioacERR_NOTSUPPORTED : UINT := 30194; (*not supported*)
ioacERR_PARAMETER : UINT := 30195; (*invalid parameter*)
ioacERR_ACCESS : UINT := 30196; (*access error*)
END_VAR

View File

@@ -0,0 +1,132 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _ASIOACC_
#define _ASIOACC_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#include <runtime.h>
#ifndef _BUR_PUBLIC
#define _BUR_PUBLIC
#endif
/* Constants */
#ifdef _REPLACE_CONST
#define ioacERR_ACCESS 30196U
#define ioacERR_PARAMETER 30195U
#define ioacERR_NOTSUPPORTED 30194U
#define ioacERR_TIMEOUT 30193U
#define ioacERR_CHANNEL 30192U
#define ioacERR_DEVICE 30191U
#define ioacERR_INTERNAL 30190U
#else
#ifndef _GLOBAL_CONST
#define _GLOBAL_CONST _WEAK const
#endif
_GLOBAL_CONST unsigned short ioacERR_ACCESS;
_GLOBAL_CONST unsigned short ioacERR_PARAMETER;
_GLOBAL_CONST unsigned short ioacERR_NOTSUPPORTED;
_GLOBAL_CONST unsigned short ioacERR_TIMEOUT;
_GLOBAL_CONST unsigned short ioacERR_CHANNEL;
_GLOBAL_CONST unsigned short ioacERR_DEVICE;
_GLOBAL_CONST unsigned short ioacERR_INTERNAL;
#endif
/* Datatypes and datatypes of function blocks */
typedef struct IOAC_I_TYPE
{ unsigned short StateMan;
unsigned short ErrMan;
unsigned long Init;
unsigned long Taskhandle;
unsigned long Semaphore;
unsigned long Requestsize;
unsigned long Answersize;
unsigned long pAccessObj;
unsigned long Offset;
unsigned long flags;
} IOAC_I_TYPE;
typedef struct AsIOAccRead
{
/* VAR_INPUT (analog) */
unsigned long pDeviceName;
unsigned long pChannelName;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long value;
/* VAR (analog) */
struct IOAC_I_TYPE intern;
/* VAR_INPUT (digital) */
plcbit enable;
} AsIOAccRead_typ;
typedef struct AsIOAccWrite
{
/* VAR_INPUT (analog) */
unsigned long pDeviceName;
unsigned long pChannelName;
unsigned long value;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
struct IOAC_I_TYPE intern;
/* VAR_INPUT (digital) */
plcbit enable;
} AsIOAccWrite_typ;
typedef struct AsIOAccReadReg
{
/* VAR_INPUT (analog) */
unsigned char nodeNr;
unsigned short registerNr;
unsigned char size;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long value;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} AsIOAccReadReg_typ;
typedef struct AsIOAccWriteReg
{
/* VAR_INPUT (analog) */
unsigned char nodeNr;
unsigned short registerNr;
unsigned char size;
unsigned long value;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} AsIOAccWriteReg_typ;
/* Prototyping of functions and function blocks */
_BUR_PUBLIC void AsIOAccRead(struct AsIOAccRead* inst);
_BUR_PUBLIC void AsIOAccWrite(struct AsIOAccWrite* inst);
_BUR_PUBLIC void AsIOAccReadReg(struct AsIOAccReadReg* inst);
_BUR_PUBLIC void AsIOAccWriteReg(struct AsIOAccWriteReg* inst);
#ifdef __cplusplus
};
#endif
#endif /* _ASIOACC_ */

View File

@@ -0,0 +1,101 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _ASIOACC_
#define _ASIOACC_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#include <runtime.h>
#ifndef _IEC_CONST
#define _IEC_CONST _WEAK const
#endif
/* Constants */
#ifdef _REPLACE_CONST
#define ioacERR_ACCESS 30196U
#define ioacERR_PARAMETER 30195U
#define ioacERR_NOTSUPPORTED 30194U
#define ioacERR_TIMEOUT 30193U
#define ioacERR_CHANNEL 30192U
#define ioacERR_DEVICE 30191U
#define ioacERR_INTERNAL 30190U
#else
_IEC_CONST unsigned short ioacERR_ACCESS = 30196U;
_IEC_CONST unsigned short ioacERR_PARAMETER = 30195U;
_IEC_CONST unsigned short ioacERR_NOTSUPPORTED = 30194U;
_IEC_CONST unsigned short ioacERR_TIMEOUT = 30193U;
_IEC_CONST unsigned short ioacERR_CHANNEL = 30192U;
_IEC_CONST unsigned short ioacERR_DEVICE = 30191U;
_IEC_CONST unsigned short ioacERR_INTERNAL = 30190U;
#endif
/* Datatypes and datatypes of function blocks */
typedef struct IOAC_I_TYPE
{ unsigned short StateMan;
unsigned short ErrMan;
unsigned long Init;
unsigned long Taskhandle;
unsigned long Semaphore;
unsigned long Requestsize;
unsigned long Answersize;
unsigned long pAccessObj;
unsigned long Offset;
unsigned long flags;
} IOAC_I_TYPE;
typedef struct AsIOAccReadReg
{
/* VAR_INPUT (analog) */
unsigned char nodeNr;
unsigned short registerNr;
unsigned char size;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long value;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} AsIOAccReadReg_typ;
typedef struct AsIOAccWriteReg
{
/* VAR_INPUT (analog) */
unsigned char nodeNr;
unsigned short registerNr;
unsigned char size;
unsigned long value;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} AsIOAccWriteReg_typ;
/* Prototyping of functions and function blocks */
void AsIOAccReadReg(struct AsIOAccReadReg* inst);
void AsIOAccWriteReg(struct AsIOAccWriteReg* inst);
#ifdef __cplusplus
};
#endif
#endif /* _ASIOACC_ */

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Library SubType="binary" Description="This library provides read and write access to non-cyclic I/O data points." xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>AsIOAcc.fun</File>
<File>AsIOAcc.typ</File>
<File>AsIOAcc.var</File>
</Files>
<Dependencies>
<Dependency ObjectName="runtime" />
</Dependencies>
</Library>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
TYPE
END_TYPE

View File

@@ -0,0 +1,4 @@
VAR CONSTANT
END_VAR

View File

@@ -0,0 +1,49 @@
/* Automation Studio Generated Header File, Format Version 1.00 */
/* do not change */
#ifndef ASIECCON_H_
#define ASIECCON_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <bur/plc.h>
/* Constants */
/* Datatypes */
/* Datatypes of function blocks */
/* Prototyping of functions and function blocks */
signed short H_TO_NINT(signed short IN);
unsigned short H_TO_NUINT(unsigned short IN);
signed long H_TO_NDINT(signed long IN);
unsigned long H_TO_NUDINT(unsigned long IN);
float H_TO_NREAL(float IN);
plctime H_TO_NTIME(plctime IN);
DATE_AND_TIME H_TO_NDT(DATE_AND_TIME IN);
signed short N_TO_HINT(signed short IN);
unsigned short N_TO_HUINT(unsigned short IN);
signed long N_TO_HDINT(signed long IN);
unsigned long N_TO_HUDINT(unsigned long IN);
float N_TO_HREAL(float IN);
plctime N_TO_HTIME(plctime IN);
DATE_AND_TIME N_TO_HDT(DATE_AND_TIME IN);
signed short swapINT(signed short IN);
unsigned short swapUINT(unsigned short IN);
signed long swapDINT(signed long IN);
unsigned long swapUDINT(unsigned long IN);
float swapREAL(float IN);
#ifdef __cplusplus
};
#endif
#endif /* ASIECCON_H_ */

View File

@@ -0,0 +1,61 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _ASIECCON_
#define _ASIECCON_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#ifndef _BUR_PUBLIC
#define _BUR_PUBLIC
#endif
/* Prototyping of functions and function blocks */
_BUR_PUBLIC signed short H_TO_NINT(signed short IN);
_BUR_PUBLIC unsigned short H_TO_NUINT(unsigned short IN);
_BUR_PUBLIC signed long H_TO_NDINT(signed long IN);
_BUR_PUBLIC unsigned long H_TO_NUDINT(unsigned long IN);
_BUR_PUBLIC float H_TO_NREAL(float IN);
_BUR_PUBLIC double H_TO_NLREAL(double IN);
_BUR_PUBLIC plctime H_TO_NTIME(plctime IN);
_BUR_PUBLIC DATE_AND_TIME H_TO_NDT(DATE_AND_TIME IN);
_BUR_PUBLIC DATE H_TO_NDATE(DATE IN);
_BUR_PUBLIC TOD H_TO_NTOD(TOD IN);
_BUR_PUBLIC signed short N_TO_HINT(signed short IN);
_BUR_PUBLIC unsigned short N_TO_HUINT(unsigned short IN);
_BUR_PUBLIC signed long N_TO_HDINT(signed long IN);
_BUR_PUBLIC unsigned long N_TO_HUDINT(unsigned long IN);
_BUR_PUBLIC float N_TO_HREAL(float IN);
_BUR_PUBLIC double N_TO_HLREAL(double IN);
_BUR_PUBLIC plctime N_TO_HTIME(plctime IN);
_BUR_PUBLIC DATE_AND_TIME N_TO_HDT(DATE_AND_TIME IN);
_BUR_PUBLIC DATE N_TO_HDATE(DATE IN);
_BUR_PUBLIC TOD N_TO_HTOD(TOD IN);
_BUR_PUBLIC signed short swapINT(signed short IN);
_BUR_PUBLIC unsigned short swapUINT(unsigned short IN);
_BUR_PUBLIC WORD swapWORD(WORD IN);
_BUR_PUBLIC signed long swapDINT(signed long IN);
_BUR_PUBLIC unsigned long swapUDINT(unsigned long IN);
_BUR_PUBLIC DWORD swapDWORD(DWORD IN);
_BUR_PUBLIC TIME swapTIME(TIME IN);
_BUR_PUBLIC DATE_AND_TIME swapDT(DATE_AND_TIME IN);
_BUR_PUBLIC DATE swapDATE(DATE IN);
_BUR_PUBLIC TOD swapTOD(TOD IN);
_BUR_PUBLIC float swapREAL(float IN);
_BUR_PUBLIC double swapLREAL(double IN);
/* The interface declarations of the AsIecCon functions are not included here
* because they are inline in IEC languages. The x_TO_STRING and the
* STRING_TO_x functions are not available for C programms. */
#ifdef __cplusplus
};
#endif
#endif /* _ASIECCON_ */

View File

@@ -0,0 +1,62 @@
/* Automation Studio Generated Header File, Format Version 1.00 */
/* do not change */
#ifndef ASIECCON_H_
#define ASIECCON_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <bur/plc.h>
/* Constants */
/* Datatypes */
/* Datatypes of function blocks */
/* Prototyping of functions and function blocks */
signed short H_TO_NINT(signed short IN);
unsigned short H_TO_NUINT(unsigned short IN);
signed long H_TO_NDINT(signed long IN);
unsigned long H_TO_NUDINT(unsigned long IN);
float H_TO_NREAL(float IN);
plctime H_TO_NTIME(plctime IN);
DATE_AND_TIME H_TO_NDT(DATE_AND_TIME IN);
DATE H_TO_NDATE(DATE IN);
TOD H_TO_NTOD(TOD IN);
signed short N_TO_HINT(signed short IN);
unsigned short N_TO_HUINT(unsigned short IN);
signed long N_TO_HDINT(signed long IN);
unsigned long N_TO_HUDINT(unsigned long IN);
float N_TO_HREAL(float IN);
plctime N_TO_HTIME(plctime IN);
DATE_AND_TIME N_TO_HDT(DATE_AND_TIME IN);
DATE N_TO_HDATE(DATE IN);
TOD N_TO_HTOD(TOD IN);
signed short swapINT(signed short IN);
unsigned short swapUINT(unsigned short IN);
WORD swapWORD(WORD IN);
signed long swapDINT(signed long IN);
unsigned long swapUDINT(unsigned long IN);
DWORD swapDWORD(DWORD IN);
TIME swapTIME(TIME IN);
DATE_AND_TIME swapDT(DATE_AND_TIME IN);
DATE swapDATE(DATE IN);
TOD swapTOD(TOD IN);
float swapREAL(float IN);
/* The interface declarations of the AsIecCon functions are not included here
* because they are inline in IEC languages. The x_TO_STRING and the
* STRING_TO_x functions are not available for C programms. */
#ifdef __cplusplus
};
#endif
#endif /* ASIECCON_H_ */

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Library SubType="binary" Description="This library contains function interfaces for IEC 61131-3 conversion functions." xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>AsIecCon.fun</File>
<File>AsIecCon.typ</File>
<File>AsIecCon.var</File>
</Files>
<Dependencies>
<Dependency ObjectName="astime" />
</Dependencies>
</Library>

View File

@@ -0,0 +1,303 @@
{REDUND_ERROR} FUNCTION_BLOCK safeRemoteControl (*Remote Control Function Block*)
VAR_INPUT
SafeLOGICID : UINT; (*SafeLOGIC ID*)
Execute : BOOL; (*execution*)
pCommandData : UDINT; (*pointer to command data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
SafeLOGICStatus : RemoteControlStatusTypeV1; (*SafeLOGIC status*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
i_handle : UDINT; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION_BLOCK safeRemoteControl_V2 (*Remote Control Function Block*)
VAR_INPUT
SafeLOGICID : UINT; (*SafeLOGIC ID*)
Execute : BOOL; (*execution*)
pCommandData : UDINT; (*pointer to command data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
SafeLOGICStatus : RemoteControlStatusTypeV2; (*SafeLOGIC status*)
END_VAR
VAR
Internal : AsSafetyInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION_BLOCK safeDownloadApplication (*Download Application Function Block*)
VAR_INPUT
SafeLOGICID : UINT; (*SafeLOGIC ID*)
Execute : BOOL; (*execution*)
pCommandData : UDINT; (*pointer to command data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
UnlockRequired : BOOL; (*unlock required*)
ApplicationCRC : UDINT; (*application CRC*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
i_handle : UDINT; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION_BLOCK safeDownloadApplication_V2 (*Download Application Function Block*)
VAR_INPUT
SafeLOGICID : UINT; (*SafeLOGIC ID*)
Execute : BOOL; (*execution*)
pCommandData : UDINT; (*pointer to command data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
UnlockRequired : BOOL; (*unlock required*)
ApplicationCRC : UDINT; (*application CRC*)
END_VAR
VAR
Internal : AsSafetyInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION_BLOCK safeDownloadData (*Download Data Function Block*)
VAR_INPUT
SafeLOGICID : UINT; (*SafeLOGIC ID*)
Execute : BOOL; (*execution*)
Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,... *)
pCommandData : UDINT; (*pointer to command data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
UnlockRequired : BOOL; (*unlock required*)
Timestamp : UDINT; (*timestamp from data*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
i_handle : UDINT; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION_BLOCK safeDownloadData_V2 (*Download Data Function Block*)
VAR_INPUT
SafeLOGICID : UINT; (*SafeLOGIC ID*)
Execute : BOOL; (*execution*)
Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,... *)
pCommandData : UDINT; (*pointer to command data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
UnlockRequired : BOOL; (*unlock required*)
Timestamp : UDINT; (*timestamp from data*)
END_VAR
VAR
Internal : AsSafetyInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION_BLOCK safeConfigurationOnTarget (*Configuration On Target Function Block*)
VAR_INPUT
SafeLOGICID : UINT; (*SafeLOGIC ID*)
Execute : BOOL; (*execution*)
Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,...*)
pCommandData : UDINT; (*pointer to command data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
Timestamp : UDINT; (*timestamp of data*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
i_handle : UDINT; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION_BLOCK safeConfigurationOnTarget_V2 (*Configuration On Target Function Block*)
VAR_INPUT
SafeLOGICID : UINT; (*SafeLOGIC ID*)
Execute : BOOL; (*execution*)
Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,...*)
pCommandData : UDINT; (*pointer to command data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
Timestamp : UDINT; (*timestamp of data*)
END_VAR
VAR
Internal : AsSafetyInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION safeLibraryVersion : UINT (*returns the actual library version*)
END_FUNCTION
{REDUND_ERROR} FUNCTION_BLOCK safeDownloadFile (*Download File Function Block*)
VAR_INPUT
SafeLOGICID : UINT; (*SafeLOGIC ID*)
Execute : BOOL; (*execution*)
pCommandData : UDINT; (*pointer to command data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
UnlockRequired : BOOL; (*unlock required*)
Timestamp : UDINT; (*timestamp from data*)
END_VAR
VAR
Internal : AsSafetyInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION_BLOCK safeCheckTable (*Check Table Function Block*)
VAR_INPUT
Execute : BOOL; (*execution*)
InstNr : USINT; (*instance number*)
pUser : UDINT; (*user name*)
Timestamp : UDINT; (*timestamp*)
TableType : USINT; (*table type*)
EntryCnt : UDINT; (*number of entries*)
pTableHeader : UDINT; (*table header input*)
pTableData : UDINT; (*table data input*)
pTableHeaderOut : UDINT; (*table header output buffer*)
pTableDataOut : UDINT; (*table data output buffer*)
pFileDataOut : UDINT; (*file data output buffer*)
AckData : USINT; (*1 .. acknowledge table data, 2 .. NOT acknowledge table data, abort FUB*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
CheckErrorCode : UDINT; (*table check error code*)
CheckErrorLine : UDINT; (*table check error line*)
CheckErrorColumn : UDINT; (*table check error column*)
pCrcOut : UDINT; (*returns pointer to CRC data*)
CrcCntOut : UDINT; (*returns number of CRCs*)
END_VAR
VAR
i_step : UINT; (*internal*)
i_tmp : UDINT; (*internal*)
i_clean : BOOL; (*internal*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION_BLOCK safeFileInfo (*File Info Function Block*)
VAR_INPUT
SafeLOGICID : UINT; (*SafeLOGIC ID*)
Execute : BOOL; (*execution*)
Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,...*)
pCommandData : UDINT; (*pointer to command data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
VAR
Internal : AsSafetyInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION safeGetTableLength : UDINT (*Function returns size of table data*)
VAR_INPUT
TableType : USINT; (*table type*)
EntryCnt : UDINT; (*number of entries*)
pTableHeader : UDINT; (*pointer to table header*)
END_VAR
END_FUNCTION
{REDUND_ERROR} FUNCTION_BLOCK safeGetDataLength (*Function Block returns size of download file*)
VAR_INPUT
Execute : BOOL; (*execution*)
Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,... *)
pCommandData : UDINT; (*pointer to command data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
Length : UDINT; (*calculated length of download file*)
END_VAR
VAR
Internal : AsSafetyInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION_BLOCK safeCreateData (*Create Data Function Block*)
VAR_INPUT
SafeLOGICID : UINT; (*SafeLOGIC ID*)
Execute : BOOL; (*execution*)
Type : UINT; (*type of data: safeDATA_TYPE_MAOP, safeDATA_TYPE_EXTMAOP,... *)
pCommandData : UDINT; (*pointer to command data*)
FileDataOutLen : UDINT; (*size of buffer for file data*)
pFileDataOut : UDINT; (*pointer to memory buffer for file data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
UnlockRequired : BOOL; (*unlock required*)
Timestamp : UDINT; (*timestamp from data*)
END_VAR
VAR
Internal : AsSafetyInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION_BLOCK safeLogicInfo (*Remote Control Function Block*)
VAR_INPUT
SafeLOGICID : UINT; (*SafeLOGIC ID*)
Execute : BOOL; (*execution*)
Type : UINT; (*type of data: safeINFO_TYPE_PWD_INFO, safeINFO_TYPE_PWD_CHK, safeINFO_TYPE_UDID_INFO*)
pCommandData : UDINT; (*pointer to command data*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution done*)
Busy : BOOL; (*execution busy*)
Error : BOOL; (*execution error*)
StatusID : UINT; (*execution status: ERR_OK, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
VAR
Internal : AsSafetyInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK

View File

@@ -0,0 +1,610 @@
(********************************************************************
* COPYRIGHT -- Bernecker + Rainer
********************************************************************
* Library: AsSafety
* File: AsSafety.typ
* Author: B&R
* Created: May 25, 2012
********************************************************************
* Data types of library AsSafety
********************************************************************)
TYPE
FileReferenceType : STRUCT (*file reference*)
Device : STRING[80]; (*pointer to the device name*)
File : STRING[80]; (*pointer to the file name*)
END_STRUCT;
AsSafetyInternalType : STRUCT (*internal data type*)
Clean : BOOL;
State : UINT;
Result : UINT;
Tmp : UDINT;
pThis : UDINT;
pFcn : UDINT;
END_STRUCT;
SourceLocalDataTypeV1 : STRUCT (*local data source type*)
pFileData : UDINT; (*pointer to data buffer*)
FileLength : UDINT; (*data length*)
END_STRUCT;
SourceLocalFileTypeV1 : STRUCT (*local file source*)
SourceFile : FileReferenceType; (*path to local file*)
END_STRUCT;
DataSourceTypeV1 : STRUCT (*source data type*)
Type : UINT; (*0 .. file upload from safeLOGIC, 1 .. local data buffer, 2 .. local file*)
LocalData : SourceLocalDataTypeV1; (*arguments for local data*)
LocalFile : SourceLocalFileTypeV1; (*arguments for local file*)
END_STRUCT;
InfoCmdPwdInfoTypeV1 : STRUCT (*password info data from SafeLOGIC command structure*)
Version : UINT; (*used version*)
PasswordSet : BOOL; (*0 .. no password set, 1 .. password is set*)
END_STRUCT;
InfoCmdPwdChkTypeV1 : STRUCT (*password check data from SafeLOGIC command structure*)
Version : UINT; (*used version*)
Password : STRING[16]; (*password for check*)
PasswordEqual : BOOL; (*0 .. no password set, 1 .. password is set*)
END_STRUCT;
ConfigurationAddParaTypeV2 : STRUCT (*additional parameter data from SafeLOGIC*)
SADR : UINT; (*safety address*)
ID : USINT; (*id*)
pParaData : UDINT; (*pointer to additional parameter data*)
Length : UDINT; (*size of parameter buffer*)
LengthOut : UDINT; (*length of parameter*)
CRC : UDINT; (*CRC*)
Timestamp : UDINT; (*timestamp*)
END_STRUCT;
ConfigurationAddParaTypeV1 : STRUCT (*additional parameter data from SafeLOGIC*)
SADR : UINT; (*safety address*)
ID : USINT; (*id*)
pParaData : UDINT; (*pointer to additional parameter data*)
Length : UDINT; (*size of parameter buffer*)
CRC : UDINT; (*CRC*)
Timestamp : UDINT; (*timestamp*)
END_STRUCT;
ConfigurationBitOptionsTypeV1 : STRUCT (*bit machine options*)
BitData : ARRAY[0..63]OF USINT; (*bit array*)
END_STRUCT;
ConfigurationCmdAddParaTypeV2 : STRUCT (*additional parameter data from SafeLOGIC command structure*)
Version : UINT; (*input data: used version*)
Password : STRING[16]; (*input data: password*)
pParaDataOutput : UDINT; (*input data: pointer to list of type ConfigurationAddParaTypeV2*)
NumberParaSetsOutput : UINT; (*input data: number of available entries in pParaDataOutput*)
NumberParaSetsOutputOut : UINT; (*return value: number of returned entries*)
pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *)
pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*)
END_STRUCT;
ConfigurationCmdAddParaTypeV1 : STRUCT (*additional parameter data from SafeLOGIC command structure*)
Version : UINT; (*input data: used version*)
Password : STRING[16]; (*input data: password*)
pParaDataOutput : UDINT; (*return value: pointer to list of type ConfigurationAddParaTypeV1*)
NumberParaSetsOutput : UINT; (*return value: number of returned entries*)
END_STRUCT;
ConfigurationCmdExtMaOpTypeV2 : STRUCT (*extended machine options from SafeLOGIC command structure*)
Version : UINT; (*input data: safeVERSION_R110*)
Password : STRING[16]; (*input data: password*)
pIntDataOutput : UDINT; (*input data: pointer to list of type ConfigurationIntOptionsTypeV1*)
NumberIntOutput : UINT; (*input data: number of available entries in INT buffer*)
NumberIntOutputOut : UINT; (*return value: number of returned INT data entries*)
pUintDataOutput : UDINT; (*input data: pointer to list of type ConfigurationUintOptionsTypeV1*)
NumberUintOutput : UINT; (*input data: number of available entries in UINT buffer*)
NumberUintOutputOut : UINT; (*return value: number of returned UINT data entries*)
pDintDataOutput : UDINT; (*input data: pointer to list of type ConfigurationDintOptionsTypeV1*)
NumberDintOutput : UINT; (*input data: number of available DINT data entries*)
NumberDintOutputOut : UINT; (*return value: number of returned DINT data entries*)
pUdintDataOutput : UDINT; (*input data: pointer to list of type ConfigurationUdintOptionsTypeV1*)
NumberUdintOutput : UINT; (*input data: number of available UDINT data entries*)
NumberUdintOutputOut : UINT; (*return value: number of returned UDINT data entries*)
pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *)
pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*)
END_STRUCT;
ConfigurationCmdExtMaOpTypeV1 : STRUCT (*extended machine options from SafeLOGIC command structure*)
Version : UINT; (*input data: safeVERSION_R107*)
Password : STRING[16]; (*input data: password*)
pIntDataOutput : UDINT; (*return value: pointer to list of type ConfigurationIntOptionsTypeV1*)
NumberIntOutput : UINT; (*return value: number of returned INT data entries*)
pUintDataOutput : UDINT; (*return value: pointer to list of type ConfigurationUintOptionsTypeV1*)
NumberUintOutput : UINT; (*return value: number of returned UINT data entries*)
pDintDataOutput : UDINT; (*return value: pointer to list of type ConfigurationDintOptionsTypeV1*)
NumberDintOutput : UINT; (*return value: number of returned DINT data entries*)
pUdintDataOutput : UDINT; (*return value: pointer to list of type ConfigurationUdintOptionsTypeV1*)
NumberUdintOutput : UINT; (*return value: number of returned UDINT data entries*)
END_STRUCT;
ConfigurationCmdMaOpTypeV2 : STRUCT (*machine options from SafeLOGIC command structure Version 2*)
Version : UINT; (*input data: safeVERSION_R110*)
Password : STRING[16]; (*input data: password*)
pDeviceListOutput : UDINT; (*input data: pointer to device list buffer of type ConfigurationDeviceTypeV1*)
NumberDevicesOutput : UINT; (*input data: number of available device entries in devices list buffer*)
NumberDevicesOutputOut : UINT; (*return value: number of returned device entries*)
pMachineOptionsOutput : UDINT; (*input data: pointer to bit machine options of type ConfigurationBitOptionsTypeV1*)
pModuleFlagsOutput : UDINT; (*input data: pointer to module flags of type ConfigurationModuleFlagsTypeV1*)
pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *)
pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*)
END_STRUCT;
ConfigurationCmdMaOpTypeV1 : STRUCT (*machine options from SafeLOGIC command structure Version 1*)
Version : UINT; (*input data: safeVERSION_R107*)
Password : STRING[16]; (*input data: password*)
pDeviceListOutput : UDINT; (*return value: pointer to device list of type ConfigurationDeviceTypeV1*)
NumberDevicesOutput : UINT; (*return value: number of returned entries*)
pMachineOptionsOutput : UDINT; (*return value: pointer to bit machine options of type ConfigurationBitOptionsTypeV1*)
pModuleFlagsOutput : UDINT; (*return value: pointer to module flags of type ConfigurationModuleFlagsTypeV1*)
END_STRUCT;
ConfigurationCmdTableTypeV2 : STRUCT (*table data from SafeLOGIC command structure*)
Version : UINT; (*input data: safeVERSION_R110*)
Password : STRING[16]; (*input data: password*)
pTableDataOutput : UDINT; (*input data: pointer to list of type ConfigurationTableTypeV1*)
NumberTablesOutput : UINT; (*input data: number of available entries in pTableDataOutput*)
NumberTablesOutputOut : UINT; (*return value: number of returned table entries*)
pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *)
pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*)
END_STRUCT;
ConfigurationCmdTableTypeV1 : STRUCT (*table data from SafeLOGIC command structure*)
Version : UINT; (*input data: safeVERSION_R107*)
Password : STRING[16]; (*input data: password*)
pTableDataOutput : UDINT; (*return value: pointer to list of type ConfigurationTableTypeV1*)
NumberTablesOutput : UINT; (*return value: number of returned table entries*)
END_STRUCT;
FileInfoCmdTypeV1 : STRUCT (*file info command structure*)
Version : UINT; (*used version*)
DataSource : DataSourceTypeV1; (*data source*)
Timestamp : UDINT; (*timestamp*)
pCrcs : UDINT; (*buffer for CRCs*)
NumberOfCrcs : UINT; (*size of CRC buffer*)
NumberOfCrcsOut : UINT; (*number of CRCs*)
END_STRUCT;
ConfigurationDeviceTypeV1 : STRUCT (*safety device from SafeLOGIC*)
SADR : UINT; (*safety address*)
UDID : ARRAY[0..5]OF USINT; (*UDID*)
END_STRUCT;
ConfigurationDintOptionsTypeV1 : STRUCT (*DINT machine options*)
ID : UINT; (*id*)
Value : DINT; (*value*)
END_STRUCT;
ConfigurationIntOptionsTypeV1 : STRUCT (*INT machine options*)
ID : UINT; (*id*)
Value : INT; (*value*)
END_STRUCT;
ConfigurationModuleFlagsTypeV1 : STRUCT (*module flags*)
Optional : ARRAY[0..127]OF USINT; (*optional*)
Startup : ARRAY[0..127]OF USINT; (*startup*)
NotPresent : ARRAY[0..127]OF USINT; (*not present*)
END_STRUCT;
ConfigurationTableTypeV2 : STRUCT (*table data for command struct V1*)
ID : UINT; (*table id*)
Type : USINT; (*table type*)
NumberOfCRCs : UINT; (*input data: number of available entries in pCRCData*)
NumberOfCRCsOut : UINT; (*return value: number of returned CRC entries*)
pCRCData : UDINT; (*input data: pointer to table CRC buffer*)
END_STRUCT;
ConfigurationTableTypeV1 : STRUCT (*table data for command struct V2*)
ID : UINT; (*table id*)
Type : USINT; (*table type*)
NumberOfCRCs : UINT; (*return value: number of returned CRCs*)
pCRCData : UDINT; (*return value: pointer to table CRC buffer*)
END_STRUCT;
ConfigurationUdintOptionsTypeV1 : STRUCT (*UDINT machine options*)
ID : UINT; (*id*)
Value : UDINT; (*value*)
END_STRUCT;
ConfigurationUintOptionsTypeV1 : STRUCT (*UINT machine options*)
ID : UINT; (*id*)
Value : UINT; (*value*)
END_STRUCT;
DownloadAcknExtMaOpTypeV1 : STRUCT (*acknowledge extended machine options structure*)
AcknIntOptions : ARRAY[0..63]OF BOOL; (*acknowledge INT*)
AcknUintOptions : ARRAY[0..63]OF BOOL; (*acknowledge UINT*)
AcknDintOptions : ARRAY[0..63]OF BOOL; (*acknowledge DINT*)
AcknUdintOptions : ARRAY[0..63]OF BOOL; (*acknowledge UDINT*)
END_STRUCT;
DownloadAcknMaOpTypeV1 : STRUCT (*acknowledge bit machine options structure*)
AcknBitOptions : ARRAY[0..63]OF USINT; (*acknowledge bit*)
END_STRUCT;
DownloadAcknAddParaTypeV1 : STRUCT (*acknowledge bit additional parameter*)
AcknBitAddPara : ARRAY[0..63]OF USINT; (*acknowledge bit*)
END_STRUCT;
DownloadCmdAddParaTypeV2 : STRUCT (*additional paramater command structure*)
Version : UINT; (*input data: used version*)
Password : STRING[16]; (*input data: password*)
UDID_Low : UDINT; (*input data: UDID low*)
UDID_High : UINT; (*input data: UDID high*)
Unlock : USINT; (*input data: unlock data*)
pParaListInput : UDINT; (*input data: pointer to additional parameter input data list of type DownloadAddParaTypeV1*)
NumberParaSetsInput : UINT; (*input data: number of input parameter entries in pParaListInput*)
pParaDataOutput : UDINT; (*input data: pointer to list of type ConfigurationAddParaTypeV2*)
NumberParaSetsOutput : UINT; (*input data: number of available entries in pParaDataOutput*)
NumberParaSetsOutputOut : UINT; (*return value: number of returned entries*)
pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *)
pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*)
END_STRUCT;
DownloadCmdAddParaTypeV1 : STRUCT (*additional paramater command structure*)
Version : UINT; (*input data: used version*)
Password : STRING[16]; (*input data: password*)
UDID_Low : UDINT; (*input data: UDID low*)
UDID_High : UINT; (*input data: UDID high*)
Unlock : USINT; (*input data: unlock data*)
pParaListInput : UDINT; (*input data: pointer to additional parameter input data list of type DownloadAddParaTypeV1*)
NumberParaSetsInput : UINT; (*input data: number of input parameter entries in pParaListInput*)
pParaDataOutput : UDINT; (*return value: pointer to list of type ConfigurationAddParaTypeV1*)
NumberParaSetsOutput : UINT; (*return value: number of returned entries*)
END_STRUCT;
DownloadCmdApplicationTypeV1 : STRUCT (*application command structure*)
Version : UINT; (*used version*)
Password : STRING[16]; (*password*)
UDID_Low : UDINT; (*UDID low*)
UDID_High : UINT; (*UDID high*)
ApplicationID : UINT; (*application id*)
Device : STRING[80]; (*device for file*)
File : STRING[80]; (*file name*)
Unlock : USINT; (*unlock application*)
END_STRUCT;
DownloadCmdExtMaOpTypeV2 : STRUCT (*extended machine options command structure*)
Version : UINT; (*input data: safeVERSION_R110*)
Password : STRING[16]; (*input data: password*)
UDID_Low : UDINT; (*input data: UDID low*)
UDID_High : UINT; (*input data: UDID high*)
Unlock : USINT; (*input data: unlock data*)
pIntDataInput : UDINT; (*input data: pointer to INT input data list from type ConfigurationIntOptionsTypeV1*)
NumberIntInput : UINT; (*input data: number of INT input entries in pIntDataInput*)
pUintDataInput : UDINT; (*input data: pointer to UINT input data list from type ConfigurationUintOptionsTypeV1*)
NumberUintInput : UINT; (*input data: number of UINT input entries in pUintDataInput*)
pDintDataInput : UDINT; (*input data: pointer to DINT input data list from type ConfigurationDintOptionsTypeV1*)
NumberDintInput : UINT; (*input data: number of DINT input entries in pDintDataInput*)
pUdintDataInput : UDINT; (*input data: pointer to UDINT input data list from type ConfigurationUdintOptionsTypeV1*)
NumberUdintInput : UINT; (*input data: number of UDINT input entries in pUdintDataInput*)
pAcknMachineOptions : UDINT; (*input data: pointer to acknowledge information of type DownloadAcknMaOpTypeV1*)
pIntDataOutput : UDINT; (*input data: pointer to list of type ConfigurationIntOptionsTypeV1*)
NumberIntOutput : UINT; (*input data: number of available entries in INT buffer*)
NumberIntOutputOut : UINT; (*return value: number of returned INT data entries*)
pUintDataOutput : UDINT; (*input data: pointer to list of type ConfigurationUintOptionsTypeV1*)
NumberUintOutput : UINT; (*input data: number of available entries in UINT buffer*)
NumberUintOutputOut : UINT; (*return value: number of returned UINT data entries*)
pDintDataOutput : UDINT; (*input data: pointer to list of type ConfigurationDintOptionsTypeV1*)
NumberDintOutput : UINT; (*input data: number of available DINT data entries*)
NumberDintOutputOut : UINT; (*return value: number of returned DINT data entries*)
pUdintDataOutput : UDINT; (*input data: pointer to list of type ConfigurationUdintOptionsTypeV1*)
NumberUdintOutput : UINT; (*input data: number of available UDINT data entries*)
NumberUdintOutputOut : UINT; (*number of UDINT channels from SafeLOGIC*)
pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *)
pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*)
END_STRUCT;
DownloadCmdExtMaOpTypeV1 : STRUCT (*return value: number of returned UDINT data entries*)
Version : UINT; (*input data: safeVERSION_R107*)
Password : STRING[16]; (*input data: password*)
UDID_Low : UDINT; (*input data: UDID low*)
UDID_High : UINT; (*input data: UDID high*)
Unlock : USINT; (*input data: unlock data*)
pIntDataInput : UDINT; (*input data: pointer to INT input data list from type ConfigurationIntOptionsTypeV1*)
NumberIntInput : UINT; (*input data: number of INT input entries in pIntDataInput*)
pUintDataInput : UDINT; (*input data: pointer to UINT input data list from type ConfigurationUintOptionsTypeV1*)
NumberUintInput : UINT; (*input data: number of UINT input entries in pUintDataInput*)
pDintDataInput : UDINT; (*input data: pointer to DINT input data list from type ConfigurationDintOptionsTypeV1*)
NumberDintInput : UINT; (*input data: number of DINT input entries in pDintDataInput*)
pUdintDataInput : UDINT; (*input data: pointer to UDINT input data list from type ConfigurationUdintOptionsTypeV1*)
NumberUdintInput : UINT; (*input data: number of UDINT input entries in pUdintDataInput*)
pAcknMachineOptions : UDINT; (*input data: pointer to acknowledge information of type DownloadAcknMaOpTypeV1*)
pIntDataOutput : UDINT; (*return value: pointer to list of type ConfigurationIntOptionsTypeV1*)
NumberIntOutput : UINT; (*return value: number of returned INT data entries*)
pUintDataOutput : UDINT; (*return value: pointer to list of type ConfigurationUintOptionsTypeV1*)
NumberUintOutput : UINT; (*return value: number of returned UINT data entries*)
pDintDataOutput : UDINT; (*return value: pointer to list of type ConfigurationDintOptionsTypeV1*)
NumberDintOutput : UINT; (*return value: number of returned DINT data entries*)
pUdintDataOutput : UDINT; (*return value: pointer to list of type ConfigurationUdintOptionsTypeV1*)
NumberUdintOutput : UINT; (*return value: number of returned UDINT data entries*)
END_STRUCT;
DownloadCmdMaOpTypeV2 : STRUCT (*machine options command structure*)
Version : UINT; (*input data: safeVERSION_R110*)
Password : STRING[16]; (*input data: password*)
UDID_Low : UDINT; (*input data: UDID low from SafeLOGIC*)
UDID_High : UINT; (*input data: UDID high from SafeLOGIC*)
Unlock : USINT; (*input data: unlock data*)
pDeviceListInput : UDINT; (*input data: pointer to input device list of type DownloadDeviceTypeV1*)
NumberDevicesInput : UINT; (*input data: number of input devices*)
pMachineOptionsInput : UDINT; (*input data: pointer to input bit machine options of type ConfigurationBitOptionsTypeV1*)
pModuleFlagsInput : UDINT; (*input data: pointer to input module flags of type ConfigurationModuleFlagsTypeV1*)
pAcknMachineOptions : UDINT; (*input data: pointer to acknowledge information of type DownloadAcknMaOpTypeV1*)
pDeviceListOutput : UDINT; (*input data: pointer to device list buffer of type ConfigurationDeviceTypeV1*)
NumberDevicesOutput : UINT; (*input data: number of available device entries in devices list buffer*)
NumberDevicesOutputOut : UINT; (*return value: number of returned device entries*)
pMachineOptionsOutput : UDINT; (*input data: pointer to bit machine options of type ConfigurationBitOptionsTypeV1*)
pModuleFlagsOutput : UDINT; (*input data: pointer to module flags of type ConfigurationModuleFlagsTypeV1*)
pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *)
pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*)
END_STRUCT;
DownloadCmdMaOpTypeV1 : STRUCT (*machine options command structure*)
Version : UINT; (*input data: safeVERSION_R107*)
Password : STRING[16]; (*input data: password*)
UDID_Low : UDINT; (*input data: UDID low from SafeLOGIC*)
UDID_High : UINT; (*input data: UDID high from SafeLOGIC*)
Unlock : USINT; (*input data: unlock data*)
pDeviceListInput : UDINT; (*input data: pointer to input device list of type DownloadDeviceTypeV1*)
NumberDevicesInput : UINT; (*input data: number of input devices*)
pMachineOptionsInput : UDINT; (*input data: pointer to input bit machine options of type ConfigurationBitOptionsTypeV1*)
pModuleFlagsInput : UDINT; (*input data: pointer to input module flags of type ConfigurationModuleFlagsTypeV1*)
pAcknMachineOptions : UDINT; (*input data: pointer to acknowledge information of type DownloadAcknMaOpTypeV1*)
pDeviceListOutput : UDINT; (*return value: pointer to device list of type ConfigurationDeviceTypeV1*)
NumberDevicesOutput : UINT; (*return value: number of returned entries*)
pMachineOptionsOutput : UDINT; (*return value: pointer to bit machine options of type ConfigurationBitOptionsTypeV1*)
pModuleFlagsOutput : UDINT; (*return value: pointer to module flags of type ConfigurationModuleFlagsTypeV1*)
END_STRUCT;
DownloadCmdTableTypeV2 : STRUCT (*table command structure*)
Version : UINT; (*input data: safeVERSION_R110*)
Password : STRING[16]; (*input data: password*)
UDID_Low : UDINT; (*input data: UDID low*)
UDID_High : UINT; (*input data: UDID high*)
Unlock : USINT; (*input data: unlock data*)
pTableDataInput : UDINT; (*input data: pointer to input table data list of type DownloadTableTypeV2*)
NumberTablesInput : UINT; (*input data: number of input entries in pTableDataInput*)
pTableDataOutput : UDINT; (*input data: pointer to list of type ConfigurationTableTypeV1*)
NumberTablesOutput : UINT; (*input data: number of available entries in pTableDataOutput*)
NumberTablesOutputOut : UINT; (*return value: number of returned table entries*)
pBackupFile : UDINT; (*input data: 0 .. no backup, otherwise pointer to struct of type FileReferenceType *)
pXmlOutputFile : UDINT; (*input data: 0 .. don't create XML output data, otherwise pointer to struct of type FileReferenceType*)
END_STRUCT;
DownloadCmdTableTypeV1 : STRUCT (*table command structure*)
Version : UINT; (*input data: safeVERSION_R107*)
Password : STRING[16]; (*input data: password*)
UDID_Low : UDINT; (*input data: UDID low*)
UDID_High : UINT; (*input data: UDID high*)
Unlock : USINT; (*input data: unlock data*)
pTableDataInput : UDINT; (*input data: pointer to input table data list of type DownloadTableTypeV1*)
NumberTablesInput : UINT; (*input data: number of input entries in pTableDataInput*)
pTableDataOutput : UDINT; (*return value: pointer to list of type ConfigurationTableTypeV1*)
NumberTablesOutput : UINT; (*return value: number of returned table entries*)
END_STRUCT;
DownloadCmdFileTypeV1 : STRUCT (*file command structure*)
Version : UINT; (*used version*)
Password : STRING[16]; (*password*)
UDID_Low : UDINT; (*UDID low*)
UDID_High : UINT; (*UDID high*)
Unlock : USINT; (*unlock data*)
DataSource : DataSourceTypeV1; (*local data or local file available, file upload from safeLOGIC not available*)
pCrcs : UDINT; (*pointer to CRC data buffer*)
NumberOfCrcs : UINT; (*size of CRC data Buffer*)
NumberOfCrcsOut : UINT; (*number of CRCs*)
END_STRUCT;
DownloadAddParaTypeV1 : STRUCT (*additional parameter data*)
SADR : UINT; (*safety address*)
ID : USINT; (*id*)
pParaData : UDINT; (*pointer to additional parameter data*)
Length : UDINT; (*length*)
pAcknAddPara : UDINT; (*pointer to acknowledge information*)
END_STRUCT;
DownloadDeviceTypeV1 : STRUCT (*safety device*)
SADR : UINT; (*safety address*)
UDID_Low : UDINT; (*UDID low*)
UDID_High : UINT; (*UDID high*)
END_STRUCT;
DownloadTableTypeV1 : STRUCT (*table data*)
Device : STRING[80]; (*device for file*)
File : STRING[80]; (*file name*)
END_STRUCT;
DownloadTableTypeV2 : STRUCT (*table data*)
Type : UINT; (*safeTABLE_FILE_TYPE .. use Device / File, safeTABLE_DATA_TYPE .. use pData / DataLen*)
Device : STRING[80]; (*device for file*)
File : STRING[80]; (*file name*)
pData : UDINT; (*pointer to table data *)
DataLen : UDINT; (*length of table data*)
END_STRUCT;
RemoteControlCmdTypeV1 : STRUCT (*remote control command structure*)
Version : UINT; (*used version*)
Command : UINT; (*command*)
Number : UINT; (*actual number*)
Data : UINT; (*data*)
Password : STRING[16]; (*password*)
NewPassword : STRING[16]; (*new password*)
END_STRUCT;
RemoteControlStatusTypeV1 : STRUCT (*remote control status from SafeLOGIC*)
Command : UINT; (*last received command*)
Number : UINT; (*running number of last received command*)
Status : UINT; (*status of command*)
State : UINT; (*state of the last ENTER command*)
EnterData : UINT; (*last received ENTER command that was correct executed*)
EnterNumber : UINT; (*running number of the last received ENTER command*)
EnterExecuteStatus : UINT; (*state of the last received ENTER command*)
SafeOSState : USINT; (*status of the safety application*)
SafeKEYChanged : USINT; (*SafeKEY has been exchanged*)
LedTestActive : USINT; (*LED test active*)
Scanning : USINT; (*module scan active*)
openSAFETYstate : USINT; (*status of openSAFETY stack*)
FailSafe : USINT; (*Fail-Safe status*)
NumberOfMissingModules : UINT; (*number of missing modules*)
NumberOfUDIDMismatches : UINT; (*number of mismatched modules*)
NumberOfDifferentFirmware : UINT; (*number of modules with different firmware*)
SADR : ARRAY[0..100]OF UINT; (*safety address array*)
MissingModules : ARRAY[0..15]OF USINT; (*missing modules array*)
UDIDMismatches : ARRAY[0..15]OF USINT; (*udid mismatch array*)
DifferentFirmware : ARRAY[0..15]OF USINT; (*different firmware array*)
END_STRUCT;
RemoteControlStatusTypeV2 : STRUCT (*remote control status from SafeLOGIC*)
Command : UINT; (*last received command*)
Number : UINT; (*running number of last received command*)
Status : UINT; (*status of command*)
State : UINT; (*state of the last ENTER command*)
EnterData : UINT; (*last received ENTER command that was correct executed*)
EnterNumber : UINT; (*running number of the last received ENTER command*)
EnterExecuteStatus : UINT; (*state of the last received ENTER command*)
SafeOSState : USINT; (*status of the safety application*)
SafeKEYChanged : USINT; (*SafeKEY has been exchanged*)
LedTestActive : USINT; (*LED test active*)
Scanning : USINT; (*module scan active*)
openSAFETYstate : USINT; (*status of openSAFETY stack*)
FailSafe : USINT; (*Fail-Safe status*)
NumberOfMissingModules : UINT; (*number of missing modules*)
NumberOfUDIDMismatches : UINT; (*number of mismatched modules*)
NumberOfDifferentFirmware : UINT; (*number of modules with different firmware*)
SADR : ARRAY[0..299]OF UINT; (*safety address array*)
MissingModules : ARRAY[0..39]OF USINT; (*missing modules array*)
UDIDMismatches : ARRAY[0..39]OF USINT; (*udid mismatch array*)
DifferentFirmware : ARRAY[0..39]OF USINT; (*different firmware array*)
NumberOfConfiguredModules : UINT; (*number of configured modules*)
SetupModeActive : USINT; (*setup mode active*)
ProjectPresent : USINT; (*project present*)
PasswordSet : USINT; (*password set*)
IsSL81xx : USINT; (*SCM is part of SL81xx*)
IsSCMar : USINT; (*SCM is part of SCMar*)
SetupModeSupported : USINT; (*setup mode is supported*)
END_STRUCT;
TableHeaderATypeV1 : STRUCT (*header struct for table type A version 1*)
xTol : DINT;
yTol : DINT;
END_STRUCT;
TableEntryATypeV1 : STRUCT (*entry struct for table type A version 1*)
xVal : DINT;
yVal : DINT;
resVal : USINT;
END_STRUCT;
TableEntryBTypeV1 : STRUCT (*entry struct for table type B version 1*)
xVal : DINT;
yVal : DINT;
zVal : DINT;
resVal : DINT;
END_STRUCT;
TableEntryCTypeV1 : STRUCT (*entry struct for table type C version 1*)
Zone : UINT;
Position : UINT;
Dimension : UINT;
END_STRUCT;
TableHeaderDTypeV1 : STRUCT (*header struct for table type A version 1*)
Surveillance : BYTE;
END_STRUCT;
TableEntryDTypeV1 : STRUCT (*entry struct for table type D version 1*)
Object : UINT;
Type : UINT;
MinimumBeam : UINT;
MaximumBeam : UINT;
Dimension : UINT;
DimensionTolerance : UINT;
END_STRUCT;
TableHeaderDTypeV2 : STRUCT (*header struct for table type D version 2*)
Surveillance : BYTE;
END_STRUCT;
TableEntryDTypeV2 : STRUCT (*entry struct for table type D version 2*)
Object : UINT;
MinimumBeam : UINT;
MaximumBeam : UINT;
Dimension : UINT;
DimensionTolerance : UINT;
END_STRUCT;
TableHeaderETypeV1 : STRUCT (*header struct for table type E version 1*)
xDim : INT;
yDim : INT;
END_STRUCT;
TableEntryETypeV1 : STRUCT (*entry struct for table type D version 1*)
Entry : DINT;
END_STRUCT;
TableEntrySTypeV1 : STRUCT (*entry struct for table type S version 1*)
LinkTargetObjectID : DINT;
LinkTargetAxisType : DINT;
LinkSourceObjectID : DINT;
LinkSourceAxisType : DINT;
LinkFactorNum : DINT;
LinkFactorDenom : DINT;
END_STRUCT;
TableHeaderTTypeV1 : STRUCT (*header struct for table type T version 1*)
NumberOfActiveAxes : DINT; (*number of active axes*)
END_STRUCT;
TableEntryTTypeV1 : STRUCT (*entry struct for table type T version 1*)
KinObjID : DINT;
KinObjType : DINT;
KinObjTransX : DINT;
KinObjTransY : DINT;
KinObjTransZ : DINT;
KinObjRotAngle1 : DINT;
KinObjRotAngle2 : DINT;
KinObjRotAngle3 : DINT;
KinObjRotaryAxisDecRamp : DINT;
KinObjRotaryAxisMaxAcc : DINT;
KinObjLinearAxisDecRamp : DINT;
KinObjLinearAxisMaxAcc : DINT;
END_STRUCT;
TableHeaderTTypeV2 : STRUCT (*header struct for table type T version 2*)
NumberOfTableObjects : UINT;
VersionNumber : UINT;
NumberOfActiveAxes : DINT;
END_STRUCT;
TableEntryTTypeV2 : STRUCT (*entry struct for table type T version 2*)
KinObjID : DINT;
KinObjType : DINT;
KinObjTransX : DINT;
KinObjTransY : DINT;
KinObjTransZ : DINT;
KinObjRotAngle1 : DINT;
KinObjRotAngle2 : DINT;
KinObjRotAngle3 : DINT;
KinObjRotaryAxisDecRamp : DINT;
KinObjRotaryAxisMaxAcc : DINT;
KinObjLinearAxisDecRamp : DINT;
KinObjLinearAxisMaxAcc : DINT;
KinObjActivateWireFrameModel : DINT;
KinObjDistanceToBndElements : DINT;
END_STRUCT;
TableHeaderTTypeV3 : STRUCT (*header struct for table type T version 3*)
NumberOfTableObjects : UINT;
VersionNumber : UINT;
NumberOfActiveAxes : DINT;
END_STRUCT;
TableEntryTTypeV3 : STRUCT (*entry struct for table type T version 3*)
KinObjID : DINT;
KinObjType : DINT;
KinObjTransX : DINT;
KinObjTransY : DINT;
KinObjTransZ : DINT;
KinObjRotAngle1 : DINT;
KinObjRotAngle2 : DINT;
KinObjRotAngle3 : DINT;
KinObjRotaryAxisDecRamp : DINT;
KinObjRotaryAxisMaxAcc : DINT;
KinObjLinearAxisDecRamp : DINT;
KinObjLinearAxisMaxAcc : DINT;
KinObjActivateWireFrameModel : DINT;
KinObjDistanceToBndElements : DINT;
END_STRUCT;
TableHeaderTTypeV4 : STRUCT (*header struct for table type T version 4*)
NumberOfTableObjects : UINT;
VersionNumber : UINT;
NumberOfActiveAxes : DINT;
ParallelConfiguration : DINT;
END_STRUCT;
TableEntryTTypeV4 : STRUCT (*entry struct for table type T version 4*)
KinObjID : DINT;
KinObjType : DINT;
KinObjTransX : DINT;
KinObjTransY : DINT;
KinObjTransZ : DINT;
KinObjRotAngle1 : DINT;
KinObjRotAngle2 : DINT;
KinObjRotAngle3 : DINT;
KinObjRotaryAxisDecRamp : DINT;
KinObjRotaryAxisMaxAcc : DINT;
KinObjLinearAxisDecRamp : DINT;
KinObjLinearAxisMaxAcc : DINT;
KinObjActivateWireFrameModel : DINT;
KinObjDistanceToBndElements : DINT;
END_STRUCT;
TableEntryUTypeV1 : STRUCT (*entry struct for table type U version 1*)
SpaceID : DINT;
SpaceType : DINT;
SpaceTransX : DINT;
SpaceTransY : DINT;
SpaceTransZ : DINT;
SpaceRotAngle1 : DINT;
SpaceRotAngle2 : DINT;
SpaceRotAngle3 : DINT;
SpaceDimensionX : DINT;
SpaceDimensionY : DINT;
SpaceDimensionZ : DINT;
END_STRUCT;
TableEntryVTypeV1 : STRUCT (*entry struct for table type V version 1*)
SpaceID : DINT;
SpaceType : DINT;
KinObjID : DINT;
KinObjJointAxisType : DINT;
SpaceMaxLimit : DINT;
SpaceMinLimit : DINT;
END_STRUCT;
TableEntryWTypeV1 : STRUCT (* entry struct for table type W version 1*)
OrientID : DINT;
OrientType : DINT;
OrientTransX_RotAngle1 : DINT;
OrientTransY_RotAngle2 : DINT;
OrientTransZ_RotAngle3 : DINT;
END_STRUCT;
END_TYPE

View File

@@ -0,0 +1,87 @@
VAR CONSTANT
safeVERSION_R107 : UINT := 16#107; (*safety release version - 1.7*)
safeVERSION_R110 : UINT := 16#110; (*safety release version - 1.10*)
safeDATA_TYPE_MAOP : UINT := 16#100; (*download type for machine options *)
safeDATA_TYPE_EXTMAOP : UINT := 16#200; (*download type for extended machine options *)
safeDATA_TYPE_TABLE : UINT := 16#300; (*download type for table objects *)
safeDATA_TYPE_ADDPARA : UINT := 16#400; (*download type for additional parameter*)
safeDATA_TYPE_APPLICATION : UINT := 16#1200; (*type for restore*)
safeINFO_TYPE_PWD_INFO : UINT := 1; (*SL info type for password info*)
safeINFO_TYPE_PWD_CHK : UINT := 2; (*SL info type for password check*)
safeTABLE_FILE_TYPE : UINT := 16#0000; (*reference to table file*)
safeTABLE_DATA_TYPE : UINT := 16#0001; (*pointer to table data*)
safeSRC_TYPE_UPLOAD_FILE : UINT := 0; (*file upload from SafeLOGIC*)
safeSRC_TYPE_LOCAL_DATA : UINT := 1; (*local data from memory buffer*)
safeSRC_TYPE_LOCAL_FILE : UINT := 2; (*local data from file*)
safeCMD_ENTER : UINT := 16#100; (*enter command*)
safeCMD_STATUS : UINT := 16#200; (*status command*)
safeCMD_STATUS_SL : UINT := 16#0000; (*read back status*)
safeCMD_N_UDID_ACKN : UINT := 16#20; (*acknowledge N modules*)
safeCMD_4_UDID_ACKN : UINT := 16#30; (*acknowledge 4 modules*)
safeCMD_3_UDID_ACKN : UINT := 16#40; (*acknowledge 3 modules*)
safeCMD_2_UDID_ACKN : UINT := 16#50; (*acknowledge 2 modules*)
safeCMD_1_UDID_ACKN : UINT := 16#60; (*acknowledge 1 module*)
safeCMD_FW_ACKN : UINT := 16#100; (*acknowledge firmware*)
safeCMD_SK_XCHG : UINT := 16#200; (*acknowledge SafeKEY*)
safeCMD_TEST : UINT := 16#1000; (*LED test*)
safeCMD_SCAN : UINT := 16#2000; (*scan*)
safeCMD_SK_PW : UINT := 16#5000; (*change password*)
safeCMD_SK_FORMAT : UINT := 16#6000; (*format SafeKEY*)
safeCMD_RESET : UINT := 16#7000; (*reset SafeLOGIC*)
safeCMD_CLEAR_DATA : UINT := 16#8000; (*clear additonal downloaded data*)
safeCMD_SETUP_MODE_ACT : UINT := 16#9000; (*activate setup mode*)
safeCMD_SETUP_MODE_DEACT : UINT := 16#9100; (*deactivate setup mode*)
safeCMD_VERSION_INFO : UINT := 16#F000; (*remote version info*)
safeRET_NO_TIMESTAMP : UDINT := 16#FFFFFFFF; (*no timestamp available*)
safeERR_VERSION : UINT := 36100; (*error wrong version for command structure*)
safeERR_PW_LENGTH : UINT := 36101; (*error wrong password length*)
safeERR_UDID : UINT := 36102; (*error no UDID*)
safeERR_ALLOC_MEM : UINT := 36103; (*error allocating memory*)
safeERR_INTERNAL_ERROR : UINT := 36104; (*internal error*)
safeERR_TIMEOUT : UINT := 36105; (*error connection timeout*)
safeERR_RC_CMD : UINT := 36106; (*error wrong command*)
safeERR_RC_ENTER_DATA : UINT := 36107; (*error wrong data for ENTER command*)
safeERR_RC_ENTER_PW : UINT := 36108; (*error no password for command*)
safeERR_RC_ENTER_SK_PW : UINT := 36109; (*error no new password for command*)
safeERR_RC_STATUS_DATA : UINT := 36110; (*error wrong data for STATUS command*)
safeERR_RC_DATA_LENGTH : UINT := 36111; (*error worng length for status data*)
safeERR_DL_NO_PASSWORD : UINT := 36112; (*error no password for download*)
safeERR_DL_PROTOCOL : UINT := 36113; (*error protocol version for download*)
safeERR_DL_FILE_OPEN : UINT := 36114; (*error file open*)
safeERR_DL_FILE_INVALID : UINT := 36115; (*error file invalid*)
safeERR_DL_FILE_TOO_BIG : UINT := 36116; (*error file too big*)
safeERR_DL_WRITE : UINT := 36117; (*error write*)
safeERR_DL_STREAM : UINT := 36118; (*error stream*)
safeERR_DL_CHECKSUM : UINT := 36119; (*error checksum*)
safeERR_DL_UDID : UINT := 36120; (*error UDID doesn't match*)
safeERR_DL_WRONG_FILE_SIZE : UINT := 36121; (*error wrong file size*)
safeERR_DL_NO_RIGHTS_TO_WRITE : UINT := 36122; (*error wrong password*)
safeERR_DL_UNLOCK_FILE_INFO : UINT := 36123; (*error file info*)
safeERR_DL_UNLOCK_READ : UINT := 36124; (*error unlock read*)
safeERR_DL_UNLOCK_WRITE : UINT := 36125; (*error unlock write*)
safeERR_DL_STATIC_UNLOCK : UINT := 36126; (*error static unlock*)
safeERR_DL_COMPARE_FAILED : UINT := 36127; (*error data compare failed*)
safeERR_DLDATA_TYPE_ERR : UINT := 36128; (*error data type for download*)
safeERR_DLDATA_ERR_DATA : UINT := 36129; (*error data for download*)
safeERR_COT_TYPE_ERR : UINT := 36130; (*error data type for upload*)
safeERR_COT_READING_FILE : UINT := 36131; (*error reading file*)
safeERR_BUFFER_NULL : UINT := 36132; (*required input buffer is NULL*)
safeERR_BUFFER_TOO_SMALL : UINT := 36133; (*required input buffer is too small*)
safeERR_FILE_EMPTY : UINT := 36134; (*file is empty or does not exist on SL/SLX*)
safeERR_FI_TYPE_ERR : UINT := 36135; (*error data type for getting file info*)
safeERR_SLINFO_TYPE_ERR : UINT := 36136; (*error data type for SL info*)
safeERR_SLINFO_RET_ERR : UINT := 36137; (*remote command returns error*)
safeERR_COT_PWD_ERR : UINT := 36138; (*wrong password for configuration on target command*)
safeERR_TC_INV_TABTYPE : UINT := 36180; (*invalid table type*)
safeERR_TC_INV_INST : UINT := 36181; (*invalid table instance*)
safeERR_TC_INV_INPUT_PTR : UINT := 36182; (*invalid input pointer*)
safeERR_TC_INV_TAB_LEN : UINT := 36183; (*invalid table length*)
safeERR_TC_INV_USER : UINT := 36184; (*invalid user name*)
safeERR_TC_TYPE_CPY_FCT : UINT := 36185; (*no copy function for table type*)
safeWRN_TC_WAIT_FOR_ACK : UINT := 36191; (*wait for acknowledge of tables*)
safeERR_TC_CHECK_FAILED : UINT := 36186; (*table check failed*)
safeERR_TC_EXTRACT_FAILED : UINT := 36187; (*extraction of output table data failed*)
safeERR_TC_LOCK_FAILED : UINT := 36188; (*table lock failed*)
safeERR_TC_ACK_SET : UINT := 36189; (*AckData is already set*)
safeERR_TC_INVALID_STEP : UINT := 36190; (*invalid step in table check*)
END_VAR

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Library SubType="binary" Description="The AsSafety library provides function blocks for the safety system." xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>AsSafety.fun</File>
<File>AsSafety.typ</File>
<File>AsSafety.var</File>
</Files>
<Dependencies>
<Dependency ObjectName="standard" />
<Dependency ObjectName="FileIO" />
<Dependency ObjectName="astime" />
<Dependency ObjectName="DataObj" />
<Dependency ObjectName="AsXml" />
</Dependencies>
</Library>

View File

@@ -0,0 +1,264 @@
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlCreateMemoryReader (*creates an xml memory reader*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pXmlMemory : UDINT; (*pointer to the XML data*)
memorySize : UDINT; (*size of the XML data*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
ident : UDINT; (*identifier*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlCloseMemoryReader (*closes the xml memory reader*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlReadNextNode (*reads the next XML node*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
forceRead : BOOL; (*reads next Node even if last node could not be read successfully*)
skipSubtree : BOOL; (*avoids XML nodes in the subtree*)
pName : UDINT; (*pointer to buffer for the XML node name*)
nameSize : UDINT; (*size of the buffer for the XML node name*)
pValue : UDINT; (*pointer to buffer for the XML node value*)
valueSize : UDINT; (*size of the buffer for the XML node value*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
nodeType : UDINT; (*type of the XML node*)
depth : UDINT; (*depth of the XML node*)
isEmpty : BOOL; (*empty XML node?*)
attributeCount : UDINT; (*number of attributes*)
neededNameSize : UDINT; (*needed name buffer size*)
neededValueSize : UDINT; (*needed value buffer size*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlReadAttributeNr (*reads the next attribute of the XML node*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
index : UDINT; (*index of the attribute to read*)
pName : UDINT; (*pointer to buffer for the attribute name*)
nameSize : UDINT; (*size of the buffer for the XML attribute name*)
pValue : UDINT; (*pointer to buffer for the attribute value*)
valueSize : UDINT; (*size of the buffer for the XML attribute value*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
neededNameSize : UDINT; (*needed name buffer size*)
neededValueSize : UDINT; (*needed value buffer size*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlCreateMemoryWriter (*creates an xml memory writer*)
VAR_INPUT
enable : BOOL; (*enables execution*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
ident : UDINT; (*identifier*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlGetMemoryInfo (*gets the pointer to and the size of the created XML data*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
pXmlData : UDINT; (*pointer to the created XML data*)
xmlDataSize : UDINT; (*size of the created XML data*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlCloseMemoryWriter (*closes the xml memory writer and releases the allocated memory*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteStartDocument (*writes the version and the encoding of the document*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
pVersion : UDINT; (*pointer to the version*)
pEncoding : UDINT; (*pointer to the encoding*)
pStandalone : UDINT; (*pointer to the standalone text*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteStartDocEnc (*writes the version and the encoding of the document and sets the input encoding*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
pVersion : UDINT; (*pointer to the version*)
pInputEncoding : UDINT; (*pointer to the input encoding e.g. "ISO-8859-1"*)
pOutputEncoding : UDINT; (*pointer to the output encoding e.g. "UTF-8"*)
pStandalone : UDINT; (*pointer to the standalone text*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteEndDocument (*finishes the document*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteStartElement (*starts a new XML element*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
pName : UDINT; (*pointer to the XML element name*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteAttribute (*adds an attribute to the current XML element*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
pName : UDINT; (*pointer to the XML attribute name*)
pValue : UDINT; (*pointer to the XML attribute value*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteElementText (*writes an XML element text*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
pText : UDINT; (*pointer to the element text*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteElementTextEx (*writes an XML element text*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
pText : UDINT; (*pointer to the element text*)
textLen : UDINT; (*length of the element text*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteEndElement (*closes the current XML element*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteComment (*writes an XML comment*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
pText : UDINT; (*pointer to the comment text*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteCommentEx (*writes an XML comment*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
pText : UDINT; (*pointer to the comment text*)
textLen : UDINT; (*length of the comment text*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteCData (*writes an XML CDATA Section*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
pCData : UDINT; (*pointer to the CDATA data*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWriteCDataEx (*writes an XML CDATA Section*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
pCData : UDINT; (*pointer to the CDATA*)
cdataLen : UDINT; (*length of the CDATA*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK xmlWritePI (*writes an XML process instruction*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier*)
pTarget : UDINT; (*pointer to the process instruction*)
pValue : UDINT; (*pointer to the pi value*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK

View File

@@ -0,0 +1,4 @@
TYPE
END_TYPE

View File

@@ -0,0 +1,29 @@
VAR CONSTANT
xmlERR_MEMORY : UINT := 33810; (*memory error*)
xmlERR_INVALID_PARAMETER : UINT := 33811; (*wrong parameter or nullpointer given*)
xmlERR_GENERAL : UINT := 33812; (*general XML error*)
xmlERR_NO_FURTHER_XML_NODE : UINT := 33813; (*no further XML node available*)
xmlERR_NAME_BUFFER_TOO_SMALL: UINT := 33814; (*buffer for name too small*)
xmlERR_VALUE_BUFFER_TOO_SMALL: UINT := 33815; (*buffer for value too small*)
xmlERR_INVALID_ATTRIBUTE_INDEX: UINT := 33816; (*invalid attribute index*)
xmlERR_NO_ATTRIBUTES : UINT := 33817; (*no attribute available*)
xmlERR_XML_DATA_INVALID : UINT := 33818; (*xml data is invalid*)
xmlERR_INVALID_IDENT : UINT := 33819; (*error identifier invalid*)
xmlERR_NO_ELEMENT_OPEN : UINT := 33820; (*no open XML element where to put the attribute*)
xmlERR_INVALID_POSITION : UINT := 33821; (*invalid position for this node*)
xmlERR_CONVERT : UINT := 33822; (*error during converting text*)
xmlERR_CONVERT_TEXT : UINT := 33823; (*error converting text*)
xmlERR_UNSUPPORTED_ENCODING : UINT := 33824; (*unsupported encoding*)
xmlERR_DOCUMENT_NOT_OPEN : UINT := 33825; (*XML document not open*)
xmlNODE_TYPE_ELEMENT : UINT := 1; (*XML element node*)
xmlNODE_TYPE_TEXT : UINT := 3; (*XML element text*)
xmlNODE_TYPE_CDATA : UINT := 4; (*XML CDATA section*)
xmlNODE_TYPE_PI : UINT := 7; (*XML process instruction node*)
xmlNODE_TYPE_COMMENT : UINT := 8; (*XML comment*)
xmlNODE_TYPE_WHITESPACE : UINT := 13; (*XML white space*)
xmlNODE_TYPE_SIGN_WHITESPACE: UINT := 14; (*XML significant white space*)
xmlNODE_TYPE_ENDELEMENT : UINT := 15; (*XML end element node*)
END_VAR

View File

@@ -0,0 +1,349 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _ASXML_
#define _ASXML_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#ifndef _BUR_PUBLIC
#define _BUR_PUBLIC
#endif
/* Constants */
#ifdef _REPLACE_CONST
#define xmlNODE_TYPE_ENDELEMENT 15U
#define xmlNODE_TYPE_SIGN_WHITESPACE 14U
#define xmlNODE_TYPE_WHITESPACE 13U
#define xmlNODE_TYPE_COMMENT 8U
#define xmlNODE_TYPE_PI 7U
#define xmlNODE_TYPE_CDATA 4U
#define xmlNODE_TYPE_TEXT 3U
#define xmlNODE_TYPE_ELEMENT 1U
#define xmlERR_DOCUMENT_NOT_OPEN 33825U
#define xmlERR_UNSUPPORTED_ENCODING 33824U
#define xmlERR_CONVERT_TEXT 33823U
#define xmlERR_CONVERT 33822U
#define xmlERR_INVALID_POSITION 33821U
#define xmlERR_NO_ELEMENT_OPEN 33820U
#define xmlERR_INVALID_IDENT 33819U
#define xmlERR_XML_DATA_INVALID 33818U
#define xmlERR_NO_ATTRIBUTES 33817U
#define xmlERR_INVALID_ATTRIBUTE_INDEX 33816U
#define xmlERR_VALUE_BUFFER_TOO_SMALL 33815U
#define xmlERR_NAME_BUFFER_TOO_SMALL 33814U
#define xmlERR_NO_FURTHER_XML_NODE 33813U
#define xmlERR_GENERAL 33812U
#define xmlERR_INVALID_PARAMETER 33811U
#define xmlERR_MEMORY 33810U
#else
#ifndef _GLOBAL_CONST
#define _GLOBAL_CONST _WEAK const
#endif
_GLOBAL_CONST unsigned short xmlNODE_TYPE_ENDELEMENT;
_GLOBAL_CONST unsigned short xmlNODE_TYPE_SIGN_WHITESPACE;
_GLOBAL_CONST unsigned short xmlNODE_TYPE_WHITESPACE;
_GLOBAL_CONST unsigned short xmlNODE_TYPE_COMMENT;
_GLOBAL_CONST unsigned short xmlNODE_TYPE_PI;
_GLOBAL_CONST unsigned short xmlNODE_TYPE_CDATA;
_GLOBAL_CONST unsigned short xmlNODE_TYPE_TEXT;
_GLOBAL_CONST unsigned short xmlNODE_TYPE_ELEMENT;
_GLOBAL_CONST unsigned short xmlERR_DOCUMENT_NOT_OPEN;
_GLOBAL_CONST unsigned short xmlERR_UNSUPPORTED_ENCODING;
_GLOBAL_CONST unsigned short xmlERR_CONVERT_TEXT;
_GLOBAL_CONST unsigned short xmlERR_CONVERT;
_GLOBAL_CONST unsigned short xmlERR_INVALID_POSITION;
_GLOBAL_CONST unsigned short xmlERR_NO_ELEMENT_OPEN;
_GLOBAL_CONST unsigned short xmlERR_INVALID_IDENT;
_GLOBAL_CONST unsigned short xmlERR_XML_DATA_INVALID;
_GLOBAL_CONST unsigned short xmlERR_NO_ATTRIBUTES;
_GLOBAL_CONST unsigned short xmlERR_INVALID_ATTRIBUTE_INDEX;
_GLOBAL_CONST unsigned short xmlERR_VALUE_BUFFER_TOO_SMALL;
_GLOBAL_CONST unsigned short xmlERR_NAME_BUFFER_TOO_SMALL;
_GLOBAL_CONST unsigned short xmlERR_NO_FURTHER_XML_NODE;
_GLOBAL_CONST unsigned short xmlERR_GENERAL;
_GLOBAL_CONST unsigned short xmlERR_INVALID_PARAMETER;
_GLOBAL_CONST unsigned short xmlERR_MEMORY;
#endif
/* Datatypes and datatypes of function blocks */
typedef struct xmlCreateMemoryReader
{
/* VAR_INPUT (analog) */
unsigned long pXmlMemory;
unsigned long memorySize;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long ident;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlCreateMemoryReader_typ;
typedef struct xmlCloseMemoryReader
{
/* VAR_INPUT (analog) */
unsigned long ident;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlCloseMemoryReader_typ;
typedef struct xmlReadNextNode
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pName;
unsigned long nameSize;
unsigned long pValue;
unsigned long valueSize;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long nodeType;
unsigned long depth;
unsigned long attributeCount;
unsigned long neededNameSize;
unsigned long neededValueSize;
/* VAR_INPUT (digital) */
plcbit enable;
plcbit forceRead;
plcbit skipSubtree;
/* VAR_OUTPUT (digital) */
plcbit isEmpty;
} xmlReadNextNode_typ;
typedef struct xmlReadAttributeNr
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long index;
unsigned long pName;
unsigned long nameSize;
unsigned long pValue;
unsigned long valueSize;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long neededNameSize;
unsigned long neededValueSize;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlReadAttributeNr_typ;
typedef struct xmlCreateMemoryWriter
{
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long ident;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlCreateMemoryWriter_typ;
typedef struct xmlGetMemoryInfo
{
/* VAR_INPUT (analog) */
unsigned long ident;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long pXmlData;
unsigned long xmlDataSize;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlGetMemoryInfo_typ;
typedef struct xmlCloseMemoryWriter
{
/* VAR_INPUT (analog) */
unsigned long ident;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlCloseMemoryWriter_typ;
typedef struct xmlWriteStartDocument
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pVersion;
unsigned long pEncoding;
unsigned long pStandalone;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWriteStartDocument_typ;
typedef struct xmlWriteStartDocEnc
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pVersion;
unsigned long pInputEncoding;
unsigned long pOutputEncoding;
unsigned long pStandalone;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWriteStartDocEnc_typ;
typedef struct xmlWriteEndDocument
{
/* VAR_INPUT (analog) */
unsigned long ident;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWriteEndDocument_typ;
typedef struct xmlWriteStartElement
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pName;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWriteStartElement_typ;
typedef struct xmlWriteAttribute
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pName;
unsigned long pValue;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWriteAttribute_typ;
typedef struct xmlWriteElementText
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pText;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWriteElementText_typ;
typedef struct xmlWriteElementTextEx
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pText;
unsigned long textLen;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWriteElementTextEx_typ;
typedef struct xmlWriteEndElement
{
/* VAR_INPUT (analog) */
unsigned long ident;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWriteEndElement_typ;
typedef struct xmlWriteComment
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pText;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWriteComment_typ;
typedef struct xmlWriteCommentEx
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pText;
unsigned long textLen;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWriteCommentEx_typ;
typedef struct xmlWriteCData
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pCData;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWriteCData_typ;
typedef struct xmlWriteCDataEx
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pCData;
unsigned long cdataLen;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWriteCDataEx_typ;
typedef struct xmlWritePI
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pTarget;
unsigned long pValue;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} xmlWritePI_typ;
/* Prototyping of functions and function blocks */
_BUR_PUBLIC void xmlCreateMemoryReader(struct xmlCreateMemoryReader* inst);
_BUR_PUBLIC void xmlCloseMemoryReader(struct xmlCloseMemoryReader* inst);
_BUR_PUBLIC void xmlReadNextNode(struct xmlReadNextNode* inst);
_BUR_PUBLIC void xmlReadAttributeNr(struct xmlReadAttributeNr* inst);
_BUR_PUBLIC void xmlCreateMemoryWriter(struct xmlCreateMemoryWriter* inst);
_BUR_PUBLIC void xmlGetMemoryInfo(struct xmlGetMemoryInfo* inst);
_BUR_PUBLIC void xmlCloseMemoryWriter(struct xmlCloseMemoryWriter* inst);
_BUR_PUBLIC void xmlWriteStartDocument(struct xmlWriteStartDocument* inst);
_BUR_PUBLIC void xmlWriteStartDocEnc(struct xmlWriteStartDocEnc* inst);
_BUR_PUBLIC void xmlWriteEndDocument(struct xmlWriteEndDocument* inst);
_BUR_PUBLIC void xmlWriteStartElement(struct xmlWriteStartElement* inst);
_BUR_PUBLIC void xmlWriteAttribute(struct xmlWriteAttribute* inst);
_BUR_PUBLIC void xmlWriteElementText(struct xmlWriteElementText* inst);
_BUR_PUBLIC void xmlWriteElementTextEx(struct xmlWriteElementTextEx* inst);
_BUR_PUBLIC void xmlWriteEndElement(struct xmlWriteEndElement* inst);
_BUR_PUBLIC void xmlWriteComment(struct xmlWriteComment* inst);
_BUR_PUBLIC void xmlWriteCommentEx(struct xmlWriteCommentEx* inst);
_BUR_PUBLIC void xmlWriteCData(struct xmlWriteCData* inst);
_BUR_PUBLIC void xmlWriteCDataEx(struct xmlWriteCDataEx* inst);
_BUR_PUBLIC void xmlWritePI(struct xmlWritePI* inst);
#ifdef __cplusplus
};
#endif
#endif /* _ASXML_ */

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Library SubType="binary" Description="The AsXml library supports reading and writing of XML files." xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>AsXml.fun</File>
<File>AsXml.typ</File>
<File>AsXml.var</File>
</Files>
</Library>

View File

@@ -0,0 +1,40 @@
{REDUND_ERROR} FUNCTION_BLOCK zipArchive (*Creates an archive (.tar, .gz or .tar.gz)*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pArchiveDevice : UDINT; (*device name of the archive file given as a pointer*)
pArchiveFile : UDINT; (*file name of the archive file given as a pointer*)
pSrcDevice : UDINT; (*device name of the source file or folder given as a pointer*)
pSrcFile : UDINT; (*source folder or file given as a pointer*)
pOptions : UDINT; (*additional options given as pointer*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_ERROR} FUNCTION_BLOCK zipExtract (*Extracts an archive (.tar, .gz or .tar.gz)*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pArchiveDevice : UDINT; (*device name of the archive given as a pointer*)
pArchiveFile : UDINT; (*file name of the archive given as a pointer*)
pOutDevice : UDINT; (*device name of the destination folder of the files to extract given as pointer*)
pOutFolder : UDINT; (*destination folder name of the files to extract given as pointer*)
pOptions : UDINT; (*additional options given as pointer*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK

View File

@@ -0,0 +1,4 @@
TYPE
END_TYPE

View File

@@ -0,0 +1,10 @@
VAR CONSTANT
zipERR_NULLPOINTER : UINT := 38060; (*null pointer given*)
zipERR_INVALID_DEVICE : UINT := 38061; (*device doesn't exist or device not configured*)
zipERR_UNSUPPORTED_EXTENSION : UINT := 38062; (*unsupported extension*)
zipERR_INTERNAL_ERROR : UINT := 38063; (*internal error*)
zipERR_SPACE : UINT := 38064; (*device is out of space*)
zipERR_FILE_NOT_FOUND : UINT := 38065; (*file not found*)
zipERR_FILE_WRITE_ERROR : UINT := 38066; (*could not write extracted file*)
END_VAR

View File

@@ -0,0 +1,89 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _ASZIP_
#define _ASZIP_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#include <runtime.h>
#ifndef _BUR_PUBLIC
#define _BUR_PUBLIC
#endif
/* Constants */
#ifdef _REPLACE_CONST
#define zipERR_FILE_WRITE_ERROR 38066U
#define zipERR_FILE_NOT_FOUND 38065U
#define zipERR_SPACE 38064U
#define zipERR_INTERNAL_ERROR 38063U
#define zipERR_UNSUPPORTED_EXTENSION 38062U
#define zipERR_INVALID_DEVICE 38061U
#define zipERR_NULLPOINTER 38060U
#else
#ifndef _GLOBAL_CONST
#define _GLOBAL_CONST _WEAK const
#endif
_GLOBAL_CONST unsigned short zipERR_FILE_WRITE_ERROR;
_GLOBAL_CONST unsigned short zipERR_FILE_NOT_FOUND;
_GLOBAL_CONST unsigned short zipERR_SPACE;
_GLOBAL_CONST unsigned short zipERR_INTERNAL_ERROR;
_GLOBAL_CONST unsigned short zipERR_UNSUPPORTED_EXTENSION;
_GLOBAL_CONST unsigned short zipERR_INVALID_DEVICE;
_GLOBAL_CONST unsigned short zipERR_NULLPOINTER;
#endif
/* Datatypes and datatypes of function blocks */
typedef struct zipArchive
{
/* VAR_INPUT (analog) */
unsigned long pArchiveDevice;
unsigned long pArchiveFile;
unsigned long pSrcDevice;
unsigned long pSrcFile;
unsigned long pOptions;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
/* VAR_INPUT (digital) */
plcbit enable;
} zipArchive_typ;
typedef struct zipExtract
{
/* VAR_INPUT (analog) */
unsigned long pArchiveDevice;
unsigned long pArchiveFile;
unsigned long pOutDevice;
unsigned long pOutFolder;
unsigned long pOptions;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
/* VAR_INPUT (digital) */
plcbit enable;
} zipExtract_typ;
/* Prototyping of functions and function blocks */
_BUR_PUBLIC void zipArchive(struct zipArchive* inst);
_BUR_PUBLIC void zipExtract(struct zipExtract* inst);
#ifdef __cplusplus
};
#endif
#endif /* _ASZIP_ */

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Library SubType="binary" Description="The AsZip library offers compressing archive-support" xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>AsZip.fun</File>
<File>AsZip.typ</File>
<File>AsZip.var</File>
</Files>
<Dependencies>
<Dependency ObjectName="runtime" />
</Dependencies>
</Library>

View File

@@ -0,0 +1,291 @@
(********************************************************************
* COPYRIGHT (C) BERNECKER + RAINER, AUSTRIA, A-5142 EGGELSBERG
********************************************************************
* Library: CoTrace
* File: CoTrace.fun
********************************************************************
* Declaration of IEC-FBs of library CoTrace
********************************************************************)
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CoTraceConfigCreate (*This function is used to create a new blank trace configuration, which then can be configured using the following CoTraceConfig function blocks: CoTraceConfigSetTiming, CoTraceConfigAddDatapoint, CoTraceConfigAddStartTrigger, and CoTraceConfigOptionalParameter.
This function block is mandatory for obtaining a valid trace configuration.
By disabling this function block the configuration is being deleted and cannot be accessed any longer.
A specific configIdent can only be used for a single recordings of data. Thus, even if the settings should stay the same,
CoTraceConfigCreate and all CoTraceConfig function blocks have to be disabled and enabled again when rerunning a trace recording.
The following figure shows a connection scheme of CoTrace function blocks using the two types of idents, ConfigIdent and DataIdent.
DNE(<img src="CoTraceConfigCreate\IdentVerschaltungsSchema.png">)DNE *)
VAR_INPUT
Enable : BOOL; (*Enabling this function block creates a new empty trace configuration.
Configuration settings are defined using the function blocks CoTraceConfigSetTiming, CoTraceConfigAddDatapoint, CoTraceConfigAddStartTrigger, and CoTraceConfigOptionalParameter.*) (* *) (*#PAR*)
END_VAR
VAR_OUTPUT
Active : BOOL; (*The function block's output ConfigIdent can be used.*) (* *) (*#PAR*)
Busy : BOOL; (*The function block is busy and must continue to be called.*) (* *) (*#PAR*)
Error : BOOL; (*An error occurred during operation. The function block must be disabled to get out of the error state.*) (* *) (*#PAR*)
StatusID : DINT; (*Status information*) (* *) (*#PAR*)
ConfigIdent : CoTraceConfigIdentType; (*This ident can be used by other function blocks of this library to define the trace configuration.*) (* *) (*#CMD*)
END_VAR
VAR
Internal : CoTraceMemCtxInternalType; (*Data for internal use*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CoTraceConfigLoad (*This function block is used to create a trace configuration by loading a (via AutomationStudio) pre-configured and transferred trace configuration. The loaded configuration can be manipulated using the FBs CoTraceConfigSetTiming, CoTraceConfigAddDataPoint, CoTraceConfigAddStart-Trigger and CoTraceConfigOptionalParameter.
This function block is an alternative to CoTraceConfigCreate to setup a valid trace configuration.
The following figure shows a connection scheme of CoTrace function blocks using the two types of idents, ConfigIdent and DataIdent.
DNE(<img src="CoTraceConfigCreate\IdentVerschaltungsSchema.png">)DNE *)
VAR_INPUT
Enable : BOOL; (*Enabling this function block loads an existing trace configuration*) (* *) (*#PAR*)
Name : STRING[32]; (*Name of the trace configuration to be loaded*) (* *) (*#PAR*)
END_VAR
VAR_OUTPUT
Active : BOOL; (*The function block's output ConfigIdent can be used.*) (* *) (*#PAR*)
Busy : BOOL; (*The function block is busy and must continue to be called.*) (* *) (*#PAR*)
Error : BOOL; (*An error occurred during operation. The function block must be disabled to get out of the error state.*) (* *) (*#PAR*)
StatusID : DINT; (*Status information*) (* *) (*#PAR*)
ConfigIdent : CoTraceConfigIdentType; (*This ident can be used by a trace recorder function block and by other function blocks of this library to modify the trace configuration.*) (* *) (*#CMD*)
END_VAR
VAR
Internal : CoTraceMemCtxInternalType; (*Data for internal use*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CoTraceConfigSetTiming (*This function block allows to set the timing parameters of a trace configuration.
For a successful execution of this function block a CoTraceConfigCreate function block needs to be enabled and to provide a valid ConfigIdent as input.
This function block is required to obtain a valid trace configuration for recording.
This function block is executed synchronously.*)
VAR_INPUT
Execute : BOOL; (*Execution of the function block begins on a rising edge of this input.*) (* *) (*#PAR*)
ConfigIdent : CoTraceConfigIdentType; (*The output "ConfigIdent" of an CoTraceConfigCreate function block has to be provided on the input.*) (* *) (*#PAR*)
TotalRecordingTime : REAL; (*Overall record time span in seconds.*) (* *) (*#PAR*)
TriggerOffsetTime : REAL; (*Offset-time between start of recording and trigger-event. Using a negative value for the TriggerOffsetTime allows to record values before a start trigger is detected.
DNE(<img src="CoTraceConfigSetTiming\CoTraceSetTiming.png">)DNE
1... First start trigger is detected*) (* *) (*#PAR*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*Execution successful. Function block is finished.*) (* *) (*#PAR*)
Busy : BOOL; (*The function block is busy and must continue to be called.*) (* *) (*#PAR*)
Error : BOOL; (*An error occurred during operation. The function block must be disabled to get out of the error state.*) (* *) (*#PAR*)
StatusID : DINT; (*Status information*) (* *) (*#PAR*)
END_VAR
VAR
Internal : CoTraceExec1InternalType; (*Data for internal use*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CoTraceConfigOptionalParameter (*This function block allows to set optional trace configuration parameters for fine tuning.
For a successful execution of this function block a CoTraceConfigCreate function block needs to be enabled and to provide a valid ConfigIdent as input.
It is possible to add several parameter values to a trace configuration by executing this function block multiple times.
This function block is an optional part of a trace configuration.
This function block is executed synchronously.*)
VAR_INPUT
Execute : BOOL; (*Execution of the function block begins on a rising edge of this input.*) (* *) (*#PAR*)
ConfigIdent : CoTraceConfigIdentType; (*The output "ConfigIdent" of an CoTraceConfigCreate function block has to be provided on the input.*) (* *) (*#PAR*)
Parameter : CoTraceConfigParamEnum; (*This input is used to select the parameter, that should be set.*) (* *) (*#PAR*)
Value : REAL; (*This input defines the value of the parameter.*) (* *) (*#PAR*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*Execution successful. Function block is finished.*) (* *) (*#PAR*)
Busy : BOOL; (*The function block is busy and must continue to be called.*) (* *) (*#PAR*)
Error : BOOL; (*An error occurred during operation. The function block must be disabled to get out of the error state.*) (* *) (*#PAR*)
StatusID : DINT; (*Status information*) (* *) (*#PAR*)
END_VAR
VAR
Internal : CoTraceExec1InternalType; (*Data for internal use*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CoTraceConfigAddDataPoint (*This function block allows to add a DataPoint to a trace configuration.
For a successful execution of this function block a CoTraceConfigCreate function block needs to be enabled and to provide a valid ConfigIdent as input.
It is possible to add several DataPoints to a trace configuration by executing this function block multiple times.
At least one DataPoint has to be added in order to obtain a valid trace configuration.
Limitations:
- A maximum of 10 DataPoints per ACOPOS channel/axis may be added.*)
VAR_INPUT
Execute : BOOL; (*Execution of the function block begins on a rising edge of this input.*) (* *) (*#PAR*)
ConfigIdent : CoTraceConfigIdentType; (*The output "ConfigIdent" of an CoTraceConfigCreate function block has to be provided on the input.*) (* *) (*#PAR*)
DataPointName : STRING[767]; (*Fully qualified identification of the DataPoint that is to be recorded.
For global variables on the PLC: "<variable name>"
For local variables on the PLC: "<program name>:<variable name>"
For DataPoints on ACOPOS drives: "*ACP:<network node/address>_Axis<channel number>:<parid number>" example: "*ACP:IF3.ST2_Axis1:355"
For global variables on the PLC in application modules: "<application module>::<variable name>"
For local variables on the PLC in application modules: "<application module>::<program name>:<variable name>" *) (* *) (*#PAR*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*Execution successful. Function block is finished.*) (* *) (*#PAR*)
Busy : BOOL; (*The function block is busy and must continue to be called.*) (* *) (*#PAR*)
Error : BOOL; (*An error occurred during operation. The function block must be disabled to get out of the error state.*) (* *) (*#PAR*)
StatusID : DINT; (*Status information*) (* *) (*#PAR*)
END_VAR
VAR
Internal : CoTraceExec1InternalType; (*Data for internal use*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CoTraceConfigAddStartTrigger (*This function block allows to add a start trigger to a trace configuration.
For a successful execution of this function block a CoTraceConfigCreate function block needs to be enabled and to provide a valid ConfigIdent as input.
This function block is an optional part of a trace configuration.
The start trigger can also be actuated manually using the "ForceStartTrigger" input of an CoTraceRecorder function block.
Limitations:
- Only one StartTrigger per ACOPOS channel/axis can be applied.*)
VAR_INPUT
Execute : BOOL; (*Execution of the function block begins on a rising edge of this input.*) (* *) (*#PAR*)
ConfigIdent : CoTraceConfigIdentType; (*The output "ConfigIdent" of an CoTraceConfigCreate function block has to be provided on the input.*) (* *) (*#PAR*)
DataPointName : STRING[767]; (*Fully qualified identification of the DataPoint that is to be recorded.
For global variables on the PLC: "<variable name>"
For local variables on the PLC: "<program name>:<variable name>"
For DataPoints on ACOPOS drives: "*ACP:<network node/address>_Axis<channel number>:<parid number>" example: "*ACP:IF3.ST2_Axis1:355"
For global variables on the PLC in application modules: "<application module>::<variable name>"
For local variables on the PLC in application modules: "<application module>::<program name>:<variable name>" *) (* *) (*#PAR*)
Condition : CoTraceTriggerConditionEnum; (*Defines the start trigger condition.*) (* *) (*#PAR*)
Threshold : REAL; (*Threshold, further information: DNE(<a xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" href="Data types and constants\Enumerators\CoTraceTriggerConditionEnum.html">CoTraceTriggerConditionEnum</a>)DNE*) (* *) (*#PAR*)
Window : REAL; (*Window, further information: DNE(<a xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" href="Data types and constants\Enumerators\CoTraceTriggerConditionEnum.html">CoTraceTriggerConditionEnum</a>)DNE*) (* *) (*#PAR*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*Execution successful. Function block is finished.*) (* *) (*#PAR*)
Busy : BOOL; (*The function block is busy and must continue to be called.*) (* *) (*#PAR*)
Error : BOOL; (*An error occurred during operation. The function block must be disabled to get out of the error state.*) (* *) (*#PAR*)
StatusID : DINT; (*Status information*) (* *) (*#PAR*)
END_VAR
VAR
Internal : CoTraceExec1InternalType; (*Data for internal use*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CoTraceConfigAddStartTriggerExt (*This function block allows to add a start trigger to a trace configuration.
For a successful execution of this function block a CoTraceConfigCreate function block needs to be enabled and to provide a valid ConfigIdent as input.
This function block is an optional part of a trace configuration.
The start trigger can also be actuated manually using the "ForceStartTrigger" input of an CoTraceRecorder function block.
Limitations:
- Only one StartTrigger per ACOPOS channel/axis can be applied.*)
VAR_INPUT
Execute : BOOL; (*Execution of the function block begins on a rising edge of this input.*) (* *) (*#PAR*)
ConfigIdent : CoTraceConfigIdentType; (*The output "ConfigIdent" of an CoTraceConfigCreate function block has to be provided on the input.*) (* *) (*#PAR*)
DataPointName : STRING[767]; (*Fully qualified identification of the DataPoint that is to be recorded.
For global variables on the PLC: "<variable name>"
For local variables on the PLC: "<program name>:<variable name>"
For DataPoints on ACOPOS drives: "*ACP:<network node/address>_Axis<channel number>:<parid number>" example: "*ACP:IF3.ST2_Axis1:355"
For global variables on the PLC in application modules: "<application module>::<variable name>"
For local variables on the PLC in application modules: "<application module>::<program name>:<variable name>" *) (* *) (*#PAR*)
Condition : CoTraceTriggerConditionEnum; (*Defines the start trigger condition.*) (* *) (*#PAR*)
Threshold : LREAL; (*Threshold, further information: DNE(<a xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" href="Data types and constants\Enumerators\CoTraceTriggerConditionEnum.html">CoTraceTriggerConditionEnum</a>)DNE*) (* *) (*#PAR*)
Window : LREAL; (*Window, further information: DNE(<a xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" href="Data types and constants\Enumerators\CoTraceTriggerConditionEnum.html">CoTraceTriggerConditionEnum</a>)DNE*) (* *) (*#PAR*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*Execution successful. Function block is finished.*) (* *) (*#PAR*)
Busy : BOOL; (*The function block is busy and must continue to be called.*) (* *) (*#PAR*)
Error : BOOL; (*An error occurred during operation. The function block must be disabled to get out of the error state.*) (* *) (*#PAR*)
StatusID : DINT; (*Status information*) (* *) (*#PAR*)
END_VAR
VAR
Internal : CoTraceExec1InternalType; (*Data for internal use*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CoTraceRecorder (*This function block records data according to the applied trace configuration.
When the recording is finished and the data is available the DataIdent is used as reference for the read-out by the function blocks CoTraceDataReadRecords or CoTraceDataSaveCsv.
Limitations:
- Only one instance of this function block can be recording at a certain time. As soon as DataAvailable is true, the usage of further instances associated with different ConfigIdents is possible.
- Only one instance of this function block can be enabled using a certain ConfigIdent and therefore being connected to a certain CoTraceConfigCreate function block.*)
VAR_INPUT
Enable : BOOL; (*Once this function block is enabled, the trace configuration provided on the ConfigIdent input is installed automatically.
TraceRecords can only be read as long as this function block is enabled.
All recorded trace data, are deleted if this function block is disabled.*) (* *) (*#PAR*)
ConfigIdent : CoTraceConfigIdentType; (*The output "ConfigIdent" of an CoTraceConfigCreate function block has to be provided on the input.*) (* *) (*#PAR*)
ForceStartTrigger : BOOL; (*This level sensitive input can be used as a manual start trigger.
The configured "TriggerOffsetTime" is still active and may delay the start.
The output "WaitStartTrigger" needs to be TRUE for this input to have an effect.*) (* *) (*#CMD*)
ForceStop : BOOL; (*This level sensitive input forces the trace to stop the recording process immediately.
The output "WaitStopTrigger" needs to be TRUE for this input to have an effect.*) (* *) (*#CMD#OPT*)
END_VAR
VAR_OUTPUT
Active : BOOL; (*The function block is running.*) (* *) (*#PAR*)
Busy : BOOL; (*The function block is busy and must continue to be called.*) (* *) (*#PAR*)
Error : BOOL; (*An error occurred during operation. The function block must be disabled to get out of the error state.*) (* *) (*#PAR*)
StatusID : DINT; (*Status information*) (* *) (*#PAR*)
DataIdent : CoTraceDataIdentType; (*This ident can be used by other function blocks of this library to read or save the recorded data.*) (* *) (*#CMD*)
ProcessingConfig : BOOL; (*The trace configuration is being applied at the moment.*) (* *) (*#CMD#OPT*)
WaitsOnStartTrigger : BOOL; (*The configuration is applied and the recorder is waiting for a start trigger.*) (* *) (*#CMD#OPT*)
WaitsOnStopEvent : BOOL; (*Signals, that recording is currently in progress. Stop events include: total recording time reached, memory full, ForceStop. *) (* *) (*#CMD#OPT*)
ProcessingData : BOOL; (*Indicates, that recorded data is gathered and processed.*) (* *) (*#CMD#OPT*)
DataAvailable : BOOL; (*All recorded data is available to be read or saved.*) (* *) (*#PAR*)
TraceStatus : CoTraceRecorderStateEnum; (*Provides additional information about the internal state of the recorder.
It is possible that multiple states are run through during one execution cycle, in order to increase execution speed.*) (* *) (*#PAR*)
END_VAR
VAR
Internal : CoTraceMemCtxInternalType; (*Data for internal use*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CoTraceDataReadRecords (*This function block can be used to read the recorded data.
For a successful execution of this function block a CoTraceRecorder function block needs to be enabled. In addition, a valid DataIdent needs to be provided on the DataIdent input.
The records are read in blocks. One block comprises either the data sampled on the PLC or the data sampled on one ACOPOS channel/axis.
Within each block, the records are sorted by recording time.
This function block can be executed multiple times during one task class cycle. This allows to reduce the overall reading time.*)
VAR_INPUT
Execute : BOOL; (*Execution of the function block begins on a rising edge of this input.*) (* *) (*#PAR*)
DataIdent : CoTraceDataIdentType; (*The output "DataIdent" of an CoTraceRecorder function block has to be provided on the input.
The output "DataAvailable" of the CoTraceRecorder function block has to be TRUE when executing this function block.*) (* *) (*#PAR*)
First : BOOL; (*The read process is started from the first element, if this input is set to true*) (* *) (*#PAR*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*Execution successful. Function block is finished.*) (* *) (*#PAR*)
Busy : BOOL; (*The function block is busy and must continue to be called.*) (* *) (*#PAR*)
Error : BOOL; (*An error occurred during operation. The function block must be disabled to get out of the error state.*) (* *) (*#PAR*)
StatusID : DINT; (*Status information*)(* *) (*#PAR*)
RelativeTime : LREAL; (*Recording-time in seconds relative to starting trigger-event.*)(* *) (*#PAR*)
SiosTimeUsec : UDINT; (*Time in microseconds-ticks, when the records were sampled.*)(* *) (*#CMD#OPT*)
UtcEpochTime : DATE_AND_TIME; (*Absolute recording-time of these data as UTC-value.*)(* *) (*#PAR*)
NanoSecTimeOffset : UDINT; (*Fraction-part of absolute recording-time (UtcEpochTime) as offset in nanoseconds.*)(* *) (*#PAR*)
Records : ARRAY[0..9] OF CoTraceDataRecordType; (*Array of recorded data. All data in the array was recorded at the same time.*) (* *) (*#PAR*)
Last : BOOL; (*Is true, if the record currently being read is the last of the sampled records.*) (* *) (*#PAR*)
END_VAR
VAR
Internal : CoTraceMemCtxInternalType; (*Data for internal use*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK CoTraceDataSaveCsv (*This function block can be used to save the recorded data to comma-separated values (CSV) file(s).
For a successful execution of this function block a CoTraceRecorder function block needs to be enabled and to provide a valid DataIdent as input until the data is saved.
The FileDevice must be configured in the CPU's configuration, see also the functional description of this function block.
Each data block comprising either all data sampled on the PLC or the data sampled on one ACOPOS channel/axis will lead to an separate CSV file.
The FileName is the base name used for the naming scheme of the produced output files.
The naming of the CSV files follows the scheme <FileName> + 3 digit counting integer + ".csv".
In an additional DAT file information on the content of all CSV files is provided.
The files can then be accessed via FTP. A DNE(<a href="../../projectmanagement/systemconfiguration/sg4/cpu/projectorganisation_systemconfiguration_sg4_cpu_ftpserv.html">FTP server</a>)DNE including users can be configured in the CPU's configuration.
It might be appropriate to use a DNE(<a href="../../automationruntime/enhancedtransfer/handling/et_settingsbeforebuild.html">user partition</a>)DNE as FileDevice.
*)
VAR_INPUT
Execute : BOOL; (*Execution of the function block begins on a rising edge of this input.*) (* *) (*#PAR*)
DataIdent : CoTraceDataIdentType; (*The output "DataIdent" of an CoTraceRecorder function block has to be provided on the input.
The CoTraceRecorder needs to be enabled and the output DataAvailable TRUE, until the data is saved.*) (* *) (*#PAR*)
FileDevice : STRING[128]; (*Name of the file device as specified in the DNE(<a href="../../projectmanagement/systemconfiguration/sg4/cpu/projectorganisation_systemconfiguration_sg4_cpu_files.html">CPU configuration file</a>)DNE similar as in the case of the DNE(<a href="../../libraries/fileio/gen/filedevice.html">FileIO library</a>)DNE*) (* *) (*#PAR*)
FileName : STRING[128]; (*base name of the CSV file(s)*) (* *) (*#PAR*)
ColumnSeparator : STRING[1]; (*Character to be used as an separator between the columns in the CSV file (typical english setting is ",", typical german setting is ";")*) (* *) (*#PAR*)
DecimalMark : STRING[1]; (*Character for the decimal mark (typical default setting is ".", german setting is sometimes ",")*) (* *) (*#PAR*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*Execution successful. Function block is finished.*) (* *) (*#PAR*)
Busy : BOOL; (*The function block is busy and must continue to be called.*) (* *) (*#PAR*)
Error : BOOL; (*An error occurred during operation. The function block must be disabled to get out of the error state.*) (* *) (*#PAR*)
StatusID : DINT; (*Status information*)(* *) (*#PAR*)
END_VAR
VAR
Internal : CoTraceExec1InternalType; (*Data for internal use*)
END_VAR
END_FUNCTION_BLOCK

View File

@@ -0,0 +1,122 @@
(********************************************************************
* COPYRIGHT (C) BERNECKER + RAINER, AUSTRIA, A-5142 EGGELSBERG
********************************************************************
* Library: CoTrace
* File: CoTrace.typ
********************************************************************
* Declaration of data-types of library CoTrace
********************************************************************)
TYPE
CoTraceConfigIdentType : UDINT; (*This type represents a trace-configuration*)
CoTraceDataIdentType : UDINT; (*This type represents recorded trace-data*)
CoTraceTriggerConditionEnum :
(
coTRACE_IN_WINDOW_EVENT := 20, (*The trigger event occurs if the value of the DataPoint meets the following conditions:
"value DNE(&ge;)DNE threshold + window" and
"value DNE(&le;)DNE threshold - window"
DNE(<img src="IN_WINDOW.png">)DNE*)
coTRACE_OUT_OF_WINDOW_EVENT := 30, (*The trigger event occurs if the value of the DataPoint meets the following conditions:
"value DNE(&gt;)DNE threshold + window" or
"value DNE(&lt;)DNE threshold - window"
DNE(<img src="OUT_WINDOW.png">)DNE*)
coTRACE_ABOVE_THRESHOLD_EVENT := 40, (*The trigger event occurs if the value of the DataPoint meets the following condition:
"value DNE(&gt;)DNE threshold + window"
DNE(<img src="ABOVE_WINDOW.png">)DNE*)
coTRACE_BELOW_THRESHOLD_EVENT := 50, (*The trigger event occurs if the value of the DataPoint meets the following condition:
"value DNE(&lt;)DNE threshold - window"
DNE(<img src="BELOW_WINDOW.png">)DNE*)
coTRACE_ENTER_WINDOW_EVENT := 24, (*The trigger event occurs if the value for the DataPoint
goes below the upper window limit "threshold + window" or
goes above the lower window limit "threshold - window"
(after being outside the window before) and is then within the window. If the value of the value of the DataPoint is already within the window during trace activation, the trace is not yet started.
DNE(<img src="IN_WINDOW_ENTRY.png">)DNE*)
coTRACE_LEAVE_WINDOW_EVENT := 34, (*The trigger event occurs if the value for the DataPoint
goes above the upper window limit "threshold + window" or
goes below the lower window limit "threshold - window"
(after being inside the window before) and is then outside the window. If the value of the DataPoint is already outside the window during trace activation, the trace is not yet started.
DNE(<img src="OUT_WINDOW_ENTRY.png">)DNE*)
coTRACE_GOES_ABOVE_WINDOW_EVENT := 44, (*The trigger event occurs if the value of the DataPoint goes above the upper window limit "threshold + window".
If, during trace activation, the value of the trigger parameter is already above the window, the trace is not yet started.
DNE(<img src="ABOVE_WINDOW_ENTRY.png">)DNE*)
coTRACE_GOES_BELOW_WINDOW_EVENT := 54 (*The trigger event occurs if the value of the DataPoint goes below the lower window limit "threshold - window".
If, during trace activation, the value of the trigger parameter is already below the window, the trace is not yet started.
DNE(<img src="BELOW_WINDOW_ENTRY.png">)DNE*)
);
(*Enumeration of trigger conditions*)
CoTraceRecorderStateEnum :
(
coTRACE_DISABLED_STATE := 1, (* The FB is invalid or disabled *)
coTRACE_NOT_CONFIGURED_STATE := 2, (* The trace configuration is empty; no DataPoint has been added yet.*)
coTRACE_READY_TO_APPLY_STATE := 3, (* The trace configuration contains one or more DataPoint(s) and may be ready to be applied. *)
coTRACE_CONFIG_PROCESSING_STATE := 10, (* The trace configuration is being installed. *)
coTRACE_CONFIG_APPLIED_STATE := 11, (* The applied trace configuration is active. *)
coTRACE_WAIT_START_TRIGGER_STATE := 20, (* Recording is in progress. Waiting for start trigger. *)
coTRACE_WAIT_STOP_EVENT_STATE := 21, (* Recording is in progress. Waiting for stop event. *)
coTRACE_PROCESS_DATA_STATE := 22, (* Recording is completed. The recorded data is gathered. *)
coTRACE_DATA_AVAILABLE_STATE := 23, (* Recording is completed. All recorded data is available for reading. *)
coTRACE_CONFIGURE_FAILED_STATE := 80, (* The trace configuration could not be applied.
Error state: Please disable the FB for at least one cycle.*)
coTRACE_RECORD_ABORTED_STATE := 81, (* Reading of trace records was aborted due to unknown reason.
Error state: Please disable the FB for at least one cycle.*)
coTRACE_RECORD_FAILURE_STATE := 82 (* A failure during applying or processing a trace-configuration occurred.
Error state: Please disable the FB for at least one cycle.*)
);
(*Enumeration of trace-processing states.*)
CoTraceConfigParamEnum :
(
coTRACE_PARAM_PV_TASK_CLASS := 1, (* This parameter can be used to set the desired task-class for PV-traces. The value is of the data-type REAL, but an integer number must be supplied (e.g. a value of 1.0 refers to TaskClass Cyclic #1, a value of 1.1 is invalid and would result in an error). *)
coTRACE_PARAM_TOTAL_RECORD_TIME := 2, (* This parameter can be used to configure the total recording time over all involved data-sources. The value defines the sample time in [seconds].*)
coTRACE_PARAM_TRIG_OFFSET_TIME := 3, (* This parameter can be used to set a time of record data to be hold before (negative value) or after (positive value) a trigger-event occurred.*)
coTRACE_PARAM_ACP_BUFFER_SIZE := 10, (* This parameter represents the actual ACOPOS trace-buffer size in kilobyte (1 kilobyte is 1024 byte). This optional parameter should be set, if the ACOPOS trace-buffer size was manipulated by setting the respective ParId.
The default value of the ACOPOS trace-buffer size is (32.0 KB = 32768 byte).
The value is of the data-type REAL, but an integer number must be supplied (e.g. a value of 64.0 refers to 64KB, a value of 64.1 is invalid and would result in an error).*)
coTRACE_PARAM_ACP_SAMPLE_TIME := 11, (* This parameter can be used to set the sample time of an ACOPOS trace. The value defines the time in [seconds].
The defined sample time has a higher priority than the TotalRecordingTime. Defining a small sample time (leading to a high frequency) can have the effect that the recording is stopped as soon as the trace-buffer is full (prior to reaching the "TotalRecordingTime").*)
coTRACE_PARAM_PLC_SAMPLE_TIME := 5 (* This parameter defines a preferred PLC sample-interval in [seconds]. This optional parameter is used to calculate a clock-divider; I.e., that recording occurs as multiple of the monoton clock of the configured task-class.
The default value of 0.0 specifies, that PLC-values are recorded on every cycle. Each other (positive) value will be used as hint to do recording close to this configured interval. *)
);
(*Enumeration of trace-parameters, to setup or specify optional values to an CoTrace-configuration.*)
CoTraceDataRecordType : STRUCT (*This structure-type represents a single data record*)
DataPointName : STRING[767]; (*string-pointer to full identifier string of this DataPoint (read-only)*)
DataType : UINT; (*type of data-value; e.g. IEC_DATATYPE_UDINT IEC 61131-3 data types:
1 IEC_DATATYPE_BOOL 8 Bit containing a boolean value FALSE=0 oder TRUE=1
2 IEC_DATATYPE_SINT 8 Bit signed integer
3 IEC_DATATYPE_INT 16 Bit signed integer
4 IEC_DATATYPE_DINT 32 Bit signed integer
5 IEC_DATATYPE_USINT 8 Bit unsigned integer
6 IEC_DATATYPE_UINT 16 Bit unsigned integer
7 IEC_DATATYPE_UDINT 32 Bit unsigned integer
8 IEC_DATATYPE_REAL 32 Bit floating point number
9 IEC_DATATYPE_STRING Variable-length single-byte character string
10 IEC_DATATYPE_ULINT 64 Bit unsigned integer (not yet fully supported as IEC data type)
11 IEC_DATATYPE_DATE_AND_TIME 32 Bit of Date in Seconds since 01.01.1970 00:00:00 UTC
12 IEC_DATATYPE_TIME 32 Bit of Time in ms
13 IEC_DATATYPE_DATE 32 Bit of Date (only)
14 IEC_DATATYPE_LREAL 64 Bit floating point number
16 IEC_DATATYPE_TIME_OF_DAY UINT 32 Bit Time of day (only)
17 IEC_DATATYPE_BYTE Bit string of length 8
18 IEC_DATATYPE_WORD Bit string of length 16
19 IEC_DATATYPE_DWORD Bit string of length 32
20 IEC_DATATYPE_LWORD Bit string of length 64
21 IEC_DATATYPE_WSTRING Variable-length double-byte character string
23 IEC_DATATYPE_LINT 64 Bit signed integer (not yet fully supported as IEC data type)*)
DataPointer : UDINT; (*pointer (read-only) to data-value*)
END_STRUCT;
CoTraceExec1InternalType : STRUCT (*Internal structure-types for FB-processing*)
i_serno : UINT;
i_state : UINT;
Result : DINT;
END_STRUCT;
CoTraceMemCtxInternalType : STRUCT (*Internal structure-types for FB-processing*)
i_base : CoTraceExec1InternalType;
m_ctx : UDINT; (*internal reference; e.g. memory-pointer*)
END_STRUCT;
END_TYPE

View File

@@ -0,0 +1,143 @@
(********************************************************************
* COPYRIGHT (C) BERNECKER + RAINER, AUSTRIA, A-5142 EGGELSBERG
********************************************************************
* Library: CoTrace
* File: CoTrace.var
********************************************************************
* Declaration of constants for CoTrace-library; Ie. status-codes
********************************************************************)
VAR CONSTANT
coTRACE_ERR_OUT_OF_MEMORY : DINT := -1050673151; (*Not enough RAM memory available.
RAM memory is required for the following operations:
- CoTraceConfigLoad(): Loading a persistently stored configuration
- CoTraceConfigCreate(): Creating a new configuration in the RAM (very unlikely, hardly any memory required)
- CoTraceConfigAddDataPoint(), CoTraceConfigAddStartTrigger(),etc.: Adding parameters such as DataPoints of trigger conditions to an configuration
- CoTraceRecorder(): Processing/Activating the configuration (memory requirement depends on trace configuration and may be considerably large)
- CoTraceRecorder(): Collecting the data (memory requirement depends on trace configuration and may be considerably large)
- CoTraceDataSaveCsv(): Storing data (very unlikely, hardly any memory required)
Reaction on error:
The FB does not perform any action. The FB must be restarted.
Please check the overall RAM availability before retrying.
Solution:
If this error appears on the CoTraceRecorder() FB, increasing the sample time and reducing the total recording leads to lower memory consumption.
*)
coTRACE_ERR_INVALID_ARG : DINT := -2124414974; (*One or more input arguments are invalid.
Causes an solutions:
- CoTraceConfigAddStartTrigger(): The input "Window" is negative
- CoTraceConfigLoad(): Invalid configuration name provided.
- CoTraceDataSaveCsv(): Input "FileDevice" or "FileName" is empty
- CoTraceConfigAddDataPoint() and CoTraceConfigAddStartTrigger():
-- The DataPoint input contains an empty string
-- For DataPoints within the namespace "*ACP:" the syntax of the following string is invalid
- CoTraceConfigOptionalParameter(): The input "Parameter" is known , but input "Value" is out of range
*)
coTRACE_ERR_FAILED : DINT := -1050673149; (*Internal error occurred, please contact the B&R support.
Causes:
- CoTraceConfigAddStartTrigger() and CoTraceConfigAddDataPoint(): Internal error in the ACOPOS driver (the driver is available, but forwards an internal error)
- CoTraceConfigLoad(): Internal error within the B&R configuration system
- CoTraceDataSaveCsv(): Internal error (thread separation)
- CoTraceConfigOptionalParameter():
- CoTraceRecorder():
-- Internal error (system failure within the AR scheduler)
-- Internal error (.br-module containing the recoded data on ACOPOS drives not readable)
-- Internal error (recorded data on PLC unavailable)*)
coTRACE_ERR_ACCESS_DENIED : DINT := -2124414972; (*The "Ident" input is invalid (null)
Possible sources:
- CoTraceConfigAddStartTrigger()
- CoTraceConfigAddDataPoint()
- CoTraceConfigSetTiming()
- CoTraceConfigOptionalParameter()
- CoTraceDataSaveCsv()
- CoTraceDataReadRecords()
- CoTraceRecorder()*)
coTRACE_ERR_INVALID_IDENT : DINT := -2124414971; (*The Ident input is invalid (null)
Possible sources:
- CoTraceConfigAddStartTrigger()
- CoTraceConfigAddDataPoint()
- CoTraceConfigSetTiming()
- CoTraceConfigOptionalParameter()
- CoTraceDataSaveCsv()
- CoTraceDataReadRecords()
- CoTraceRecorder()*)
coTRACE_ERR_NOT_POSSIBLE : DINT := -2124414960; (*Action is not possible or system is in the wrong state.
Causes and solutions:
- CoTraceConfigAddStartTrigger() and CoTraceConfigAddDataPoint() and CoTraceConfigOptionalParameter(): Executed while a trace recorder FB is using this configuration. After disabling the recorder, the FB can be executed again.
- CoTraceRecorder(): Provided trace configuration is not valid, because the configuration does not contain any DataPoint. Solution: A DataPoints needs to be added to the trace configuration prior to enabling the recorder.
*)
coTRACE_ERR_UNKNOWN_PROVIDER : DINT := -2124414959; (*Data-provider is not supported.
Causes and solutions:
- CoTraceConfigAddStartTrigger() and CoTraceConfigAddDataPoint() and CoTraceConfigLoad(): Name of a DataPoint starts with *namespace:, but the given namespace is invalid. Solution: Check the namespace.
*)
coTRACE_ERR_INVALID_DP_NAME : DINT := -2124414958; (*DataPoint-name is invalid or unrecognized.
Causes and solutions:
- CoTraceConfigAddStartTrigger() and CoTraceConfigAddDataPoint() and CoTraceConfigLoad():
-- In the namespace "*ACP": the ParID is invalid, valid range: 1-65534
-- In the namespace "*ACP": Channel Number is invalid, valid range 1-99
-- PV: No PV with matching name found
*)
coTRACE_ERR_NOT_AVAILABLE : DINT := -2124414957; (*Resource provider is not available.
Causes:
- CoTraceConfigAddStartTrigger() and CoTraceConfigAddDataPoint() and CoTraceConfigLoad() and CoTraceRecorder(): DataPoint with "*ACP:" namespace used, but a suitable driver/provider for this namespace is not installed.
*)
coTRACE_INF_ALREADY_DONE : DINT := 1096810516; (*Action already performed.
Causes:
- CoTraceConfigAddStartTrigger() and CoTraceConfigAddDataPoint(): This DataPoint or exact start trigger condition is already part of the configuration
No reaction required. No duplicate of DataPoint or start trigger condition added.
*)
coTRACE_ERR_UNSUPPORTED_TYPE : DINT := -2124414955; (*Variable type or size is not supported.
Causes:
- CoTraceConfigAddStartTrigger() and CoTraceConfigAddDataPoint() and CoTraceConfigLoad():
-- PV-DataPoint: Given PV name is valid, but the data type is not supported. Only native numeric data types are supported. Only single array elements are supported.
*)
coTRACE_ERR_INCOMPLETE_CONFIG : DINT := -2124414954; (*Action aborted due to an incomplete configuration.
Causes:
- CoTraceConfigAddStartTrigger() and CoTraceConfigAddDataPoint() and CoTraceConfigLoad():
-- DataPoint with "*ACP:" namespace in start trigger condition is defined, but no DataPoint is to be recorded within the "*ACP:" namespace
-- Configured start trigger condition with incomplete parameters
- CoTraceRecorder():
-- No DataPoints are in the configuration
-- TotalRecordingTime is 0 or undefined
*)
coTRACE_ERR_REF_NOT_FOUND : DINT := -2124414953; (*Referenced resource not found or not configured.
Causes:
- CoTraceConfigAddStartTrigger(), CoTraceConfigAddDataPoint() or CoTraceConfigLoad(): DataPoint with "*ACP:" namespace references a module or channel, which address is currently not configured.
*)
coTRACE_ERR_NOT_EXISTS : DINT := -2124414952; (*Record not found or does not exist.
- CoTraceDataSaveCsv() and CoTraceDataReadRecords(): No data available.
Possible cause:
Trace recording has been stopped before the first value has been recorded.
*)
coTRACE_ERR_END_REACHED : DINT := -2124414951; (*No further suitable entry found.
Causes:
- CoTraceDataReadRecords(): Reading next records tried after last record has already been read.
*)
coTRACE_ERR_FILEIO_FAILED : DINT := -2124414950; (*File-I/O operation failed.
Causes:
- CoTraceDataSaveCsv():
-- Csv-file could not be created
-- Writing into the created csv-file failed
For further information see error number of file IO functionality provided in the description text of the EventLog entry. The EventID of this entry is -2124414950.
*)
END_VAR

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,326 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _COTRACE_
#define _COTRACE_
#ifdef __cplusplus
extern "C" {
#endif
#include <bur/plctypes.h>
#ifndef _BUR_PUBLIC
#define _BUR_PUBLIC
#endif
/* Constants */
#if defined(_REPLACE_CONST) || defined(BUILD_COTRACE)
#define coTRACE_ERR_FILEIO_FAILED (-2124414950) /*!< File-I/O operation failed*/
#define coTRACE_ERR_END_REACHED (-2124414951) /*!< no further suitable entry found*/
#define coTRACE_ERR_NOT_EXISTS (-2124414952) /*!< record not found; doesn't exist*/
#define coTRACE_ERR_REF_NOT_FOUND (-2124414953) /*!< Reference resource not found/configured*/
#define coTRACE_ERR_INCOMPLETE_CONFIG (-2124414954) /*!< aborted due incomplete configuration*/
#define coTRACE_ERR_UNSUPPORTED_TYPE (-2124414955) /*!< unsupported variable-type or -size*/
#define coTRACE_INF_ALREADY_DONE 1096810516 /*!< execution/task already performed*/
#define coTRACE_ERR_NOT_AVAILABLE (-2124414957) /*!< resource (provider) not available*/
#define coTRACE_ERR_INVALID_DP_NAME (-2124414958) /*!< invalid or unrecognized DP-name*/
#define coTRACE_ERR_UNKNOWN_PROVIDER (-2124414959) /*!< data-provider is not supported*/
#define coTRACE_ERR_NOT_POSSIBLE (-2124414960) /*!< action not (yet) possible; wrong state*/
#define coTRACE_ERR_INVALID_IDENT (-2124414971) /*!< Invalid Ident-argument detected*/
#define coTRACE_ERR_ACCESS_DENIED (-2124414972) /*!< Resource-access denied*/
#define coTRACE_ERR_FAILED (-1050673149) /*!< Internal processing failure*/
#define coTRACE_ERR_INVALID_ARG (-2124414974) /*!< One or more arguments are invalid*/
#define coTRACE_ERR_OUT_OF_MEMORY (-1050673151) /*!< Failed to allocate necessary memory*/
#else
#ifndef _GLOBAL_CONST
#define _GLOBAL_CONST _WEAK const
#endif
_GLOBAL_CONST signed long coTRACE_ERR_FILEIO_FAILED;
_GLOBAL_CONST signed long coTRACE_ERR_END_REACHED;
_GLOBAL_CONST signed long coTRACE_ERR_NOT_EXISTS;
_GLOBAL_CONST signed long coTRACE_ERR_REF_NOT_FOUND;
_GLOBAL_CONST signed long coTRACE_ERR_INCOMPLETE_CONFIG;
_GLOBAL_CONST signed long coTRACE_ERR_UNSUPPORTED_TYPE;
_GLOBAL_CONST signed long coTRACE_INF_ALREADY_DONE;
_GLOBAL_CONST signed long coTRACE_ERR_NOT_AVAILABLE;
_GLOBAL_CONST signed long coTRACE_ERR_INVALID_DP_NAME;
_GLOBAL_CONST signed long coTRACE_ERR_UNKNOWN_PROVIDER;
_GLOBAL_CONST signed long coTRACE_ERR_NOT_POSSIBLE;
_GLOBAL_CONST signed long coTRACE_ERR_INVALID_IDENT;
_GLOBAL_CONST signed long coTRACE_ERR_ACCESS_DENIED;
_GLOBAL_CONST signed long coTRACE_ERR_FAILED;
_GLOBAL_CONST signed long coTRACE_ERR_INVALID_ARG;
_GLOBAL_CONST signed long coTRACE_ERR_OUT_OF_MEMORY;
#endif
/* Datatypes and datatypes of function blocks */
typedef enum CoTraceTriggerConditionEnum
{
coTRACE_IN_WINDOW_EVENT = 20,
coTRACE_OUT_OF_WINDOW_EVENT = 30,
coTRACE_ABOVE_THRESHOLD_EVENT = 40,
coTRACE_BELOW_THRESHOLD_EVENT = 50,
coTRACE_ENTER_WINDOW_EVENT = 24,
coTRACE_LEAVE_WINDOW_EVENT = 34,
coTRACE_GOES_ABOVE_WINDOW_EVENT = 44,
coTRACE_GOES_BELOW_WINDOW_EVENT = 54
} CoTraceTriggerConditionEnum;
typedef enum CoTraceRecorderStateEnum
{
coTRACE_DISABLED_STATE = 1,
coTRACE_NOT_CONFIGURED_STATE = 2,
coTRACE_READY_TO_APPLY_STATE = 3,
coTRACE_CONFIG_PROCESSING_STATE = 10,
coTRACE_CONFIG_APPLIED_STATE = 11,
coTRACE_WAIT_START_TRIGGER_STATE = 20,
coTRACE_WAIT_STOP_EVENT_STATE = 21,
coTRACE_PROCESS_DATA_STATE = 22,
coTRACE_DATA_AVAILABLE_STATE = 23,
coTRACE_CONFIGURE_FAILED_STATE = 80,
coTRACE_RECORD_ABORTED_STATE = 81,
coTRACE_RECORD_FAILURE_STATE = 82
} CoTraceRecorderStateEnum;
typedef enum CoTraceConfigParamEnum
{
coTRACE_PARAM_PV_TASK_CLASS = 1,
coTRACE_PARAM_TOTAL_RECORD_TIME = 2,
coTRACE_PARAM_TRIG_OFFSET_TIME = 3,
coTRACE_PARAM_ACP_BUFFER_SIZE = 10,
coTRACE_PARAM_ACP_SAMPLE_TIME = 11,
coTRACE_PARAM_PLC_SAMPLE_TIME = 5
} CoTraceConfigParamEnum;
typedef struct CoTraceDataRecordType
{
plcstring DataPointName[768];
unsigned short DataType;
unsigned long DataPointer;
} CoTraceDataRecordType;
typedef struct CoTraceExec1InternalType
{
unsigned short i_serno;
unsigned short i_state;
signed long Result;
} CoTraceExec1InternalType;
typedef struct CoTraceMemCtxInternalType
{
struct CoTraceExec1InternalType i_base;
unsigned long m_ctx;
} CoTraceMemCtxInternalType;
typedef unsigned long CoTraceConfigIdentType;
typedef unsigned long CoTraceDataIdentType;
typedef struct CoTraceConfigCreate
{
/* VAR_OUTPUT (analog) */
signed long StatusID;
CoTraceConfigIdentType ConfigIdent;
/* VAR (analog) */
struct CoTraceMemCtxInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Enable;
/* VAR_OUTPUT (digital) */
plcbit Active;
plcbit Busy;
plcbit Error;
} CoTraceConfigCreate_typ;
typedef struct CoTraceConfigLoad
{
/* VAR_INPUT (analog) */
plcstring Name[33];
/* VAR_OUTPUT (analog) */
signed long StatusID;
CoTraceConfigIdentType ConfigIdent;
/* VAR (analog) */
struct CoTraceMemCtxInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Enable;
/* VAR_OUTPUT (digital) */
plcbit Active;
plcbit Busy;
plcbit Error;
} CoTraceConfigLoad_typ;
typedef struct CoTraceConfigSetTiming
{
/* VAR_INPUT (analog) */
CoTraceConfigIdentType ConfigIdent;
float TotalRecordingTime;
float TriggerOffsetTime;
/* VAR_OUTPUT (analog) */
signed long StatusID;
/* VAR (analog) */
struct CoTraceExec1InternalType Internal;
/* VAR_INPUT (digital) */
plcbit Execute;
/* VAR_OUTPUT (digital) */
plcbit Done;
plcbit Busy;
plcbit Error;
} CoTraceConfigSetTiming_typ;
typedef struct CoTraceConfigOptionalParameter
{
/* VAR_INPUT (analog) */
CoTraceConfigIdentType ConfigIdent;
enum CoTraceConfigParamEnum Parameter;
float Value;
/* VAR_OUTPUT (analog) */
signed long StatusID;
/* VAR (analog) */
struct CoTraceExec1InternalType Internal;
/* VAR_INPUT (digital) */
plcbit Execute;
/* VAR_OUTPUT (digital) */
plcbit Done;
plcbit Busy;
plcbit Error;
} CoTraceConfigOptionalParameter_typ;
typedef struct CoTraceConfigAddDataPoint
{
/* VAR_INPUT (analog) */
CoTraceConfigIdentType ConfigIdent;
plcstring DataPointName[768];
/* VAR_OUTPUT (analog) */
signed long StatusID;
/* VAR (analog) */
struct CoTraceExec1InternalType Internal;
/* VAR_INPUT (digital) */
plcbit Execute;
/* VAR_OUTPUT (digital) */
plcbit Done;
plcbit Busy;
plcbit Error;
} CoTraceConfigAddDataPoint_typ;
typedef struct CoTraceConfigAddStartTrigger
{
/* VAR_INPUT (analog) */
CoTraceConfigIdentType ConfigIdent;
plcstring DataPointName[768];
enum CoTraceTriggerConditionEnum Condition;
float Threshold;
float Window;
/* VAR_OUTPUT (analog) */
signed long StatusID;
/* VAR (analog) */
struct CoTraceExec1InternalType Internal;
/* VAR_INPUT (digital) */
plcbit Execute;
/* VAR_OUTPUT (digital) */
plcbit Done;
plcbit Busy;
plcbit Error;
} CoTraceConfigAddStartTrigger_typ;
typedef struct CoTraceConfigAddStartTriggerExt
{
/* VAR_INPUT (analog) */
CoTraceConfigIdentType ConfigIdent;
plcstring DataPointName[768];
enum CoTraceTriggerConditionEnum Condition;
double Threshold;
double Window;
/* VAR_OUTPUT (analog) */
signed long StatusID;
/* VAR (analog) */
struct CoTraceExec1InternalType Internal;
/* VAR_INPUT (digital) */
plcbit Execute;
/* VAR_OUTPUT (digital) */
plcbit Done;
plcbit Busy;
plcbit Error;
} CoTraceConfigAddStartTriggerExt_typ;
typedef struct CoTraceRecorder
{
/* VAR_INPUT (analog) */
CoTraceConfigIdentType ConfigIdent;
/* VAR_OUTPUT (analog) */
signed long StatusID;
CoTraceDataIdentType DataIdent;
enum CoTraceRecorderStateEnum TraceStatus;
/* VAR (analog) */
struct CoTraceMemCtxInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Enable;
plcbit ForceStartTrigger;
plcbit ForceStop;
/* VAR_OUTPUT (digital) */
plcbit Active;
plcbit Busy;
plcbit Error;
plcbit ProcessingConfig;
plcbit WaitsOnStartTrigger;
plcbit WaitsOnStopEvent;
plcbit ProcessingData;
plcbit DataAvailable;
} CoTraceRecorder_typ;
typedef struct CoTraceDataReadRecords
{
/* VAR_INPUT (analog) */
CoTraceDataIdentType DataIdent;
/* VAR_OUTPUT (analog) */
signed long StatusID;
double RelativeTime;
unsigned long SiosTimeUsec;
plcdt UtcEpochTime;
unsigned long NanoSecTimeOffset;
struct CoTraceDataRecordType Records[10];
/* VAR (analog) */
struct CoTraceMemCtxInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Execute;
plcbit First;
/* VAR_OUTPUT (digital) */
plcbit Done;
plcbit Busy;
plcbit Error;
plcbit Last;
} CoTraceDataReadRecords_typ;
typedef struct CoTraceDataSaveCsv
{
/* VAR_INPUT (analog) */
CoTraceDataIdentType DataIdent;
plcstring FileDevice[129];
plcstring FileName[129];
plcstring ColumnSeparator[2];
plcstring DecimalMark[2];
/* VAR_OUTPUT (analog) */
signed long StatusID;
/* VAR (analog) */
struct CoTraceExec1InternalType Internal;
/* VAR_INPUT (digital) */
plcbit Execute;
/* VAR_OUTPUT (digital) */
plcbit Done;
plcbit Busy;
plcbit Error;
} CoTraceDataSaveCsv_typ;
/* Prototyping of functions and function blocks */
_BUR_PUBLIC void CoTraceConfigCreate(struct CoTraceConfigCreate* inst);
_BUR_PUBLIC void CoTraceConfigLoad(struct CoTraceConfigLoad* inst);
_BUR_PUBLIC void CoTraceConfigSetTiming(struct CoTraceConfigSetTiming* inst);
_BUR_PUBLIC void CoTraceConfigOptionalParameter(struct CoTraceConfigOptionalParameter* inst);
_BUR_PUBLIC void CoTraceConfigAddDataPoint(struct CoTraceConfigAddDataPoint* inst);
_BUR_PUBLIC void CoTraceConfigAddStartTrigger(struct CoTraceConfigAddStartTrigger* inst);
_BUR_PUBLIC void CoTraceConfigAddStartTriggerExt(struct CoTraceConfigAddStartTriggerExt* inst);
_BUR_PUBLIC void CoTraceRecorder(struct CoTraceRecorder* inst);
_BUR_PUBLIC void CoTraceDataReadRecords(struct CoTraceDataReadRecords* inst);
_BUR_PUBLIC void CoTraceDataSaveCsv(struct CoTraceDataSaveCsv* inst);
#ifdef __cplusplus
} // End of C-Linkage
#endif
#endif /* _COTRACE_ */

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Library Version="5.20.0" SubType="binary" Description="This library contains functionality to execute traces (to sample numeric values periodically for a defined time-span)" xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>CoTrace.fun</File>
<File>CoTrace.typ</File>
<File>CoTrace.var</File>
</Files>
<Dependencies>
<Dependency ObjectName="AsZip" />
<Dependency ObjectName="FileIO" />
</Dependencies>
</Library>

View File

@@ -0,0 +1,157 @@
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DatObjCreate (*creates a data object*)
VAR_INPUT
enable :BOOL; (*enables execution*)
grp :USINT; (*group ID for the data object (default 0x00), must be set to zero*)
pName :UDINT; (*pointer to name of the data object to be created*)
len :UDINT; (*length of the data area of the data object to be created*)
MemType :USINT; (*type of target memory: doTEMP, doUSRRAM, doUSRROM, doSYSROM, doFIXRAM, doMEMCARD*)
Option :UDINT; (*options: doNO_CS*)
pCpyData :UDINT; (*pointer to data written to the data object during generation*)
END_VAR
VAR_OUTPUT
status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
ident :UDINT; (*ID of the created data object*)
pDatObjMem :UDINT; (*pointer to the data in the data object*)
END_VAR
VAR
i_state :UDINT; (*internal variable*)
i_result :UDINT; (*internal variable*)
i_spare :ARRAY[0..104] OF USINT; (*internal variable*)
i_spare_1 :UDINT; (*internal variable*)
i_spare_2 :UINT; (*internal variable*)
i_spare_3 :UDINT; (*internal variable*)
i_spare_4 :USINT; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DatObjWrite (*writes to a data object*)
VAR_INPUT
enable :BOOL; (*enables execution*)
ident :UDINT; (*ID of the data object*)
Offset :UDINT; (*offset in the data area of the data object*)
pSource :UDINT; (*pointer to the data copied to the data object*)
len :UDINT; (*length of the data to be copied*)
END_VAR
VAR_OUTPUT
status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DatObjRead (*reads from a data object*)
VAR_INPUT
enable :BOOL; (*enables execution*)
ident :UDINT; (*ID of the data object*)
Offset :UDINT; (*offset in the data area of the data object*)
pDestination:UDINT; (*memory to which the data to be read is copied*)
len :UDINT; (*length of the data to be copied*)
END_VAR
VAR_OUTPUT
status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DatObjDelete (*deletes data objects*)
VAR_INPUT
enable :BOOL; (*enables execution*)
ident :UDINT; (*ID of the data object*)
END_VAR
VAR_OUTPUT
status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
END_VAR
VAR
i_state :UDINT; (*internal variable*)
i_result :UDINT; (*internal variable*)
i_spare :USINT; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DatObjMove (*moves the storage space of a data object to a new target memory*)
VAR_INPUT
enable :BOOL; (*enables execution*)
ident :UDINT; (*ID of the data object*)
MemType :USINT; (*target memory in which the data object is to be saved, e.g. doTEMP, doUSRRAM, doUSRROM, ...*)
Option :UDINT; (*options for the object to be saved (doNO_CS = no checksum)*)
END_VAR
VAR_OUTPUT
status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
identNew :UDINT; (*ID of the new data object*)
pDatObjMem :UDINT; (*pointer to the data in the newly created data object*)
END_VAR
VAR
i_state :UDINT; (*internal variable*)
i_result :UDINT; (*internal variable*)
i_spare :ARRAY[0..40] OF USINT; (*internal variable*)
i_spare_1 :UDINT; (*internal variable*)
i_spare_2 :USINT; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DatObjCopy (*copies a data object*)
VAR_INPUT
enable :BOOL; (*enables execution*)
ident :UDINT; (*ID of the data object to be copied*)
pNameTarget :UDINT; (*pointer to name of the new data object*)
MemTypeTarget :USINT; (*target memory in which the new object is to be generated, e.g. doTEMP, doUSRRAM, ...*)
OptionTarget :UDINT; (*options for the copied object (doNO_CS = no checksum)*)
END_VAR
VAR_OUTPUT
status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
identNew :UDINT; (*ID of the copied data object*)
pDatObjMemNew :UDINT; (*pointer to the data in the newly created data object*)
END_VAR
VAR
i_state :UDINT; (*internal variable*)
i_result :UDINT; (*internal variable*)
i_spare :ARRAY[0..40] OF USINT; (*internal variable*)
i_spare_1 :UDINT; (*internal variable*)
i_spare_2 :USINT; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DatObjInfo (*gives information about a data object*)
VAR_INPUT
enable :BOOL; (*enables execution*)
pName :UDINT; (*name of data object*)
END_VAR
VAR_OUTPUT
status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
ident :UDINT; (*ID of the data object*)
pDatObjMem :UDINT; (*pointer to the data in the data object*)
len :UDINT; (*length of the data area in the data object*)
MemType :USINT; (*memory type in which the data object is located, e.g. doTEMP, doUSRRAM, doUSRROM, ...*)
Option :UDINT; (*information about data object options*)
ChangeDate :DATE_AND_TIME; (*modification date of the data object*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DatObjChangeDate (*changes the modification date of a data object*)
VAR_INPUT
enable :BOOL; (*enables execution*)
pName :UDINT; (*pointer to name of data object*)
SetDate :DATE_AND_TIME; (*date and time; if the value 0 is transferred, the current PLC system time is used*)
END_VAR
VAR_OUTPUT
status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DatObjAttach (*attaches a data object to prevent deletion*)
VAR_INPUT
enable :BOOL; (*enables execution*)
ident :UDINT; (*ID of the data object*)
END_VAR
VAR_OUTPUT
status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DatObjDetach (*detaches a data object*)
VAR_INPUT
enable :BOOL; (*enables execution*)
ident :UDINT; (*ID of the data object*)
END_VAR
VAR_OUTPUT
status :UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK

View File

@@ -0,0 +1,14 @@
TYPE
END_TYPE

View File

@@ -0,0 +1,27 @@
VAR CONSTANT
doERR_TOOLONG_MODULNAME : UINT := 20613; (*module name too long (max. 10 characters)*)
doERR_CHECKSUM_WARNING : UINT := 20630; (*wrong target memory specified for the "doNO_CS" option*)
doERR_MODULNOTFOUND : UINT := 20609; (*data object not found*)
doERR_ILLEGALLENGTH : UINT := 20608; (*wrong length specified*)
doERR_STARTHANDLER : UINT := 20612; (*error while enabling asynchronous handler (only SG4)*)
doERR_ILLPARAMETER : UINT := 20600; (*wrong parameter given (NULL pointer)*)
doERR_WRONGOFFSET : UINT := 20607; (*wrong offset specified*)
doERR_ILLOBJTYPE : UINT := 20606; (*wrong object type (not data object)*)
doERR_ILLMEMTYPE : UINT := 20602; (*wrong target memory specified*)
doERR_WRONGTIME : UINT := 20610; (*wrong date in SetDate (DatObjChangeDate)*)
doERR_ILLOBJECT : UINT := 20605; (*object not found*)
doERR_DUPOBJECT : UINT := 20601; (*object already present*)
doERR_BRINSTALL : UINT := 20604; (*error installing data object*)
doERR_NOMEMORY : UINT := 20603; (*no memory available for module to be created*)
doERR_ILLSTATE : UINT := 20611; (*incorrect state of the data object*)
doERR_BURNINGOBJECT : UINT := 20614; (*error while saving the data object in "Flash" memory*)
doERR_MODULDELETE_SYSROM : UINT := 20615; (*a module in SYSROM cannot be deleted*)
doSYSROM : USINT := 0; (*SYSROM (SYSTEM FLASH)*)
doNO_CS : USINT := 1; (*no cyclic checksum monitoring and no checksum monitoring during installation and booting*)
doUSRROM : USINT := 2; (*USERROM (USER FLASH)*)
doUSRRAM : USINT := 3; (*USERRAM (target memory for pointer handling)*)
doMEMCARD : USINT := 4; (*MEMCARD (only for SG3)*)
doFIXRAM : USINT := 5; (*FIXRAM (only for SG3)*)
doTEMP : USINT := 65; (*Temporary data object (DRAM, only for SG4)*)
END_VAR

View File

@@ -0,0 +1,225 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _DATAOBJ_
#define _DATAOBJ_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#include <runtime.h>
#ifndef _IEC_CONST
#define _IEC_CONST _WEAK const
#endif
/* Constants */
#ifdef _REPLACE_CONST
#define doTEMP 65U
#define doFIXRAM 5U
#define doMEMCARD 4U
#define doUSRRAM 3U
#define doUSRROM 2U
#define doNO_CS 1U
#define doSYSROM 0U
#define doERR_BURNINGOBJECT 20614U
#define doERR_ILLSTATE 20611U
#define doERR_NOMEMORY 20603U
#define doERR_BRINSTALL 20604U
#define doERR_DUPOBJECT 20601U
#define doERR_ILLOBJECT 20605U
#define doERR_WRONGTIME 20610U
#define doERR_ILLMEMTYPE 20602U
#define doERR_ILLOBJTYPE 20606U
#define doERR_WRONGOFFSET 20607U
#define doERR_ILLPARAMETER 20600U
#define doERR_STARTHANDLER 20612U
#define doERR_ILLEGALLENGTH 20608U
#define doERR_MODULNOTFOUND 20609U
#define doERR_CHECKSUM_WARNING 20630U
#define doERR_TOOLONG_MODULNAME 20613U
#else
_IEC_CONST unsigned char doTEMP = 65U;
_IEC_CONST unsigned char doFIXRAM = 5U;
_IEC_CONST unsigned char doMEMCARD = 4U;
_IEC_CONST unsigned char doUSRRAM = 3U;
_IEC_CONST unsigned char doUSRROM = 2U;
_IEC_CONST unsigned char doNO_CS = 1U;
_IEC_CONST unsigned char doSYSROM = 0U;
_IEC_CONST unsigned short doERR_BURNINGOBJECT = 20614U;
_IEC_CONST unsigned short doERR_ILLSTATE = 20611U;
_IEC_CONST unsigned short doERR_NOMEMORY = 20603U;
_IEC_CONST unsigned short doERR_BRINSTALL = 20604U;
_IEC_CONST unsigned short doERR_DUPOBJECT = 20601U;
_IEC_CONST unsigned short doERR_ILLOBJECT = 20605U;
_IEC_CONST unsigned short doERR_WRONGTIME = 20610U;
_IEC_CONST unsigned short doERR_ILLMEMTYPE = 20602U;
_IEC_CONST unsigned short doERR_ILLOBJTYPE = 20606U;
_IEC_CONST unsigned short doERR_WRONGOFFSET = 20607U;
_IEC_CONST unsigned short doERR_ILLPARAMETER = 20600U;
_IEC_CONST unsigned short doERR_STARTHANDLER = 20612U;
_IEC_CONST unsigned short doERR_ILLEGALLENGTH = 20608U;
_IEC_CONST unsigned short doERR_MODULNOTFOUND = 20609U;
_IEC_CONST unsigned short doERR_CHECKSUM_WARNING = 20630U;
_IEC_CONST unsigned short doERR_TOOLONG_MODULNAME = 20613U;
#endif
/* Datatypes and datatypes of function blocks */
typedef struct DatObjCreate
{
/* VAR_INPUT (analog) */
unsigned char grp;
unsigned long pName;
unsigned long len;
unsigned char MemType;
unsigned long Option;
unsigned long pCpyData;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long ident;
unsigned long pDatObjMem;
/* VAR (analog) */
unsigned long i_state;
unsigned long i_result;
unsigned char i_spare[105];
unsigned long i_spare_1;
unsigned short i_spare_2;
unsigned long i_spare_3;
unsigned char i_spare_4;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjCreate_typ;
typedef struct DatObjWrite
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long Offset;
unsigned long pSource;
unsigned long len;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjWrite_typ;
typedef struct DatObjRead
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long Offset;
unsigned long pDestination;
unsigned long len;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjRead_typ;
typedef struct DatObjDelete
{
/* VAR_INPUT (analog) */
unsigned long ident;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned long i_state;
unsigned long i_result;
unsigned char i_spare;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjDelete_typ;
typedef struct DatObjMove
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned char MemType;
unsigned long Option;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long identNew;
unsigned long pDatObjMem;
/* VAR (analog) */
unsigned long i_state;
unsigned long i_result;
unsigned char i_spare[41];
unsigned long i_spare_1;
unsigned char i_spare_2;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjMove_typ;
typedef struct DatObjCopy
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pNameTarget;
unsigned char MemTypeTarget;
unsigned long OptionTarget;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long identNew;
unsigned long pDatObjMemNew;
/* VAR (analog) */
unsigned long i_state;
unsigned long i_result;
unsigned char i_spare[41];
unsigned long i_spare_1;
unsigned char i_spare_2;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjCopy_typ;
typedef struct DatObjInfo
{
/* VAR_INPUT (analog) */
unsigned long pName;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long ident;
unsigned long pDatObjMem;
unsigned long len;
unsigned char MemType;
unsigned long Option;
plcdt ChangeDate;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjInfo_typ;
typedef struct DatObjChangeDate
{
/* VAR_INPUT (analog) */
unsigned long pName;
plcdt SetDate;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjChangeDate_typ;
/* Prototyping of functions and function blocks */
void DatObjCreate(struct DatObjCreate* inst);
void DatObjWrite(struct DatObjWrite* inst);
void DatObjRead(struct DatObjRead* inst);
void DatObjDelete(struct DatObjDelete* inst);
void DatObjMove(struct DatObjMove* inst);
void DatObjCopy(struct DatObjCopy* inst);
void DatObjInfo(struct DatObjInfo* inst);
void DatObjChangeDate(struct DatObjChangeDate* inst);
#ifdef __cplusplus
};
#endif
#endif /* _DATAOBJ_ */

View File

@@ -0,0 +1,250 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _DATAOBJ_
#define _DATAOBJ_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#include <runtime.h>
#ifndef _BUR_PUBLIC
#define _BUR_PUBLIC
#endif
/* Constants */
#ifdef _REPLACE_CONST
#define doTEMP 65U
#define doFIXRAM 5U
#define doMEMCARD 4U
#define doUSRRAM 3U
#define doUSRROM 2U
#define doNO_CS 1U
#define doSYSROM 0U
#define doERR_MODULDELETE_SYSROM 20615U
#define doERR_BURNINGOBJECT 20614U
#define doERR_ILLSTATE 20611U
#define doERR_NOMEMORY 20603U
#define doERR_BRINSTALL 20604U
#define doERR_DUPOBJECT 20601U
#define doERR_ILLOBJECT 20605U
#define doERR_WRONGTIME 20610U
#define doERR_ILLMEMTYPE 20602U
#define doERR_ILLOBJTYPE 20606U
#define doERR_WRONGOFFSET 20607U
#define doERR_ILLPARAMETER 20600U
#define doERR_STARTHANDLER 20612U
#define doERR_ILLEGALLENGTH 20608U
#define doERR_MODULNOTFOUND 20609U
#define doERR_CHECKSUM_WARNING 20630U
#define doERR_TOOLONG_MODULNAME 20613U
#else
#ifndef _GLOBAL_CONST
#define _GLOBAL_CONST _WEAK const
#endif
_GLOBAL_CONST unsigned char doTEMP;
_GLOBAL_CONST unsigned char doFIXRAM;
_GLOBAL_CONST unsigned char doMEMCARD;
_GLOBAL_CONST unsigned char doUSRRAM;
_GLOBAL_CONST unsigned char doUSRROM;
_GLOBAL_CONST unsigned char doNO_CS;
_GLOBAL_CONST unsigned char doSYSROM;
_GLOBAL_CONST unsigned short doERR_MODULDELETE_SYSROM;
_GLOBAL_CONST unsigned short doERR_BURNINGOBJECT;
_GLOBAL_CONST unsigned short doERR_ILLSTATE;
_GLOBAL_CONST unsigned short doERR_NOMEMORY;
_GLOBAL_CONST unsigned short doERR_BRINSTALL;
_GLOBAL_CONST unsigned short doERR_DUPOBJECT;
_GLOBAL_CONST unsigned short doERR_ILLOBJECT;
_GLOBAL_CONST unsigned short doERR_WRONGTIME;
_GLOBAL_CONST unsigned short doERR_ILLMEMTYPE;
_GLOBAL_CONST unsigned short doERR_ILLOBJTYPE;
_GLOBAL_CONST unsigned short doERR_WRONGOFFSET;
_GLOBAL_CONST unsigned short doERR_ILLPARAMETER;
_GLOBAL_CONST unsigned short doERR_STARTHANDLER;
_GLOBAL_CONST unsigned short doERR_ILLEGALLENGTH;
_GLOBAL_CONST unsigned short doERR_MODULNOTFOUND;
_GLOBAL_CONST unsigned short doERR_CHECKSUM_WARNING;
_GLOBAL_CONST unsigned short doERR_TOOLONG_MODULNAME;
#endif
/* Datatypes and datatypes of function blocks */
typedef struct DatObjCreate
{
/* VAR_INPUT (analog) */
unsigned char grp;
unsigned long pName;
unsigned long len;
unsigned char MemType;
unsigned long Option;
unsigned long pCpyData;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long ident;
unsigned long pDatObjMem;
/* VAR (analog) */
unsigned long i_state;
unsigned long i_result;
unsigned char i_spare[105];
unsigned long i_spare_1;
unsigned short i_spare_2;
unsigned long i_spare_3;
unsigned char i_spare_4;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjCreate_typ;
typedef struct DatObjWrite
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long Offset;
unsigned long pSource;
unsigned long len;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjWrite_typ;
typedef struct DatObjRead
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long Offset;
unsigned long pDestination;
unsigned long len;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjRead_typ;
typedef struct DatObjDelete
{
/* VAR_INPUT (analog) */
unsigned long ident;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned long i_state;
unsigned long i_result;
unsigned char i_spare;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjDelete_typ;
typedef struct DatObjMove
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned char MemType;
unsigned long Option;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long identNew;
unsigned long pDatObjMem;
/* VAR (analog) */
unsigned long i_state;
unsigned long i_result;
unsigned char i_spare[41];
unsigned long i_spare_1;
unsigned char i_spare_2;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjMove_typ;
typedef struct DatObjCopy
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pNameTarget;
unsigned char MemTypeTarget;
unsigned long OptionTarget;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long identNew;
unsigned long pDatObjMemNew;
/* VAR (analog) */
unsigned long i_state;
unsigned long i_result;
unsigned char i_spare[41];
unsigned long i_spare_1;
unsigned char i_spare_2;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjCopy_typ;
typedef struct DatObjInfo
{
/* VAR_INPUT (analog) */
unsigned long pName;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long ident;
unsigned long pDatObjMem;
unsigned long len;
unsigned char MemType;
unsigned long Option;
plcdt ChangeDate;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjInfo_typ;
typedef struct DatObjChangeDate
{
/* VAR_INPUT (analog) */
unsigned long pName;
plcdt SetDate;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjChangeDate_typ;
typedef struct DatObjAttach
{
/* VAR_INPUT (analog) */
unsigned long ident;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjAttach_typ;
typedef struct DatObjDetach
{
/* VAR_INPUT (analog) */
unsigned long ident;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjDetach_typ;
/* Prototyping of functions and function blocks */
_BUR_PUBLIC void DatObjCreate(struct DatObjCreate* inst);
_BUR_PUBLIC void DatObjWrite(struct DatObjWrite* inst);
_BUR_PUBLIC void DatObjRead(struct DatObjRead* inst);
_BUR_PUBLIC void DatObjDelete(struct DatObjDelete* inst);
_BUR_PUBLIC void DatObjMove(struct DatObjMove* inst);
_BUR_PUBLIC void DatObjCopy(struct DatObjCopy* inst);
_BUR_PUBLIC void DatObjInfo(struct DatObjInfo* inst);
_BUR_PUBLIC void DatObjChangeDate(struct DatObjChangeDate* inst);
_BUR_PUBLIC void DatObjAttach(struct DatObjAttach* inst);
_BUR_PUBLIC void DatObjDetach(struct DatObjDetach* inst);
#ifdef __cplusplus
};
#endif
#endif /* _DATAOBJ_ */

View File

@@ -0,0 +1,225 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _DATAOBJ_
#define _DATAOBJ_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#include <runtime.h>
#ifndef _IEC_CONST
#define _IEC_CONST _WEAK const
#endif
/* Constants */
#ifdef _REPLACE_CONST
#define doTEMP 65U
#define doFIXRAM 5U
#define doMEMCARD 4U
#define doUSRRAM 3U
#define doUSRROM 2U
#define doNO_CS 1U
#define doSYSROM 0U
#define doERR_BURNINGOBJECT 20614U
#define doERR_ILLSTATE 20611U
#define doERR_NOMEMORY 20603U
#define doERR_BRINSTALL 20604U
#define doERR_DUPOBJECT 20601U
#define doERR_ILLOBJECT 20605U
#define doERR_WRONGTIME 20610U
#define doERR_ILLMEMTYPE 20602U
#define doERR_ILLOBJTYPE 20606U
#define doERR_WRONGOFFSET 20607U
#define doERR_ILLPARAMETER 20600U
#define doERR_STARTHANDLER 20612U
#define doERR_ILLEGALLENGTH 20608U
#define doERR_MODULNOTFOUND 20609U
#define doERR_CHECKSUM_WARNING 20630U
#define doERR_TOOLONG_MODULNAME 20613U
#else
_IEC_CONST unsigned char doTEMP = 65U;
_IEC_CONST unsigned char doFIXRAM = 5U;
_IEC_CONST unsigned char doMEMCARD = 4U;
_IEC_CONST unsigned char doUSRRAM = 3U;
_IEC_CONST unsigned char doUSRROM = 2U;
_IEC_CONST unsigned char doNO_CS = 1U;
_IEC_CONST unsigned char doSYSROM = 0U;
_IEC_CONST unsigned short doERR_BURNINGOBJECT = 20614U;
_IEC_CONST unsigned short doERR_ILLSTATE = 20611U;
_IEC_CONST unsigned short doERR_NOMEMORY = 20603U;
_IEC_CONST unsigned short doERR_BRINSTALL = 20604U;
_IEC_CONST unsigned short doERR_DUPOBJECT = 20601U;
_IEC_CONST unsigned short doERR_ILLOBJECT = 20605U;
_IEC_CONST unsigned short doERR_WRONGTIME = 20610U;
_IEC_CONST unsigned short doERR_ILLMEMTYPE = 20602U;
_IEC_CONST unsigned short doERR_ILLOBJTYPE = 20606U;
_IEC_CONST unsigned short doERR_WRONGOFFSET = 20607U;
_IEC_CONST unsigned short doERR_ILLPARAMETER = 20600U;
_IEC_CONST unsigned short doERR_STARTHANDLER = 20612U;
_IEC_CONST unsigned short doERR_ILLEGALLENGTH = 20608U;
_IEC_CONST unsigned short doERR_MODULNOTFOUND = 20609U;
_IEC_CONST unsigned short doERR_CHECKSUM_WARNING = 20630U;
_IEC_CONST unsigned short doERR_TOOLONG_MODULNAME = 20613U;
#endif
/* Datatypes and datatypes of function blocks */
typedef struct DatObjCreate
{
/* VAR_INPUT (analog) */
unsigned char grp;
unsigned long pName;
unsigned long len;
unsigned char MemType;
unsigned long Option;
unsigned long pCpyData;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long ident;
unsigned long pDatObjMem;
/* VAR (analog) */
unsigned long i_state;
unsigned long i_result;
unsigned char i_spare[105];
unsigned long i_spare_1;
unsigned short i_spare_2;
unsigned long i_spare_3;
unsigned char i_spare_4;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjCreate_typ;
typedef struct DatObjWrite
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long Offset;
unsigned long pSource;
unsigned long len;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjWrite_typ;
typedef struct DatObjRead
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long Offset;
unsigned long pDestination;
unsigned long len;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjRead_typ;
typedef struct DatObjDelete
{
/* VAR_INPUT (analog) */
unsigned long ident;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned long i_state;
unsigned long i_result;
unsigned char i_spare;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjDelete_typ;
typedef struct DatObjMove
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned char MemType;
unsigned long Option;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long identNew;
unsigned long pDatObjMem;
/* VAR (analog) */
unsigned long i_state;
unsigned long i_result;
unsigned char i_spare[41];
unsigned long i_spare_1;
unsigned char i_spare_2;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjMove_typ;
typedef struct DatObjCopy
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pNameTarget;
unsigned char MemTypeTarget;
unsigned long OptionTarget;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long identNew;
unsigned long pDatObjMemNew;
/* VAR (analog) */
unsigned long i_state;
unsigned long i_result;
unsigned char i_spare[41];
unsigned long i_spare_1;
unsigned char i_spare_2;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjCopy_typ;
typedef struct DatObjInfo
{
/* VAR_INPUT (analog) */
unsigned long pName;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long ident;
unsigned long pDatObjMem;
unsigned long len;
unsigned char MemType;
unsigned long Option;
plcdt ChangeDate;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjInfo_typ;
typedef struct DatObjChangeDate
{
/* VAR_INPUT (analog) */
unsigned long pName;
plcdt SetDate;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR_INPUT (digital) */
plcbit enable;
} DatObjChangeDate_typ;
/* Prototyping of functions and function blocks */
void DatObjCreate(struct DatObjCreate* inst);
void DatObjWrite(struct DatObjWrite* inst);
void DatObjRead(struct DatObjRead* inst);
void DatObjDelete(struct DatObjDelete* inst);
void DatObjMove(struct DatObjMove* inst);
void DatObjCopy(struct DatObjCopy* inst);
void DatObjInfo(struct DatObjInfo* inst);
void DatObjChangeDate(struct DatObjChangeDate* inst);
#ifdef __cplusplus
};
#endif
#endif /* _DATAOBJ_ */

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Library SubType="binary" Description="The DataObj library can be used to dynamically create, dynamically delete and copy data objects, etc. " xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>DataObj.fun</File>
<File>DataObj.typ</File>
<File>DataObj.var</File>
</Files>
<Dependencies>
<Dependency ObjectName="runtime" />
</Dependencies>
</Library>

View File

@@ -0,0 +1,561 @@
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK FileCreate (*creates a file; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pFile : UDINT; (*pointer to the file name*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
ident : UDINT; (*identifier of the created file*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK FileOpen (*opens a file; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pFile : UDINT; (*pointer to the file name*)
mode : USINT; (*access mode (FILE_R, FILE_W, FILE_RW)*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
ident : UDINT; (*identifier of the created file*)
filelen : UDINT; (*file length*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK FileClose (*closes an open file; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier of the created file*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK FileRead (*reads from an open file; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier of the created file*)
offset : UDINT; (*offset*)
pDest : UDINT; (*pointer to the read buffer*)
len : UDINT; (*length of bytes to read*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK FileReadEx (*reads from an open file and returns the number of actually read bytes; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier of the created file*)
offset : UDINT; (*offset*)
pDest : UDINT; (*pointer to the read buffer*)
len : UDINT; (*number of bytes to read*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
bytesread : UDINT; (*number of bytes read*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK FileWrite (*writes to a file; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier of the created file*)
offset : UDINT; (*offset*)
pSrc : UDINT; (*pointer to the write buffer*)
len : UDINT; (*number of bytes to write*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK FileWriteEx (*writes to a file; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier of the created file*)
offset : UDINT; (*offset*)
pSrc : UDINT; (*pointer to the write buffer*)
len : UDINT; (*number of bytes to write*)
option : UDINT; (*options*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK FileRename (*renames files; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pName : UDINT; (*pointer to the file name*)
pNewName : UDINT; (*pointer to the new file name*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK FileCopy (*copies a file; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pSrcDev : UDINT; (*pointer to the source file device name*)
pSrc : UDINT; (*pointer to the existing file name*)
pDestDev : UDINT; (*pointer to the destination file device name*)
pDest : UDINT; (*pointer to the copy file name*)
option : USINT; (*copy option*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK FileDelete (*deletes a file; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pName : UDINT; (*pointer to the file name*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK FileInfo (*gets information about a file; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pName : UDINT; (*file name given as pointer*)
pInfo : UDINT; (*file information (fiFILE_INFO) structure given as pointer*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK FileTruncate (*truncates a file's length; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pName : UDINT; (*file name given as pointer*)
newLength : UDINT; (*new length*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DirCreate (*creates a directory; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pName : UDINT; (*pointer to the directory name*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DirOpen (*opens a directory; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pName : UDINT; (*pointer to the directory name*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
ident : UDINT; (*identifier of the directory*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DirClose (*closes a directory; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier of the directory*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DirRead (*reads the individual file names in a directory; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pPath : UDINT; (*pointer to the path string*)
entry : UDINT; (*specifies which entry should be read*)
option : USINT; (*specifies whether directory names or filenames should be read*)
pData : UDINT; (*pointer to the memory area where the information is copied*)
data_len : UDINT; (*length of the provided data area*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DirReadEx (*reads the individual file or directory names in a directory; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
ident : UDINT; (*identifier of the directory*)
pData : UDINT; (*pointer to the memory area where the information is copied*)
data_len : UDINT; (*length of the available data area*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DirInfo (*gets information about a directory; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pPath : UDINT; (*pointer to the path (directory name)*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
dirnum : UDINT; (*number of subdirectories in this directory*)
filenum : UDINT; (*number of files in this directory*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DirRename (*renames directories; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pName : UDINT; (*pointer to the directory name*)
pNewName : UDINT; (*pointer to the new directory name*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DirCopy (*copies a directory*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pSrcDev : UDINT; (*pointer to the source file device name*)
pSrcDir : UDINT; (*pointer to the source directory name*)
pDestDev : UDINT; (*pointer to the destination file device name*)
pDestDir : UDINT; (*pointer to the destination directory name*)
option : USINT; (*copy option*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DirDelete (*deletes a directory; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pName : UDINT; (*pointer to the directory name*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DirDeleteEx (*deletes a directory (all files and subdirectories); asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pName : UDINT; (*pointer to the directory name*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK SetAttributes (*sets attributes; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pPath : UDINT; (*pointer to the path name (file or directory)*)
attributes : USINT; (*attributes*)
option : USINT; (*set options*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK GetAttributes (*reads attributes; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pPath : UDINT; (*pointer to the path name (file or directory)*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
attributes : USINT; (*attributes*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DevMemInfo (*determines a file device's memory information; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
freemem : UDINT; (*available disk space*)
memsize : UDINT; (*total disk space*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DevLink (*creates the file device; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*new device name given as a pointer*)
pParam : UDINT; (*pointer to the link parameter*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
handle : UDINT; (*file device handle*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK DevUnlink (*unlinks the device; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
handle : UDINT; (*file device handle*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK GetVolumeLabel (*reads volume label; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
pLabel : UDINT; (*buffer for volume label given as pointer*)
labelMax : UDINT; (*size of buffer for volume label*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
labelLen : UDINT; (*length of volume label*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} {REDUND_UNREPLICABLE} FUNCTION_BLOCK GetVolumeSerialNo (*reads volume serial nummer; asynchronous execution*)
VAR_INPUT
enable : BOOL; (*enables execution*)
pDevice : UDINT; (*device name given as a pointer*)
END_VAR
VAR
i_state : UINT; (*internal variable*)
i_result : UINT; (*internal variable*)
i_tmp : UDINT; (*internal variable*)
END_VAR
VAR_OUTPUT
status : UINT; (*execution status: ERR_OK, ERR_FUB_ENABLE_FALSE, ERR_FUB_BUSY, 0xXXXX = see help*)
serialNo : UDINT; (*volume serialNo*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION FileIoGetSysError : UINT (*reads system errors*)
END_FUNCTION

View File

@@ -0,0 +1,24 @@
TYPE
fiDIR_READ_DATA : STRUCT (*directory read structure*)
Filename : ARRAY[0..259] OF USINT; (*file name*)
Date : DATE_AND_TIME; (*date and time*)
Filelength : UDINT; (*file length*)
END_STRUCT;
fiDIR_READ_EX_DATA : STRUCT (*directory read extended structure*)
Filename : ARRAY[0..259] OF USINT; (*file name*)
Date : DATE_AND_TIME; (*date and time*)
Filelength : UDINT; (*file length*)
Mode : UINT; (*mode*)
END_STRUCT;
fiFILE_INFO : STRUCT (*file information structure*)
size : UDINT; (*size of file [bytes]*)
linkCnt : UDINT; (*link count*)
accTime : DATE_AND_TIME; (*time of last access*)
modTime : DATE_AND_TIME; (*time of last data modification*)
chgTime : DATE_AND_TIME; (*time of last file status change*)
reserved : ARRAY[0..20] OF UDINT; (*reserved for future use*)
END_STRUCT;
END_TYPE

View File

@@ -0,0 +1,85 @@
VAR CONSTANT
fiATTR_ARCHIVE : USINT := 32; (*attribute archive*)
fiATTR_DIRECTORY : USINT := 16; (*attribute directory*)
fiATTR_HIDDEN : USINT := 2; (*attribute hidden*)
fiATTR_RDONLY : USINT := 1; (*attribute read only*)
fiATTR_SYSTEM : USINT := 4; (*attribute system*)
fiATTR_VOL_LABEL : USINT := 8; (*attribute volume label*)
fiRECURSIVE : USINT := 1; (*option recursive*)
fiOVERWRITE : USINT := 2; (*option overwrite*)
fiREAD_ONLY : USINT := 0; (*access mode read only*)
fiWRITE_ONLY : USINT := 1; (*access mode write only*)
fiREAD_WRITE : USINT := 2; (*access mode read and write*)
fiFILE : USINT := 0; (*directory read files only*)
fiDIRECTORY : USINT := 1; (*directory read directories only*)
fiBOTH : USINT := 2; (*directory read files and directories*)
fiTruncate : UDINT := 1; (*truncate file*)
fiERR_INVALID_PATH : UINT := 20700; (*error invalid path*)
fiERR_DATA_SIZE : UINT := 20701; (*error data size*)
fiERR_NO_MORE_ENTRIES : UINT := 20702; (*error no more entries*)
fiERR_NOT_SUPPORTED : UINT := 20703; (*error not supported*)
fiERR_INVALID_TYP : UINT := 20704; (*error invalid type*)
fiERR_EXIST : UINT := 20705; (*error exist*)
fiERR_ACCESS : UINT := 20706; (*error access*)
fiERR_MODE : UINT := 20707; (*error mode*)
fiERR_FILE_NOT_FOUND : UINT := 20708; (*error file not found*)
fiERR_FILE_DEVICE : UINT := 20709; (*error file device*)
fiERR_SPACE : UINT := 20710; (*error space*)
fiERR_SEEK : UINT := 20711; (*error seek*)
fiERR_FILE : UINT := 20712; (*error file*)
fiERR_LESS_VIRTUAL_MEMORY : UINT := 20713; (*error less virtual memory*)
fiERR_COM_FILE_OPEN : UINT := 20714; (*error file open*)
fiERR_COM_FILE_CLOSE : UINT := 20715; (*error file close*)
fiERR_COM_FILE_READ : UINT := 20716; (*error file read*)
fiERR_COM_FILE_WRITE : UINT := 20717; (*error file write*)
fiERR_COM_FILE_IOCTL : UINT := 20718; (*error fiel ioctl*)
fiERR_DATA : UINT := 20719; (*error data*)
fiERR_ASYNC_MANAGER : UINT := 20720; (*error asynchron manager*)
fiERR_FILE_NOT_OPENED : UINT := 20721; (*error file not opened*)
fiERR_INVALID_DIRECTORY : UINT := 20722; (*error invalid directory*)
fiERR_DIR_NOT_EXIST : UINT := 20723; (*error directory not exists*)
fiERR_DIR_NOT_EMPTY : UINT := 20724; (*error directory not empty*)
fiERR_DIR_ALREADY_EXIST : UINT := 20725; (*error directory already exists*)
fiERR_DETMEMINFO : UINT := 20726; (*error dedect memory info*)
fiERR_NOT_ENOUGH_FREEMEM : UINT := 20727; (*error not enough free memory*)
fiERR_DIR_INVALID_HANDLE : UINT := 20728; (*error invalid directory handle*)
fiERR_PARAMETER : UINT := 20729; (*error parameter*)
fiERR_DEVICE_ALREADY_EXIST : UINT := 20730; (*error device already exists*)
fiERR_DEVICE_INVALID_HANDLE : UINT := 20731; (*error invalid device handle*)
fiERR_NETIO_IP_UNEQUAL : UINT := 20732; (*ungleiche IP bei identischem Hostnamen - IP-overwrite nicht gesetzt*)
fiERR_NETIO_PORT : UINT := 20733; (*error port not supported*)
fiERR_NETIO_USER : UINT := 20734; (*error user or password*)
fiERR_INVALID_NBYTES : UINT := 20735; (*error invalid number of bytes*)
fiERR_NETIO_PARAMETERS : UINT := 20736; (*error invalid parameters to establish a connection*)
fiERR_INIT : UINT := 20796; (*error init*)
fiERR_DEVICE_DRIVER : UINT := 20797; (*error device driver*)
fiERR_DEVICE_MANAGER : UINT := 20798; (*error device manager*)
fiERR_SYSTEM : UINT := 20799; (*error system*)
ATTR_ARCHIVE : USINT := 32; (*obsolete*)
ATTR_DIRECTORY : USINT := 16; (*obsolete*)
ATTR_HIDDEN : USINT := 2; (*obsolete*)
ATTR_RDONLY : USINT := 1; (*obsolete*)
ATTR_SYSTEM : USINT := 4; (*obsolete*)
ATTR_VOL_LABEL : USINT := 8; (*obsolete*)
DIR_OW : USINT := 1; (*obsolete*)
FILE_ALL : USINT := 2; (*obsolete*)
FILE_DIR : USINT := 1; (*obsolete*)
FILE_FILE : USINT := 0; (*obsolete*)
FILE_ONCE : USINT := 0; (*obsolete*)
FILE_DETMEM : USINT := 1; (*obsolete*)
FILE_OW_DETMEM : USINT := 2; (*obsolete*)
FILE_OW_ONCE : USINT := 3; (*obsolete*)
FILE_R : USINT := 0; (*obsolete*)
FILE_W : USINT := 1; (*obsolete*)
FILE_RW : USINT := 2; (*obsolete*)
SET_RECURSIVE : USINT := 1; (*obsolete*)
END_VAR

View File

@@ -0,0 +1,710 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _FILEIO_
#define _FILEIO_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#include <runtime.h>
#ifndef _BUR_PUBLIC
#define _BUR_PUBLIC
#endif
/* Constants */
#ifdef _REPLACE_CONST
#define SET_RECURSIVE 1U
#define FILE_RW 2U
#define FILE_W 1U
#define FILE_R 0U
#define FILE_OW_ONCE 3U
#define FILE_OW_DETMEM 2U
#define FILE_DETMEM 1U
#define FILE_ONCE 0U
#define FILE_FILE 0U
#define FILE_DIR 1U
#define FILE_ALL 2U
#define DIR_OW 1U
#define ATTR_VOL_LABEL 8U
#define ATTR_SYSTEM 4U
#define ATTR_RDONLY 1U
#define ATTR_HIDDEN 2U
#define ATTR_DIRECTORY 16U
#define ATTR_ARCHIVE 32U
#define fiERR_SYSTEM 20799U
#define fiERR_DEVICE_MANAGER 20798U
#define fiERR_DEVICE_DRIVER 20797U
#define fiERR_INIT 20796U
#define fiERR_NETIO_PARAMETERS 20736U
#define fiERR_INVALID_NBYTES 20735U
#define fiERR_NETIO_USER 20734U
#define fiERR_NETIO_PORT 20733U
#define fiERR_NETIO_IP_UNEQUAL 20732U
#define fiERR_DEVICE_INVALID_HANDLE 20731U
#define fiERR_DEVICE_ALREADY_EXIST 20730U
#define fiERR_PARAMETER 20729U
#define fiERR_DIR_INVALID_HANDLE 20728U
#define fiERR_NOT_ENOUGH_FREEMEM 20727U
#define fiERR_DETMEMINFO 20726U
#define fiERR_DIR_ALREADY_EXIST 20725U
#define fiERR_DIR_NOT_EMPTY 20724U
#define fiERR_DIR_NOT_EXIST 20723U
#define fiERR_INVALID_DIRECTORY 20722U
#define fiERR_FILE_NOT_OPENED 20721U
#define fiERR_ASYNC_MANAGER 20720U
#define fiERR_DATA 20719U
#define fiERR_COM_FILE_IOCTL 20718U
#define fiERR_COM_FILE_WRITE 20717U
#define fiERR_COM_FILE_READ 20716U
#define fiERR_COM_FILE_CLOSE 20715U
#define fiERR_COM_FILE_OPEN 20714U
#define fiERR_LESS_VIRTUAL_MEMORY 20713U
#define fiERR_FILE 20712U
#define fiERR_SEEK 20711U
#define fiERR_SPACE 20710U
#define fiERR_FILE_DEVICE 20709U
#define fiERR_FILE_NOT_FOUND 20708U
#define fiERR_MODE 20707U
#define fiERR_ACCESS 20706U
#define fiERR_EXIST 20705U
#define fiERR_INVALID_TYP 20704U
#define fiERR_NOT_SUPPORTED 20703U
#define fiERR_NO_MORE_ENTRIES 20702U
#define fiERR_DATA_SIZE 20701U
#define fiERR_INVALID_PATH 20700U
#define fiTruncate 1U
#define fiBOTH 2U
#define fiDIRECTORY 1U
#define fiFILE 0U
#define fiREAD_WRITE 2U
#define fiWRITE_ONLY 1U
#define fiREAD_ONLY 0U
#define fiOVERWRITE 2U
#define fiRECURSIVE 1U
#define fiATTR_VOL_LABEL 8U
#define fiATTR_SYSTEM 4U
#define fiATTR_RDONLY 1U
#define fiATTR_HIDDEN 2U
#define fiATTR_DIRECTORY 16U
#define fiATTR_ARCHIVE 32U
#else
#ifndef _GLOBAL_CONST
#define _GLOBAL_CONST _WEAK const
#endif
_GLOBAL_CONST unsigned char SET_RECURSIVE;
_GLOBAL_CONST unsigned char FILE_RW;
_GLOBAL_CONST unsigned char FILE_W;
_GLOBAL_CONST unsigned char FILE_R;
_GLOBAL_CONST unsigned char FILE_OW_ONCE;
_GLOBAL_CONST unsigned char FILE_OW_DETMEM;
_GLOBAL_CONST unsigned char FILE_DETMEM;
_GLOBAL_CONST unsigned char FILE_ONCE;
_GLOBAL_CONST unsigned char FILE_FILE;
_GLOBAL_CONST unsigned char FILE_DIR;
_GLOBAL_CONST unsigned char FILE_ALL;
_GLOBAL_CONST unsigned char DIR_OW;
_GLOBAL_CONST unsigned char ATTR_VOL_LABEL;
_GLOBAL_CONST unsigned char ATTR_SYSTEM;
_GLOBAL_CONST unsigned char ATTR_RDONLY;
_GLOBAL_CONST unsigned char ATTR_HIDDEN;
_GLOBAL_CONST unsigned char ATTR_DIRECTORY;
_GLOBAL_CONST unsigned char ATTR_ARCHIVE;
_GLOBAL_CONST unsigned short fiERR_SYSTEM;
_GLOBAL_CONST unsigned short fiERR_DEVICE_MANAGER;
_GLOBAL_CONST unsigned short fiERR_DEVICE_DRIVER;
_GLOBAL_CONST unsigned short fiERR_INIT;
_GLOBAL_CONST unsigned short fiERR_NETIO_PARAMETERS;
_GLOBAL_CONST unsigned short fiERR_INVALID_NBYTES;
_GLOBAL_CONST unsigned short fiERR_NETIO_USER;
_GLOBAL_CONST unsigned short fiERR_NETIO_PORT;
_GLOBAL_CONST unsigned short fiERR_NETIO_IP_UNEQUAL;
_GLOBAL_CONST unsigned short fiERR_DEVICE_INVALID_HANDLE;
_GLOBAL_CONST unsigned short fiERR_DEVICE_ALREADY_EXIST;
_GLOBAL_CONST unsigned short fiERR_PARAMETER;
_GLOBAL_CONST unsigned short fiERR_DIR_INVALID_HANDLE;
_GLOBAL_CONST unsigned short fiERR_NOT_ENOUGH_FREEMEM;
_GLOBAL_CONST unsigned short fiERR_DETMEMINFO;
_GLOBAL_CONST unsigned short fiERR_DIR_ALREADY_EXIST;
_GLOBAL_CONST unsigned short fiERR_DIR_NOT_EMPTY;
_GLOBAL_CONST unsigned short fiERR_DIR_NOT_EXIST;
_GLOBAL_CONST unsigned short fiERR_INVALID_DIRECTORY;
_GLOBAL_CONST unsigned short fiERR_FILE_NOT_OPENED;
_GLOBAL_CONST unsigned short fiERR_ASYNC_MANAGER;
_GLOBAL_CONST unsigned short fiERR_DATA;
_GLOBAL_CONST unsigned short fiERR_COM_FILE_IOCTL;
_GLOBAL_CONST unsigned short fiERR_COM_FILE_WRITE;
_GLOBAL_CONST unsigned short fiERR_COM_FILE_READ;
_GLOBAL_CONST unsigned short fiERR_COM_FILE_CLOSE;
_GLOBAL_CONST unsigned short fiERR_COM_FILE_OPEN;
_GLOBAL_CONST unsigned short fiERR_LESS_VIRTUAL_MEMORY;
_GLOBAL_CONST unsigned short fiERR_FILE;
_GLOBAL_CONST unsigned short fiERR_SEEK;
_GLOBAL_CONST unsigned short fiERR_SPACE;
_GLOBAL_CONST unsigned short fiERR_FILE_DEVICE;
_GLOBAL_CONST unsigned short fiERR_FILE_NOT_FOUND;
_GLOBAL_CONST unsigned short fiERR_MODE;
_GLOBAL_CONST unsigned short fiERR_ACCESS;
_GLOBAL_CONST unsigned short fiERR_EXIST;
_GLOBAL_CONST unsigned short fiERR_INVALID_TYP;
_GLOBAL_CONST unsigned short fiERR_NOT_SUPPORTED;
_GLOBAL_CONST unsigned short fiERR_NO_MORE_ENTRIES;
_GLOBAL_CONST unsigned short fiERR_DATA_SIZE;
_GLOBAL_CONST unsigned short fiERR_INVALID_PATH;
_GLOBAL_CONST unsigned long fiTruncate;
_GLOBAL_CONST unsigned char fiBOTH;
_GLOBAL_CONST unsigned char fiDIRECTORY;
_GLOBAL_CONST unsigned char fiFILE;
_GLOBAL_CONST unsigned char fiREAD_WRITE;
_GLOBAL_CONST unsigned char fiWRITE_ONLY;
_GLOBAL_CONST unsigned char fiREAD_ONLY;
_GLOBAL_CONST unsigned char fiOVERWRITE;
_GLOBAL_CONST unsigned char fiRECURSIVE;
_GLOBAL_CONST unsigned char fiATTR_VOL_LABEL;
_GLOBAL_CONST unsigned char fiATTR_SYSTEM;
_GLOBAL_CONST unsigned char fiATTR_RDONLY;
_GLOBAL_CONST unsigned char fiATTR_HIDDEN;
_GLOBAL_CONST unsigned char fiATTR_DIRECTORY;
_GLOBAL_CONST unsigned char fiATTR_ARCHIVE;
#endif
/* Datatypes and datatypes of function blocks */
typedef struct fiDIR_READ_DATA
{ unsigned char Filename[260];
plcdt Date;
unsigned long Filelength;
} fiDIR_READ_DATA;
typedef struct fiDIR_READ_EX_DATA
{ unsigned char Filename[260];
plcdt Date;
unsigned long Filelength;
unsigned short Mode;
} fiDIR_READ_EX_DATA;
typedef struct fiFILE_INFO
{ unsigned long size;
unsigned long linkCnt;
plcdt accTime;
plcdt modTime;
plcdt chgTime;
unsigned long reserved[21];
} fiFILE_INFO;
typedef struct FileCreate
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pFile;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long ident;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} FileCreate_typ;
typedef struct FileOpen
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pFile;
unsigned char mode;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long ident;
unsigned long filelen;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} FileOpen_typ;
typedef struct FileClose
{
/* VAR_INPUT (analog) */
unsigned long ident;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} FileClose_typ;
typedef struct FileRead
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long offset;
unsigned long pDest;
unsigned long len;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} FileRead_typ;
typedef struct FileReadEx
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long offset;
unsigned long pDest;
unsigned long len;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long bytesread;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} FileReadEx_typ;
typedef struct FileWrite
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long offset;
unsigned long pSrc;
unsigned long len;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} FileWrite_typ;
typedef struct FileWriteEx
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long offset;
unsigned long pSrc;
unsigned long len;
unsigned long option;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} FileWriteEx_typ;
typedef struct FileRename
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pName;
unsigned long pNewName;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} FileRename_typ;
typedef struct FileCopy
{
/* VAR_INPUT (analog) */
unsigned long pSrcDev;
unsigned long pSrc;
unsigned long pDestDev;
unsigned long pDest;
unsigned char option;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} FileCopy_typ;
typedef struct FileDelete
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pName;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} FileDelete_typ;
typedef struct FileInfo
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pName;
unsigned long pInfo;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} FileInfo_typ;
typedef struct FileTruncate
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pName;
unsigned long newLength;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} FileTruncate_typ;
typedef struct DirCreate
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pName;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DirCreate_typ;
typedef struct DirOpen
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pName;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long ident;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DirOpen_typ;
typedef struct DirClose
{
/* VAR_INPUT (analog) */
unsigned long ident;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DirClose_typ;
typedef struct DirRead
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pPath;
unsigned long entry;
unsigned char option;
unsigned long pData;
unsigned long data_len;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DirRead_typ;
typedef struct DirReadEx
{
/* VAR_INPUT (analog) */
unsigned long ident;
unsigned long pData;
unsigned long data_len;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DirReadEx_typ;
typedef struct DirInfo
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pPath;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long dirnum;
unsigned long filenum;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DirInfo_typ;
typedef struct DirRename
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pName;
unsigned long pNewName;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DirRename_typ;
typedef struct DirCopy
{
/* VAR_INPUT (analog) */
unsigned long pSrcDev;
unsigned long pSrcDir;
unsigned long pDestDev;
unsigned long pDestDir;
unsigned char option;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DirCopy_typ;
typedef struct DirDelete
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pName;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DirDelete_typ;
typedef struct DirDeleteEx
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pName;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DirDeleteEx_typ;
typedef struct SetAttributes
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pPath;
unsigned char attributes;
unsigned char option;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} SetAttributes_typ;
typedef struct GetAttributes
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pPath;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned char attributes;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} GetAttributes_typ;
typedef struct DevMemInfo
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long freemem;
unsigned long memsize;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DevMemInfo_typ;
typedef struct DevLink
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pParam;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long handle;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DevLink_typ;
typedef struct DevUnlink
{
/* VAR_INPUT (analog) */
unsigned long handle;
/* VAR_OUTPUT (analog) */
unsigned short status;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} DevUnlink_typ;
typedef struct GetVolumeLabel
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
unsigned long pLabel;
unsigned long labelMax;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long labelLen;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} GetVolumeLabel_typ;
typedef struct GetVolumeSerialNo
{
/* VAR_INPUT (analog) */
unsigned long pDevice;
/* VAR_OUTPUT (analog) */
unsigned short status;
unsigned long serialNo;
/* VAR (analog) */
unsigned short i_state;
unsigned short i_result;
unsigned long i_tmp;
/* VAR_INPUT (digital) */
plcbit enable;
} GetVolumeSerialNo_typ;
/* Prototyping of functions and function blocks */
_BUR_PUBLIC void FileCreate(struct FileCreate* inst);
_BUR_PUBLIC void FileOpen(struct FileOpen* inst);
_BUR_PUBLIC void FileClose(struct FileClose* inst);
_BUR_PUBLIC void FileRead(struct FileRead* inst);
_BUR_PUBLIC void FileReadEx(struct FileReadEx* inst);
_BUR_PUBLIC void FileWrite(struct FileWrite* inst);
_BUR_PUBLIC void FileWriteEx(struct FileWriteEx* inst);
_BUR_PUBLIC void FileRename(struct FileRename* inst);
_BUR_PUBLIC void FileCopy(struct FileCopy* inst);
_BUR_PUBLIC void FileDelete(struct FileDelete* inst);
_BUR_PUBLIC void FileInfo(struct FileInfo* inst);
_BUR_PUBLIC void FileTruncate(struct FileTruncate* inst);
_BUR_PUBLIC void DirCreate(struct DirCreate* inst);
_BUR_PUBLIC void DirOpen(struct DirOpen* inst);
_BUR_PUBLIC void DirClose(struct DirClose* inst);
_BUR_PUBLIC void DirRead(struct DirRead* inst);
_BUR_PUBLIC void DirReadEx(struct DirReadEx* inst);
_BUR_PUBLIC void DirInfo(struct DirInfo* inst);
_BUR_PUBLIC void DirRename(struct DirRename* inst);
_BUR_PUBLIC void DirCopy(struct DirCopy* inst);
_BUR_PUBLIC void DirDelete(struct DirDelete* inst);
_BUR_PUBLIC void DirDeleteEx(struct DirDeleteEx* inst);
_BUR_PUBLIC void SetAttributes(struct SetAttributes* inst);
_BUR_PUBLIC void GetAttributes(struct GetAttributes* inst);
_BUR_PUBLIC void DevMemInfo(struct DevMemInfo* inst);
_BUR_PUBLIC void DevLink(struct DevLink* inst);
_BUR_PUBLIC void DevUnlink(struct DevUnlink* inst);
_BUR_PUBLIC void GetVolumeLabel(struct GetVolumeLabel* inst);
_BUR_PUBLIC void GetVolumeSerialNo(struct GetVolumeSerialNo* inst);
_BUR_PUBLIC unsigned short FileIoGetSysError(void);
#ifdef __cplusplus
};
#endif
#endif /* _FILEIO_ */

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Library SubType="binary" Description="The FileIO library provides function blocks for file handling." xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>FileIO.fun</File>
<File>FileIO.typ</File>
<File>FileIO.var</File>
</Files>
<Dependencies>
<Dependency ObjectName="runtime" />
</Dependencies>
</Library>

View File

@@ -0,0 +1,649 @@
FUNCTION_BLOCK MC_BR_InitHome_AcpAx (*initializes homing parameters for usage with MC_Home*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
HomingParameters : McAcpAxHomingParType; (*parameters used with MC_Home if HomingMode=mcHomeInit*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_ProcessParID_AcpAx (*reads or writes the value of a ParID according to the input "Mode"*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
DataAddress : UDINT; (*address of an array with data type MCProcessParIDAcpType*)
NumberOfParIDs : UDINT; (*number of ParIDs which should be read/written*)
Mode : McAcpAxProcessParIDModeEnum; (*selection if the ParIDs should be read or written*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_ProcessParTab_AcpAx (*transfers parameters of an ACOPOS parameter table according to the input "Mode"*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Data : McAcpAxProcessParTabDataType; (*data of the ACOPOS parameter table*)
Mode : McAcpAxProcessParTabModeEnum; (*mode for the transfer of the ACOPOS parameter(s)*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
AdditionalInfo : McAcpAxProcessParTabAddInfoType; (*additional information*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_CyclicProcessParID_AcpAx (*reads or writes the value of a ParID cyclic according to the input "Mode"*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Enable : BOOL; (*FB is active as long as input is set*)
DataAddress : UDINT; (*address of an array with data type MC_CYCLIC_PARID_ACP_TYPE*)
NumberOfParIDs : UDINT; (*number of ParIDs which should be read/written cyclically*)
Mode : McAcpAxCycParIDModeEnum; (*selection if the ParIDs should be read/written cyclically*)
END_VAR
VAR_OUTPUT
Valid : BOOL; (*FB reads/writes ParIDs cyclically*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_MoveAbsoluteTrgStop_AcpAx (*commands a controlled motion to a specified absolute position, at trigger event a specified distance is moved*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Position : LREAL; (*target position for the motion*)
Velocity : REAL; (*maximum velocity*)
Acceleration : REAL; (*maximum acceleration*)
Deceleration : REAL; (*maximum deceleration*)
Direction : McDirectionEnum; (*movement direction*)
BufferMode : McBufferModeEnum; (*defines the chronological sequence of FB*)
TriggerStopParameters : McAcpAxTriggerStopType; (*parameters used for defining the trigger source*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Active : BOOL; (*FB has control over the axis*)
CommandAborted : BOOL; (*Command was aborted by another command*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
StoppedAtTargetPosition : BOOL; (*movement was stopped at specified target position*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_MoveAdditiveTrgStop_AcpAx (*commands a controlled motion for the specified distance, at trigger event a specified distance is moved*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Distance : LREAL; (*distance for the motion*)
Velocity : REAL; (*maximum velocity*)
Acceleration : REAL; (*maximum acceleration*)
Deceleration : REAL; (*maximum deceleration*)
BufferMode : McBufferModeEnum; (*defines the chronological sequence of FB*)
TriggerStopParameters : McAcpAxTriggerStopType; (*parameters used for defining the trigger source*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Active : BOOL; (*FB has control over the axis*)
CommandAborted : BOOL; (*Command was aborted by another command*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
StoppedAtTargetPosition : BOOL; (*movement was stopped at specified target position*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_MoveVelocityTrgStop_AcpAx (*commands a controlled motion with a specified velocity, at trigger event a specified distance is moved*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Velocity : REAL; (*maximum velocity*)
Acceleration : REAL; (*maximum acceleration*)
Deceleration : REAL; (*maximum deceleration*)
Direction : McDirectionEnum; (*movement direction*)
BufferMode : McBufferModeEnum; (*defines the chronological sequence of FB*)
TriggerStopParameters : McAcpAxTriggerStopType; (*parameters used for defining the trigger source*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Active : BOOL; (*FB has control over the axis*)
CommandAborted : BOOL; (*Command was aborted by another command*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
InVelocity : BOOL; (*Commanded velocity reached*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_LimitLoad_AcpAx (*limits the motor torque to a set value*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Enable : BOOL; (*when set limitation is activated*)
LoadPosAccel : REAL; (*limit for acceleration in positive direction [Nm]*)
LoadPosDecel : REAL; (*limit for deceleration in positive direction [Nm]*)
LoadNegAccel : REAL; (*limit for acceleration in negative direction [Nm]*)
LoadNegDecel : REAL; (*limit for deceleration in negative direction [Nm]*)
InitData : BOOL; (*initialize new parameters*)
Mode : McAcpAxLimitLoadModeEnum; (*torque limitation mode*)
AdvancedParameters : McAcpAxAdvLimitLoadParType; (*structure for using additional functions*)
END_VAR
VAR_OUTPUT
Busy : BOOL; (*FB is active and needs to be called*)
Ready : BOOL; (*parameters initialized*)
Active : BOOL; (*torque is limited*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
DataInitialized : BOOL; (*new parameters are initialized*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_BrakeSetPar_AcpAx (*sets parameters for the holding brake*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Parameters : McAcpAxBrakeParType; (*brake parameters*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_BrakeTest_AcpAx (*sets parameters and starts test for the holding brake*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Command : McAcpAxBrakeTestCmdEnum; (*selects the command for this FB*)
Parameters : McAcpAxBrakeTestParType; (*brake test parameters*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
PositionError : LREAL; (*Maximal position error during brake test*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_LoadSimulationSetPar_AcpAx (*transfers parameters for the load simulation on the axis*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Parameters : McAcpAxSimulationParType; (*parameters used for defining the simulated load*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_LoadSimulationGetPar_AcpAx (*reads parameters for the load simulation from the axis*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
Parameters : McAcpAxSimulationParType; (*parameters used for defining the simulated load*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_GetDriveInfo_AcpAx (*read information from the axis and the corresponding drive*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
AxisInfo : McAcpAxAxisInfoType; (*output structure for axis information*)
ModuleInfo : McAcpAxModuleInfoType; (*output structure for module information*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_AutoTuneSpeedCtrl_AcpAx (*execute auto tuning for speed controller*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Parameters : McAcpAxAutoTuneParType; (*auto tuning parameters*)
AdvancedParameters : McAcpAxAdvAutoTuneSpeedCtrlType; (*advanced auto tuning parameters*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
CommandAborted : BOOL; (*Command was aborted by another command*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
Output : McAcpAxAutoTuneSpeedCtrlOutType; (*output parameters of auto tuning speed control*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_AutoTuneLoopFilters_AcpAx (*execute auto tuning for loop filters*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
LoopFilters : McAcpAxAutoTuneLoopFiltersType; (*loop filters parameters*)
Parameters : McAcpAxAutoTuneParType; (*auto tuning parameters*)
AdvancedParameters : McAcpAxAdvAutoTuneLoopFilterType; (*advanced auto tuning parameters*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
CommandAborted : BOOL; (*Command was aborted by another command*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
Output : McAcpAxAutoTuneLoopFilterOutType; (*output parameters of auto tuning loop filters*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_AutoTunePositionCtrl_AcpAx (*execute auto tuning for position controller*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Parameters : McAcpAxAutoTuneParType; (*auto tuning parameters*)
AdvancedParameters : McAcpAxAdvAutoTunePosCtrlType; (*advanced auto tuning parameters*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
CommandAborted : BOOL; (*Command was aborted by another command*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
Output : McAcpAxAutoTunePosCtrlOutType; (*output parameters of auto tuning position control*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_AutoTuneTest_AcpAx (*tests the stability of the controller*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Mode : McAcpAxAutoTuneTestModeEnum; (*mode for the stability test of the controller*)
Parameters : McAcpAxAutoTuneParType; (*auto tuning parameters*)
AdvancedParameters : McAcpAxAdvAutoTuneTestType; (*advanced auto tuning parameters*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
CommandAborted : BOOL; (*Command was aborted by another command*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
Output : McAcpAxAutoTuneTestOutType; (*output parameters of auto tuning test*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_AutoTuneInductMotor_AcpAx (*tune an induction motor*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Mode : McAcpAxAutoTuneMotorModeEnum; (*Mode for the auto tuning*)
Parameters : McAcpAxAutoTuneIndMotParType; (*auto tuning parameters*)
AdvancedParameters : McAcpAxAdvAutoTuneIndMotType; (*advanced auto tuning parameters*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
CommandAborted : BOOL; (*Command was aborted by another command*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
Output : McAcpAxAutoTuneIndMotOutType; (*output parameters of auto tuning for induction motor*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_AutoTuneSyncMotor_AcpAx (*tune a synchronous motor*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Mode : McAcpAxAutoTuneMotorModeEnum; (*Mode for the auto tuning*)
Parameters : McAcpAxAutoTuneSyncMotParType; (*auto tuning parameters*)
AdvancedParameters : McAcpAxAdvAutoTuneSyncMotType; (*advanced auto tuning parameters*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
CommandAborted : BOOL; (*Command was aborted by another command*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
Output : McAcpAxAutoTuneSyncMotOutType; (*output parameters of auto tuning for synchronous motor*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_AutoTuneMotorPhasing_AcpAx (*tune for phasing*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Mode : McAcpAxAutoTuneMotPhasModeEnum; (*Mode for the phasing auto tuning*)
Parameters : McAcpAxAutoTuneMotPhasParType; (*auto tuning parameters*)
AdvancedParameters : McAcpAxAdvAutoTuneMotPhasType; (*advanced auto tuning parameters*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
CommandAborted : BOOL; (*Command was aborted by another command*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
Output : McAcpAxAutoTuneMotPhasOutType; (*output parameters of auto tuning for motor phasing*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_AutoTuneLoadModel_AcpAx (*tune load model parameters*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Parameters : McAcpAxAutoTuneParType; (*auto tuning parameters*)
AdvancedParameters : McAcpAxAdvAutoTuneLoadModelType; (*advanced auto tuning parameters*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
CommandAborted : BOOL; (*Command was aborted by another command*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
Output : McAcpAxAutoTuneLoadModelOutType; (*output parameters of auto tuning for motor phasing*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_AutoTuneFeedForward_AcpAx (*execute auto tuning for feed forward*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Command : McAcpAxAutoTuneFeedFwdCmdEnum;
Mode : McAcpAxAutoTuneFeedFwdModeEnum; (*operating (identification) mode*)
Parameters : McAcpAxAutoTuneFeedFwdParType; (*basic operating parameters*)
AdvancedParameters : McAcpAxAdvAutoTuneFeedFwdType; (*advanced operating parameters*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
CommandAborted : BOOL; (*Command was aborted by another command*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
Output : McAcpAxAutoTuneFeedFwdOutType; (*output parameters of auto tuning feed forward*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_CamAutomatSetPar_AcpAx (*set parameter for configuration of cam automat*)
VAR_INPUT
Slave : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Command : McCamAutSetParCmdEnum; (*command for sending values*)
CamAutomat : McAcpAxCamAutDefineType; (*parameter source for cam automat*)
AdvancedParameters : McAcpAxAdvCamAutSetParType; (*advanced parameters for configuration options*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_CamAutomatGetPar_AcpAx (*get parameter of configured cam automat*)
VAR_INPUT
Slave : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
Command : McCamAutGetParCmdEnum; (*command for sending values*)
CamAutomat : McAcpAxCamAutDefineType; (*parameter source for cam automat*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*execution successful. FB finished*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_PhasingVelocity_AcpAx (*creates phase shift in the master position of a slave axis using a velocity motion profile*)
VAR_INPUT
Slave : REFERENCE TO McAxisType; (*axis reference*)
Enable : BOOL; (*FB is active as long as input is set*)
Acceleration : REAL; (*maximum acceleration to reach additive velocity*)
AdvancedParameters : McAcpAxAdvPhasingParType; (*structure for using advanced parameters*)
CyclicVelocity : REAL; (*cyclically transferred additive velocity*)
END_VAR
VAR_OUTPUT
Valid : BOOL; (*initialization complete, "CyclicVelocity" is processed*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
VelocityAttained : BOOL; (*additive velocity reached*)
ActualPhaseShift : LREAL; (*currently covered phase shift*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_OffsetVelocity_AcpAx (*creates phase shift in the slave position of a slave axis using a velocity motion profile*)
VAR_INPUT
Slave : REFERENCE TO McAxisType; (*axis reference*)
Enable : BOOL; (*FB is active as long as input is set*)
Acceleration : REAL; (*maximum acceleration to reach additive velocity*)
AdvancedParameters : McAcpAxAdvPhasingParType; (*structure for using advanced parameters*)
CyclicVelocity : REAL; (*cyclically transferred additive velocity*)
END_VAR
VAR_OUTPUT
Valid : BOOL; (*initialization complete, "CyclicVelocity" is processed*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
VelocityAttained : BOOL; (*additive velocity reached*)
ActualOffsetShift : LREAL; (*currently covered phase shift*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_WrLoadSimTorque_AcpAx (*transmit the simulated torque from the MTLoadSim function blocks to the axis being used*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Enable : BOOL; (*FB is active as long as input is set*)
Torque : REAL; (*Simulated torque that is transmitted to the axis [Nm]*)
END_VAR
VAR_OUTPUT
Valid : BOOL; (*Torque is being transferred to the axis*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_RdLoadSimTorque_AcpAx (*reads air gap torque ACOPOS simulation on PLC *)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Enable : BOOL; (* The function block is active as long as this input is set *)
END_VAR
VAR_OUTPUT
Valid : BOOL; (*Indicates that the value output at the "Torque" output is valid*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
Torque : REAL; (*Air gap torque of the electric motor [Nm]*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_WrLoadSimPosition_AcpAx (*transmit the simulated position of the rotor to the axis being used*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Enable : BOOL; (*FB is active as long as input is set*)
Position : LREAL; (*Simulated angular position of the rotor that is transmitted to the axis [rad]*)
END_VAR
VAR_OUTPUT
Valid : BOOL; (*Position is being transferred to the axis*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_WrLoadSimTwoEncPos_AcpAx (*transfer the simulated position of the rotor and simulated position of the load to the axis being used*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Enable : BOOL; (*FB is active as long as input is set*)
MotorPosition : LREAL; (*Simulated angular position of the rotor that is transferred to the axis [rad]*)
LoadPosition : LREAL; (*Simulated angular position of the load encoder that is transmitted to the axis [rad]*)
END_VAR
VAR_OUTPUT
Valid : BOOL; (*Positions are being transferred to the axis*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_RdLoadSimInputData_AcpAx (* This function block provides the values needed for the MTLoadSimCoupling function block *)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Enable : BOOL; (* The function block is active as long as this input is set *)
END_VAR
VAR_OUTPUT
Valid : BOOL; (*Indicates that the value output at the "Torque" output is valid*)
Busy : BOOL; (*FB is active and needs to be called*)
Error : BOOL; (*error occurred during operation*)
ErrorID : DINT; (*error number*)
LoadSimInputData : McAcpAxLoadSimInputDataType; (*Data which are needed for the load simulation. (E.g. for the FB MTLoadSimCoupling)*)
END_VAR
VAR
Internal : McInternalType; (*internal variable*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_ApsmPowerOn_AcpAx (* This function block switches on the output of an ACOPOS auxiliary power supply module*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*Indicates whether the output is on*)
Busy : BOOL; (*Function block is active and must continue to be called.*)
CommandAborted : BOOL; (*Command aborted by another command.*)
Error : BOOL; (*Execution error*)
ErrorID : DINT; (*Error number*)
END_VAR
VAR
Internal : McInternalType;
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_ApsmPowerOff_AcpAx (* This function block switches off the output of an ACOPOS auxiliary power supply module*)
VAR_INPUT
Axis : REFERENCE TO McAxisType; (*axis reference*)
Execute : BOOL; (*execution of this FB is started on rising edge of the input*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*Indicates whether the output is off*)
Busy : BOOL; (*Function block is active and must continue to be called.*)
CommandAborted : BOOL; (*Command aborted by another command.*)
Error : BOOL; (*Execution error*)
ErrorID : DINT; (*Error number*)
END_VAR
VAR
Internal : McInternalType;
END_VAR
END_FUNCTION_BLOCK

View File

@@ -0,0 +1,753 @@
TYPE
McAcpAxDataTypeEnum :
(
mcACPAX_PARTYPE_BOOL := 1, (*Data type: Digital information, 1 bit (1 byte)*)
mcACPAX_PARTYPE_SINT, (*Data type: Whole number, 1 byte*)
mcACPAX_PARTYPE_INT, (*Data type: Whole number, 2 bytes*)
mcACPAX_PARTYPE_DINT, (*Data type: Whole number, 4 bytes*)
mcACPAX_PARTYPE_USINT, (*Data type: Whole number, 1 byte, positive numbers only*)
mcACPAX_PARTYPE_UINT, (*Data type: Whole number, 2 bytes, positive numbers only*)
mcACPAX_PARTYPE_UDINT, (*Data type: Whole number, 4 bytes, positive numbers only*)
mcACPAX_PARTYPE_REAL, (*Data type: Floating point, 4 bytes*)
mcACPAX_PARTYPE_VOID := 65535 (*General data type*)
);
McAcpAxProcessParIDModeEnum :
(
mcACPAX_PARID_GET := 0, (*Read ParID(s)*)
mcACPAX_PARID_SET, (*Write ParID(s)*)
mcACPAX_PARID_GET_NO_NCT (*Read ParID(s) without entry in the NCT*)
);
McAcpAxProcessParTabModeEnum :
(
mcACPAX_PARTAB_SET := 0 (*Write parameter(s)*)
);
McAcpAxCycParIDModeEnum :
(
mcACPAX_CYCLIC_PARID_READ := 0, (*Read ParID(s) cyclically*)
mcACPAX_CYCLIC_PARID_WRITE (*Write ParID(s) cyclically*)
);
McAcpAxCycParIDRefreshModeEnum :
(
mcACPAX_CYCLIC_MULTIPLEXED := 0, (*Entry in only one data telegram*)
mcACPAX_CYCLIC_EVERY_RECORD (*Entry in the current data telegram and every subsequent automatically created data telegram (ParID value is updated every network cycle)*)
);
McAcpAxTriggerEnum :
(
mcACPAX_TRIGGER_1, (*Selects trigger input 1*)
mcACPAX_TRIGGER_2 (*Selects trigger input 2*)
);
McAcpAxLimitLoadModeEnum :
(
mcACPAX_LL_WITH_FEED_FORWARD := 0, (*The overall torque is limited, i.e. the sum of feed-forward torque and corrective action*)
mcACPAX_LL_WITHOUT_FEED_FORWARD (*Only the share of torque that results from control deviations is limited. Feed-forward torque is ignored*)
);
McAcpAxBrakeTestCmdEnum :
(
mcACPAX_BRAKE_TEST_INIT := 0, (*Transfers parameters for holding brake test*)
mcACPAX_BRAKE_TEST_START := 1, (*Starts the holding brake test*)
mcACPAX_BRAKE_TEST_INIT_START (*Initializes and starts the holding brake test*)
);
McAcpAxBrakeTestModeEnum :
(
mcACPAX_BRAKE_TEST_STANDARD := 0, (*Standard brake test*)
mcACPAX_BRAKE_TEST_SAFETY (*Safe brake test*)
);
McAcpAxAxisTypeEnum :
(
mcACPAX_AXIS_REAL, (*Real axis*)
mcACPAX_AXIS_VIRTUAL, (*Virtual axis*)
mcACPAX_AXIS_EXT_ENC (*External encoder axis*)
);
McAcpAxProductFamilyEnum :
(
mcACPAX_ACOPOS, (*ACOPOS*)
mcACPAX_ACOPOS_MULTI, (*ACOPOSmulti*)
mcACPAX_ACOPOS_MICRO, (*ACOPOSmicro*)
mcACPAX_ACOPOS_REMOTE, (*ACOPOSremote*)
mcACPAX_ACOPOS_MOTOR, (*ACOPOSmotor*)
mcACPAX_ACOPOS_P3 (*ACOPOS P3*)
);
McAcpAxModuleTypeEnum :
(
mcACPAX_MODULE_INVERTER, (*Inverter module*)
mcACPAX_MODULE_ACTIVE_SUPPLY, (*Active power supply module*)
mcACPAX_MODULE_PASSIVE_SUPPLY (*Passive power supply module*)
);
McAcpAxSimulationOnPlcEnum :
(
mcACPAX_SIM_STATE_OFF, (*Simulation disabled*)
mcACPAX_SIM_STATE_ON, (*Simulation enabled*)
mcACPAX_SIM_SET_VALUE_GENERATION, (*Simulation based on target value generation only*)
mcACPAX_SIM_COMPLETE_CTRL_SYSTEM (*Full simulation*)
);
McAcpAxCtrlModeEnum :
(
mcACPAX_CTRL_POSITION := 1, (*Position control*)
mcACPAX_CTRL_POSITION_WITH_FF := 33 (*Position controller with feed-forward control*)
);
McAcpAxCtrlParSelectEnum :
(
mcACPAX_CTRL_SELECT_ALL_PAR, (*Default setting; all parameters are transferred*)
mcACPAX_CTRL_SELECT_POSITION, (*Used for selecting the position controller parameters*)
mcACPAX_CTRL_SELECT_SPEED, (*Used for selecting the velocity controller parameters*)
mcACPAX_CTRL_SELECT_FEED_FORWARD, (*Used for selecting the feed-forward control parameters*)
mcACPAX_CTRL_SELECT_ADV_PAR_ONLY (*Used for selecting advanced parameters (if written)*)
);
McAcpAxLoopFilterTypeEnum :
(
mcACPAX_LOOP_FILTER_NO_TRANSFER, (*Filter parameter not transferred*)
mcACPAX_LOOP_FILTER_OFF, (*Filter switched off*)
mcACPAX_LOOP_FILTER_LOWPASS, (*Low-pass filter*)
mcACPAX_LOOP_FILTER_NOTCH, (*Notch*)
mcACPAX_LOOP_FILTER_Z_TRANS_FUN, (*Z-transfer function*)
mcACPAX_LOOP_FILTER_COMPENSATION, (*Compensation*)
mcACPAX_LOOP_FILTER_BIQUAD, (*Biquad filter*)
mcACPAX_LOOP_FILTER_LIM, (*Limits*)
mcACPAX_LOOP_FILTER_LIM_LINEAR, (*Linear limit*)
mcACPAX_LOOP_FILTER_LIM_R_TIME (*Rise limit*)
);
McAcpAxAutoTuneExSignalEnum :
(
mcACPAX_EX_SIGNAL_PRBS := 0, (*Standard*)
mcACPAX_EX_SIGNAL_CHIRP := 1, (*Chirp (linear frequency modulation)*)
mcACPAX_EX_SIGNAL_CHIRP_TRAPEZ := 2 (*Chirp (linear frequency modulation) with trapezoidal amplitude response*)
);
McAcpAxAutoTuneTestModeEnum:
(
mcACPAX_TEST, (*Controller test*)
mcACPAX_TEST_POSITION, (*Controller test (position controller)*)
mcACPAX_TEST_SPEED (*Controller test (rotary speed controller)*)
);
McAcpAxIntegrationTimeModeEnum:
(
mcACPAX_INTEGRATION_TIME_IGNORE, (*Integral action time is neither taken into account nor calculated*)
mcACPAX_INTEGRATION_TIME_USE, (*Integral action time is taken into account for autotuning*)
mcACPAX_INTEGRATION_TIME_TUNE (*Integral action time is calculated for autotuning*)
);
McAcpAxAutoTuneOperatPointEnum:
(
mcACPAX_OP_TUNE_STANDSTILL, (*Autotuning at standstill*)
mcACPAX_OP_TUNE_V_CONSTANT (*Autotuning at constant velocity*)
);
McAcpAxAutoTuneMotorModeEnum:
(
mcACPAX_ATM_IDENTIFICATION := 10, (*Identification of the parameter on the drive*)
mcACPAX_ATM_TEST := 12 (*Test of the motor to detect aging*)
);
McAcpAxLoadModelIdentModeEnum:
(
mcACPAX_MODEL_IDENT_CLOSED_LOOP := 0, (*Model identification in closed loop, using excitation signal with potentially variable amplitude.*)
mcACPAX_MODEL_IDENT_OPEN_LOOP := 1 (*Model identification in open loop, using excitation signal with constant amplitude.*)
);
McAcpAxAutoTuneMotPhasModeEnum:
(
mcACPAX_ATMP_SATURATION := 30, (*Saturation*)
mcACPAX_ATMP_STEPPER := 31, (*Stepper*)
mcACPAX_ATMP_DITHER := 32, (*Dither*)
mcACPAX_ATMP_SET_OFFSET := 34 (*Set commutation offset*)
);
McAcpAxSimulationModeEnum :
(
mcACPAX_SIMULATION_1MASS_AUTO, (*Standard (1-mass model, parameters determined automatically)*)
mcACPAX_SIMULATION_1MASS, (*1-mass load model*)
mcACPAX_SIMULATION_2MASS, (*2-mass load model*)
mcACPAX_SIMULATION_SET_GEN_ONLY (*set value generation only*)
);
McAcpAxFeedbackModeEnum:
(
mcACPAX_FBCTRL_MODE_STANDARD := 0, (*Standard: ncSTANDARD*)
mcACPAX_FBCTRL_MODE_1MASS_MODEL := 4, (*One mass load model: ncMODEL_1MASS*)
mcACPAX_FBCTRL_MODE_2MASS_MODEL := 3, (*Two mass load model: ncMODEL_2MASS*)
mcACPAX_FBCTRL_MODE_2ENC_SPEED := 5 (*Two encoder speed: nc2ENCOD_SPEED*)
);
McAcpAxHomingParType : STRUCT
HomingMode : McHomingModeEnum; (*Mode for homing*)
Position : LREAL; (*Absolute position or homing offset when homing signal [Measurement units] occurs*)
StartVelocity : REAL; (*Velocity for reference switch search [Measurement units/s]*)
HomingVelocity : REAL; (*Velocity (after reaching reference switch) [Measurement units/s]*)
Acceleration : REAL; (*Maximum acceleration [Measurement units/s²]*)
SwitchEdge : McDirectionEnum; (*Edge of reference switch*)
StartDirection : McDirectionEnum; (*Start direction for searching the reference edge*)
HomingDirection : McDirectionEnum; (*Direction for homing (after reaching reference switch)*)
ReferencePulse : McSwitchEnum; (*The encoder's reference pulse is used for homing*)
KeepDirection : McSwitchEnum; (*The direction of movement is or is not permitted to be changed during the homing procedure*)
ReferencePulseBlockingDistance : REAL; (*Distance for blocking activation of "triggering reference pulse" [Measurement units]*)
TorqueLimit : REAL; (*Torque limit value for homing to blocks [Nm]*)
BlockDetectionPositionError : REAL; (*Lag error for block detection [Measurement units]*)
PositionErrorStopLimit : REAL; (*Lag error for canceling homing procedure [Measurement units]*)
RestorePositionVariableAddress : UDINT; (*Address of a remanent variable of type McAcpAxRestorePosType that is needed for "HomingMode" mcHOMING_RESTORE_POSITION*)
END_STRUCT;
McAcpAxProcessParIDType : STRUCT
ParID : UINT; (*Parameter ID number to be read or written*)
VariableAddress : UDINT; (*Address of the variable that receives the read value or the corresponding value that is to be written*)
DataType : McAcpAxDataTypeEnum; (*Data type of the variable:*)
END_STRUCT;
McAcpAxProcessParTabDataType : STRUCT
DataObjectName : STRING[12]; (*Name of the ACOPOS parameter table data object*)
END_STRUCT;
McAcpAxProcessParTabAddInfoType : STRUCT
NumberOfParameters : UDINT; (*Number of transferred parameters*)
END_STRUCT;
McAcpAxCycParIDType : STRUCT
ParID : UINT; (*Parameter ID number to be read or written*)
VariableAddress : UDINT; (*Address of the variable that receives the read value or the corresponding value that is to be written*)
DataType : McAcpAxDataTypeEnum; (*Data type of the variable:*)
RefreshMode : McAcpAxCycParIDRefreshModeEnum; (*Defines how often a ParID should be read/written*)
END_STRUCT;
McAcpAxTriggerStopType : STRUCT
TriggerSource : McAcpAxTriggerEnum; (*Source of the trigger event*)
TriggerEdge : McEdgeEnum; (*Selection of the edge for the trigger event*)
TriggerDistance : LREAL; (*Distance after the trigger event occurs [Measurement units]*)
ForceTriggerDistance : McSwitchEnum; (*Forces the trigger distance to be traveled even if it exceeds the end position*)
END_STRUCT;
McAcpAxAdvLimitLoadParType : STRUCT
LoadPosAccelParID : UINT; (*ParID with limit value for accelerating torque in the positive direction*)
LoadPosDecelParID : UINT; (*ParID with limit value for decelerating torque in the positive direction*)
LoadNegAccelParID : UINT; (*ParID with limit value for accelerating torque in the negative direction*)
LoadNegDecelParID : UINT; (*ParID with limit value for decelerating torque in the negative direction*)
END_STRUCT;
McAcpAxBrakeParType : STRUCT
AutomaticControl : McSwitchEnum := mcSWITCH_ON; (*Automatic control on/off (Default setting:*)
RestrictedBrakeControl : McSwitchEnum := mcSWITCH_ON; (*Holding brake can only be applied and released (Default setting:*)
ControlMonitoring : McSwitchEnum := mcSWITCH_ON; (*Enables/disables control monitoring (Default setting:*)
MovementMonitoring : McSwitchEnum := mcSWITCH_ON; (*Enables/disables movement monitoring (Default setting:*)
VoltageMonitoring : McSwitchEnum := mcSWITCH_ON; (*Enables/disables monitoring of external voltage over 24 V (Default setting:*)
TestAtPowerOn : McSwitchEnum := mcSWITCH_OFF; (*Enables/disables automatic torque testing when the controller is switched on (Default setting:*)
TestAtPowerOff : McSwitchEnum := mcSWITCH_OFF; (*Enables/disables automatic torque testing when the controller is switched off (Default setting:*)
AutomaticInductionStop : McSwitchEnum := mcSWITCH_OFF; (*Enables/disables automatic induction stop (Default setting:*)
EnableSBTRequestBySMC : McSwitchEnum := mcSWITCH_OFF; (*Enables the automatic safe brake test requested and monitored by module SafeMC (Default setting:*)
ControlMonitoringFilterTime : REAL := 0.5; (*Time after which an error is reported after control monitoring is enabled. [s] (Default setting: 0.5)*)
END_STRUCT;
McAcpAxBrakeTestParType : STRUCT
Mode : McAcpAxBrakeTestModeEnum; (*Mode for brake test*)
Torque : REAL; (*Torque for holding brake test [Nm]*)
Duration : REAL; (*Duration of holding brake test [s]*)
PositionLimit : LREAL; (*Position error limit for holding brake test [Measurement units]*)
END_STRUCT;
McAcpAxSimulationMass1Type : STRUCT
Inertia : REAL; (*Inertia [kgm²]*)
StaticFriction : REAL; (*Static friction [Nm]*)
ViscousFriction : REAL; (*Viscous friction*)
END_STRUCT;
McAcpAxSimulationMass2Type : STRUCT
Inertia : REAL; (*Inertia [kgm²]*)
StaticFriction : REAL; (*Static friction [Nm]*)
ViscousFriction : REAL; (*Viscous friction*)
Stiffness : REAL; (*Stiffness to coupled mass 1 [Nm]*)
Damping : REAL; (*Damping to coupled mass 1 [Nms]*)
END_STRUCT;
McAcpAxSimulationParType : STRUCT
Mode : McAcpAxSimulationModeEnum; (*Mode for load simulation on the drive*)
AdditiveLoadParID : UINT; (*Parameter ID for applying an additional load*)
Mass1 : McAcpAxSimulationMass1Type; (*Parameter for determining the first mass*)
Mass2 : McAcpAxSimulationMass2Type; (*Parameter for determining the second mass*)
END_STRUCT;
McAcpAxRestorePosType: STRUCT
Data : ARRAY[0..17] OF DINT; (*Data for restoring the position*)
END_STRUCT;
McAcpAxAxisInfoType : STRUCT
AxisType : McAcpAxAxisTypeEnum; (*Axis type*)
ChannelNumber : UDINT; (*Channel number of the axis*)
AcoposSimulationOnPlcMode : McAcpAxSimulationOnPlcEnum; (*Information about the ACOPOS drive simulation mode that is enabled on the controller for this axis*)
END_STRUCT;
McAcpAxModuleInfoType : STRUCT
ProductFamily : McAcpAxProductFamilyEnum; (*Product family*)
ModuleType : McAcpAxModuleTypeEnum; (*Module type*)
NetworkType : McNetworkTypeEnum; (*Network type*)
NodeNumber : UDINT; (*Node number*)
AcoposSimulationOnPlc : McAcpAxSimulationOnPlcEnum; (*Information about whether ACOPOS drive simulation is enabled on the controller for this module*)
END_STRUCT;
McAcpAxPosCtrlParType : STRUCT
ProportionalGain : REAL; (*Proportional gain [1/s]*)
IntegrationTime : REAL; (*Integral action time of integral component [s]*)
PredictionTime : REAL; (*Prediction time [s]*)
TotalDelayTime : REAL; (*Total delay [s]*)
END_STRUCT;
McAcpAxSpeedCtrlParType : STRUCT
ProportionalGain : REAL; (*Proportional gain [As/Rev.]*)
IntegrationTime : REAL; (*Integral action time of integral component [s]*)
FilterTime : REAL; (*Filter time constant [s]*)
END_STRUCT;
McAcpAxFeedForwardParType : STRUCT
TorqueLoad : REAL; (*Load torque [Nm}*)
TorquePositive : REAL; (*Torque in positive direction [Nm]*)
TorqueNegative : REAL; (*Torque in negative direction [Nm]*)
SpeedTorqueFactor : REAL; (*Velocity torque factor [Nms]*)
Inertia : REAL; (*Moment of inertia [kgm²]*)
AccelerationFilterTime : REAL; (*Acceleration filter time constant [s]*)
END_STRUCT;
McAcpAxLoopFilterParType : STRUCT
Type : McAcpAxLoopFilterTypeEnum; (*Loop filter type used*)
LowPass : McAcpAxLoopFilterLowPassType; (*Parameter for low pass*)
Notch : McAcpAxLoopFilterNotchType; (*Parameter for band-stop filter*)
ZTransferFunction : McAcpAxLoopFilterZTransFunType; (*Parameter for z-transfer function*)
Compensation : McAcpAxLoopFilterCompType; (*Parameter for compensation*)
Biquad : McAcpAxLoopFilterBiquadType; (*Parameter for biquad filter*)
Limiter : McAcpAxLoopFilterLimType; (*Parameter for limit*)
LimiterLinear : McAcpAxLoopFilterLimLinearType; (*Parameter for linear limit*)
LimiterRiseTime : McAcpAxLoopFilterLimRiseTimeType; (*Parameter for rise limit*)
END_STRUCT;
McAcpAxLoopFilterLowPassType : STRUCT
CutOffFrequency : REAL; (*Low pass: Limit frequency [Hz]*)
END_STRUCT;
McAcpAxLoopFilterNotchType : STRUCT
CenterFrequency : REAL; (*Band-stop: Center frequency [Hz]*)
Bandwidth : REAL; (*Band-stop: bandwidth [Hz]*)
END_STRUCT;
McAcpAxLoopFilterZTransFunType: STRUCT
A0 : REAL; (*Coefficient a0 of the denominator polynomial*)
A1 : REAL; (*Coefficient a1 of the denominator polynomial*)
B0 : REAL; (*Coefficient b0 of the numerator polynomial*)
B1 : REAL; (*Coefficient b1 of the numerator polynomial*)
B2 : REAL; (*Coefficient b2 of the numerator polynomial*)
END_STRUCT;
McAcpAxLoopFilterCompType : STRUCT
MultiplicationFactorParID : UINT; (*ACOPOS drive parameter ID for multiplication point*)
AdditiveValueParID : UINT; (*ACOPOS drive parameter ID for addition point*)
END_STRUCT;
McAcpAxLoopFilterBiquadType : STRUCT
FrequencyNumerator : REAL; (*Biquad filter: Known frequency counter [Hz]*)
DampingNumerator : REAL; (*Biquad filter: Damping counter*)
FrequencyDenominator : REAL; (*Biquad filter: Known frequency denominator [Hz]*)
DampingDenominator : REAL; (*Biquad filter: Damping denominator*)
END_STRUCT;
McAcpAxLoopFilterLimType : STRUCT
PositiveLimit : REAL; (*Positive limit [A]*)
NegativeLimit : REAL; (*Negative limit [A]*)
PositiveLimitParID : UINT; (*ACOPOS drive parameter ID for the magnitude of the positive limit*)
NegativeLimitParID : UINT; (*ACOPOS drive parameter ID for the magnitude of the negative limit*)
END_STRUCT;
McAcpAxLoopFilterLimLinearType : STRUCT
InputParID : UINT; (*ACOPOS drive parameter ID for the function input*)
InputLimit : REAL; (*Input limit value for complete limit [Hz]*)
Gradient : REAL; (*Slope [As]*)
END_STRUCT;
McAcpAxLoopFilterLimRiseTimeType : STRUCT
RiseTime : REAL; (*Rise time [s]*)
NormalizedLimit : REAL; (*Normalized limit*)
END_STRUCT;
McAcpAxFeedbackParType : STRUCT
SpeedMixRatio : REAL; (*Speed mixing ratio.*)
SpeedProportionalGain : REAL; (*Speed proportional gain [As].*)
END_STRUCT;
McAcpAxAutoTuneExSignalType: STRUCT
SignalType: McAcpAxAutoTuneExSignalEnum; (*Type of excitation signal*)
SignalOrder : UDINT := 9; (*Order of the excitation signal (only for signal type PRBS)*)
DelayTime : REAL; (*Delay time for transient operations [s] (only for signal type PRBS)*)
SignalStartFrequency : REAL; (*Starting frequency of the excitation signal [Hz] (only for chirp signal types)*)
SignalStopFrequency : REAL; (*Stopping frequency of the excitation signal [Hz] (only for chirp signal types)*)
SignalTime : REAL; (*Duration of the excitation signal [s] (only for chirp signal types)*)
END_STRUCT;
McAcpAxAutoTuneParType : STRUCT
Orientation : McAcpAxAutoTuneOrientationEnum; (*Selects the orientation for autotuning*)
MaxCurrentPercent : REAL; (*Percentage of the rated current that is used during autotuning [%]*)
MaxDistance : LREAL; (*Maximum distance traveled during autotuning [Measurement units]*)
MaxPositionError : LREAL; (*Maximum permitted lag error during autotuning[Measurement units]*)
END_STRUCT;
McAcpAxAutoTuneSpeedCtrlOutType : STRUCT
Quality : REAL; (*Quality of parameter identification [%]*)
EstimatedInertia : REAL; (*Estimated drive inertia [kg/m*)
ProportionalGain : REAL; (*Estimated proportional gain factor [As]*)
IntegrationTime : REAL; (*Estimated integral action time [s]*)
FilterTime : REAL; (*Filter time constant [s]*)
LoopFilter1 : McAcpAxLoopFilterParType; (*LoopFilter1 settings*)
PhaseCrossoverFrequency : REAL; (*Phase crossover frequency of the controlled system [Hz]*)
Feedback : McAcpAxFeedbackParType; (*Feedback parameters for one mass model, two mass model and two encoder speed feedback mode*)
Parameters : McCfgAcpCtrlType; (*Parameter structure for usage on MC_BR_ProcessConfig and MC_BR_ProcessParam*)
END_STRUCT;
McAcpAxAutoTuneLoopFilterOutType : STRUCT
Quality : REAL; (*Quality of parameter identification [%]*)
LoopFilter1 : McAcpAxLoopFilterParType; (*Parameter for first control loop filter*)
LoopFilter2 : McAcpAxLoopFilterParType; (*Parameter for additional control loop filter*)
LoopFilter3 : McAcpAxLoopFilterParType; (*Parameter for additional control loop filter*)
Parameters : McCfgAcpCtrlType; (*Parameter structure for usage on MC_BR_ProcessConfig and MC_BR_ProcessParam*)
END_STRUCT;
McAcpAxAutoTunePosCtrlOutType : STRUCT
Quality : REAL; (*Quality of parameter identification [%]*)
ProportionalGain : REAL; (*Estimated proportional gain factor [As/U]*)
Parameters : McCfgAcpCtrlType; (*Parameter structure for usage on MC_BR_ProcessConfig and MC_BR_ProcessParam*)
END_STRUCT;
McAcpAxAutoTuneTestOutType : STRUCT
Quality : REAL; (*Quality of parameter identification [%]*)
END_STRUCT;
McAcpAxAutoTuneLoopFiltersType : STRUCT
LoopFilter1Mode : McAcpAxLoopFilterModeEnum := mcACPAX_LOOP_FILTER_IGNORE; (*Mode for loop filter tuning:*)
LoopFilter2Mode : McAcpAxLoopFilterModeEnum := mcACPAX_LOOP_FILTER_IGNORE; (*Mode for loop filter tuning:*)
LoopFilter3Mode : McAcpAxLoopFilterModeEnum := mcACPAX_LOOP_FILTER_IGNORE; (*Mode for loop filter tuning:*)
END_STRUCT;
McAcpAxAdvAutoTuneSpeedCtrlType : STRUCT
FeedbackMode : McAcpAxFeedbackModeEnum; (*Defines the controller feedback mode during the tuning process.*)
LoopFilter1Mode : McAcpAxLoopFilterModeEnum; (*Mode for taking LoopFilter1 into account*)
FilterTimeMode : McAcpAxFilterTimeModeEnum; (*Mode for taking the filter time constant into account*)
IntegrationTimeMode : McAcpAxIntegrationTimeModeEnum; (*Mode for taking integral action time into account*)
OperatingPoint : McAcpAxAutoTuneOperatPointEnum; (*Selects the operating point for autotuning*)
Velocity : REAL; (*Note: Not used, should be deprecated.*)
MaxVelocityPercent : REAL := 50.0; (*Maximum velocity, in percent of the the axis velocity limit, applied during autotuning if "OperatingPoint" = mcACPAX_OP_TUNE_V_CONSTANT. [%]*)
Acceleration : REAL; (*Acceleration applied during autotuning if "OperatingPoint" = mcACPAX_OP_TUNE_V_CONSTANT. [Measurement units / s^2]*)
MaxProportionalGain : REAL := 2000; (*Maximum proportional gain [As]*)
ProportionalGainPercent : REAL := 100; (*Percentage of the proportional gain determined during autotuning that will be used for the control parameters [%]*)
ResonanceFactor : REAL := 2; (*Factor for detecting resonance*)
InertiaEstimationLowerFrequency : REAL := 10; (*Lower frequency for estimating the mass moment of inertia of the drive [Hz]*)
InertiaEstimationUpperFrequency : REAL := 40; (*Upper frequency for estimating the mass moment of inertia of the drive [Hz]*)
ExcitationSignal : McAcpAxAutoTuneExSignalType; (*Parameter for excitation signal*)
LoadModel : McAcpAxLoadModelType; (*Load model parameters required for autotuning in one mass, two mass and two encoder speed feedback mode.*)
END_STRUCT;
McAcpAxAdvAutoTuneLoopFilterType : STRUCT
OperatingPoint : McAcpAxAutoTuneOperatPointEnum; (*Selects the operating point for autotuning*)
Velocity : REAL; (*Maximum velocity applied during autotuning if "OperatingPoint =*)
Acceleration : REAL; (*Acceleration applied during autotuning if "OperatingPoint =*)
ResonanceFactor : REAL := 2; (*Factor for detecting resonance*)
ExcitationSignal : McAcpAxAutoTuneExSignalType; (*Parameter for excitation signal*)
END_STRUCT;
McAcpAxAdvAutoTunePosCtrlType : STRUCT
OperatingPoint : McAcpAxAutoTuneOperatPointEnum; (*Selects the operating point for autotuning*)
Velocity : REAL; (*Maximum velocity applied during autotuning if "OperatingPoint =*)
Acceleration : REAL; (*Acceleration applied during autotuning if "OperatingPoint =*)
MaxProportionalGain : REAL := 2000; (*Maximum proportional gain [As]*)
ProportionalGainPercent : REAL := 100; (*Percentage of the proportional gain determined during autotuning that will be used for the control parameters [%]*)
ExcitationSignal : McAcpAxAutoTuneExSignalType; (*Parameter for excitation signal*)
END_STRUCT;
McAcpAxAdvAutoTuneTestType : STRUCT
ExcitationSignal : McAcpAxAutoTuneExSignalType; (*Parameter for excitation signal*)
END_STRUCT;
McAcpAxAutoTuneIndMotParType : STRUCT
NominalVoltage : REAL; (*Nominal voltage (RMS value, phase-phase) [V]*)
NominalCurrent : REAL; (*Phase current for generating the nominal torque at nominal speed (RMS value) [A]*)
NominalSpeed : REAL; (*Nominal speed [RPM]*)
NominalFrequency : REAL; (*Nominal frequency [Hz]*)
PowerFactor : REAL; (*Power factor (cos phi)*)
ThermalTrippingTime : REAL; (*Tripping time for thermal overload [s]*)
END_STRUCT;
McAcpAxAdvAutoTuneIndMotType : STRUCT
Phase : USINT; (*Motor phase the setup is executed with (1=U, 2=V, 3=W*)
NumberOfPolePairs : USINT; (*Number of pole pairs*)
MaximumSpeed : REAL; (*Maximal speed [RPM]*)
StallTorque : REAL; (*Torque at standstill [Nm]*)
NominalTorque : REAL; (*Nominal torque [Nm]*)
PeakTorque : REAL; (*Peak torque [Nm]*)
StallCurrent : REAL; (*Current at standstill [A]*)
PeakCurrent : REAL; (*Peak current [A]*)
MagnetizingCurrent : REAL; (*Magnetizing current [A]*)
WindingCrossSection : REAL; (*Cunductor cross section of a phase [mm^2]*)
InverterCharacteristicGain : REAL; (*Inverter characteristic curve: Gain factor*)
InverterCharacteristicExponent : REAL; (*Inverter characteristic curve: Exponent [1/A]*)
END_STRUCT;
McAcpAxAutoTuneIndMotOutType : STRUCT
Quality : REAL;
Parameters : McCfgMotInductType; (*Parameter structure for usage on MC_BR_ProcessConfig*)
NumberOfPolePairs : USINT; (*Number of pole pairs*)
MaximumSpeed : REAL; (*Maximal speed [RPM]*)
StallTorque : REAL; (*Torque at standstill [Nm]*)
NominalTorque : REAL; (*Nominal torque [Nm]*)
PeakTorque : REAL; (*Peak torque [Nm]*)
StallCurrent : REAL; (*Current at standstill [A]*)
PeakCurrent : REAL; (*Peak current [A]*)
WindingCrossSection : REAL; (*Cunductor cross section of a phase [mm^2]*)
StatorResistance : REAL; (*Stator resistance (phase) [Ohm]*)
StatorInductance : REAL; (*Stator leakage inductance (phase) [mH]*)
RotorResistance : REAL; (*Rotor resistance (phase) [Ohm]*)
RotorInductance : REAL; (*Rotor leakage inductance (phase) [mH]*)
MutualInductance : REAL; (*Mutual inductance (phase) [mH]*)
MagnetizingCurrent : REAL; (*Magnetizing current [A]*)
END_STRUCT;
McAcpAxAutoTuneSyncMotParType : STRUCT
NominalVoltage : REAL; (*Nominal voltage (RMS value, phase-phase) [V]*)
NominalCurrent : REAL; (*Phase current for generating the nominal torque at nominal speed (RMS value) [A]*)
NominalSpeed : REAL; (*Nominal speed [RPM]*)
NominalTorque : REAL; (*Nominal torque [Nm]*)
NumberOfPolePairs : USINT; (*Number of pole pairs*)
PeakCurrent : REAL; (*Peak current [A]*)
PeakTorque : REAL; (*Peak torque [NM]*)
ThermalTrippingTime : REAL; (*Tripping time for thermal overload [s]*)
END_STRUCT;
McAcpAxAdvAutoTuneSyncMotType : STRUCT
Phase : USINT; (*Motor phase the setup is executed with (1=U, 2=V, 3=W*)
VoltageConstant : REAL; (*Voltage constant [mVmin]*)
MaximumSpeed : REAL; (*Maximal speed [RPM]*)
StallTorque : REAL; (*Torque at standstill [Nm]*)
TorqueConstant : REAL; (*Torque constant [Nm/A]*)
StallCurrent : REAL; (*Current at standstill [A]*)
WindingCrossSection : REAL; (*Cunductor cross section of a phase [mm^2]*)
InverterCharacteristicGain : REAL; (*Inverter characteristic curve: Gain factor*)
InverterCharacteristicExponent : REAL; (*Inverter characteristic curve: Exponent [1/A]*)
END_STRUCT;
McAcpAxAutoTuneSyncMotOutType : STRUCT
Quality : REAL;
Parameters : McCfgMotSynType; (*Parameter structure for usage on MC_BR_ProcessConfig*)
VoltageConstant : REAL; (*Voltage constant [mVmin]*)
MaximumSpeed : REAL; (*Maximal speed [RPM]*)
StallTorque : REAL; (*Torque at standstill [Nm]*)
TorqueConstant : REAL; (*Torque constant [Nm/A]*)
StallCurrent : REAL; (*Current at standstill [A]*)
WindingCrossSection : REAL; (*Cunductor cross section of a phase [mm^2]*)
StatorResistance : REAL; (*Stator resistance (phase) [Ohm]*)
StatorInductance : REAL; (*Stator leakage inductance (phase) [mH]*)
END_STRUCT;
McAcpAxAutoTuneMotPhasParType : STRUCT
PhasingCurrent : REAL; (*Motor current durring phasing [A]*)
PhasingTime : REAL; (*Time for phasing the motor [s]*)
END_STRUCT;
McAcpAxAdvAutoTuneMotPhasType : STRUCT
CommutationOffset : REAL; (*Commutation offset [rad]*)
END_STRUCT;
McAcpAxAutoTuneMotPhasOutType : STRUCT
Quality : REAL;
NumberOfPolePairs : USINT; (*Number of pole pairs*)
CommutationOffset : REAL; (*Commutation offset [rad]*)
END_STRUCT;
McAcpAxAdvAutoTuneLoadModelType : STRUCT
IdentMode : McAcpAxLoadModelIdentModeEnum; (*Load model identification mode, i.e. closed or open loop.*)
ExcitationSignal : McAcpAxAutoTuneExSignalType; (*Parameters for excitation signal.*)
END_STRUCT;
McAcpAxAutoTuneLoadModelOutType : STRUCT
Quality : REAL; (*Quality of parameter identification [%]*)
LoadModel : McAcpAxLoadModelType; (*Load model parameters resulting from the autotuning (identification).*)
Parameters : McCfgAcpCtrlType; (*Parameter structure for usage on MC_BR_ProcessConfig and MC_BR_ProcessParam*)
END_STRUCT;
McAcpAxAutoTuneFeedFwdParType : STRUCT
Direction : McDirectionEnum; (*Used for selecting the direction of movement for autotuning the feed-forward control*)
Orientation : McAcpAxAutoTuneOrientationEnum; (*Selects the orientation for autotuning*)
MaxCurrentPercent : REAL := 25.0; (*Percentage of the rated current that is used during autotuning [%]*)
MaxVelocityPercent : REAL := 50.0; (*Percentage of the velocity used during autotuning [%]*)
MaxDistance : LREAL; (*Maximum distance traveled during autotuning [Measurement units]*)
MaxPositionError : LREAL; (*Maximum permitted lag error during autotuning [Measurement units]*)
Acceleration : REAL; (*Acceleration that is used during autotuning [Measurement units/s]*)
END_STRUCT;
McAcpAxAdvAutoTuneFeedFwdType : STRUCT
ExcitationSignal : McAcpAxAutoTuneExSignalType; (*Parameter for excitation signal*)
END_STRUCT;
McAcpAxAutoTuneFeedFwdOutType : STRUCT
Quality : REAL; (*Quality of parameter identification [%]*)
FeedForward : McAcpAxFeedForwardParType; (*Parameter for first control loop filter*)
Parameters : McCfgAcpCtrlType; (*Parameter structure for usage on MC_BR_ProcessConfig and MC_BR_ProcessParam*)
END_STRUCT;
McAcpAxAdvCamAutSetParType : STRUCT
ParLock : McCamAutParLockCmdEnum; (*Command for the transfer of the parameter*)
END_STRUCT;
McAcpAxCamAutEventParType : STRUCT
Type : McCamAutEventTypeEnum; (*Event type*)
Transition : McCamAutEventTransitionEnum; (*Event transition*)
SynchronousUpdate: McSwitchEnum; (*Synchronous parameter update if event occurs*)
NextState : USINT; (*Index of the next state if the event occurs*)
END_STRUCT;
McAcpAxCamAutCompParType : STRUCT
MasterCompDistance : LREAL; (*Compensation distance for the master axis [Measurement units of master]*)
SlaveCompDistance : LREAL; (*Compensation distance for the slave axis [Measurement units of slave]*)
MasterCamLeadIn : LREAL; (*Relative position at which the master axis enters the state [Measurement units of master]*)
MinMasterCompDistance : LREAL; (*Minimum compensation distance for the master axis [Measurement units of master]*)
MinSlaveCompDistance : LREAL; (*Minimum compensation distance for the slave axis [Measurement units of slave]*)
MaxSlaveCompDistance : LREAL; (*Maximum compensation distance for the slave axis [Measurement units of slave]*)
MinSlaveCompVelocity : REAL; (*Minimum velocity of the slave axis during compensation [Measurement units of slave/s]*)
MaxSlaveCompVelocity : REAL; (*Maximum velocity of the slave axis during compensation [Measurement units of slave/s]*)
MaxSlaveCompAccel1 : REAL; (*Maximum acceleration of the slave axis during compensation phase 1 [Measurement units of slave/s²]*)
MaxSlaveCompAccel2 : REAL; (*Maximum acceleration of the slave axis during compensation phase 2 [Measurement units of slave/s²]*)
SlaveCompJoltTime : REAL; (*Jerk time of the slave axis during compensation [s]*)
END_STRUCT;
McAcpAxCamAutAdvStateParType : STRUCT
RepeatCounterInit : UINT; (*Starting value of state repetitions for event*)
RepeatCounterSetTransfer : McSwitchEnum; (*"RepeatCounterInit" is transferred*)
RepeatCounterSet : UINT; (*State repetitions counter for event*)
MasterAxis : REFERENCE TO McAxisType; (*Master axis for this state*)
MasterParID : UINT; (*Parameter ID of the master axis for this state*)
END_STRUCT;
McAcpAxCamAutStateParType : STRUCT
CamID : UINT; (*Index of the cam data for a state*)
MasterFactor : DINT; (*Master gauge factor for the cam profile for this state*)
SlaveFactor: DINT; (*Slave gauge factor for the cam profile for this state*)
CompensationMode : McCamAutCompModeEnum; (*Compensation gear mode*)
CompensationParameters : McAcpAxCamAutCompParType; (*Parameter for the compensation gear*)
AdvancedParameters : McAcpAxCamAutAdvStateParType; (*Advanced state parameter*)
Event : ARRAY[0..4] OF McAcpAxCamAutEventParType; (*Definition of the event for a state*)
END_STRUCT;
McAcpAxCamAutCtrlSettingsType : STRUCT
CrossLeftBoundary : McCamAutCrossLeftBoundEnum; (*Function on the left cam edge during backward movement of the master without event*)
CamChangeImmediately : McCamAutCamChangeImmedEnum; (*Direction of the cam change on event transition*)
END_STRUCT;
McAcpAxCamAutMsgSettingsType : STRUCT
ErrorsInStandby : McCamAutErrorsInStandbyEnum; (*Used for setting an error message in stand-by mode*)
ExceedingLimits : McCamAutExceedingLimitsEnum; (*Used for setting a message if the limit values are exceeded*)
END_STRUCT;
McAcpAxCamAutTriggerAndLatchType : STRUCT
Trigger1Delay : REAL; (*Trigger1 delay time [s] to compensate for a signal delay*)
Trigger2Delay : REAL; (*Trigger2 delay time [s] to compensate for a signal delay*)
SlaveLatchParID : UINT; (*Parameter ID for the latch value of the slave axis*)
END_STRUCT;
McAcpAxCamAutStartStateParType : STRUCT
StartState : USINT; (*State in which the cam automat is started*)
MasterStartRelPos : LREAL; (*Master position within the starting state at which the cam automat is started [Measurements units of the master]*)
END_STRUCT;
McAcpAxCamAutAddAxesType : STRUCT
AdditiveMasterAxis : REFERENCE TO McAxisType; (*Axis reference of additive master axis*)
AdditiveMasterParID : UINT; (*ParID of the additive master axis*)
AdditiveSlaveAxis : REFERENCE TO McAxisType; (*Axis reference of additive slave axis*)
AdditiveSlaveParID : UINT; (*ParID of additive slave axis*)
END_STRUCT;
McAcpAxCamAutCommonFactorsType : STRUCT
SlaveFactorParID : UINT; (*Parameter ID for multiplication factor of the slave axis*)
END_STRUCT;
McAcpAxCamAutAdvParType : STRUCT
StartStateParam : McAcpAxCamAutStartStateParType; (*Parameter used for starting directly from a state*)
AdditiveAxes : McAcpAxCamAutAddAxesType; (*Parameter for additive axes*)
MasterStartPosMode : McCamAutMaStartPosModeEnum; (*Mode for event type*)
ControlSettings : McAcpAxCamAutCtrlSettingsType; (*Control settings for cam automat*)
MessageSettings : McAcpAxCamAutMsgSettingsType; (*Settings for warnings and error messages*)
TriggerAndLatch : McAcpAxCamAutTriggerAndLatchType; (*Settings for triggering delay times and for latch value*)
EventParID1 : UINT; (*Parameter ID for event input 1*)
EventParID2 : UINT; (*Parameter ID for event input 2*)
EventParID3 : UINT; (*Parameter ID for event input 3*)
EventParID4 : UINT; (*Parameter ID for event input 4*)
StartIntervalPos1 : LREAL; (*Relative starting positions of the master axis in the interval for generating event*)
StartIntervalPos2 : LREAL; (*Relative starting positions of the master axis in the interval for generating event*)
StartIntervalPos3 : LREAL; (*Relative starting positions of the master axis in the interval for generating event*)
StartIntervalPos4 : LREAL; (*Relative starting positions of the master axis in the interval for generating event*)
Factors : McAcpAxCamAutCommonFactorsType; (*Multiplication factors for all states of the cam automat*)
END_STRUCT;
McAcpAxCamAutMasterParType : STRUCT
MasterAxis : REFERENCE TO McAxisType; (*Axis reference of the master axis*)
MasterParID : UINT; (*ParID of the master axis*)
MasterStartPosition : LREAL; (*Starting position of the master axis [Measurement units of master]*)
MasterStartInterval : LREAL; (*Starting interval of the master axis [Measurement units of master]*)
MaxMasterVelocity : REAL; (*Maximum velocity of the master axis [Measurement units of master/s]*)
END_STRUCT;
McAcpAxCamAutCommonParType : STRUCT
Master : McAcpAxCamAutMasterParType; (*Parameter for the cam automat master*)
AdvancedParameters : McAcpAxCamAutAdvParType; (*Optional parameter for the cam automat*)
END_STRUCT;
McAcpAxCamAutParType : STRUCT
Common : McAcpAxCamAutCommonParType; (*General parameter for all states of the cam automat*)
State : ARRAY[0..14] OF McAcpAxCamAutStateParType; (*Parameter for the states of the cam automat*)
END_STRUCT;
McAcpAxCamAutDefineType : STRUCT
DataObjectName : STRING[32]; (*Name of the cam automat configuration object*)
DataAddress : UDINT; (*Address of a variable of data type McAcpAxCamAutParType*)
END_STRUCT;
McAcpAxAdvPhasingParType : STRUCT
VelocityParID : UINT; (*ParID from which the velocity for the phase shift is read*)
PosVelocityTriggerParID : UINT; (*ParID controls the addition of velocity "CyclicVelocity" or the value of "VelocityParID"*)
NegVelocityTriggerParID : UINT; (*ParID controls the subtraction of velocity "CyclicVelocity" or the value of "VelocityParID"*)
END_STRUCT;
McAcpAxAdvOffsetParType : STRUCT
VelocityParID : UINT; (*ParID from which the velocity for the phase shift is read*)
PosVelocityTriggerParID : UINT; (*ParID controls the addition of velocity "CyclicVelocity" or the value of "VelocityParID"*)
NegVelocityTriggerParID : UINT; (*ParID controls the subtraction of velocity "CyclicVelocity" or the value of "VelocityParID"*)
END_STRUCT;
McAcpAxLoadSimInputDataType : STRUCT
Position : LREAL; (*Position value [rad]*)
Velocity : REAL; (*Velocity value [rad/s]*)
Acceleration : REAL; (*Acceleration value [rad/s²] Note: This structure element is not supported currently, and always the value "0.0" is output*)
END_STRUCT;
McAcpAxLoadModelMass1Type : STRUCT
Inertia : REAL; (*Mass moment of inertia [kg*m^2].*)
ViscousFriction : REAL; (*Viscous friction [Nm*s].*)
END_STRUCT;
McAcpAxLoadModelMass2Type : STRUCT
Inertia : REAL; (*Mass moment of inertia [kg*m^2].*)
ViscousFriction : REAL; (*Viscous friction [Nm*s].*)
Stiffness : REAL; (*Stiffness of the coupling to Mass 1 [Nm/rad].*)
Damping : REAL; (*Damping of the coupling to Mass 1 [Nm/(rad/s)].*)
END_STRUCT;
McAcpAxLoadModelType : STRUCT
Mass1 : McAcpAxLoadModelMass1Type; (*Mass 1 component of the load model.*)
Mass2 : McAcpAxLoadModelMass2Type; (*Mass 2 component of the load model.*)
END_STRUCT;
END_TYPE

View File

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Library Version="5.20.1" SubType="binary" Description="[mapp Motion] ACOPOS axis library" xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>McAcpAx.typ</File>
<File>McAcpAx.fun</File>
<File>McAcpAx.var</File>
<File>McAcpAxCfg.typ</File>
</Files>
<Dependencies>
<Dependency ObjectName="McBase" FromVersion="5.20.0" ToVersion="5.20.9" />
<Dependency ObjectName="McAxis" FromVersion="5.20.0" ToVersion="5.20.9" />
</Dependencies>
</Library>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,878 @@
TYPE
(*Enum types*)
McDirectionEnum :
(
mcDIR_POSITIVE, (*Movement only in the positive direction *)
mcDIR_NEGATIVE, (*Movement only in the negative direction*)
mcDIR_CURRENT, (*Movement in the direction of the active movement*)
mcDIR_SHORTEST_WAY, (*Movement with the shortest distance to the target, either in positive or negative direction. The movement will be in the positive direction if the distance is the same in both directions*)
mcDIR_EXCEED_PERIOD := 8, (*The end position can be located outside of the axis period. The axis period can be exited in the negative direction if the end position is also negative*)
mcDIR_UNDEFINED, (*Movement in undefined direction*)
mcDIR_BOTH (*Movement in both directions*)
);
McCamAutCouplingSourceEnum :
(
mcCAMAUT_COUPLING_SRC_NOT_USED, (*No source*)
mcCAMAUT_COUPLING_SRC_AXIS, (*Axis as source*)
mcCAMAUT_COUPLING_SRC_VARIABLE, (*Process variable as source*)
mcCAMAUT_COUPLING_SRC_SYSTIME (*System time as source*)
);
McPlcopenParEnum :
(
mcPAR_COMMANDED_AX_POSITION := 1, (*Target position for the movement [Measurement units]*)
mcPAR_SW_LIMIT_POSITIVE, (*Currently not available*)
mcPAR_SW_LIMIT_NEGATIVE, (*Currently not available*)
mcPAR_ENABLE_LIMIT_POSITIVE, (*Currently not available*)
mcPAR_ENABLE_LIMIT_NEGATIVE, (*Currently not available*)
mcPAR_ENABLE_POS_LAG_MONITORING, (*Currently not available*)
mcPAR_MAX_AX_POSITION_LAG, (*Currently not available*)
mcPAR_MAX_AX_VELOCITY_SYSTEM, (*Currently not available*)
mcPAR_MAX_AX_VELOCITY_APPL, (*Currently not available*)
mcPAR_ACTUAL_AX_VELOCITY, (*Current speed [Measurement units/s]*)
mcPAR_COMMANDED_AX_VELOCITY, (*Currently not available*)
mcPAR_MAX_AX_ACCELERATION_SYSTEM, (*Currently not available*)
mcPAR_MAX_AX_ACCELERATION_APPL, (*Currently not available*)
mcPAR_MAX_AX_DECELERATION_SYSTEM, (*Currently not available*)
mcPAR_MAX_AX_DECELERATION_APPL, (*Currently not available*)
mcPAR_MAX_AX_JERK, (*Maximum jerk of the axis*)
mcPAR_AX_PERIOD := 1008, (*The range of values of the axis position is [0, period] in [Measurement units]*)
mcPAR_SW_END_IGNORE := 1014, (*Status of the SW end position monitoring*)
mcPAR_HOMING_OFFSET := 1019, (*Homing offset [Measurement units]. Cannot be read before the first homing procedure*)
mcPAR_AX_MEASUREMENT_RESOLUTION := 1020, (*Defines the possible resolution of [Measurement units] that can be met*)
mcPAR_REFERENCE_PULSE_DISTANCE := 1021, (*Reference pulse distance [Measurement units]. Cannot be read before the first homing procedure*)
mcPAR_DISTANCE_PER_ENCODER_REV := 1022 (*Distance of one encoder revolution [Measurement units]*)
);
McCamIplModeEnum :
(
mcCAMIPL_CUBIC_SPLINE, (*Cubic spline interpolation (3rd order polynomial)*)
mcCAMIPL_OPTIMIZED_VELOCITY, (*5th order polynomials with optimized velocity characteristics*)
mcCAMIPL_OPTIMIZED_ACCELERATION, (*5th order polynomials with optimized velocity and acceleration characteristics*)
mcCAMIPL_BESTFIT_5TH_ORDER, (*Best fit interpolation with 5th order polynomials*)
mcCAMIPL_BESTFIT_6TH_ORDER (*Best fit interpolation with 6th order polynomials*)
);
McCamTypeEnum :
(
mcCAMTYPE_NON_PERIODIC, (*Parameters "StartSlope", "EndSlope" and "StartCurvature", "EndCurvature" are used for the slope at the beginning and end as well as the curvature at the beginning and end of the polynomial cam*)
mcCAMTYPE_PERIODIC (*The slope and curvature for the beginning and endpoints are set the same as each other*)
);
McCamSectRefPointEnum :
(
mcCAMSECTREF_ABSOLUTE := 0, (*Master and slave position are used as absolute values*)
mcCAMSECTREF_RELATIVE := 1 (*Master and slave position are used as relative values from the last point*)
);
McCamSectLawOfMotionEnum :
(
mcCAMSECTLAW_LAST_POINT := 0,
mcCAMSECTLAW_STRAIGHT_LINE := 1,
mcCAMSECTLAW_QUADRATIC_PARABOLA := 2,
mcCAMSECTLAW_SIMPLE_SINE_CURVE := 3,
mcCAMSECTLAW_5TH_ORDER_POLYNOM := 4,
mcCAMSECTLAW_INCLINED_SINE_CURVE := 5,
mcCAMSECTLAW_MOD_ACCEL_TRAPEZOID := 6,
mcCAMSECTLAW_MOD_SINE_CURVE := 7,
mcCAMSECTLAW_HARMONIC_COMBI := 8
);
McEventSrcEnum :
(
mcEVENT_SRC_TRIGGER1 := 0, (*Use Trigger 1 as an event source*)
mcEVENT_SRC_TRIGGER2 := 1, (*Use Trigger 2 as an event source*)
mcEVENT_SRC_ALT_VALUE1 := 2, (*"Value source 1" of the feature "Alternative value source" is used*)
mcEVENT_SRC_ALT_VALUE2 := 3, (*"Value source 2" of the feature "Alternative value source" is used*)
mcEVENT_SRC_ALT_VALUE3 := 4, (*"Value source 3" of the feature "Alternative value source" is used*)
mcEVENT_SRC_ALT_VALUE4 := 5, (*"Value source 4" of the feature "Alternative value source" is used*)
mcEVENT_SRC_ALT_VALUE5 := 6, (*"Value source 5" of the feature "Alternative value source" is used*)
mcEVENT_SRC_ALT_VALUE6 := 7, (*"Value source 6" of the feature "Alternative value source" is used*)
mcEVENT_SRC_ALT_VALUE7 := 8, (*"Value source 7" of the feature "Alternative value source" is used*)
mcEVENT_SRC_ALT_VALUE8 := 9 (*"Value source 8" of the feature "Alternative value source" is used*)
);
McBrTouchProbeModeEnum :
(
mcTP_MODE_WITHOUT_PERIOD := 4, (*Do not use axis or window period*)
mcTP_MODE_SHIFT_FROM_RESULT := 49, (*Shift window from detected trigger position*)
mcTP_MODE_SHIFT_FROM_EXPECTED := 50 (*Shift window from expected trigger position*)
);
McBrTriggerInfoStatusEnum :
(
mcTRG_STAT_WAITING := 0, (*Waiting for trigger event*)
mcTRG_STAT_VALID := 1, (*A valid trigger event was detected*)
mcTRG_STAT_MISSED := 2 (*No valid trigger event was detected in period*)
);
McDisableModeEnum :
(
mcDISABLE_DEFAULT := 0, (*Switch to default setting at disable*)
mcDISABLE_KEEP_VALUE := 1 (*Keep value at disable*)
);
McEventMoveModeEnum :
(
mcEVENT_ONCE := 0, (*Single start of a movement after an event*)
mcEVENT_CYCLIC := 1, (*Cyclic start of a movement during standstill. Note: Not applicable for FB MC_BR_EventMoveVelocity*)
mcEVENT_CYCLIC_ALL_EVENTS := 2 (*Cyclic start of a movement for all events*)
);
McMechDevCompStateEnum:
(
mcMDC_STATE_NOT_ACTIVE, (*Compensation is not active*)
mcMDC_STATE_INIT, (*Initialization of parameters*)
mcMDC_STATE_ACTIVE_DIR_INDEP, (*Direction independent compensation active*)
mcMDC_STATE_ACTIVE_DIR_DEP, (*Direction dependent compensation active*)
mcMDC_STATE_ERROR (*Error state*)
);
(*Structure types*)
McLibraryInfoType : STRUCT
Name : STRING[32]; (*Name of the implementation-specific axis library*)
END_STRUCT;
McDigitalInputStatusType : STRUCT
HomingSwitch : BOOL; (*The digital reference switch input is active*)
PositiveLimitSwitch : BOOL; (*The positive hardware limit switch is active*)
NegativeLimitSwitch : BOOL; (*The negative hardware limit switch is active*)
Trigger1 : BOOL; (*Trigger input 1 is enabled*)
Trigger2 : BOOL; (*Trigger input 2 is enabled*)
DriveEnable : BOOL; (*Drive input "Enable" is active*)
END_STRUCT;
McAddInfoType : STRUCT
DigitalInputStatus : McDigitalInputStatusType; (*Status of the digital inputs*)
LagWarning : BOOL; (*Lag error warning limit reached*)
StartupCount : UDINT; (*Number of times the drive was started up since the last PLC start*)
CommunicationState : McCommunicationStateEnum; (*State of network communication*)
PLCopenState : McAxisPLCopenStateEnum; (*Extended PLCopen state*)
InMotion : BOOL; (*Controlled movement on the axis*)
MechDeviationCompState : McMechDevCompStateEnum; (*State of mechanical deviation compensation*)
AutoTuneState : McAutoTuneStateEnum; (* Status of the auto tune activity on the drive*)
END_STRUCT;
McAdvVelCtrlParType : STRUCT
Acceleration : REAL; (*Maximum acceleration [Measurement units/s<>]*)
Deceleration : REAL; (*Maximum deceleration [Measurement units/s<>]*)
Jerk : REAL; (*Maximum jerk [Measurement units/s<>]*)
END_STRUCT;
McShiftModeEnum:
(
mcSHIFT_ABSOLUTE, (*The value on input "XxxShift" is interpreted as an absolute value*)
mcSHIFT_RELATIVE, (*The value on input "XxxShift" is interpreted as a relative value*)
mcSHIFT_ABSOLUTE_NO_RESET, (*The functionality here is effectively the same as for mcSHIFT_ABSOLUTE. With this setting, however, the shift value on the drive is not set to 0 if the slave axis leaves state Synchronized Motion and input "Enable" is still set*)
mcSHIFT_RELATIVE_NO_RESET (*The functionality here is effectively the same as for mcSHIFT_RELATIVE. With this setting, however, the shift value on the drive is not set to 0 if the slave axis leaves state Synchronized Motion and input "Enable" is still set*)
);
McProfileBaseEnum:
(
mcPROFBASE_TIME, (*A speed profile is calculated depending on the "Velocity" and "Acceleration" inputs. The duration of the phase shift is independent of a master speed. If a negative value is entered, this can cause the slave axis to move in the negative direction if the original master speed is low or 0*)
mcPROFBASE_MASTER_POSITION, (*The speed profile is calculated from the speed of the coupling master measured at the beginning of the phase shift and function block inputs "Velocity" and "Acceleration". The current master position serves as a basis for calculating the actual shift from the speed profile. The duration of the phase shift depends on the master speed measured at the beginning (profile calculation) and the current master speed*)
mcPROFBASE_MASTER_DISTANCE, (*A smooth motion profile is calculated based on the configured value for "ProfileDistance". "ProfileDistance" refers to the sections completed by the master axis. This prevents the slave from moving in the negative direction. The movement is limited by the "Velocity" and "Acceleration" values*)
mcPROFBASE_SLAVE_POSITION, (*As per mcPROFBASE_MASTER_POSITION, but in reference to the slave*)
mcPROFBASE_SLAVE_DISTANCE, (*As per mcPROFBASE_MASTER_DISTANCE, but in reference to the slave*)
mcPROFBASE_MASTER_ZONE, (*A smooth motion profile is calculated based on the configured values for "ZoneParameters". These parameters refer to sections of the master axis*)
mcPROFBASE_SLAVE_ZONE (*As per mcPROFBASE_MASTER_ZONE, but in reference to the slave*)
);
McAdvShiftDistanceParType : STRUCT
ProfileDistance : LREAL; (*Distance to the offset [Measurement units]*)
END_STRUCT;
McAdvShiftZoneParType : STRUCT
StartPosition : LREAL; (*Starting position in the profile base for starting the offset [Measurement units]*)
EndPosition : LREAL; (*End position in the profile base for ending the offset [Measurement units]*)
Period : LREAL; (*Defines the period if a non-periodic profile base axis or an offset period other than the axis period is to be used [Measurement units]*)
END_STRUCT;
McAdvPhasingParType : STRUCT
ShiftMode : McShiftModeEnum; (*Defines how the value on input "XxxShift" should be used*)
ProfileBase : McProfileBaseEnum; (*Defines the profile base for the offset as a time or position value*)
ProfileBaseMaxVelocity : REAL; (*Maximum speed of profile base during offset [Measurement units]*)
DistanceParameters : McAdvShiftDistanceParType ; (*Distance to the offset [Measurement units]*)
ZoneParameters : McAdvShiftZoneParType ; (*Position range in which the offset occurs [Measurement units]*)
Jerk : REAL; (*Maximum jerk of the profile [Measurement units/s<>]*)
ShiftAlternativeValueSource : McAltValueSrcEnum; (*If used, defines the alternative source of shift value [Axis units]*)
END_STRUCT;
McAdvOffsetParType : STRUCT
ShiftMode : McShiftModeEnum; (*Defines how the value on input "XxxShift" should be used*)
ProfileBase : McProfileBaseEnum; (*Defines the profile base for the offset as a time or position value*)
ProfileBaseMaxVelocity : REAL; (*Maximum speed of profile base during offset [Measurement units/s]*)
DistanceParameters : McAdvShiftDistanceParType ; (*Distance to the offset [Measurement units]*)
ZoneParameters : McAdvShiftZoneParType ; (*Position range in which the offset occurs [Measurement units]*)
Jerk : REAL; (*Maximum jerk of the profile [Measurement units/s<>]*)
ShiftAlternativeValueSource : McAltValueSrcEnum; (*If used, defines the alternative source of shift value [Axis units]*)
END_STRUCT;
McAdvGearInParType : STRUCT
MasterMaxVelocity : REAL; (*Maximum velocity of the master axis [Measurement units of master/s]*)
END_STRUCT;
McAdvGearInPosParType : STRUCT
MasterMaxVelocity : REAL; (*Maximum velocity of the master axis [Measurement units of master/s]*)
END_STRUCT;
McAdvCamInParType : STRUCT
Periodic : BOOL; (*TRUE -> Cam is executed periodically; FALSE -> Cam is executed just once*)
Velocity : REAL; (*Velocity which is used for the movement to the start position [Measurement units of slave/s]*)
Acceleration : REAL; (*Acceleration which is used for the movement to the start position [Measurement units of slave/s<>]*)
Deceleration : REAL; (*Deceleration which is used for the movement to the start position [Measurement units of slave/s<>]*)
Jerk : REAL; (*Maximum jerk during the "move to start" movement [Measurement units of slave/s<>]*)
END_STRUCT;
McCamAutCrossLeftBoundEnum:
(
mcCAMAUT_LIMIT_HORIZONTAL, (*Position has a horizontal limit*)
mcCAMAUT_EXTEND_POLY (*Left limit polynomial is extended*)
);
McCamAutCamChangeImmedEnum:
(
mcCAMAUT_MASTER_DIR, (*In the current master direction of movement*)
mcCAMAUT_POSITIVE_DIR (*In the positive direction only*)
);
McCamAutErrorsInStandbyEnum:
(
mcCAMAUT_ERRORS_OFF, (*No error message in standby mode*)
mcCAMAUT_ERRORS_ON (*Error message in standby mode*)
);
McCamAutExceedingLimitsEnum:
(
mcCAMAUT_WARNING, (*Warning when limit values have been exceeded*)
mcCAMAUT_ERROR (*Error when limit values have been exceeded*)
);
McCamAutGetParCmdEnum:
(
mcGET_PAR_FROM_OBJECT, (*Copies parameters from a cam configuration object*)
mcGET_PAR_ACTUAL, (*Copies parameters from the configured cam automat for the axis*)
mcGET_PAR_DEFAULT, (*Copies parameters from the preconfigured cam automat configuration object for the axis*)
mcGET_PAR_PRESET (*Copies preset values of the cam automat*)
);
McCamAutSetParCmdEnum:
(
mcSET_ALL_PAR_FROM_OBJ, (*Transfers all parameters from a cam automat configuration object*)
mcSET_ALL_PAR_FROM_ADR, (*Transfers all parameters from the specified user structure*)
mcSET_ALL_PAR_DEFAULT, (*Transfers all parameters from the preconfigured cam automat configuration object for the axis*)
mcSET_UPDATE_FROM_OBJ, (*Transfers all update parameters from a cam automat configuration object*)
mcSET_UPDATE_FROM_ADR, (*Transfers all update parameters from the specified user structure*)
mcSET_UPDATE_DEFAULT, (*Transfers all update parameters from the preconfigured cam automat configuration object for the axis*)
mcSET_SYNC_UPDATE_FROM_OBJ, (*Transfers all SyncUpdate parameters from a cam automat configuration object*)
mcSET_SYNC_UPDATE_FROM_ADR, (*Transfers all SyncUpdate parameters from the specified user structure*)
mcSET_SYNC_UPDATE_DEFAULT (*Transfers all SyncUpdate parameters from the preconfigured cam automat configuration object for the axis*)
);
McCamAutResetCmdEnum:
(
mcRESET_ALL_AUTOMAT_PARAMS, (*Resets general automat parameters and all automat states*)
mcRESET_COMMON_PARAMS, (*Resets general automat parameters*)
mcRESET_ALL_STATE_PARAMS, (*Resets all automat states*)
mcRESET_ONE_STATE_PARAMS (*Resets a specific automat state*)
);
McCamAutParLockCmdEnum:
(
mcCAMAUT_NO_LOCK, (*Automat is not locked*)
mcCAMAUT_LOCK, (*Locks the automat in order to transfer parameters*)
mcCAMAUT_UNLOCK_NEXT_STATE, (*Unlocks the automat when switching to the next automat state*)
mcCAMAUT_UNLOCK_SYNCHRON (*Unlocks the automat when a defined event occurs*)
);
McCamAutCompModeEnum:
(
mcCOMP_OFF := 0, (*No compensation*)
mcCOMP_BETWEEN_CAMS := 30, (*Spacing between cams*)
mcCOMP_BETWEEN_CAMS_DIRECT := 35, (*Spacing between the end of one cam and the start of another*)
mcCOMP_CAM_CENTER_POINTS := 31, (*Spacing from the center of one cam to another*)
mcCOMP_MA_LATCHPOS := 32, (*Master spacing between latch position and cam center*)
mcCOMP_SL_LATCHPOS := 34, (*Slave spacing between latch position and cam center*)
mcCOMP_SL_ABSOLUTE := 33, (*Slave compensation for absolute slave position*)
mcCOMP_VELOCITY_S_MA := 37, (*Minimum jerk velocity mode with master target distance*)
mcCOMP_VELOCITY_S_SL := 38, (*Minimum jerk velocity mode with slave target distance*)
mcCOMP_VELOCITY_A_SL := 36, (*time optimal jolt limited velocity mode*)
mcCOMP_VELOCITY_A_CYC := 39, (*Time-optimized jerk-limited velocity mode, cyclical master velocity determination*)
mcCOMP_MA_SL_ABSOLUTE := 40, (*Absolute master and slave position when compensation is finished*)
mcCOMP_MA_IV_SL_ABSOLUTE := 41 (*Periodic master and absolute slave position when compensation is finished*)
);
McCamAutEventTypeEnum:
(
mcEVENT_OFF := 0, (*Disables the event*)
mcEVENT_START_POSITION := 10, (*Event is triggered at master starting position*)
mcEVENT_STATE_END := 12, (*Event is triggered at end of state*)
mcEVENT_STATE_END_NEGATIVE := 13, (*Event is triggered at left end of state*)
mcEVENT_COUNT := 11, (*Event is triggered when RepeatCounter is reached*)
mcEVENT_SIGNAL1 := 91, (*Event is triggered by Signal1*)
mcEVENT_SIGNAL2 := 92, (*Event is triggered by Signal2*)
mcEVENT_SIGNAL3 := 93, (*Event is triggered by Signal3*)
mcEVENT_SIGNAL4 := 94, (*Event is triggered by Signal4*)
mcEVENT_TRIGGER1_P_EDGE := 20, (*Event is triggered by rising edge of Trigger1*)
mcEVENT_TRIGGER1_N_EDGE := 21, (*Event is triggered by falling edge of Trigger1*)
mcEVENT_TRIGGER2_P_EDGE := 22, (*Event is triggered by rising edge of Trigger2*)
mcEVENT_TRIGGER2_N_EDGE := 23, (*Event is triggered by falling edge of Trigger2*)
mcEVENT_AND_NEXT_TWO := 15, (*Event is triggered by the next two defined events triggered*)
mcEVENT_PARID1 := 16, (*Event is triggered when EventParID1 changes from 0 to not 0*)
mcEVENT_PARID2 := 17, (*Event is triggered when EventParID2 changes from 0 to not 0*)
mcEVENT_PARID3 := 18, (*Event is triggered when EventParID3 changes from 0 to not 0*)
mcEVENT_PARID4 := 19, (*Event is triggered when EventParID4 changes from 0 to not 0*)
mcEVENT_START_IV_POS1 := 41, (*Event is triggered when starting interval Position1 is reached*)
mcEVENT_START_IV_POS2 := 42, (*Event is triggered when starting interval Position2 is reached*)
mcEVENT_START_IV_POS3 := 43, (*Event is triggered when starting interval Position3 is reached*)
mcEVENT_START_IV_POS4 := 44 (*Event is triggered when starting interval Position4 is reached*)
);
McCamAutMaStartPosModeEnum:
(
mcCAMAUT_EVALUATE_NEW, (*Starting position is recalculated*)
mcCAMAUT_NO_NEW_EVALUATION (*Starting position is not recalculated*)
);
McCamAutEventTransitionEnum:
(
mcEVENT_IMMEDIATELY := 0, (*State changes immediately*)
mcEVENT_END_OF_STATE := 12 (*State changes at end of state*)
);
McCamStartModeEnum:
(
mcCAM_START_DIRECT, (*The cam coupling is startet directly at the current axes positions*)
mcCAM_START_ABSOLUTE, (*"MasterOffset" and "SlaveOffset" are interpreted as absolute values*)
mcCAM_START_RELATIVE (*"MasterOffset" and "SlaveOffset" are interpreted as relative values*)
);
McCamInStatusEnum:
(
mcCAM_STATUS_PREPARING_MOVE, (*Preparing for move to SlaveOffset position*)
mcCAM_STATUS_MOVE_TO_START_POS, (*Axis is moving to the SlaveOffset position*)
mcCAM_STATUS_PREPARING_CAM, (*Preparing cam coupling*)
mcCAM_STATUS_WAIT_FOR_MASTER, (*Axis is waiting for the master axis to reach the master start position*)
mcCAM_STATUS_IN_CAM, (*Axis is in cam movement (is set similar to InSync)*)
mcCAM_STATUS_END (*Non-periodic cam has ended*)
);
McSyncModeEnum:
(
mcSYNC_MODE_POSITIVE, (*Synchronous position is approached from the starting point in positive direction*)
mcSYNC_MODE_NEGATIVE, (*Synchronous position is approached from the starting point in negative directionn*)
mcSYNC_MODE_SHORTEST_WAY, (*The nearest synchronous position to the starting point is approached*)
mcSYNC_MODE_WITHIN_PERIOD (*The synchronous position is approached in the current slave period*)
);
McAdvCamInModeEnum:
(
mcCAM_MASTER_INTERVAL, (*The cam is started at the current slave position and next possible master start position*)
mcCAM_DIRECT, (*The start takes place directly in the cam depending on the master and slave position*)
mcCAM_MASTER_INTERVAL_LEAD_IN, (*The cam is started at the current slave position and next possible master start position*)
mcCAM_MASTER_INTERVAL_LEAD_OUT, (*The cam is started at the current slave position and next possible master start position*)
mcCAM_MASTER_INTERVAL_LEAD_INOUT, (*The cam is started at the current slave position and next possible master start position*)
mcCAM_DIRECT_LEAD_OUT (*The start takes place directly in the cam depending on the master and slave position*)
);
McAxisTypeEnum:
(
mcAX_TYPE_ACP_REAL, (*ACOPOS real axis*)
mcAX_TYPE_ACP_VIRT, (*ACOPOS virtual axis*)
mcAX_TYPE_ACP_APSM, (*ACOPOS auxiliary power supply module axis*)
mcAX_TYPE_ACP_PS_ACTIVE, (*ACOPOS active power supply axis*)
mcAX_TYPE_ACP_PS_PASSIVE, (*ACOPOS passive power supply axis*)
mcAX_TYPE_ACP_EXT_ENC, (*ACOPOS external encoder axis*)
mcAX_TYPE_ACP_INV, (*ACOPOSinverter axis*)
mcAX_TYPE_STP, (*Stepper module axis*)
mcAX_TYPE_PURE_VIRT, (*Purely virtual axis*)
mcAX_TYPE_PURE_VIRT_GPAI, (*Purely virtual axis with activated general purpose axis interface*)
mcAX_TYPE_DS402_SERVO, (*DS402 conform servo drive axis*)
mcAX_TYPE_DS402_INV, (*DS402 conform inverter axis*)
mcAX_TYPE_PURE_VIRT_EXT_ENC (*Purely virtual axis with activated external encoder axis interface*)
);
McAcpAxAutoTuneFeedFwdModeEnum:
(
mcACPAX_TUNE_FF_MODE_STANDARD := 0, (*Standard (active) tuning mode*)
mcACPAX_TUNE_FF_MODE_PASSIVE := 1 (*Passive tuning mode*)
);
McAcpAxAutoTuneFeedFwdCmdEnum:
(
mcACPAX_TUNE_FF_CMD_START := 0, (*Start (standard or passive) tuning process*)
mcACPAX_TUNE_FF_CMD_FINISH := 1, (*Finish (passive) tuning process*)
mcACPAX_TUNE_FF_CMD_ABORT := 2 (*Abort (stop) (passive) tuning process*)
);
McAutoTuneStateEnum:
(
mcAT_NOT_ACTIVE := 0, (*Currently no auto tune is active on the axis*)
mcAT_SPEED_CONTROLLER := 1, (*Auto tuning for the speed controller is active*)
mcAT_POSTION_CONTROLLER := 2, (* Auto tuning for the position controller is active*)
mcAT_LOAD_MODEL := 3, (* Auto tuning for the load model is active*)
mcAT_LOOP_FILTERS := 4, (* Auto tuning for the loop filters is active*)
mcAT_FEED_FORWARD_STANDARD := 5, (* Standard auto tuning for feedforward is active*)
mcAT_FEED_FORWARD_PASSIVE := 6, (* Passive auto tuning for feedforward is active*)
mcAT_TEST := 7, (* Auto tuning test is active*)
mcAT_MOTOR_PHASING := 8, (* Auto tuning for motor phasing is active*)
mcAT_INDUCTION_MOTOR := 9, (* Auto tuning for induction motor is active*)
mcAT_SYNCHRON_MOTOR := 10 (* Auto tuning for synchronous motor is active*)
);
McCamDefineType : STRUCT
DataObjectName : STRING[12]; (*Name of the cam data object*)
DataAdress : UDINT; (*Address of the cam data on the PLC provided in a PV of data type "McCamDataType"*)
END_STRUCT;
McAdvCamAutSetParType : STRUCT
ParLock : McCamAutParLockCmdEnum; (*Command for the transfer of the parameter*)
END_STRUCT;
McCamAutEventParType : STRUCT
Type : McCamAutEventTypeEnum; (*Event type*)
Transition : McCamAutEventTransitionEnum; (*Event transition*)
SynchronousUpdate: McSwitchEnum; (*Synchronous parameter update if event occurs*)
NextState : USINT; (*Index of the next state if the event occurs*)
END_STRUCT;
McCamAutCompParType : STRUCT
MasterCompDistance : LREAL; (*Compensation distance for the master axis [Measurement units of master]*)
SlaveCompDistance : LREAL; (*Compensation distance for the slave axis [Measurement units of slave]*)
MasterCamLeadIn : LREAL; (*Relative position at which the master axis enters the state [Measurement units of master]*)
MinMasterCompDistance : LREAL; (*Minimum compensation distance for the master axis [Measurement units of master]*)
MinSlaveCompDistance : LREAL; (*Minimum compensation distance for the slave axis [Measurement units of slave]*)
MaxSlaveCompDistance : LREAL; (*Maximum compensation distance for the slave axis [Measurement units of slave]*)
MinSlaveCompVelocity : REAL; (*Minimum velocity of the slave axis during compensation [Measurement units of slave/s]*)
MaxSlaveCompVelocity : REAL; (*Maximum velocity of the slave axis during compensation [Measurement units of slave/s]*)
MaxSlaveCompAccel1 : REAL; (*Maximum acceleration of the slave axis during compensation phase 1 [Measurement units of slave/s<>]*)
MaxSlaveCompAccel2 : REAL; (*Maximum acceleration of the slave axis during compensation phase 2 [Measurement units of slave/s<>]*)
SlaveCompJoltTime : REAL; (*Jerk time of the slave axis during compensation [s]*)
SlaveCompJerk : REAL; (*Jerk of the slave axis during compensation [Measurement units of slave/s<>]*)
END_STRUCT;
McCamAutMasterAxisType : STRUCT
Axis : REFERENCE TO McAxisType; (*Axis reference of master axis*)
ValueSource : McValueSrcEnum ; (*Defines the source of the position to be read*)
MaxVelocity : REAL; (*Maximum velocity of the master axis [Measurement units of master/s]*)
END_STRUCT;
McCamAutMasterVarType : STRUCT
VariableAddress : REFERENCE TO LREAL; (*Address of the process variable*)
MaxVelocity : REAL; (*Maximum velocity of the master axis [Measurement units of master/s]*)
END_STRUCT;
McCamAutAxisType : STRUCT
Axis : REFERENCE TO McAxisType; (*Axis reference*)
ValueSource : McValueSrcEnum ; (*Defines the source of the position to be read*)
END_STRUCT;
McCamAutVariableType : STRUCT
VariableAddress : REFERENCE TO LREAL; (*Address of the process variable*)
END_STRUCT;
McCamAutAdvStateParType : STRUCT
RepeatCounterInit : UINT; (*Starting value of state repetitions for event mcACPAX_EVENT_COUNT*)
RepeatCounterSetTransfer : McSwitchEnum; (*"RepeatCounterInit" is transferred*)
RepeatCounterSet : UINT; (*State repetitions counter for event mcACPAX_EVENT_COUNT*)
MasterSource : McCamAutCouplingSourceEnum; (*Source to be used as master of this state*)
MasterAxis : McCamAutAxisType; (*Master axis for this state*)
MasterVariable : McCamAutVariableType; (*Process variable that is used as master position for this state*)
END_STRUCT;
McCamAutStateParType : STRUCT
CamID : UINT; (*Index of the cam data for a state*)
MasterFactor : DINT; (*Master gauge factor for the cam profile for this state*)
SlaveFactor: DINT; (*Slave gauge factor for the cam profile for this state*)
CompensationMode : McCamAutCompModeEnum; (*Compensation gear mode*)
CompensationParameters : McCamAutCompParType; (*Parameters for the compensation gear*)
AdvancedParameters : McCamAutAdvStateParType; (*Advanced state parameter*)
Event : ARRAY[0..4] OF McCamAutEventParType; (*Definition of the event for a state*)
END_STRUCT;
McCamAutCtrlSettingsType : STRUCT
CrossLeftBoundary : McCamAutCrossLeftBoundEnum; (*Function on the left cam edge during backward movement of the master without event mcEVENT_STATE_END_NEGATIVE*)
CamChangeImmediately : McCamAutCamChangeImmedEnum; (*Direction of the cam change on event transition mcEVENT_IMMEDIATELY*)
END_STRUCT;
McCamAutStartStateParType : STRUCT
StartState : USINT; (*State in which the cam automat is started*)
MasterStartRelPos : LREAL; (*Master position within the starting state at which the cam automat is started [measurements units of the master]*)
END_STRUCT;
McCamAutAddAxesType : STRUCT
AdditiveMasterSource : McCamAutCouplingSourceEnum; (*Source to be used as additive master*)
AdditiveMasterAxis : McCamAutAxisType; (*Additive master axis*)
AdditiveMasterVariable : McCamAutVariableType; (*Process variable specifying the additive master position*)
AdditiveSlaveSource : McCamAutCouplingSourceEnum; (*Source to be used as additive slave*)
AdditiveSlaveAxis : McCamAutAxisType; (*Additive slave axis*)
AdditiveSlaveVariable : McCamAutVariableType; (*Process variable specifying the additive slave position*)
END_STRUCT;
McCamAutAdvParType : STRUCT
StartStateParam : McCamAutStartStateParType; (*Parameter used for starting directly from a state*)
AdditiveAxes : McCamAutAddAxesType; (*Parameter for additive axes*)
MasterStartPosMode : McCamAutMaStartPosModeEnum; (*Mode for event type mcEVENT_START_POSITION*)
ControlSettings : McCamAutCtrlSettingsType; (*Control settings for cam automat*)
StartIntervalPos1 : LREAL; (*Relative starting positions of the master axis in the interval for generating event mcEVENT_START_IV_POS1 [Measurement units of master]*)
StartIntervalPos2 : LREAL; (*Relative starting positions of the master axis in the interval for generating event mcEVENT_START_IV_POS2 [Measurement units of master]*)
StartIntervalPos3 : LREAL; (*Relative starting positions of the master axis in the interval for generating event mcEVENT_START_IV_POS3 [Measurement units of master]*)
StartIntervalPos4 : LREAL; (*Relative starting positions of the master axis in the interval for generating event mcEVENT_START_IV_POS4 [Measurement units of master]*)
END_STRUCT;
McCamAutMasterParType : STRUCT
MasterSource : McCamAutCouplingSourceEnum; (*Source to be used as master*)
MasterAxis : McCamAutMasterAxisType; (*Master axis*)
MasterVariable : McCamAutMasterVarType; (*Process variable specifying the master position*)
MasterStartPosition : LREAL; (*Starting position of the master axis [Measurement units of master]*)
MasterStartInterval : LREAL; (*Starting interval of the master axis [Measurement units of master]*)
END_STRUCT;
McCamAutCommonParType : STRUCT
Master : McCamAutMasterParType; (*Parameter for the cam automat master*)
AdvancedParameters : McCamAutAdvParType; (*Optional parameter for the cam automat*)
END_STRUCT;
McCamAutParType : STRUCT
Common : McCamAutCommonParType; (*General parameter for all states of the cam automat*)
State : ARRAY[0..14] OF McCamAutStateParType; (*Parameter for the states of the cam automat*)
END_STRUCT;
McCamAutDefineType : STRUCT
DataObjectName : STRING[32]; (*Name of the cam automat configuration object*)
DataAddress : UDINT; (*Address of a variable of data type McCamAutParType or McAcpAxCamAutParType*)
DataSize: UDINT; (*Address of the cam data, 0 considered as use of McCamAutParType"*)
END_STRUCT;
McPolynomialDataType : STRUCT (*Structure with polynomial coefficient*)
A : REAL; (*Polynomial coefficient*)
B : REAL; (*Polynomial coefficient*)
C : REAL; (*Polynomial coefficient*)
D : REAL; (*Polynomial coefficient*)
E : REAL; (*Polynomial coefficient*)
F : REAL; (*Polynomial coefficient*)
G : REAL; (*Polynomial coefficient*)
X : REAL; (*Maximum master position*)
Reserve : UDINT; (*= 0 (Reserve)*)
END_STRUCT;
McCamDataType : STRUCT (*Structure with cam data*)
MasterPeriod : DINT; (*Length of the master period*)
SlavePeriod : DINT; (*Length of the slave period*)
PolynomialNumber : UDINT; (*Number of polynomials: 1..128*)
PolynomialData : ARRAY[0..127] OF McPolynomialDataType; (*Polynomial coefficient*)
END_STRUCT;
McAdvCalcCamFromPointsParType : STRUCT
InterpolationMode : McCamIplModeEnum; (*Interpolation mode*)
Type : McCamTypeEnum; (*Periodic or non-periodic operation*)
NumberOfPolynomials : UDINT; (*Maximum number of calculated polynomials: 1 .. 128*)
MasterPeriod : DINT; (*Length of the master period*)
StartSlope : LREAL; (*Slope (velocity) at the beginning of the curve*)
StartCurvature : LREAL; (*Curvature (acceleration) at the beginning of the curve*)
EndSlope : LREAL; (*Slope (velocity) at the end of the curve*)
EndCurvature : LREAL; (*Curvature (acceleration) at the end of the curve*)
END_STRUCT;
McCamSectionType : STRUCT
MasterPoint : REAL; (*Master position of the section*)
SlavePoint : REAL; (*Slave position of the section*)
FirstDerivative : REAL; (*Velocity of the section*)
SecondDerivative : REAL; (*Acceleration of the section*)
Mode : McCamSectRefPointEnum; (*Specification if master and slave position is used absolute or relative*)
Type : McCamSectLawOfMotionEnum; (*Law of motion, defines the number of used polynomials*)
InflectionPoint : REAL; (*Master position of the point of inflection*)
END_STRUCT;
McCamSectionsType : STRUCT
Section : ARRAY[0..129] OF McCamSectionType; (*Data of one point and the following part*)
END_STRUCT;
McAdvCamInLeadInOutParType : STRUCT
MasterOffset : LREAL; (*Master position in the cam at which the lead-in movement ends or the lead-out movement starts [Measurement units of master]*)
MasterDistance : LREAL; (*Master compensation distance outside the cam for lead-in or lead-out movement [Measurement units of master]*)
SlaveDistance : LREAL; (*Slave compensation distance for the lead-in or lead-out movement [Measurement units of slave]*)
CamID : UINT; (*ID of the cam for the lead-in or lead-out movement*)
MasterScaling : DINT; (*Master gauge factor for the lead-in or lead-out cam*)
SlaveScaling : DINT; (*Slave gauge factor for the lead-in or lead-out cam*)
Jerk : REAL; (*Maximum jerk of the slave axis [Measurement units of slave/s<>]*)
END_STRUCT;
McAdvBrCamInParType : STRUCT
Mode : McAdvCamInModeEnum; (*Mode for EnterCam and ExitCam*)
LeadIn : McAdvCamInLeadInOutParType; (*Parameters for lead-in movement*)
LeadOut : McAdvCamInLeadInOutParType; (*Parameters for lead-out-movement*)
MasterValueSource : McValueSrcEnum; (*Defines the source of the position to be read*)
MasterMaxVelocity : REAL; (*Maximum velocity of the master axis [Measurement units of master/s]*)
Jerk : REAL; (*Maximum jerk of the slave axis [Measurement units of slave/s<>]*)
Deceleration : REAL; (*Maximum deceleration [Measurement units of slave/s<>]*)
END_STRUCT;
McTriggerType : STRUCT
ValueSource : McValueSrcEnum; (*Value source selection*)
EventSource : McEventSrcEnum; (*Trigger event source selection*)
Edge : McEdgeEnum; (*Trigger event edge selection*)
TouchProbeID : USINT; (*Instance number of TouchProbe function on the selected axis*)
END_STRUCT;
McBrTriggerType : STRUCT
ValueSource : McValueSrcEnum; (*Data value source selection*)
EventSource : McEventSrcEnum; (*Trigger event source selection*)
Edge : McEdgeEnum; (*Trigger event edge selection*)
MinWidth : LREAL; (*Minimum trigger event width for the event to be considered valid [Measurement units]*)
MaxWidth : LREAL; (*Maximum trigger event width for the event to be considered valid [Measurement units]*)
SensorDelay : REAL; (*Trigger event signal sensor delay [s]*)
DisableWidthEvaluationAtStart : BOOL; (*Ignore width monitoring if the function block is enabled on the high level of the trigger signal*)
END_STRUCT;
McAdvBrTouchProbeParType : STRUCT
UseFirstTriggerPosition : BOOL; (*Capture position upon first trigger event*)
UseAxisPeriod : BOOL; (*Use axis period for window period*)
UpdatePeriod : BOOL; (*Detect and adapt to change of input "Period"*)
ReadTriggerWidth : BOOL; (*Enable reading and updating the "TriggerInfo.Width" value*)
END_STRUCT;
McBrTriggerInfoType : STRUCT
Width : LREAL; (*Measured width (size) of the trigger event [Measurement units]*)
Status : McBrTriggerInfoStatusEnum; (*Status of the trigger event*)
END_STRUCT;
McDigCamSwitchOptionsParType : STRUCT
DataSet : ARRAY[0..4] OF McDigCamSwDataSetParType; (*Reference to the switch data*)
Period : LREAL; (*Period if an non periodic axis is used or an other period should be used*)
StartPosition : LREAL; (*Start position of the cam switch*)
END_STRUCT;
McDigCamSwDataSetParType : STRUCT
NumberOfSwitches : USINT; (*Number of switches with are used*)
SwitchPositions : ARRAY[0..63] OF McDigCamSwOnPositionsParType; (*Array with the switching positions*)
END_STRUCT;
McDigCamSwOnPositionsParType : STRUCT
FirstOnPosition : LREAL; (*Lower limit at which the switch is on [Measurement units]*)
LastOnPosition : LREAL; (*Upper limit at which the switch is on [Measurement units]*)
END_STRUCT;
McDigCamSwTrackOptionsParType : STRUCT
OnCompensation : REAL; (*Compensation time for the switch-on delay [s]*)
OffCompensation : REAL; (*Compensation time for the switch-off delay [s]*)
Filter : REAL; (*Filter time constant (for speed generation to compensate for switching delays) [s]*)
Hysteresis : REAL; (*Interval from the switching point (in the positive and negative direction) during which the output is not switched until the axis leaves this area. This prevents switching from taking place several times around the switching point [Measurement units]*)
DisableNegativeDirection : BOOL; (*If this input is set, switching edges are only generated if the master axis is moving in the positive direction*)
END_STRUCT;
McDigCamSwOptionsParType : STRUCT
FeatureName : STRING[250]; (*Name of the "Digital cam switch" feature The feature must be assigned to the axis as well inside the hardware configuration*)
END_STRUCT;
McAdvCamAutPrepRestartParType : STRUCT
ToleranceWindow : LREAL; (*Tolerance window, used by several prepare restart modes [Measurement units]*)
RestartPositionOffset : LREAL; (*Offset applied in addition to the current position got from cam automat [Measurement units]*)
END_STRUCT;
McCamAutPrepRestartModeEnum:
(
mcPREP_RESTART_POSITIVE, (*Slave axis moves to "RestartPosition" only in positive direction*)
mcPREP_RESTART_NEGATIVE, (*Slave axis moves to "RestartPosition" only in negative direction*)
mcPREP_RESTART_SHORTEST_WAY, (*Slave axis moves to "RestartPosition" by the shortest distance*)
mcPREP_RESTART_POSITIVE_WINDOW, (*Slave moves to "RestartPosition" by the shortest distance when distance is smaller than "ToleranceWindow", otherwise only in positive direction*)
mcPREP_RESTART_NEGATIVE_WINDOW, (*Slave moves to "RestartPosition" by the shortest distance when distance is smaller than "ToleranceWindow", otherwise only in negative direction*)
mcPREP_RESTART_GET_POSITION (*"RestartPosition" is output, no movement is performed*)
);
McAdvCyclicTorqueFFParType : STRUCT
DisableMode : McDisableModeEnum; (*Defines the behavior at disable*)
END_STRUCT;
McAdvBrCamTransLeadInOutParType : STRUCT
MasterDistance : LREAL; (*Master compensation distance outside the cam for lead-in or lead-out movement [Measurement units of master]*)
SlaveDistance : LREAL; (*Slave compensation distance for the lead-in or lead-out movement [Measurement units of slave]*)
MasterOffset : LREAL; (*Master position in the cam at which the lead-in movement ends or the lead-out movement starts [Measurement units of master]*)
Jerk : REAL; (*Maximum jerk of the slave axis [Measurement units of slave/s<>]*)
END_STRUCT;
McAdvBrCamDwellParType : STRUCT
LeadIn : McAdvBrCamTransLeadInOutParType; (*Parameters for lead-in movement*)
LeadOut : McAdvBrCamTransLeadInOutParType; (*Parameters for lead-out movement*)
LeadInAlternativeValueSource : McAltValueSrcEnum; (*If used, defines the alternative source of LeadIn command triggered when ParID value changes from zero to non-zero value*)
LeadOutAlternativeValueSource : McAltValueSrcEnum; (*If used, defines the alternative source of LeadOut command triggered when ParID value changes from zero to non-zero value*)
MasterValueSource : McValueSrcEnum; (*Defines the source of the master axis position to be used*)
MasterMaxVelocity : REAL; (*Maximum velocity of the master axis [Measurement units of master/s]*)
Jerk : REAL; (*Maximum jerk of the slave axis [Measurement units of slave/s<>]*)
Deceleration : REAL; (*Maximum deceleration [Measurement units of slave/s<>]*)
END_STRUCT;
McAdvBrAutoCamDwellParType : STRUCT
LeadIn : McAdvBrCamTransLeadInOutParType; (*Parameters for lead-in movement*)
LeadOut : McAdvBrCamTransLeadInOutParType; (*Parameters for lead-out movement*)
LeadInAlternativeValueSource : McAltValueSrcEnum; (*If used, defines the alternative source of LeadIn command triggered when ParID value changes from zero to non-zero value*)
LeadOutAlternativeValueSource : McAltValueSrcEnum; (*If used, defines the alternative source of LeadOut command triggered when ParID value changes from zero to non-zero value*)
MasterValueSource : McValueSrcEnum; (*Defines the source of the master axis position to be used*)
MasterMaxVelocity : REAL; (*Maximum velocity of the master axis [Measurement units of master/s]*)
Jerk : REAL; (*Maximum jerk of the slave axis [Measurement units of slave/s<>]*)
Deceleration : REAL; (*Maximum deceleration [Measurement units of slave/s<>]*)
END_STRUCT;
McAdvBrCamTransCamModeEnum:
(
mcCAM_MODE_DISTANCE_BASED, (*Constant master distance*)
mcCAM_MODE_TIME_BASED (*Constant time*)
);
McAdvBrCamTransTransModeEnum:
(
mcCAM_TRANS_MODE_OFF, (*Only the synchronous cam is repeated cyclically*)
mcCAM_TRANS_MODE_ON, (*The synchronous cam - compensating movement (transition) sequence is repeated cyclically*)
mcCAM_TRANS_MODE_OFF_LEAD_IN , (*The synchronous cam is repeated cyclically and lead-in movement is performed before entering cam. No lead-out movement is executed*)
mcCAM_TRANS_MODE_OFF_LEAD_OUT, (*The synchronous cam is repeated cyclically and lead-out movement is performed when exiting the cam. No lead-in movement is executed*)
mcCAM_TRANS_MODE_OFF_LEAD_IN_OUT, (*The synchronous cam is repeated cyclically. Lead-in movement is performed before entering the cam. Lead-out movement is performed when exiting the cam*)
mcCAM_TRANS_MODE_ON_LEAD_IN, (*In this mode, the synchronous cam - compensating movement (transition) sequence is repeated cyclically. Lead-in movement is performed before entering the cam. No lead-out movement is performed*)
mcCAM_TRANS_MODE_ON_LEAD_OUT, (*The synchronous cam - compensating movement (transition) sequence is repeated cyclically. Lead-out movement is performed when exiting the cam. No lead-in movement is performed*)
mcCAM_TRANS_MODE_ON_LEAD_IN_OUT (*The synchronous cam - compensating movement (transition) sequence is repeated cyclically. Lead-in movement is performed before entering the cam. Lead-out movement is performed when exiting the cam*)
);
McAdvBrCamTransitionParType : STRUCT
LeadIn : McAdvBrCamTransLeadInOutParType; (*Parameters for lead-in movement*)
LeadOut : McAdvBrCamTransLeadInOutParType; (*Parameters for lead-out movement*)
LeadInAlternativeValueSource : McAltValueSrcEnum; (*If used, defines the alternative source of LeadIn command triggered when ParID value changes from zero to non-zero value*)
LeadOutAlternativeValueSource : McAltValueSrcEnum; (*If used, defines the alternative source of LeadOut command triggered when ParID value changes from zero to non-zero value*)
MasterValueSource : McValueSrcEnum; (*Defines the source of the master axis position to be used*)
MasterMaxVelocity : REAL; (*Maximum velocity of the master axis [Measurement units of master/s]*)
CamTime : REAL; (*Time for the synchronous curve [s]*)
CamMode : McAdvBrCamTransCamModeEnum; (*Mode for synchronous curve*)
TransitionMode : McAdvBrCamTransTransModeEnum; (*Mode for compensation phases*)
Jerk : REAL; (*Maximum jerk of the slave axis [Measurement units of slave/s<>]*)
Deceleration : REAL; (*Maximum deceleration [Measurement units of slave/s<>]*)
END_STRUCT;
McBrAdvCamSaveDatObjType : STRUCT
DataObjectVersion : UINT; (*Version of the saved data object (four digits)*)
END_STRUCT;
McEventType : STRUCT
Event : McEventSrcEnum; (*Event source selection*)
Edge : McEdgeEnum; (*Defines if the rising or falling edge should be used for the event*)
END_STRUCT;
McAdvEventMoveParType : STRUCT
Mode : McEventMoveModeEnum; (*Operation mode*)
AlternativeValueSource : McAltValueSrcEnum; (*If used, defines the alternative source of: position for MC_BR_EventMoveAbsolute, distance for MC_BR_EventMoveAdditive, velocity for MC_BR_EventMoveVelocity from which target value is read (Axis Units)*)
END_STRUCT;
McDigitalInputsPvIfType : STRUCT
HomingSwitch : BOOL; (*Variable for homing switch input functionality*)
PositiveLimitSwitch : BOOL; (*Variable for positive limit switch input functionality*)
NegativeLimitSwitch : BOOL; (*Variable for negative limit switch input functionality*)
Trigger1 : BOOL; (*Variable for trigger 1 input functionality*)
Trigger2 : BOOL; (*Variable for trigger 2 input functionality*)
Quickstop : BOOL; (*Variable for quickstop input functionality*)
END_STRUCT;
McAdvBrTorqueControlParType : STRUCT
NoHomingCheck : BOOL; (*No check for completed prior homing.*)
UseVelocityLimits : BOOL; (*Use axis velocity limits.*)
CorrectVelocityLimits : BOOL; (*Automatically correct velocity limits.*)
UseTimeLimit : BOOL; (*Automatic cutoff after time if no load or load too low.*)
TimeLimit : REAL; (*Time limit for how long the axis can move at the speed or acceleration limit before it is stopped automatically [s].*)
TorqueAlternativeValueSource : McAltValueSrcEnum; (*If used, defines the alternative source of torque setpoint and uses it instead of "Torque" input [Nm]*)
StartAlternativeValueSource : McAltValueSrcEnum; (*If used, defines the alternative source of Start command triggered when ParID value changes from zero to non-zero value*)
END_STRUCT;
McLimitLoadModeEnum :
(
mcLL_WITH_FEED_FORWARD, (*control deviation torque AND feed forward torque are limited (overall torque) *)
mcLL_WITHOUT_FEED_FORWARD (*control deviation torque only is limited; feed forward torque component is not limited *)
);
McAdvBrLimitLoadCamParType : STRUCT
PositionFactorPos : DINT; (*Multiplication factor of the axis position for the positive direction *)
LoadFactorPos : DINT; (*Multiplication factor of the torque for the positive direction *)
PositionFactorNeg : DINT; (*Multiplication factor of the axis position for the negative direction *)
LoadFactorNeg : DINT; (*Multiplication factor of the torque for the negative direction *)
END_STRUCT;
McAcpAxAutoTuneOrientationEnum:
(
mcACPAX_ORIENTATION_HORIZONTAL, (*Horizontal orientation*)
mcACPAX_ORIENTATION_VERTICAL (*Vertical orientation*)
);
McAcpAxFilterTimeModeEnum:
(
mcACPAX_FILTER_TIME_USE, (*The determination of filter time constants is disabled; however, filter time constants are taken into account for autotuning*)
mcACPAX_FILTER_TIME_TUNE_MODE1, (*The controlled variable is the unfiltered actual speed n*)
mcACPAX_FILTER_TIME_TUNE_MODE2 (*The controlled variable is the filtered actual speed n*)
);
McAcpAxLoopFilterModeEnum:
(
mcACPAX_LOOP_FILTER_IGNORE, (*Loop filters are neither taken into account nor calculated.*)
mcACPAX_LOOP_FILTER_USE, (*The parameters for all loop filters are taken into account for autotuning*)
mcACPAX_LOOP_FILTER_TUNE_NOTCH (*The parameters for the loop filter are calculated*)
);
McMechDevCompCmdEnum:
(
mcMDC_CMD_SWITCH_ON, (*Functionality activation*)
mcMDC_CMD_SWITCH_OFF, (*Functionality deactivation*)
mcMDC_CMD_CALC_COMP_DATA (*Compensation data computation*)
);
McMechDevCompDataType : STRUCT
Position : LREAL; (*Position [Measurement units]*)
Deviation : LREAL; (*Deviation [Measurement units]*)
END_STRUCT;
McMechDevCompAdvParType : STRUCT
DataObjectNamePos : STRING[12];
DataObjectNameNeg : STRING[12];
END_STRUCT;
McMechDevCompAddInfoType : STRUCT
CamStartPositionPos : LREAL;
CamStartPositionNeg : LREAL;
END_STRUCT;
McHwInfoAxisType : STRUCT
AxisName : STRING[32]; (*Name of the logical axis object*)
ConfigElementLocation : STRING[250]; (*Location for MC_BR_ProcessConfig*)
AxisType : McAxisTypeEnum; (*Detailed axis type*)
END_STRUCT;
McHwInfoDriveType : STRUCT
ModelNumber : STRING[19]; (*Model number of the drive*)
ModuleID : STRING[11]; (*For B&R modules: B&R ID code; For DS402 modules: Product code; [hex]*)
SerialNumber : STRING[19]; (*Serial number of the drive*)
Revision : STRING[3]; (*Revision number of the drive*)
FirmwareVersion : STRING[7]; (*Used firmware version*)
END_STRUCT;
McHwInfoCardType : STRUCT
InfoAvailable : BOOL; (*Displays if the information is available*)
ModelNumber : STRING[19]; (*Model number of the card*)
SerialNumber : STRING[19]; (*Serial number of the card*)
Revision : STRING[3]; (*Revision number of the card*)
END_STRUCT;
McHwInfoMotorType : STRUCT
InfoAvailable : BOOL; (*Displays if the information is available*)
ModelNumber : STRING[35]; (*Model number of the motor*)
SerialNumber : STRING[19]; (*Serial number of the motor*)
Revision : STRING[3]; (*Revision number of the motor*)
END_STRUCT;
McHardwareInfoType : STRUCT
Axis : McHwInfoAxisType; (*Detailed axis information*)
Drive : McHwInfoDriveType; (*Detailed drive information*)
Card : ARRAY[0..3] OF McHwInfoCardType; (*Detailed card information*)
Motor : ARRAY[0..2] OF McHwInfoMotorType; (*Detailed motor information*)
END_STRUCT;
McDigitalOutputType : STRUCT
FeatureName : STRING[250]; (*Name of the "Digital output" feature in which the output which should be written. The feature must be assigned to the axis as well inside the hardware configuration*)
END_STRUCT;
END_TYPE

View File

View File

@@ -0,0 +1,708 @@
TYPE
McABTEnum :
( (*Base type selector setting*)
mcABT_LIN_BD := 0, (*Linear bounded - Linear axis with bounded movement scope*)
mcABT_LIN := 1, (*Linear - Linear axis*)
mcABT_LIN_PER := 2, (*Linear periodic - Linear axis with periodic movement scope*)
mcABT_ROT_BD := 10, (*Rotary bounded - Rotary axis with bounded movement scope*)
mcABT_ROT := 11, (*Rotary - Rotary axis*)
mcABT_ROT_PER := 12 (*Rotary periodic - Rotary axis with periodic movement scope*)
);
McABTLinBdType : STRUCT (*Type mcABT_LIN_BD settings*)
MeasurementUnit : McCfgLocLenUnitEnum; (*Measurement unit for the axis*)
MeasurementResolution : LREAL; (*Possible resolution of measurement unit that can be achieved [Measurement units]*)
CountDirection : McCfgCntDirEnum; (*Direction of the axis in which the position value is increasing*)
END_STRUCT;
McABTLinType : STRUCT (*Type mcABT_LIN settings*)
MeasurementUnit : McCfgLocLenUnitEnum; (*Measurement unit for the axis*)
MeasurementResolution : LREAL; (*Possible resolution of measurement unit that can be achieved [Measurement units]*)
CountDirection : McCfgCntDirEnum; (*Direction of the axis in which the position value is increasing*)
END_STRUCT;
McABTLinPerPerSetType : STRUCT (*Possible position value range of a periodic axis*)
Period : LREAL; (*The value range for axis positions is [0 , Period[ [Measurement units]*)
END_STRUCT;
McABTLinPerType : STRUCT (*Type mcABT_LIN_PER settings*)
MeasurementUnit : McCfgLocLenUnitEnum; (*Measurement unit for the axis*)
MeasurementResolution : LREAL; (*Possible resolution of measurement unit that can be achieved [Measurement units]*)
CountDirection : McCfgCntDirEnum; (*Direction of the axis in which the position value is increasing*)
PeriodSettings : McABTLinPerPerSetType; (*Possible position value range of a periodic axis*)
END_STRUCT;
McABTRotBdType : STRUCT (*Type mcABT_ROT_BD settings*)
MeasurementUnit : McCfgLocRotUnitEnum; (*Measurement unit for the axis*)
MeasurementResolution : LREAL; (*Possible resolution of measurement unit that can be achieved [Measurement units]*)
CountDirection : McCfgCntDirEnum; (*Direction of the axis in which the position value is increasing*)
END_STRUCT;
McABTRotType : STRUCT (*Type mcABT_ROT settings*)
MeasurementUnit : McCfgLocRotUnitEnum; (*Measurement unit for the axis*)
MeasurementResolution : LREAL; (*Possible resolution of measurement unit that can be achieved [Measurement units]*)
CountDirection : McCfgCntDirEnum; (*Direction of the axis in which the position value is increasing*)
END_STRUCT;
McABTRotPerPerSetType : STRUCT (*Possible position value range of a periodic axis*)
Period : LREAL; (*The value range for axis positions is [0 , Period[ [Measurement units]*)
END_STRUCT;
McABTRotPerType : STRUCT (*Type mcABT_ROT_PER settings*)
MeasurementUnit : McCfgLocRotUnitEnum; (*Measurement unit for the axis*)
MeasurementResolution : LREAL; (*Possible resolution of measurement unit that can be achieved [Measurement units]*)
CountDirection : McCfgCntDirEnum; (*Direction of the axis in which the position value is increasing*)
PeriodSettings : McABTRotPerPerSetType; (*Possible position value range of a periodic axis*)
END_STRUCT;
McABTType : STRUCT (*Defines the basic movement possibilities of the axis*)
Type : McABTEnum; (*Base type selector setting*)
LinearBounded : McABTLinBdType; (*Type mcABT_LIN_BD settings*)
Linear : McABTLinType; (*Type mcABT_LIN settings*)
LinearPeriodic : McABTLinPerType; (*Type mcABT_LIN_PER settings*)
RotaryBounded : McABTRotBdType; (*Type mcABT_ROT_BD settings*)
Rotary : McABTRotType; (*Type mcABT_ROT settings*)
RotaryPeriodic : McABTRotPerType; (*Type mcABT_ROT_PER settings*)
END_STRUCT;
McAMLEnum :
( (*Movement limits selector setting*)
mcAML_INT := 0, (*Internal - Internal definition of limits*)
mcAML_INT_PATH_AX := 1, (*Internal path axis - Internal definition of limits with additional settings for a path controlled axis*)
mcAML_EXT := 2 (*External - External definition of limits*)
);
McAMoveLimVelEnum :
( (*Velocity selector setting*)
mcAMLV_BASIC := 0, (*Basic -*)
mcAMLV_ADV := 1 (*Advanced -*)
);
McAMoveLimVelType : STRUCT (*Limits for the velocity of the axis*)
Type : McAMoveLimVelEnum; (*Velocity selector setting*)
Basic : McCfgLimVelBaseType; (*Type mcAMLV_BASIC settings*)
Advanced : McCfgLimVelAdvType; (*Type mcAMLV_ADV settings*)
END_STRUCT;
McAMoveLimAccEnum :
( (*Acceleration selector setting*)
mcAMLA_BASIC := 0, (*Basic -*)
mcAMLA_ADV := 1 (*Advanced -*)
);
McAMoveLimAccType : STRUCT (*Limits for the acceleration of the axis*)
Type : McAMoveLimAccEnum; (*Acceleration selector setting*)
Basic : McCfgLimAccBaseType; (*Type mcAMLA_BASIC settings*)
Advanced : McCfgLimAccAdvType; (*Type mcAMLA_ADV settings*)
END_STRUCT;
McAMoveLimDecEnum :
( (*Deceleration selector setting*)
mcAMLD_BASIC := 0, (*Basic -*)
mcAMLD_ADV := 1 (*Advanced -*)
);
McAMoveLimDecType : STRUCT (*Limits for the deceleration of the axis*)
Type : McAMoveLimDecEnum; (*Deceleration selector setting*)
Basic : McCfgLimDecBaseType; (*Type mcAMLD_BASIC settings*)
Advanced : McCfgLimDecAdvType; (*Type mcAMLD_ADV settings*)
END_STRUCT;
McAMLIntType : STRUCT (*Type mcAML_INT settings*)
Position : McCfgLimPosType; (*Movement range of the axis via two position boundaries*)
Velocity : McAMoveLimVelType; (*Limits for the velocity of the axis*)
Acceleration : McAMoveLimAccType; (*Limits for the acceleration of the axis*)
Deceleration : McAMoveLimDecType; (*Limits for the deceleration of the axis*)
END_STRUCT;
McAMLIntPathAxType : STRUCT (*Type mcAML_INT_PATH_AX settings*)
Position : McCfgLimPosType; (*Movement range of the axis via two position boundaries*)
Velocity : McAMoveLimVelType; (*Limits for the velocity of the axis*)
Acceleration : McAMoveLimAccType; (*Limits for the acceleration of the axis*)
Deceleration : McAMoveLimDecType; (*Limits for the deceleration of the axis*)
Jerk : McCfgLimJerkType; (*Jerk limits*)
Torque : McCfgLimTorqType; (*Torque limits*)
Force : McCfgLimForType; (*Limits for the force of the axis*)
END_STRUCT;
McAMLType : STRUCT (*Various limit values that will be considered for axis movements*)
Type : McAMLEnum; (*Movement limits selector setting*)
Internal : McAMLIntType; (*Type mcAML_INT settings*)
InternalPathAxis : McAMLIntPathAxType; (*Type mcAML_INT_PATH_AX settings*)
External : McCfgExtLimRefType; (*Type mcAML_EXT settings*)
END_STRUCT;
McCfgAxType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_AX*)
BaseType : McABTType; (*Defines the basic movement possibilities of the axis*)
MovementLimits : McAMLType; (*Various limit values that will be considered for axis movements*)
END_STRUCT;
McCfgAxBaseTypType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_AX_BASE_TYP*)
BaseType : McABTType; (*Defines the basic movement possibilities of the axis*)
END_STRUCT;
McCfgAxMoveLimType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_AX_MOVE_LIM*)
MovementLimits : McAMLType; (*Various limit values that will be considered for axis movements*)
END_STRUCT;
McAFDCSTypEnum :
( (*Digital cam switch type selector setting*)
mcAFDCST_ACP := 0 (*ACOPOS - ACOPOS specific part is used*)
);
McAFDCSTypAcpValSrcRTOAEnum :
( (*Reference to other axis selector setting*)
mcAFDCSTAVSRTOA_NOT_USE := 0, (*Not used -*)
mcAFDCSTAVSRTOA_USE := 1 (*Used -*)
);
McAFDCSTypAcpValSrcRTOAUseType : STRUCT (*Type mcAFDCSTAVSRTOA_USE settings*)
AxisReference : McCfgReferenceType; (*Name of the referenced axis component*)
END_STRUCT;
McAFDCSTypAcpValSrcRTOAType : STRUCT (*Another axis then the output axis is used as value source*)
Type : McAFDCSTypAcpValSrcRTOAEnum; (*Reference to other axis selector setting*)
Used : McAFDCSTypAcpValSrcRTOAUseType; (*Type mcAFDCSTAVSRTOA_USE settings*)
END_STRUCT;
McAFDCSTypAcpValSrcParIDEnum :
( (*ParID selector setting*)
mcAFDCSTAVSP_NOT_USE := 1, (*Not used - Not used*)
mcAFDCSTAVSP_USE := 2 (*Used - ParID used*)
);
McAFDCSTypAcpValSrcParIDUseType : STRUCT (*Type mcAFDCSTAVSP_USE settings*)
ParID : UINT; (*ParID which is used as value source*)
END_STRUCT;
McAFDCSTypAcpValSrcParIDType : STRUCT (*ParID used as Value source*)
Type : McAFDCSTypAcpValSrcParIDEnum; (*ParID selector setting*)
Used : McAFDCSTypAcpValSrcParIDUseType; (*Type mcAFDCSTAVSP_USE settings*)
END_STRUCT;
McAFDCSTypAcpValSrcType : STRUCT (*Value source for generating the cam switches*)
ReferenceToOtherAxis : McAFDCSTypAcpValSrcRTOAType; (*Another axis then the output axis is used as value source*)
ParID : McAFDCSTypAcpValSrcParIDType; (*ParID used as Value source*)
END_STRUCT;
McAFDCSTypAcpOutEnum :
( (*Output selector setting*)
mcAFDCSTAO_ACP_HW := 0, (*ACOPOS hardware - ACOPOS hardware is used*)
mcAFDCSTAO_ACP_PARID := 1 (*ACOPOS ParID - A destination ParID on an ACOPOS axis is used*)
);
McAFDCSTypAcpOutAcpHwProdFamEnum :
( (*ACOPOS product family selector setting*)
mcAFDCSTAOAHPF_ACP := 0, (*ACOPOS -*)
mcAFDCSTAOAHPF_ACPM := 1, (*ACOPOSmulti -*)
mcAFDCSTAOAHPF_ACP_P3 := 2 (*ACOPOS P3 -*)
);
McAFDCSACOPOSDigOutEnum :
( (*Digital output selector setting*)
mcAFDCSACOPOSDO_SS2X111 := 0, (*SS2.X11.1 -*)
mcAFDCSACOPOSDO_SS2X112 := 1, (*SS2.X11.2 -*)
mcAFDCSACOPOSDO_SS2X113 := 2, (*SS2.X11.3 -*)
mcAFDCSACOPOSDO_SS2X114 := 3, (*SS2.X11.4 -*)
mcAFDCSACOPOSDO_SS2X115 := 4, (*SS2.X11.5 -*)
mcAFDCSACOPOSDO_SS2X116 := 5, (*SS2.X11.6 -*)
mcAFDCSACOPOSDO_SS2X117 := 6, (*SS2.X11.7 -*)
mcAFDCSACOPOSDO_SS2X118 := 7, (*SS2.X11.8 -*)
mcAFDCSACOPOSDO_SS2X119 := 8, (*SS2.X11.9 -*)
mcAFDCSACOPOSDO_SS2X1110 := 9, (*SS2.X11.10 -*)
mcAFDCSACOPOSDO_SS3X111 := 10, (*SS3.X11.1 -*)
mcAFDCSACOPOSDO_SS3X112 := 11, (*SS3.X11.2 -*)
mcAFDCSACOPOSDO_SS3X113 := 12, (*SS3.X11.3 -*)
mcAFDCSACOPOSDO_SS3X114 := 13, (*SS3.X11.4 -*)
mcAFDCSACOPOSDO_SS3X115 := 14, (*SS3.X11.5 -*)
mcAFDCSACOPOSDO_SS3X116 := 15, (*SS3.X11.6 -*)
mcAFDCSACOPOSDO_SS3X117 := 16, (*SS3.X11.7 -*)
mcAFDCSACOPOSDO_SS3X118 := 17, (*SS3.X11.8 -*)
mcAFDCSACOPOSDO_SS3X119 := 18, (*SS3.X11.9 -*)
mcAFDCSACOPOSDO_SS3X1110 := 19, (*SS3.X11.10 -*)
mcAFDCSACOPOSDO_SS4X111 := 20, (*SS4.X11.1 -*)
mcAFDCSACOPOSDO_SS4X112 := 21, (*SS4.X11.2 -*)
mcAFDCSACOPOSDO_SS4X113 := 22, (*SS4.X11.3 -*)
mcAFDCSACOPOSDO_SS4X114 := 23, (*SS4.X11.4 -*)
mcAFDCSACOPOSDO_SS4X115 := 24, (*SS4.X11.5 -*)
mcAFDCSACOPOSDO_SS4X116 := 25, (*SS4.X11.6 -*)
mcAFDCSACOPOSDO_SS4X117 := 26, (*SS4.X11.7 -*)
mcAFDCSACOPOSDO_SS4X118 := 27, (*SS4.X11.8 -*)
mcAFDCSACOPOSDO_SS4X119 := 28, (*SS4.X11.9 -*)
mcAFDCSACOPOSDO_SS4X1110 := 29 (*SS4.X11.10 -*)
);
McAFDCSACOPOSDigOutType : STRUCT
Type : McAFDCSACOPOSDigOutEnum; (*Digital output selector setting*)
END_STRUCT;
McAFDCSACOPOSType : STRUCT (*Type mcAFDCSTAOAHPF_ACP settings*)
DigitalOutput : McAFDCSACOPOSDigOutType;
END_STRUCT;
McAFDCSACOPOSmultiDigOutEnum :
( (*Digital output selector setting*)
mcAFDCSACOPOSMULTIDO_SS1X111 := 0, (*SS1.X11.1 -*)
mcAFDCSACOPOSMULTIDO_SS1X113 := 1, (*SS1.X11.3 -*)
mcAFDCSACOPOSMULTIDO_SS1X115 := 2, (*SS1.X11.5 -*)
mcAFDCSACOPOSMULTIDO_SS1X116 := 3 (*SS1.X11.6 -*)
);
McAFDCSACOPOSmultiDigOutType : STRUCT
Type : McAFDCSACOPOSmultiDigOutEnum; (*Digital output selector setting*)
END_STRUCT;
McAFDCSACOPOSmultiType : STRUCT (*Type mcAFDCSTAOAHPF_ACPM settings*)
DigitalOutput : McAFDCSACOPOSmultiDigOutType;
END_STRUCT;
McAFDCSACOPOSP3DigOutEnum :
( (*Digital output selector setting*)
mcAFDCSACOPOSP3DO_SS1X41E1 := 0, (*SS1.X41E.1 -*)
mcAFDCSACOPOSP3DO_SS1X41E2 := 1, (*SS1.X41E.2 -*)
mcAFDCSACOPOSP3DO_SS1X41E3 := 2, (*SS1.X41E.3 -*)
mcAFDCSACOPOSP3DO_SS1X41E4 := 3, (*SS1.X41E.4 -*)
mcAFDCSACOPOSP3DO_SS1X41E5 := 4, (*SS1.X41E.5 -*)
mcAFDCSACOPOSP3DO_SS1X41E6 := 5, (*SS1.X41E.6 -*)
mcAFDCSACOPOSP3DO_SS1X41E7 := 6, (*SS1.X41E.7 -*)
mcAFDCSACOPOSP3DO_SS1X41E8 := 7, (*SS1.X41E.8 -*)
mcAFDCSACOPOSP3DO_SS1X41E9 := 8, (*SS1.X41E.9 -*)
mcAFDCSACOPOSP3DO_SS1X41E10 := 9 (*SS1.X41E.10 -*)
);
McAFDCSACOPOSP3DigOutType : STRUCT
Type : McAFDCSACOPOSP3DigOutEnum; (*Digital output selector setting*)
END_STRUCT;
McAFDCSACOPOSP3Type : STRUCT (*Type mcAFDCSTAOAHPF_ACP_P3 settings*)
DigitalOutput : McAFDCSACOPOSP3DigOutType;
END_STRUCT;
McAFDCSTypAcpOutAcpHwProdFamType : STRUCT
Type : McAFDCSTypAcpOutAcpHwProdFamEnum; (*ACOPOS product family selector setting*)
ACOPOS : McAFDCSACOPOSType; (*Type mcAFDCSTAOAHPF_ACP settings*)
ACOPOSmulti : McAFDCSACOPOSmultiType; (*Type mcAFDCSTAOAHPF_ACPM settings*)
ACOPOSP3 : McAFDCSACOPOSP3Type; (*Type mcAFDCSTAOAHPF_ACP_P3 settings*)
END_STRUCT;
McAFDCSTypAcpOutAcpHwType : STRUCT (*Type mcAFDCSTAO_ACP_HW settings*)
ProductFamily : McAFDCSTypAcpOutAcpHwProdFamType;
END_STRUCT;
McAFDCSTypAcpOutAcpParIDType : STRUCT (*Type mcAFDCSTAO_ACP_PARID settings*)
ParID : UINT;
END_STRUCT;
McAFDCSTypAcpOutType : STRUCT (*Target of the output value*)
Type : McAFDCSTypAcpOutEnum; (*Output selector setting*)
ACOPOSHardware : McAFDCSTypAcpOutAcpHwType; (*Type mcAFDCSTAO_ACP_HW settings*)
ACOPOSParID : McAFDCSTypAcpOutAcpParIDType; (*Type mcAFDCSTAO_ACP_PARID settings*)
END_STRUCT;
McAFDCSTypAcpType : STRUCT (*Type mcAFDCST_ACP settings*)
ValueSource : McAFDCSTypAcpValSrcType; (*Value source for generating the cam switches*)
Output : McAFDCSTypAcpOutType; (*Target of the output value*)
END_STRUCT;
McAFDCSTypType : STRUCT (*Type of the digital output configuration*)
Type : McAFDCSTypEnum; (*Digital cam switch type selector setting*)
ACOPOS : McAFDCSTypAcpType; (*Type mcAFDCST_ACP settings*)
END_STRUCT;
McCfgAxFeatDigCamSwType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_AX_FEAT_DIG_CAM_SW*)
DigitalCamSwitchType : McAFDCSTypType; (*Type of the digital output configuration*)
END_STRUCT;
McAFDOTypEnum :
( (*Digital output type selector setting*)
mcAFDOT_ACP := 0, (*ACOPOS - ACOPOS specific part is used*)
mcAFDOT_STP := 1 (*Stepper - Stepper specific parts are used*)
);
McAFDOTypAcpOutEnum :
( (*Output selector setting*)
mcAFDOTAO_ACP_HW := 0 (*ACOPOS hardware - ACOPOS hardware is used*)
);
McAFDOTypAcpOutAcpHwProdFamEnum :
( (*ACOPOS product family selector setting*)
mcAFDOTAOAHPF_ACP := 0, (*ACOPOS -*)
mcAFDOTAOAHPF_ACPM := 1, (*ACOPOSmulti -*)
mcAFDOTAOAHPF_ACP_P3 := 2 (*ACOPOS P3 -*)
);
McAFDOACOPOSDigOutEnum :
( (*Digital output selector setting*)
mcAFDOACOPOSDO_SS2X111 := 0, (*SS2.X11.1 -*)
mcAFDOACOPOSDO_SS2X112 := 1, (*SS2.X11.2 -*)
mcAFDOACOPOSDO_SS2X113 := 2, (*SS2.X11.3 -*)
mcAFDOACOPOSDO_SS2X114 := 3, (*SS2.X11.4 -*)
mcAFDOACOPOSDO_SS2X115 := 4, (*SS2.X11.5 -*)
mcAFDOACOPOSDO_SS2X116 := 5, (*SS2.X11.6 -*)
mcAFDOACOPOSDO_SS2X117 := 6, (*SS2.X11.7 -*)
mcAFDOACOPOSDO_SS2X118 := 7, (*SS2.X11.8 -*)
mcAFDOACOPOSDO_SS2X119 := 8, (*SS2.X11.9 -*)
mcAFDOACOPOSDO_SS2X1110 := 9, (*SS2.X11.10 -*)
mcAFDOACOPOSDO_SS3X111 := 10, (*SS3.X11.1 -*)
mcAFDOACOPOSDO_SS3X112 := 11, (*SS3.X11.2 -*)
mcAFDOACOPOSDO_SS3X113 := 12, (*SS3.X11.3 -*)
mcAFDOACOPOSDO_SS3X114 := 13, (*SS3.X11.4 -*)
mcAFDOACOPOSDO_SS3X115 := 14, (*SS3.X11.5 -*)
mcAFDOACOPOSDO_SS3X116 := 15, (*SS3.X11.6 -*)
mcAFDOACOPOSDO_SS3X117 := 16, (*SS3.X11.7 -*)
mcAFDOACOPOSDO_SS3X118 := 17, (*SS3.X11.8 -*)
mcAFDOACOPOSDO_SS3X119 := 18, (*SS3.X11.9 -*)
mcAFDOACOPOSDO_SS3X1110 := 19, (*SS3.X11.10 -*)
mcAFDOACOPOSDO_SS4X111 := 20, (*SS4.X11.1 -*)
mcAFDOACOPOSDO_SS4X112 := 21, (*SS4.X11.2 -*)
mcAFDOACOPOSDO_SS4X113 := 22, (*SS4.X11.3 -*)
mcAFDOACOPOSDO_SS4X114 := 23, (*SS4.X11.4 -*)
mcAFDOACOPOSDO_SS4X115 := 24, (*SS4.X11.5 -*)
mcAFDOACOPOSDO_SS4X116 := 25, (*SS4.X11.6 -*)
mcAFDOACOPOSDO_SS4X117 := 26, (*SS4.X11.7 -*)
mcAFDOACOPOSDO_SS4X118 := 27, (*SS4.X11.8 -*)
mcAFDOACOPOSDO_SS4X119 := 28, (*SS4.X11.9 -*)
mcAFDOACOPOSDO_SS4X1110 := 29 (*SS4.X11.10 -*)
);
McAFDOACOPOSDigOutType : STRUCT
Type : McAFDOACOPOSDigOutEnum; (*Digital output selector setting*)
END_STRUCT;
McAFDOACOPOSType : STRUCT (*Type mcAFDOTAOAHPF_ACP settings*)
DigitalOutput : McAFDOACOPOSDigOutType;
END_STRUCT;
McAFDOACOPOSmultiDigOutEnum :
( (*Digital output selector setting*)
mcAFDOACOPOSMULTIDO_SS1X111 := 0, (*SS1.X11.1 -*)
mcAFDOACOPOSMULTIDO_SS1X113 := 1, (*SS1.X11.3 -*)
mcAFDOACOPOSMULTIDO_SS1X115 := 2, (*SS1.X11.5 -*)
mcAFDOACOPOSMULTIDO_SS1X116 := 3 (*SS1.X11.6 -*)
);
McAFDOACOPOSmultiDigOutType : STRUCT
Type : McAFDOACOPOSmultiDigOutEnum; (*Digital output selector setting*)
END_STRUCT;
McAFDOACOPOSmultiType : STRUCT (*Type mcAFDOTAOAHPF_ACPM settings*)
DigitalOutput : McAFDOACOPOSmultiDigOutType;
END_STRUCT;
McAFDOACOPOSP3DigOutEnum :
( (*Digital output selector setting*)
mcAFDOACOPOSP3DO_SS1X41E1 := 0, (*SS1.X41E.1 -*)
mcAFDOACOPOSP3DO_SS1X41E2 := 1, (*SS1.X41E.2 -*)
mcAFDOACOPOSP3DO_SS1X41E3 := 2, (*SS1.X41E.3 -*)
mcAFDOACOPOSP3DO_SS1X41E4 := 3, (*SS1.X41E.4 -*)
mcAFDOACOPOSP3DO_SS1X41E5 := 4, (*SS1.X41E.5 -*)
mcAFDOACOPOSP3DO_SS1X41E6 := 5, (*SS1.X41E.6 -*)
mcAFDOACOPOSP3DO_SS1X41E7 := 6, (*SS1.X41E.7 -*)
mcAFDOACOPOSP3DO_SS1X41E8 := 7, (*SS1.X41E.8 -*)
mcAFDOACOPOSP3DO_SS1X41E9 := 8, (*SS1.X41E.9 -*)
mcAFDOACOPOSP3DO_SS1X41E10 := 9 (*SS1.X41E.10 -*)
);
McAFDOACOPOSP3DigOutType : STRUCT
Type : McAFDOACOPOSP3DigOutEnum; (*Digital output selector setting*)
END_STRUCT;
McAFDOACOPOSP3Type : STRUCT (*Type mcAFDOTAOAHPF_ACP_P3 settings*)
DigitalOutput : McAFDOACOPOSP3DigOutType;
END_STRUCT;
McAFDOTypAcpOutAcpHwProdFamType : STRUCT
Type : McAFDOTypAcpOutAcpHwProdFamEnum; (*ACOPOS product family selector setting*)
ACOPOS : McAFDOACOPOSType; (*Type mcAFDOTAOAHPF_ACP settings*)
ACOPOSmulti : McAFDOACOPOSmultiType; (*Type mcAFDOTAOAHPF_ACPM settings*)
ACOPOSP3 : McAFDOACOPOSP3Type; (*Type mcAFDOTAOAHPF_ACP_P3 settings*)
END_STRUCT;
McAFDOTypAcpOutAcpHwType : STRUCT (*Type mcAFDOTAO_ACP_HW settings*)
ProductFamily : McAFDOTypAcpOutAcpHwProdFamType;
END_STRUCT;
McAFDOTypAcpOutType : STRUCT (*Target of the output value*)
Type : McAFDOTypAcpOutEnum; (*Output selector setting*)
ACOPOSHardware : McAFDOTypAcpOutAcpHwType; (*Type mcAFDOTAO_ACP_HW settings*)
END_STRUCT;
McAFDOTypAcpType : STRUCT (*Type mcAFDOT_ACP settings*)
Output : McAFDOTypAcpOutType; (*Target of the output value*)
END_STRUCT;
McAFDOTypStpOutEnum :
( (*Output selector setting*)
mcAFDOTSO_STP_HW := 0 (*Stepper hardware - Stepper hardware is used*)
);
McAFDOTypStpOutStpHwProdFamEnum :
( (*Stepper product family selector setting*)
mcAFDOTSOSHPF_ACOPOSMICRO := 0 (*ACOPOSmicro -*)
);
McAFDOAMDigOutEnum :
( (*Digital output selector setting*)
mcAFDOAMDO_X224 := 0 (*X2.24 -*)
);
McAFDOAMDigOutType : STRUCT
Type : McAFDOAMDigOutEnum; (*Digital output selector setting*)
END_STRUCT;
McAFDOAMType : STRUCT (*Type mcAFDOTSOSHPF_ACOPOSMICRO settings*)
DigitalOutput : McAFDOAMDigOutType;
END_STRUCT;
McAFDOTypStpOutStpHwProdFamType : STRUCT
Type : McAFDOTypStpOutStpHwProdFamEnum; (*Stepper product family selector setting*)
ACOPOSmicro : McAFDOAMType; (*Type mcAFDOTSOSHPF_ACOPOSMICRO settings*)
END_STRUCT;
McAFDOTypStpOutStpHwType : STRUCT (*Type mcAFDOTSO_STP_HW settings*)
ProductFamily : McAFDOTypStpOutStpHwProdFamType;
END_STRUCT;
McAFDOTypStpOutType : STRUCT (*Target of the output value*)
Type : McAFDOTypStpOutEnum; (*Output selector setting*)
StepperHardware : McAFDOTypStpOutStpHwType; (*Type mcAFDOTSO_STP_HW settings*)
END_STRUCT;
McAFDOTypStpType : STRUCT (*Type mcAFDOT_STP settings*)
Output : McAFDOTypStpOutType; (*Target of the output value*)
END_STRUCT;
McAFDOTypType : STRUCT (*Type of the digital output configuration*)
Type : McAFDOTypEnum; (*Digital output type selector setting*)
ACOPOS : McAFDOTypAcpType; (*Type mcAFDOT_ACP settings*)
Stepper : McAFDOTypStpType; (*Type mcAFDOT_STP settings*)
END_STRUCT;
McCfgAxFeatDigOutType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_AX_FEAT_DIG_OUT*)
DigitalOutputType : McAFDOTypType; (*Type of the digital output configuration*)
END_STRUCT;
McAFAVSValSrcEnum :
( (*Value source 1-8 selector setting*)
mcAFAVSVS_ACP_PARID := 0 (*ACOPOS ParID - ParID of an ACOPOS drive*)
);
McAFAVSValSrcAcpParIDType : STRUCT (*Type mcAFAVSVS_ACP_PARID settings*)
ParID : UINT; (*ParID which is used as value source*)
END_STRUCT;
McAFAVSValSrcType : STRUCT (*Selection of the value source*)
Type : McAFAVSValSrcEnum; (*Value source 1-8 selector setting*)
ACOPOSParID : McAFAVSValSrcAcpParIDType; (*Type mcAFAVSVS_ACP_PARID settings*)
END_STRUCT;
McCfgAxFeatAltValSrcType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_AX_FEAT_ALT_VAL_SRC*)
ValueSource : McCfgUnboundedArrayType; (*Selection of the value source*)
END_STRUCT;
McAFBBrkCtrlTypEnum :
( (*Brake control type selector setting*)
mcAFBBCT_ACP := 0 (*ACOPOS -*)
);
McAFBACPCtrlModEnum :
( (*Control mode selector setting*)
mcAFBACPCM_AUT := 0, (*Automatic - Brake is controlled by ACOPOS brake controller*)
mcAFBACPCM_EXT := 1 (*External - Brake has to be controlled externally*)
);
McAFBACPCtrlModExtCmdAcptEnum :
( (*Power state that allows the brake control to be operated*)
mcAFBACPCMECA_PWR_OFF := 0, (*Power off - Switching the brake is only allowed if the controller is switched off*)
mcAFBACPCMECA_ANY := 1 (*Any - Switching the brake is also allowed if the controller is switched on*)
);
McAFBACPCtrlModExtType : STRUCT (*Type mcAFBACPCM_EXT settings*)
CommandAcceptance : McAFBACPCtrlModExtCmdAcptEnum; (*Power state that allows the brake control to be operated*)
END_STRUCT;
McAFBACPCtrlModType : STRUCT (*Behaviour of holding brake control*)
Type : McAFBACPCtrlModEnum; (*Control mode selector setting*)
External : McAFBACPCtrlModExtType; (*Type mcAFBACPCM_EXT settings*)
END_STRUCT;
McAFBACPCtrlMonEnum :
( (*Control monitoring selector setting*)
mcAFBACPCM_USE := 0, (*Used -*)
mcAFBACPCM_NOT_USE := 1 (*Not used -*)
);
McAFBACPCtrlMonUseTimeEnum :
( (*Time selector setting*)
mcAFBACPCMUT_DEF := 0, (*Default -*)
mcAFBACPCMUT_USR_DEF := 1 (*User defined -*)
);
McAFBACPCtrlMonUseTimeUsrDefType : STRUCT (*Type mcAFBACPCMUT_USR_DEF settings*)
FilterTime : REAL; (*Filter time of control monitoring [s]*)
END_STRUCT;
McAFBACPCtrlMonUseTimeType : STRUCT (*Filter time setting of control monitoring*)
Type : McAFBACPCtrlMonUseTimeEnum; (*Time selector setting*)
UserDefined : McAFBACPCtrlMonUseTimeUsrDefType; (*Type mcAFBACPCMUT_USR_DEF settings*)
END_STRUCT;
McAFBACPCtrlMonUseType : STRUCT (*Type mcAFBACPCM_USE settings*)
Time : McAFBACPCtrlMonUseTimeType; (*Filter time setting of control monitoring*)
END_STRUCT;
McAFBACPCtrlMonType : STRUCT (*Monitoring of motor brake control*)
Type : McAFBACPCtrlMonEnum; (*Control monitoring selector setting*)
Used : McAFBACPCtrlMonUseType; (*Type mcAFBACPCM_USE settings*)
END_STRUCT;
McAFBACPMoveMonEnum :
( (*Movement monitoring selector setting*)
mcAFBACPMM_USE := 0, (*Used -*)
mcAFBACPMM_NOT_USE := 1 (*Not used -*)
);
McAFBACPBrkTstEnum :
( (*Brake test selector setting*)
mcAFBACPBT_NOT_USE := 0, (*Not used -*)
mcAFBACPBT_AUT := 1 (*Automatic -*)
);
McAFBACPBrkTstAutStEvntEnum :
( (*Triggering event for the start of the brake test*)
mcAFBACPBTASE_CTRL_ON := 0, (*Controller on*)
mcAFBACPBTASE_CTRL_OFF := 1, (*Controller off*)
mcAFBACPBTASE_CTRL_ON_AND_OFF := 2, (*Controller on and off*)
mcAFBACPBTASE_SAFE_BRK_TEST_ACT := 3 (*Safe brake test active*)
);
McAFBACPBrkTstAutType : STRUCT (*Type mcAFBACPBT_AUT settings*)
StartEvent : McAFBACPBrkTstAutStEvntEnum; (*Triggering event for the start of the brake test*)
Torque : REAL; (*Brake test torque. When 0.0 rated torque of motor brake is used [Nm]*)
TorqueSlewRate : REAL; (*Maximum change of the brake test torque [Nm/s]*)
Duration : REAL; (*Duration with applied testing torque [s]*)
END_STRUCT;
McAFBACPBrkTstType : STRUCT (*Apply torque for testing the brake*)
Type : McAFBACPBrkTstEnum; (*Brake test selector setting*)
Automatic : McAFBACPBrkTstAutType; (*Type mcAFBACPBT_AUT settings*)
END_STRUCT;
McAFBACPMoveMonUseType : STRUCT (*Type mcAFBACPMM_USE settings*)
PositionErrorLimit : REAL; (*Maximum allowed movement of the motor at closed brake [Motor revolutions]*)
BrakeTest : McAFBACPBrkTstType; (*Apply torque for testing the brake*)
END_STRUCT;
McAFBACPMoveMonType : STRUCT (*Mechanical monitoring of motor brake*)
Type : McAFBACPMoveMonEnum; (*Movement monitoring selector setting*)
Used : McAFBACPMoveMonUseType; (*Type mcAFBACPMM_USE settings*)
END_STRUCT;
McAFBACPType : STRUCT (*Type mcAFBBCT_ACP settings*)
ControlMode : McAFBACPCtrlModType; (*Behaviour of holding brake control*)
ControlMonitoring : McAFBACPCtrlMonType; (*Monitoring of motor brake control*)
MovementMonitoring : McAFBACPMoveMonType; (*Mechanical monitoring of motor brake*)
END_STRUCT;
McAFBBrkCtrlTypType : STRUCT
Type : McAFBBrkCtrlTypEnum; (*Brake control type selector setting*)
ACOPOS : McAFBACPType; (*Type mcAFBBCT_ACP settings*)
END_STRUCT;
McCfgAxFeatBrkType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_AX_FEAT_BRK*)
BrakeControlType : McAFBBrkCtrlTypType;
END_STRUCT;
McMDCTypeEnum :
( (*Mechanical deviation compensation type selector setting*)
mcMDCT_ACP := 0, (*ACOPOS - ACOPOS mechanical deviation compensation*)
mcMDCT_STP_OR_GEN_PUR_AX := 1 (*Stepper or General purpose axis - Stepper or General purpose axis mechanical deviation compensation*)
);
McMDCACalcEnum :
( (*Automatic compensation calculation at axis startup*)
mcMDCAC_NOT_USE := 0, (*Not used - No automatic calculation, has to be commanded by FB*)
mcMDCAC_USE := 1 (*Used - Automatic calculation, compensation data must be available after all task INIT-SP are finished*)
);
McMDCAActiEnum :
( (*Automatic compensation activation after axis homing*)
mcMDCAA_NOT_USE := 0, (*Not used - No automatic activation, has to be switched on by FB*)
mcMDCAA_USE := 1 (*Used - Automatic activation when axis is homed*)
);
McMDCModeEnum :
( (*Mode selector setting*)
mcMDCM_DIR_DEP_CONST_BCKL := 0, (*Dir Dep Const Bckl - Direction dependent constant backlash*)
mcMDCM_DIR_DEP_SET_POS := 1, (*Dir Dep Set Pos - Direction dependent set position*)
mcMDCM_DIR_IND := 2, (*Dir Ind - Direction independent*)
mcMDCM_DIR_IND_SPD := 3, (*Dir Ind Spd - Direction independent with influence on speed controller*)
mcMDCM_DIR_IND_W_BCKL := 4 (*Dir Ind W Bckl - Direction independent compensation data and backlash*)
);
McMDCPosSrcEnum :
( (*Position source*)
mcMDCPS_SET_POS := 0, (*Set position - Set position*)
mcMDCPS_ACT_POS := 1, (*Actual position - Actual position*)
mcMDCPS_ENC_POS := 2 (*Encoder position - Encoder position*)
);
McMDCStEdgEnum :
( (*Edge at which compensation is started*)
mcMDCSE_POS := 0, (*Positive - Positive*)
mcMDCSE_NEG := 1 (*Negative - Negative*)
);
McMDCDirDepConstBcklType : STRUCT (*Type mcMDCM_DIR_DEP_CONST_BCKL settings*)
Backlash : LREAL; (*Backlash [Measurement units]*)
PositionSource : McMDCPosSrcEnum; (*Position source*)
StartEdge : McMDCStEdgEnum; (*Edge at which compensation is started*)
Velocity : REAL; (*Velocity for edge change [Measurement units/s]*)
TimeConstant : REAL; (*Time constant of the exponential function for edge change [s]*)
NoiseLimit : REAL; (*Noise limit [%]*)
END_STRUCT;
McMDCCompDatEnum :
( (*Compensation data positive selector setting*)
mcMDCCD_DAT_OBJ := 0, (*Data object - Data object*)
mcMDCCD_F_ON_F_DEV := 1, (*File on file device - File on file device*)
mcMDCCD_PROC_VAR := 2 (*Process variables - Process variables*)
);
McMDCCompDatObjType : STRUCT (*Type mcMDCCD_DAT_OBJ settings*)
DataObjectName : STRING[12];
END_STRUCT;
McMDCCompDatFileType : STRUCT (*Type mcMDCCD_F_ON_F_DEV settings*)
FileDevice : STRING[250]; (*File device*)
CSVFileName : STRING[250]; (*Full file name with extention*)
END_STRUCT;
McMDCCompDatPVType : STRUCT (*Type mcMDCCD_PROC_VAR settings*)
DataPoints : STRING[250]; (*Data points*)
NumberOfDataPoints : STRING[250]; (*Number of data points*)
END_STRUCT;
McMDCCompDatType : STRUCT (*Compensation data for movement in positive direction*)
Type : McMDCCompDatEnum; (*Compensation data positive selector setting*)
DataObject : McMDCCompDatObjType; (*Type mcMDCCD_DAT_OBJ settings*)
FileOnFileDevice : McMDCCompDatFileType; (*Type mcMDCCD_F_ON_F_DEV settings*)
ProcessVariables : McMDCCompDatPVType; (*Type mcMDCCD_PROC_VAR settings*)
END_STRUCT;
McMDCDatIntEnum :
( (*Compensation data is interpreted as periodic*)
mcMDCDI_NOT_PER := 0, (*Not periodic - Not periodic*)
mcMDCDI_PER := 1 (*Periodic - Periodic*)
);
McMDCDirDepSetPosType : STRUCT (*Type mcMDCM_DIR_DEP_SET_POS settings*)
CompensationDataPositive : McMDCCompDatType; (*Compensation data for movement in positive direction*)
CompensationDataNegative : McMDCCompDatType; (*Compensation data for movement in negative direction*)
PositionSource : McMDCPosSrcEnum; (*Position source*)
DataInterpretation : McMDCDatIntEnum; (*Compensation data is interpreted as periodic*)
StartEdge : McMDCStEdgEnum; (*Edge at which compensation is started*)
Velocity : REAL; (*Velocity for edge change [Measurement units/s]*)
TimeConstant : REAL; (*Time constant of the exponential function for edge change [s]*)
NoiseLimit : REAL; (*Noise limit [%]*)
END_STRUCT;
McMDCDirIndType : STRUCT (*Type mcMDCM_DIR_IND settings*)
CompensationData : McMDCCompDatType; (*Compensation data for movement*)
PositionSource : McMDCPosSrcEnum; (*Position source*)
DataInterpretation : McMDCDatIntEnum; (*Compensation data is interpreted as periodic*)
END_STRUCT;
McMDCDirIndSpdType : STRUCT (*Type mcMDCM_DIR_IND_SPD settings*)
CompensationData : McMDCCompDatType; (*Compensation data for movement*)
PositionSource : McMDCPosSrcEnum; (*Position source*)
DataInterpretation : McMDCDatIntEnum; (*Compensation data is interpreted as periodic*)
FilterTime : REAL; (*Filter time constant for smoothing the speed correction value [s]*)
END_STRUCT;
McMDCDirIndBcklType : STRUCT (*Type mcMDCM_DIR_IND_W_BCKL settings*)
CompensationDataPositive : McMDCCompDatType; (*Compensation data for movement in positive direction*)
Backlash : LREAL; (*Backlash [Measurement units]*)
PositionSource : McMDCPosSrcEnum; (*Position source*)
DataInterpretation : McMDCDatIntEnum; (*Compensation data is interpreted as periodic*)
StartEdge : McMDCStEdgEnum; (*Edge at which compensation is started*)
Velocity : REAL; (*Velocity for edge change [Measurement units/s]*)
TimeConstant : REAL; (*Time constant of the exponential function for edge change [s]*)
NoiseLimit : REAL; (*Noise limit [%]*)
END_STRUCT;
McMDCModeType : STRUCT (*Mode for compensating mechanical deviations*)
Type : McMDCModeEnum; (*Mode selector setting*)
DirDepConstBckl : McMDCDirDepConstBcklType; (*Type mcMDCM_DIR_DEP_CONST_BCKL settings*)
DirDepSetPos : McMDCDirDepSetPosType; (*Type mcMDCM_DIR_DEP_SET_POS settings*)
DirInd : McMDCDirIndType; (*Type mcMDCM_DIR_IND settings*)
DirIndSpd : McMDCDirIndSpdType; (*Type mcMDCM_DIR_IND_SPD settings*)
DirIndWBckl : McMDCDirIndBcklType; (*Type mcMDCM_DIR_IND_W_BCKL settings*)
END_STRUCT;
McMDCTypeAcpType : STRUCT (*Type mcMDCT_ACP settings*)
AutomaticCalculation : McMDCACalcEnum; (*Automatic compensation calculation at axis startup*)
AutomaticActivation : McMDCAActiEnum; (*Automatic compensation activation after axis homing*)
MechDevnCompMode : McMDCModeType; (*Mode for compensating mechanical deviations*)
END_STRUCT;
McMDCModeStpEnum :
( (*Mode selector setting*)
mcMDCMS_DIR_DEP_CONST_BCKL := 0, (*Dir Dep Const Bckl - Direction dependent constant backlash*)
mcMDCMS_DIR_DEP_SET_POS := 1, (*Dir Dep Set Pos - Direction dependent set position*)
mcMDCMS_DIR_IND := 2, (*Dir Ind - Direction independent*)
mcMDCMS_DIR_IND_W_BCKL := 3 (*Dir Ind W Bckl - Direction independent compensation data and backlash*)
);
McMDCPosSrcStpEnum :
( (*Position source*)
mcMDCPSS_SET_POS := 0 (*Set position - Set position*)
);
McMDCDirDepConstBcklStpType : STRUCT (*Type mcMDCMS_DIR_DEP_CONST_BCKL settings*)
Backlash : LREAL; (*Backlash [Measurement units]*)
PositionSource : McMDCPosSrcStpEnum; (*Position source*)
StartEdge : McMDCStEdgEnum; (*Edge at which compensation is started*)
Velocity : REAL; (*Velocity for edge change [Measurement units/s]*)
TimeConstant : REAL; (*Time constant of the exponential function for edge change [s]*)
NoiseLimit : REAL; (*Noise limit [%]*)
END_STRUCT;
McMDCDirDepSetPosStpType : STRUCT (*Type mcMDCMS_DIR_DEP_SET_POS settings*)
CompensationDataPositive : McMDCCompDatType; (*Compensation data for movement in positive direction*)
CompensationDataNegative : McMDCCompDatType; (*Compensation data for movement in negative direction*)
PositionSource : McMDCPosSrcStpEnum; (*Position source*)
DataInterpretation : McMDCDatIntEnum; (*Compensation data is interpreted as periodic*)
StartEdge : McMDCStEdgEnum; (*Edge at which compensation is started*)
Velocity : REAL; (*Velocity for edge change [Measurement units/s]*)
TimeConstant : REAL; (*Time constant of the exponential function for edge change [s]*)
NoiseLimit : REAL; (*Noise limit [%]*)
END_STRUCT;
McMDCDirIndStpType : STRUCT (*Type mcMDCMS_DIR_IND settings*)
CompensationData : McMDCCompDatType; (*Compensation data for movement*)
PositionSource : McMDCPosSrcStpEnum; (*Position source*)
DataInterpretation : McMDCDatIntEnum; (*Compensation data is interpreted as periodic*)
END_STRUCT;
McMDCDirIndBcklStpType : STRUCT (*Type mcMDCMS_DIR_IND_W_BCKL settings*)
CompensationDataPositive : McMDCCompDatType; (*Compensation data for movement in positive direction*)
Backlash : LREAL; (*Backlash [Measurement units]*)
PositionSource : McMDCPosSrcStpEnum; (*Position source*)
DataInterpretation : McMDCDatIntEnum; (*Compensation data is interpreted as periodic*)
StartEdge : McMDCStEdgEnum; (*Edge at which compensation is started*)
Velocity : REAL; (*Velocity for edge change [Measurement units/s]*)
TimeConstant : REAL; (*Time constant of the exponential function for edge change [s]*)
NoiseLimit : REAL; (*Noise limit [%]*)
END_STRUCT;
McMDCModeStpType : STRUCT (*Mode for compensating mechanical deviations*)
Type : McMDCModeStpEnum; (*Mode selector setting*)
DirDepConstBckl : McMDCDirDepConstBcklStpType; (*Type mcMDCMS_DIR_DEP_CONST_BCKL settings*)
DirDepSetPos : McMDCDirDepSetPosStpType; (*Type mcMDCMS_DIR_DEP_SET_POS settings*)
DirInd : McMDCDirIndStpType; (*Type mcMDCMS_DIR_IND settings*)
DirIndWBckl : McMDCDirIndBcklStpType; (*Type mcMDCMS_DIR_IND_W_BCKL settings*)
END_STRUCT;
McMDCTypeStpOrGenPurAxType : STRUCT (*Type mcMDCT_STP_OR_GEN_PUR_AX settings*)
AutomaticCalculation : McMDCACalcEnum; (*Automatic compensation calculation at axis startup*)
AutomaticActivation : McMDCAActiEnum; (*Automatic compensation activation after axis homing*)
MechDevnCompModeStp : McMDCModeStpType; (*Mode for compensating mechanical deviations*)
END_STRUCT;
McMDCTypeType : STRUCT (*Type of the mechanical deviation compensation*)
Type : McMDCTypeEnum; (*Mechanical deviation compensation type selector setting*)
ACOPOS : McMDCTypeAcpType; (*Type mcMDCT_ACP settings*)
StepperOrGeneralPurposeAxis : McMDCTypeStpOrGenPurAxType; (*Type mcMDCT_STP_OR_GEN_PUR_AX settings*)
END_STRUCT;
McCfgAxFeatMechDevCompType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_AX_FEAT_MECH_DEV_COMP*)
MechDevnCompType : McMDCTypeType; (*Type of the mechanical deviation compensation*)
END_STRUCT;
McAFANERNetwErrReacEnum :
( (*Network error reaction selector setting*)
mcAFANERNER_DEF := 0, (*Default - Configured “Stop reaction / Drive error” is immediately executed after a network failure*)
mcAFANERNER_DELAYED := 1 (*Delayed - Configured “Stop reaction / Drive error” is delayed by a specified time*)
);
McAFANERNetwErrReacDelayedType : STRUCT (*Type mcAFANERNER_DELAYED settings*)
DelayTime : REAL; (*Delay time of network error reaction [s]*)
END_STRUCT;
McAFANERNetwErrReacType : STRUCT (*Reaction in case of a network error*)
Type : McAFANERNetwErrReacEnum; (*Network error reaction selector setting*)
Delayed : McAFANERNetwErrReacDelayedType; (*Type mcAFANERNER_DELAYED settings*)
END_STRUCT;
McCfgAxFeatAcpNetwErrReacType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_AX_FEAT_ACP_NETW_ERR_REAC*)
NetworkErrorReaction : McAFANERNetwErrReacType; (*Reaction in case of a network error*)
END_STRUCT;
END_TYPE

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Library Version="5.20.1" SubType="binary" Description="[mapp Motion] PLCopen axis library" xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>McAxis.typ</File>
<File>McAxis.fun</File>
<File>McAxis.var</File>
<File>McAxisCfg.typ</File>
</Files>
<Dependencies>
<Dependency ObjectName="McBase" FromVersion="5.20.0" ToVersion="5.20.9" />
</Dependencies>
</Library>

View File

@@ -0,0 +1,81 @@
FUNCTION_BLOCK MC_BR_ProcessConfig
VAR_INPUT
Execute : BOOL; (*Execution of the function block begins on a rising edge of this input.*)
Name: STRING[250]; (*Name of config element*)
DataType: UDINT; (*Datatype of the structure element*)
DataAddress: UDINT; (*Reference to the selected data structure*)
Mode : McProcessConfigModeEnum; (*references establishing connection between the function block and the axis group, axes etc.*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*Execution successful. Function block is finished.*)
Busy : BOOL; (*Function block is active and must continue to be called.*)
Error : BOOL; (*Error occurred during execution.*)
ErrorID : DINT; (*Error number*)
END_VAR
VAR
Internal : McExec1InternalType; (*Data for internal use*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_ProcessParam
VAR_INPUT
Execute : BOOL; (*Execution of the function block begins on a rising edge of this input.*)
Component: McComponentType; (*Reference to the component*)
DataType: UDINT; (* Datatype of the structure element*)
DataAddress: UDINT; (*Reference to the selected data structure*)
Mode : McProcessParamModeEnum;
AdvancedParameters : McProcessParamAdvParType;
ExecutionMode : McExecutionModeEnum;
END_VAR
VAR_OUTPUT
Done : BOOL; (*Execution successful. Function block is finished.*)
Busy : BOOL; (*Function block is active and must continue to be called.*)
Active : BOOL; (*Function block is active and must continue to be called.*)
Error : BOOL; (*Error occurred during execution.*)
ErrorID : DINT; (*Error number*)
END_VAR
VAR
Internal : McInternalType; (*Internal data*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_GetCoordSystemIdent
VAR_INPUT
Execute : BOOL; (*Execution of the function block begins on a rising edge of this input.*)
CoordSystemName : STRING[260]; (*frame name*)
Parameter : McGetCoordSystemIdentParType; (*references establishing connection between the function block and the axis group, axes etc.*)
END_VAR
VAR_OUTPUT
Done : BOOL; (*Execution successful. Function block is finished.*)
Busy : BOOL; (*Function block is active and must continue to be called.*)
Error : BOOL; (*Error occurred during execution.*)
ErrorID : DINT; (*Error number*)
Ident : UDINT; (*coordinate system ident*)
END_VAR
VAR
Internal : McInternalType; (*Internal data*)
END_VAR
END_FUNCTION_BLOCK
FUNCTION_BLOCK MC_BR_ReadErrorText
VAR_INPUT
Component: McComponentType; (*Reference to the component*)
Enable : BOOL; (*The function block is active as long as this input is set.*)
AdvancedParameters : McAdvReadErrTxtParType;
ReadNext : BOOL;
END_VAR
VAR_OUTPUT
Valid : BOOL; (*Execution successful. Function block is finished.*)
Busy : BOOL; (*Function block is active and must continue to be called.*)
Error : BOOL; (*Error occurred during execution.*)
ErrorID : DINT; (*Error number.*)
NumberOfRecords : UINT; (*Indicates number of records available to read.*)
ReadDone : BOOL; (*Read of error record is done and record data is available in ErrorRecords output.*)
ErrorRecords : McErrorRecordsType; (*Error record output.*)
END_VAR
VAR
Internal : McInternalType; (*Internal data*)
END_VAR
END_FUNCTION_BLOCK

View File

@@ -0,0 +1,351 @@
TYPE
(*Enum types*)
McAxisPLCopenStateEnum :
(
mcAXIS_DISABLED, (*Power output stage is off*)
mcAXIS_STANDSTILL, (*Power output stage on; Axis not moving*)
mcAXIS_HOMING, (*Axis is executing a homing procedure*)
mcAXIS_STOPPING, (*Axis currently stopping or "Execute" is still set for "MC_Stop"*)
mcAXIS_DISCRETE_MOTION, (*Movement with defined end position active*)
mcAXIS_CONTINUOUS_MOTION, (*Movement without defined end position active until aborted by other command*)
mcAXIS_SYNCHRONIZED_MOTION, (*Axis is coupled to another axis (master-slave coupling)*)
mcAXIS_ERRORSTOP, (*Axis stopped due to drive error*)
mcAXIS_STARTUP, (*Axis is in startup phase*)
mcAXIS_INVALID_CONFIGURATION (*An error in the configuration of the axis occured*)
);
McGroupPLCopenStateEnum :
(
mcGROUP_DISABLED, (*Axis group disabled*)
mcGROUP_HOMING, (*Axis group is executing a homing procedure*)
mcGROUP_STANDBY, (*Axis group has been stopped*)
mcGROUP_MOVING, (*Axis group is performing a movement*)
mcGROUP_STOPPING, (*Axis group currently stopping or "Execute" is still set for "MC_GroupStop"*)
mcGROUP_ERRORSTOP, (*Axis group stopped due to an error*)
mcGROUP_STARTUP, (*Axis group is in startup phase*)
mcGROUP_INVALID_CONFIGURATION (*An error in the configuration of the axis group occured*)
);
McBufferModeEnum :
(
mcABORTING, (*Default mode without buffering. The function block aborts an active movement. The buffer is cleared*)
mcBUFFERED, (*The movement is started as soon as the previous movement is completed. No smoothing is applied*)
mcBLENDING_LOW, (*The velocity is blended with the lowest velocity of both FBs*)
mcBLENDING_PREVIOUS, (*The velocity is blended with the velocity of the first FB*)
mcBLENDING_NEXT, (*The velocity is blended with velocity of the second FB*)
mcBLENDING_HIGH (*The velocity is blended with highest velocity of both FBs*)
);
McBrakeCmdEnum :
(
mcBRAKE_CLOSE, (*Engages the brake*)
mcBRAKE_OPEN, (*Releases the brake*)
mcBRAKE_GET_STATUS (*Reads out the current brake status*)
);
McBrakeStatusEnum :
(
mcBRAKE_STATUS_NOT_PROVIDED, (*Commands was not *)
mcBRAKE_CLOSED, (*Holding brake engaged*)
mcBRAKE_OPENED (*Holding brake released*)
);
McHomingModeEnum :
(
mcHOMING_DIRECT := 0, (*Direct homing. "Position" is used directly as the new axis position*)
mcHOMING_SWITCH_GATE, (*Homing with reference gate*)
mcHOMING_ABSOLUTE_SWITCH, (*Performs homing with absolute reference switch*)
mcHOMING_LIMIT_SWITCH := 4, (*Homing with hardware limit switch*)
mcHOMING_ABSOLUTE, (*Homing by setting the "Position" homing offset for an absolute encoder*)
mcHOMING_DCM := 7, (*Homing using interval-encoded reference marks*)
mcHOMING_BLOCK_TORQUE := 9, (*Performs homing to mechanical limit, torque as criteria*)
mcHOMING_BLOCK_LAG_ERROR := 10, (*Performs homing to mechanical limit, lag error as criteria*)
mcHOMING_ABSOLUTE_INTERNAL := 11,(*Performs homing with homing offset, which is determined by drive*)
mcHOMING_ABSOLUTE_CORRECTION := 133, (*Homing by setting the "Position" homing offset for an absolute encoder with counter range correction. This mode must be used if the overflow of the absolute encoder is within the axis range of movement*)
mcHOMING_DCM_CORRECTION := 135, (*Homing using distance-coded reference marks with counting range correction*)
mcHOMING_DEFAULT := 140, (*All parameters, including "Position", are taken from the initial configuration for the axis*)
mcHOMING_INIT, (*All parameters, including "Position", are taken from an earlier initialization made using function block MC_BR_InitHome*)
mcHOMING_RESTORE_POSITION (*Restores position from a remanent variable*)
);
McStopModeEnum :
(
mcSTOPMODE_JERK_LIMIT, (*Takes into account the jerk limit value while stopping*)
mcSTOPMODE_NO_JERK_LIMIT (*Ignores the jerk limit value while stopping*)
);
McIplModeEnum :
(
mcIPLM_DEFAULT, (*The most suitable available interpolation is used*)
mcIPLM_OFF, (*Interpolation off*)
mcIPLM_LINEAR, (*linear interpolation*)
mcIPLM_QUADRATIC, (*quadratic interpolation*)
mcIPLM_QUADRATIC_NO_OVERSHOOT (*quadratic interpolation without overshoot*)
);
McErrorCmdEnum :
(
mcWARNING_CMD := 0, (*A warning is generated *)
mcERROR_CMD, (*An error is entered*)
mcERROR_STOP_CMD, (*Generates an error and ends an active movement*)
mcERROR_STOP_CTRL_OFF_CMD, (*Generates an error, ends any active movements and switches off the controller*)
mcERROR_V_STOP_CTRL_OFF_CMD, (*Generates an error, ends any active movements with a speed-controlled ramp and switches off the controller*)
mcERROR_COAST_TO_STANDSTILL_CMD, (*Generates an error, any active movements coast to a stop when controller switched off*)
mcERROR_INDUCTION_HALT_CMD, (*Generates an axis error on the drive, movements are stopped with an induction stop of the controller*)
mcERROR_STOP_DEC_CMD, (*Generates an error and ends an active movement with the deceleration specified on configuration, written by the axis group or written via the function block MC_BR_CyclicDriveErrorDecel*)
mcERROR_STOP_DEC_CTRL_OFF_CMD, (*Generates an error, ends any active movement with the deceleration specified on configuration, written by the axis group or written via the function block MC_BR_CyclicDriveErrorDecel and switches off the controller*)
mcERROR_V_STOP_DEC_CTRL_OFF_CMD (*Generates an error, ends any active movement with a speed-controlled ramp with the deceleration specified on configuration, written by the axis group or written via the function block MC_BR_CyclicDriveErrorDecel and switches off the controller*)
);
McEdgeEnum :
(
mcEDGE_POSITIVE, (*Selection for the rising edge*)
mcEDGE_NEGATIVE, (*Selection for the falling edge*)
mcEDGE_MIDDLE (* Middle position between positive and negative edge*)
);
McNetworkTypeEnum :
(
mcNETWORK_POWERLINK (*POWERLINK protocol*)
);
McTransitionModeEnum :
( (*FB internals*)
mcTM_NONE (*No transition is added*)
);
McExecutionModeEnum:
(
mcEM_IMMEDIATELY
);
McCoordinateSystemEnum :
(
mcACS := 0, (*Axis coordinate system*)
mcMCS := 1, (*Machine coordinate system*)
mcPCS := 2, (*Product coordinate system*)
mcSCS1 := 3, (*System coordinate system 1*)
mcSCS2 := 4, (*System coordinate system 2*)
mcSCS3 := 5, (*System coordinate system 3*)
mcSCS4 := 6, (*System coordinate system 4*)
mcSCS5 := 7, (*System coordinate system 5*)
mcTCS := 9, (*Tool coordinate system*)
mcGCS := 10, (*Global coordinate system*)
mcJACS := 100, (*Joint axes coordinate system*)
mcMPCS := 101 (*Manipulated product coordinate system*)
);
McValueSrcEnum :
(
mcVALUE_SET, (*Position setpoint value [Measurement units]*)
mcVALUE_ACTUAL, (*Actual position value [Measurement units]*)
mcVALUE_SET_AXIS_UNITS, (*Position setpoint value [axis units]*)
mcVALUE_ACTUAL_AXIS_UNITS, (*Actual value for position [axis units]*)
mcVALUE_AUTOMATIC_SELECTION, (*The value for the source is selected automatically in relation to the active controller mode*)
mcVALUE_ALT1, (*"Value source 1" of the feature "Alternative value source" is used*)
mcVALUE_ALT2, (*"Value source 2" of the feature "Alternative value source" is used*)
mcVALUE_ALT3, (*"Value source 3" of the feature "Alternative value source" is used*)
mcVALUE_ALT4, (*"Value source 4" of the feature "Alternative value source" is used*)
mcVALUE_ALT5, (*"Value source 5" of the feature "Alternative value source" is used*)
mcVALUE_ALT6, (*"Value source 6" of the feature "Alternative value source" is used*)
mcVALUE_ALT7, (*"Value source 7" of the feature "Alternative value source" is used*)
mcVALUE_ALT8 (*"Value source 8" of the feature "Alternative value source" is used*)
);
McAltValueSrcEnum :
(
mcALT_VALUE_NOT_USED := 0, (*No alternative value source is used*)
mcALT_VALUE1 := 1, (*"Value source 1" of the feature "Alternative value source" is used*)
mcALT_VALUE2 := 2, (*"Value source 2" of the feature "Alternative value source" is used*)
mcALT_VALUE3 := 3, (*"Value source 3" of the feature "Alternative value source" is used*)
mcALT_VALUE4 := 4, (*"Value source 4" of the feature "Alternative value source" is used*)
mcALT_VALUE5 := 5, (*"Value source 5" of the feature "Alternative value source" is used*)
mcALT_VALUE6 := 6, (*"Value source 6" of the feature "Alternative value source" is used*)
mcALT_VALUE7 := 7, (*"Value source 7" of the feature "Alternative value source" is used*)
mcALT_VALUE8 := 8 (*"Value source 8" of the feature "Alternative value source" is used*)
);
McSwitchEnum :
(
mcSWITCH_OFF, (*State/Behavior selection switched off*)
mcSWITCH_ON (*State/Behavior selection switched on*)
);
McProcessParamModeEnum:
(
mcPPM_READ, (*Reads Parameterization*)
mcPPM_WRITE, (*Write Parameterization*)
mcPPM_LOAD_FROM_CONFIG, (*Load P from Config*)
mcPPM_SAVE_TO_CONFIG (*Save P to Config*)
);
McProcessConfigModeEnum:
(
mcPCM_LOAD, (*Load from Config*)
mcPCM_SAVE (*Save to Config*)
);
McCommunicationStateEnum :
(
mcCOMM_STATE_NOT_ACTIVE := 0, (*The communication is not active*)
mcCOMM_STATE_WAITING := 100, (*Waiting for connection*)
mcCOMM_STATE_CONNECTED := 200, (*The connection is established*)
mcCOMM_STATE_FW_UPDATE := 300, (*A firmware update is in progress*)
mcCOMM_STATE_CONFIG := 400, (*The network configuration is transferred*)
mcCOMM_STATE_ACTIVATING := 500, (*The communication is activated*)
mcCOMM_STATE_ACTIVE := 600, (*The communication is active*)
mcCOMM_STATE_INACTIVE := 700, (*The communication is no longer active*)
mcCOMM_STATE_FAILED := 1000 (*Initialization of the communication has failed*)
);
(*Structure types*)
McAdvMoveCycParType : STRUCT
Velocity : REAL; (*Maximum velocity [Measurement units/s]*)
Acceleration : REAL; (*Maximum acceleration [Measurement units/s]*)
Deceleration : REAL; (*Maximum deceleration [Measurement units/s]*)
Jerk : REAL; (*Maximum jerk [measurement units / ]*)
DisableJoltLimitation : McSwitchEnum; (*Disable jolt limitation on the drive*)
AlternativeValueSource : McAltValueSrcEnum; (*If used, defines the alternative source of cyclic: position for MC_BR_MoveCyclicPosition, velocity for MC_BR_MoveCyclicVelocity [axis Units]*)
END_STRUCT;
McOrientType : STRUCT
Type : UDINT; (*Description of rotation*)
Angle1 : LREAL; (*Angle of rotation 1 for describing the orientation*)
Angle2 : LREAL; (*Angle of rotation 2 for describing the orientation*)
Angle3 : LREAL; (*Angle of rotation 3 for describing the orientation*)
END_STRUCT;
McPosType : STRUCT
X : LREAL; (*Offset in the direction of the x-axis*)
Y : LREAL; (*Offset in the direction of the y-axis*)
Z : LREAL; (*Offset in the direction of the z-axis*)
END_STRUCT;
McFrameType : STRUCT
Pos : McPosType; (*Position in the coordinate system*)
Orient : McOrientType; (*Orientation in the coordinate system*)
END_STRUCT;
(*FB internals*)
McInternalType : STRUCT (*internal variable*)
ID : UDINT; (**)
Check : UDINT; (**)
ParamHash : UDINT; (**)
State : WORD; (**)
Error : UINT; (**)
Treating : REFERENCE TO McInternalFubProcessingType; (**)
Memory : ARRAY[0..13] OF UDINT; (**)
Flags : USINT; (**)
ControlIf : REFERENCE TO McInternalControlIfType; (**)
SeqNo : DINT; (**)
END_STRUCT;
McInternalFubProcessingType : STRUCT (*Partial struct type (C only)*)
states : ARRAY[0..1]OF DINT; (**)
END_STRUCT;
McInternalControlIfType : STRUCT (*Partial interface type (C only)*)
vtable : DWORD; (**)
END_STRUCT;
McInternalTwoRefType : STRUCT (*internal variable*)
Internal : McInternalType; (**)
MaControlIf : REFERENCE TO McInternalControlIfType; (**)
MaSeqNo : DINT; (**)
END_STRUCT;
McInternalMappLinkType : STRUCT (*internal variable*)
Internal : ARRAY[0..1]OF UDINT; (*Internal data*)
END_STRUCT;
McInternalMotionCfgIfType : STRUCT (*Partial interface type (C only)*)
vtable : DWORD; (**)
END_STRUCT;
McInternalAxisIfType : STRUCT (*Partial interface type (C only)*)
vtable : DWORD; (**)
END_STRUCT;
McInternalAxesGroupIfType : STRUCT (*Partial interface type (C only)*)
vtable : DWORD; (**)
END_STRUCT;
McInternalTrackingPathIfType : STRUCT (*Partial interface type (C only)*)
vtable : DWORD; (**)
END_STRUCT;
McExec1InternalType : STRUCT (*Internal structure-types for FB-processing*)
i_serno : UINT;
i_state : UINT;
Result : DINT;
pInfo : UDINT;
END_STRUCT;
(*Component References*)
McMotionCfgType : STRUCT
controlif : REFERENCE TO McInternalMotionCfgIfType; (**)
mappLinkInternal : McInternalMappLinkType; (**)
END_STRUCT;
McAxisType : STRUCT
controlif : REFERENCE TO McInternalAxisIfType; (**)
mappLinkInternal : McInternalMappLinkType; (**)
seqNo : DINT; (**)
END_STRUCT;
McPsmAxisType : McAxisType; (**)
McApsmAxisType : McAxisType; (**)
McConvoyType : McAxisType; (**)
McAxesGroupType : STRUCT
controlif : REFERENCE TO McInternalAxesGroupIfType; (**)
mappLinkInternal : McInternalMappLinkType; (**)
END_STRUCT;
McTrackingPathType : STRUCT
controlif : REFERENCE TO McInternalTrackingPathIfType; (**)
END_STRUCT;
McGetCoordSystemIdentParType : STRUCT
AxesGroup : REFERENCE TO McAxesGroupType; (*The axis group reference establishes the connection between the function block and the axis group.*)
END_STRUCT;
McComponentType : UDINT;
McProcessParamAdvParType : STRUCT
Name : STRING[250]; (*Name of the reference within the component which should be manipulated.*)
END_STRUCT;
McLanguageEnum :
(
mcLANGUAGE_DEFAULT := 0, (*System language configured in the text system is used*)
mcLANGUAGE_ENGLISH, (*Text in English*)
mcLANGUAGE_GERMAN (*Text in German*)
);
McAdvReadErrTxtParType : STRUCT
Language : McLanguageEnum; (*Desired language for read text. This parameter is optional. Default value : mcERROR_TEXT_LANG_DEFAULT.*)
ShowInfoSeverity : McSwitchEnum; (*Allow to additionally show in RecordBuffer all related information severity events linked in hierarchy to error record. *)
END_STRUCT;
McErrorRecordTimeStampType : STRUCT
Seconds : UDINT; (*Unix timestamp*)
Nanoseconds : UDINT; (*Additional precision information in nanoseconds unit*)
END_STRUCT;
McErrorRecordType : STRUCT
Text : STRING[255]; (*Text of message from EventLog*)
RecordID : UDINT; (*RecordID of provided error text*)
EventID : DINT; (*Event ID of provided error text*)
TimeStamp : McErrorRecordTimeStampType; (*TimeStamp of record*)
END_STRUCT;
McErrorRecordsType : STRUCT
Record : ARRAY[0..9]OF McErrorRecordType; (*Array of error records to be filled by the function block*)
END_STRUCT;
END_TYPE

View File

View File

@@ -0,0 +1,626 @@
TYPE
McCfgString250Type : STRING[250]; (**)
McCfgTypeEnum :
( (*Configuration system enum*)
mcCFG_NONE := 0, (*None -*)
mcCFG_MMCFG := 10, (*Associated with data type McCfgMMCfgType*)
mcCFG_WS := 800, (*Associated with data type McCfgWorkspaceType*)
mcCFG_TOOLTBL := 900, (*Tooltable -*)
mcCFG_FRMTBL := 1000, (*Associated with data type McCfgFrmTblType*)
mcCFG_DYNPARTBL := 1100, (**)
mcCFG_TOOL := 1300, (*Tool -*)
mcCFG_LIMSET_LIN := 1411, (*Associated with data type McCfgLimSetLinType*)
mcCFG_LIMSET_ROT := 1412, (*Associated with data type McCfgLimSetRotType*)
mcCFG_PROC_PT_LST := 1600, (*Associated with data type McCfgProcPtLstType*)
mcCFG_TRK_PATH := 1700, (*Associated with data type McCfgTrkPathType*)
mcCFG_AX := 10000, (*Associated with data type McCfgAxType*)
mcCFG_AX_BASE_TYP := 10011, (*Associated with data type McCfgAxBaseTypType*)
mcCFG_AX_MOVE_LIM := 10012, (*Associated with data type McCfgAxMoveLimType*)
mcCFG_AX_FEAT_CAM_AUT_CMN := 10101, (*AxisFeatureCamAutCommon -*)
mcCFG_AX_FEAT_PROF_GEN := 10102, (**)
mcCFG_AX_FEAT_DIG_CAM_SW := 10103, (*Associated with data type McCfgAxFeatDigCamSwType*)
mcCFG_AX_FEAT_DIG_OUT := 10107, (*Associated with data type McCfgAxFeatDigOutType*)
mcCFG_AX_FEAT_CAM_LST := 11102, (*AxisFeatureCamList -*)
mcCFG_AX_FEAT_ALT_VAL_SRC := 10104, (*Associated with data type McCfgAxFeatAltValSrcType*)
mcCFG_AX_FEAT_BRK := 10105, (*Associated with data type McCfgAxFeatBrkType*)
mcCFG_AX_FEAT_MECH_DEV_COMP := 10106, (*Associated with data type McCfgAxFeatMechDevCompType*)
mcCFG_AX_FEAT_ACP_NETW_ERR_REAC := 10108, (*Associated with data type McCfgAxFeatAcpNetwErrReacType*)
mcCFG_MOT_SYN := 10500, (*Associated with data type McCfgMotSynType*)
mcCFG_MOT_INDUCT := 10501, (*Associated with data type McCfgMotInductType*)
mcCFG_IO_PL_IN_CARD := 10510, (*IOPlugInCard -*)
mcCFG_ACP_AX := 11000, (*Associated with data type McCfgAcpAxType*)
mcCFG_ACP_AX_REF := 11011, (*Associated with data type McCfgAcpAxRefType*)
mcCFG_ACP_MECH_ELM := 11012, (*Associated with data type McCfgAcpMechElmType*)
mcCFG_ACP_ENC_LINK := 11013, (*Associated with data type McCfgAcpEncLinkType*)
mcCFG_ACP_CTRL := 11014, (*Associated with data type McCfgAcpCtrlType*)
mcCFG_ACP_HOME := 11015, (*Associated with data type McCfgAcpHomeType*)
mcCFG_ACP_STOP_REAC := 11016, (*Associated with data type McCfgAcpStopReacType*)
mcCFG_ACP_MOVE_ERR_LIM := 11017, (*Associated with data type McCfgAcpMoveErrLimType*)
mcCFG_ACP_JERK_FLTR := 11018, (*Associated with data type McCfgAcpJerkFltrType*)
mcCFG_ACP_DIG_IN := 11019, (*Associated with data type McCfgAcpDigInType*)
mcCFG_ACP_SIM := 11020, (*Associated with data type McCfgAcpSimType*)
mcCFG_ACP_AX_FEAT := 11021, (*Associated with data type McCfgAcpAxFeatType*)
mcCFG_ACP_AUX_PWR_SUP_MOD := 11030, (*Associated with data type McCfgAcpAuxPwrSupModType*)
mcCFG_ACP_PSM_PWR_SEC := 11031, (*Associated with data type McCfgAcpPSMPwrSecType*)
mcCFG_ACP_PWR_SUP := 11040, (*Associated with data type McCfgAcpPwrSupType*)
mcCFG_ACP_ENC := 11045, (*Associated with data type McCfgAcpEncType*)
mcCFG_ACP_VIRT_AX := 11050, (*Associated with data type McCfgAcpVirtAxType*)
mcCFG_ACP_VIRT_AX_REF := 11051, (*Associated with data type McCfgAcpVirtAxRefType*)
mcCFG_ACP_VIRT_HOME := 11052, (*Associated with data type McCfgAcpVirtHomeType*)
mcCFG_ACP_VIRT_JERK_FLTR := 11053, (*Associated with data type McCfgAcpVirtJerkFltrType*)
mcCFG_ACP_VIRT_AX_FEAT := 11054, (*Associated with data type McCfgAcpVirtAxFeatType*)
mcCFG_ACP_CH_FEAT := 11060, (*Associated with data type McCfgAcpChFeatType*)
mcCFG_ACP_EXT_ENC_AX := 11070, (*Associated with data type McCfgAcpExtEncAxType*)
mcCFG_ACP_EXT_ENC_AX_REF := 11071, (*Associated with data type McCfgAcpExtEncAxRefType*)
mcCFG_ACP_EXT_ENC_AX_ENC_LINK := 11072, (*Associated with data type McCfgAcpExtEncAxEncLinkType*)
mcCFG_ACP_EXT_ENC_AX_MECH_ELM := 11073, (*Associated with data type McCfgAcpExtEncAxMechElmType*)
mcCFG_ACP_EXT_ENC_AX_HOME := 11074, (*Associated with data type McCfgAcpExtEncAxHomeType*)
mcCFG_AX_FEAT_CAM_AUT_ACP := 11101, (*AxisFeatureCamAutAcopos -*)
mcCFG_AX_FEAT_A_IN := 11103, (*AxisFeatureAInput -*)
mcCFG_AX_FEAT_ACP_PAR_TBL := 11104, (*Associated with data type McCfgAxFeatAcpParTblType*)
mcCFG_PURE_V_AX := 12000, (*Associated with data type McCfgPureVAxType*)
mcCFG_PURE_V_AX_REF := 12011, (*Associated with data type McCfgPureVAxRefType*)
mcCFG_PURE_V_AX_HOME := 12012, (*Associated with data type McCfgPureVAxHomeType*)
mcCFG_PURE_V_AX_JERK_FLTR := 12013, (*Associated with data type McCfgPureVAxJerkFltrType*)
mcCFG_PURE_V_AX_FEAT := 12014, (*Associated with data type McCfgPureVAxFeatType*)
mcCFG_PURE_V_AX_MECH_ELM := 12015, (*Associated with data type McCfgPureVAxMechElmType*)
mcCFG_PURE_V_AX_ENC_LINK := 12016, (*Associated with data type McCfgPureVAxEncLinkType*)
mcCFG_PURE_V_AX_DIG_IN := 12020, (*Associated with data type McCfgPureVAxDigInType*)
mcCFG_PURE_V_AX_CTRL := 12017, (*Associated with data type McCfgPureVAxCtrlType*)
mcCFG_PURE_V_AX_STOP_REAC := 12018, (*Associated with data type McCfgPureVAxStopReacType*)
mcCFG_PURE_V_AX_MOVE_ERR_LIM := 12019, (*Associated with data type McCfgPureVAxMoveErrLimType*)
mcCFG_PURE_V_AX_STAT_IN := 12021, (*Associated with data type McCfgPureVAxStatInType*)
mcCFG_PURE_V_AX_CTRL_OUT := 12022, (*Associated with data type McCfgPureVAxCtrlOutType*)
mcCFG_STP_AX := 13000, (*Associated with data type McCfgStpAxType*)
mcCFG_STP_AX_REF := 13011, (*Associated with data type McCfgStpAxRefType*)
mcCFG_STP_AX_MECH_ELM := 13012, (*Associated with data type McCfgStpAxMechElmType*)
mcCFG_STP_AX_MOT := 13013, (*Associated with data type McCfgStpAxMotType*)
mcCFG_STP_AX_ENC_LINK := 13014, (*Associated with data type McCfgStpAxEncLinkType*)
mcCFG_STP_AX_CTRL := 13015, (*Associated with data type McCfgStpAxCtrlType*)
mcCFG_STP_AX_HOME := 13016, (*Associated with data type McCfgStpAxHomeType*)
mcCFG_STP_AX_STOP_REAC := 13017, (*Associated with data type McCfgStpAxStopReacType*)
mcCFG_STP_AX_MOVE_ERR_LIM := 13018, (*Associated with data type McCfgStpAxMoveErrLimType*)
mcCFG_STP_AX_JERK_FLTR := 13019, (*Associated with data type McCfgStpAxJerkFltrType*)
mcCFG_STP_AX_DIG_IN := 13020, (*Associated with data type McCfgStpAxDigInType*)
mcCFG_STP_AX_DIG_OUT := 13021, (*Associated with data type McCfgStpAxDigOutType*)
mcCFG_STP_AX_FEAT := 13022, (*Associated with data type McCfgStpAxFeatType*)
mcCFG_STP_ENC := 13100, (*Associated with data type McCfgStpEncType*)
mcCFG_DS402_AX := 13500, (*Associated with data type McCfgDS402AxType*)
mcCFG_DS402_INV_AX := 13501, (*Associated with data type McCfgDS402InvAxType*)
mcCFG_DS402_AX_REF := 13511, (*Associated with data type McCfgDS402AxRefType*)
mcCFG_DS402_AX_MECH_ELM := 13512, (*Associated with data type McCfgDS402AxMechElmType*)
mcCFG_DS402_AX_ENC_SET := 13513, (*Associated with data type McCfgDS402AxEncSetType*)
mcCFG_DS402_AX_POS_ACT_VAL_RNG := 13514, (*Associated with data type McCfgDS402AxPosActValRngType*)
mcCFG_DS402_AX_CYC_SET_VAL_MOD := 13515, (*Associated with data type McCfgDS402AxCycSetValModType*)
mcCFG_DS402_AX_FEAT := 13516, (*Associated with data type McCfgDS402AxFeatType*)
mcCFG_ACP_INV_AX := 13600, (*Associated with data type McCfgAcpInvAxType*)
mcCFG_ACP_INV_AX_REF := 13611, (*Associated with data type McCfgAcpInvAxRefType*)
mcCFG_ACP_INV_AX_MECH_ELM := 13612, (*Associated with data type McCfgAcpInvAxMechElmType*)
mcCFG_AXGRP_ADMIN := 20000, (*Associated with data type McCfgAxGrpAdminType*)
mcCFG_AXGRP_FEAT_HOME_ORD := 20101, (*Associated with data type McCfgAxGrpFeatHomeOrdType*)
mcCFG_AXGRP_FEAT_PWR_ON_ORD := 20102, (*Associated with data type McCfgAxGrpFeatPwrOnOrdType*)
mcCFG_AXGRP_FEAT_EX_SNG_AX := 20103, (*Associated with data type McCfgAxGrpFeatExSngAxType*)
mcCFG_AXGRP_FEAT_SHR_BRK_SIG := 20104, (*Associated with data type McCfgAxGrpFeatShrBrkSigType*)
mcCFG_AXGRP_PATHGEN := 21000, (*Associated with data type McCfgAxGrpPathGenType*)
mcCFG_AXGRP_PATHGEN_BASE_SET := 21013, (*Associated with data type McCfgAxGrpPathGenBaseSetType*)
mcCFG_AXGRP_FEAT_PRG := 21101, (*Associated with data type McCfgAxGrpFeatPrgType*)
mcCFG_AXGRP_FEAT_COMP := 21102, (*Associated with data type McCfgAxGrpFeatCompType*)
mcCFG_AXGRP_FEAT_CDC := 21103, (*Associated with data type McCfgAxGrpFeatCdcType*)
mcCFG_AXGRP_FEAT_FF := 21104, (*Associated with data type McCfgAxGrpFeatFfType*)
mcCFG_AXGRP_FEAT_FRM_HIER_STD := 21105, (*Associated with data type McCfgAxGrpFeatFrmHierStdType*)
mcCFG_AXGRP_FEAT_FRM_HIER_CUS := 21106, (*Associated with data type McCfgAxGrpFeatFrmHierCusType*)
mcCFG_AXGRP_FEAT_JOG := 21107, (*AxesgroupFeatureJogging -*)
mcCFG_AXGRP_FEAT_LAH := 21108, (*Associated with data type McCfgAxGrpFeatLahType*)
mcCFG_AXGRP_FEAT_MFUN := 21109, (*Associated with data type McCfgAxGrpFeatMFunType*)
mcCFG_AXGRP_FEAT_MON_ELEM := 21110, (*Associated with data type McCfgAxGrpFeatMonElemType*)
mcCFG_AXGRP_FEAT_MP_LOG := 21111, (*Associated with data type McCfgAxGrpFeatMpLogType*)
mcCFG_AXGRP_FEAT_PATH_DEF := 21112, (*Associated with data type McCfgAxGrpFeatPathDefType*)
mcCFG_AXGRP_FEAT_PRG_SIM := 21113, (*Associated with data type McCfgAxGrpFeatPrgSimType*)
mcCFG_AXGRP_FEAT_SPINDLES := 21114, (*Associated with data type McCfgAxGrpFeatSpindlesType*)
mcCFG_AXGRP_FEAT_TOOL := 21115, (*Associated with data type McCfgAxGrpFeatToolType*)
mcCFG_AXGRP_FEAT_WSM := 21116, (*Associated with data type McCfgAxGrpFeatWsmType*)
mcCFG_AXGRP_FEAT_EX_PATH_AX := 21117, (*Associated with data type McCfgAxGrpFeatExPathAxType*)
mcCFG_AXGRP_FEAT_PROBE := 21118, (*Associated with data type McCfgAxGrpFeatProbeType*)
mcCFG_AXGRP_FEAT_SIG := 21119, (*Associated with data type McCfgAxGrpFeatSigType*)
mcCFG_AXGRP_FEAT_2D_COMP := 21120, (*Associated with data type McCfgAxGrpFeat2DCompType*)
mcCFG_AXGRP_FEAT_3D_COMP := 21121, (*Associated with data type McCfgAxGrpFeat3DCompType*)
mcCFG_AXGRP_FEAT_PATH_PREVIEW := 21122, (*Associated with data type McCfgAxGrpFeatPathPreviewType*)
mcCFG_AXGRP_FEAT_TAN_TOOL := 21124, (*Associated with data type McCfgAxGrpFeatTanToolType*)
mcCFG_AXGRP_FEAT_REV_MOVE := 21125, (*Associated with data type McCfgAxGrpFeatRevMoveType*)
mcCFG_AXGRP_FEAT_TRK := 21126, (*Associated with data type McCfgAxGrpFeatTrkType*)
mcCFG_ASM := 31000, (*Associated with data type McCfgAsmType*)
mcCFG_ASM_FEAT_CPLG := 31101, (*Associated with data type McCfgAsmFeatCplgType*)
mcCFG_ASM_FEAT_SIM_SH_DEF := 31102, (*Associated with data type McCfgAsmFeatSimShDefType*)
mcCFG_ASM_FEAT_SH_TRACE := 31103, (*Associated with data type McCfgAsmFeatShTraceType*)
mcCFG_ASM_FEAT_SH_AUT_ATT := 31104, (*Associated with data type McCfgAsmFeatShAutAttType*)
mcCFG_ASM_FEAT_LOC_LIM := 31105, (*Associated with data type McCfgAsmFeatLocLimType*)
mcCFG_ASM_FEAT_EX_SEG := 31106, (*Associated with data type McCfgAsmFeatExSegType*)
mcCFG_ASM_FEAT_SH_SHP_REG := 31107, (*Associated with data type McCfgAsmFeatShShpRegType*)
mcCFG_SEC_COMP := 31301, (*Associated with data type McCfgSecCompType*)
mcCFG_SEC_SUB := 31302, (*Associated with data type McCfgSecSubType*)
mcCFG_SH_STEREO_TYP := 31400, (*Associated with data type McCfgShStereoTypType*)
mcCFG_SEG := 31500, (*Associated with data type McCfgSegType*)
mcCFG_MS_CUS_STD := 50001, (*Associated with data type McCfgMSCusStdType*)
mcCFG_MS_2AX_CNC_XY := 51201, (*Associated with data type McCfgMS2AxCncXYType*)
mcCFG_MS_2AX_CNC_XZ := 51202, (*Associated with data type McCfgMS2AxCncXZType*)
mcCFG_MS_2AX_CNC_YZ := 51203, (*Associated with data type McCfgMS2AxCncYZType*)
mcCFG_MS_3AX_CNC_XYZ := 51301, (*Associated with data type McCfgMS3AxCncXYZType*)
mcCFG_MS_3AX_CNC_XZC := 51302, (*Associated with data type McCfgMS3AxCncXZCType*)
mcCFG_MS_3AX_CNC_XZB := 51303, (*Associated with data type McCfgMS3AxCncXZBType*)
mcCFG_MS_4AX_CNC_XYZB := 51401, (*Associated with data type McCfgMS4AxCncXYZBType*)
mcCFG_MS_4AX_CNC_XYZC := 51402, (*Associated with data type McCfgMS4AxCncXYZCType*)
mcCFG_MS_5AX_CNC_XYZCA := 51504, (*Associated with data type McCfgMS5AxCncXYZCAType*)
mcCFG_MS_6AX_CNC_ZXYBCA := 51603, (*Associated with data type McCfgMS6AxCncZXYBCAType*)
mcCFG_MS_4AX_SCARA_A := 52041, (*Associated with data type McCfgMS4AxScaraAType*)
mcCFG_MS_2AX_DELTA_A := 52121, (*Associated with data type McCfgMS2AxDeltaAType*)
mcCFG_MS_3AX_DELTA_A := 52131, (*Associated with data type McCfgMS3AxDeltaAType*)
mcCFG_MS_3AX_DELTA_XZB := 52132, (*Associated with data type McCfgMS3AxDeltaXZBType*)
mcCFG_MS_3AX_DELTA_B := 52133, (*Associated with data type McCfgMS3AxDeltaBType*)
mcCFG_MS_3AX_DELTA_XZC := 52134, (*Associated with data type McCfgMS3AxDeltaXZCType*)
mcCFG_MS_4AX_DELTA_A := 52141, (*Associated with data type McCfgMS4AxDeltaAType*)
mcCFG_MS_4AX_DELTA_B := 52142, (*Associated with data type McCfgMS4AxDeltaBType*)
mcCFG_MS_4AX_DELTA_C := 52143, (*Associated with data type McCfgMS4AxDeltaCType*)
mcCFG_MS_5AX_DELTA_A := 52151, (*Associated with data type McCfgMS5AxDeltaAType*)
mcCFG_MS_3AX_ROB_A := 52301, (*Associated with data type McCfgMS3AxRobAType*)
mcCFG_MS_4AX_ROB_A := 52401, (*Associated with data type McCfgMS4AxRobAType*)
mcCFG_MS_4AX_ROB_B := 52402, (*Associated with data type McCfgMS4AxRobBType*)
mcCFG_MS_5AX_ROB_A := 52501, (*Associated with data type McCfgMS5AxRobAType*)
mcCFG_MS_5AX_ROB_B := 52502, (*Associated with data type McCfgMS5AxRobBType*)
mcCFG_MS_6AX_ROB_A := 52601, (*Associated with data type McCfgMS6AxRobAType*)
mcCFG_MS_6AX_ROB_B := 52602, (*Associated with data type McCfgMS6AxRobBType*)
mcCFG_MS_6AX_ROB_C := 52603 (*Associated with data type McCfgMS6AxRobCType*)
);
McCfgUnboundedArrayType : STRUCT (*General purpose datatype*)
NumberOfElements : UDINT;
DataAddress : UDINT;
NumberOfArrayElements : UDINT;
END_STRUCT;
McCfgReferenceType : STRUCT (*General purpose datatype*)
Name : STRING[250];
ConfigType : McCfgTypeEnum;
END_STRUCT;
McMMCProcProcTskCEnum :
( (*Cyclic task class for command processing*)
mcMMCPPTC_CYC_1 := 1, (*Cyclic #1 - Task class 1*)
mcMMCPPTC_CYC_2 := 2 (*Cyclic #2 - Task class 2*)
);
McMMCProcType : STRUCT
ProcessingTaskClass : McMMCProcProcTskCEnum; (*Cyclic task class for command processing*)
END_STRUCT;
McMMCLogSelEnum :
( (*Selective logging selector setting*)
mcMMCLS_NOT_USE := 0, (*Not used -*)
mcMMCLS_USE := 1 (*Used -*)
);
McCfgVisEnum :
( (*Component state change logger entries (PLCopen state)*)
mcCV_VIS := 0, (*Visible*)
mcCV_SUP := 1 (*Suppressed*)
);
McMMCLogSelUseAdmCmdEnum :
( (*Administrative commands selector setting*)
mcMMCLSUAC_VIS := 0, (*Visible - This command group of logger entries will be visible*)
mcMMCLSUAC_SUP := 1, (*Suppressed - This command group of logger entries will be suppressed*)
mcMMCLSUAC_SEL := 2 (*Selective - Defines which sections of this command group should be visible*)
);
McMMCLogSelUseAdmCmdSelType : STRUCT (*Type mcMMCLSUAC_SEL settings*)
CallerInstance : McCfgVisEnum; (*Logging of the caller instance entries*)
ComponentResponse : McCfgVisEnum; (*Logging of component response entries*)
AdditionalInformation : McCfgVisEnum; (*Logging of additional information entries*)
END_STRUCT;
McMMCLogSelUseAdmCmdType : STRUCT (*Administrative logger entries*)
Type : McMMCLogSelUseAdmCmdEnum; (*Administrative commands selector setting*)
Selective : McMMCLogSelUseAdmCmdSelType; (*Type mcMMCLSUAC_SEL settings*)
END_STRUCT;
McMMCLogSelUseMoveCmdEnum :
( (*Movement commands selector setting*)
mcMMCLSUMC_VIS := 0, (*Visible - This command group of logger entries will be visible*)
mcMMCLSUMC_SUP := 1, (*Suppressed - This command group of logger entries will be suppressed*)
mcMMCLSUMC_SEL := 2 (*Selective - Defines which sections of this command group should be visible*)
);
McMMCLogSelUseMoveCmdSelType : STRUCT (*Type mcMMCLSUMC_SEL settings*)
CallerInstance : McCfgVisEnum; (*Logging of the caller instance entries*)
ComponentResponse : McCfgVisEnum; (*Logging of component response entries*)
AdditionalInformation : McCfgVisEnum; (*Logging of additional information entries*)
END_STRUCT;
McMMCLogSelUseMoveCmdType : STRUCT (*Movement logger entries*)
Type : McMMCLogSelUseMoveCmdEnum; (*Movement commands selector setting*)
Selective : McMMCLogSelUseMoveCmdSelType; (*Type mcMMCLSUMC_SEL settings*)
END_STRUCT;
McMMCLogSelUseInfoCmdEnum :
( (*Informational commands selector setting*)
mcMMCLSUIC_VIS := 0, (*Visible - This command group of logger entries will be visible*)
mcMMCLSUIC_SUP := 1, (*Suppressed - This command group of logger entries will be suppressed*)
mcMMCLSUIC_SEL := 2 (*Selective - Defines which sections of this command group should be visible*)
);
McMMCLogSelUseInfoCmdSelType : STRUCT (*Type mcMMCLSUIC_SEL settings*)
CallerInstance : McCfgVisEnum; (*Logging of the caller instance entries*)
ComponentResponse : McCfgVisEnum; (*Logging of component response entries*)
AdditionalInformation : McCfgVisEnum; (*Logging of additional information entries*)
END_STRUCT;
McMMCLogSelUseInfoCmdType : STRUCT (*Status information logger entries*)
Type : McMMCLogSelUseInfoCmdEnum; (*Informational commands selector setting*)
Selective : McMMCLogSelUseInfoCmdSelType; (*Type mcMMCLSUIC_SEL settings*)
END_STRUCT;
McMMCLogSelUseSupSubcEEnum :
( (*Suppress entries for internally invoked commands for subcomponents*)
mcMMCLSUSSE_INACT := 0, (*Inactive - Entries for internally invoked commands for subcomponents are shown unless the base entries are suppressed*)
mcMMCLSUSSE_ACT := 1 (*Active - Entries for internally invoked commands for subcomponents are suppressed*)
);
McMMCLogSelUseType : STRUCT (*Type mcMMCLS_USE settings*)
StateChange : McCfgVisEnum; (*Component state change logger entries (PLCopen state)*)
AdministrativeCommands : McMMCLogSelUseAdmCmdType; (*Administrative logger entries*)
MovementCommands : McMMCLogSelUseMoveCmdType; (*Movement logger entries*)
InformationalCommands : McMMCLogSelUseInfoCmdType; (*Status information logger entries*)
SuppressSubcomponentEntries : McMMCLogSelUseSupSubcEEnum; (*Suppress entries for internally invoked commands for subcomponents*)
END_STRUCT;
McMMCLogSelType : STRUCT (*Define which logging areas should be visible*)
Type : McMMCLogSelEnum; (*Selective logging selector setting*)
Used : McMMCLogSelUseType; (*Type mcMMCLS_USE settings*)
END_STRUCT;
McMMCLogType : STRUCT
Selective : McMMCLogSelType; (*Define which logging areas should be visible*)
END_STRUCT;
McCfgMMCfgType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_MMCFG*)
Processing : McMMCProcType;
Logger : McMMCLogType;
END_STRUCT;
McCfgTransXYZType : STRUCT (*Translation parameters*)
X : LREAL; (*Translation in X direction [measurement units]*)
Y : LREAL; (*Translation in Y direction [measurement units]*)
Z : LREAL; (*Translation in Z direction [measurement units]*)
END_STRUCT;
McCfgOrientType : STRUCT (*Orientation parameters*)
Angle1 : LREAL; (*Rotation around the first coordinate axis of the rotation order [measurement units]*)
Angle2 : LREAL; (*Rotation around the second coordinate axis of the rotation order [measurement units]*)
Angle3 : LREAL; (*Rotation around the third coordinate axis of the rotation order [measurement units]*)
END_STRUCT;
McCfgVarDatTypEnum :
( (*Data type selector setting*)
mcCVDT_TYP_BOOL := 0, (*Type BOOL -*)
mcCVDT_TYP_SINT := 1, (*Type SINT -*)
mcCVDT_TYP_USINT := 2, (*Type USINT -*)
mcCVDT_TYP_INT := 3, (*Type INT -*)
mcCVDT_TYP_UINT := 4, (*Type UINT -*)
mcCVDT_TYP_DINT := 5, (*Type DINT -*)
mcCVDT_TYP_UDINT := 6, (*Type UDINT -*)
mcCVDT_TYP_REAL := 7, (*Type REAL -*)
mcCVDT_TYP_LREAL := 8, (*Type LREAL -*)
mcCVDT_TYP_STRING := 9, (*Type STRING -*)
mcCVDT_TYP_DER := 10 (*Type Derived - Derived data type*)
);
McCfgVarDatTypTypSTRINGType : STRUCT (*Type mcCVDT_TYP_STRING settings*)
Length : UDINT;
END_STRUCT;
McCfgVarDatTypTypDerType : STRUCT (*Type mcCVDT_TYP_DER settings*)
Name : STRING[250]; (*Name*)
END_STRUCT;
McCfgVarDatTypType : STRUCT (*Data type*)
Type : McCfgVarDatTypEnum; (*Data type selector setting*)
TypeSTRING : McCfgVarDatTypTypSTRINGType; (*Type mcCVDT_TYP_STRING settings*)
TypeDerived : McCfgVarDatTypTypDerType; (*Type mcCVDT_TYP_DER settings*)
END_STRUCT;
McCfgFunDatTypEnum :
( (*Function return type selector setting*)
mcCFDT_TYP_BOOL := 0, (*Type BOOL -*)
mcCFDT_TYP_SINT := 1, (*Type SINT -*)
mcCFDT_TYP_USINT := 2, (*Type USINT -*)
mcCFDT_TYP_INT := 3, (*Type INT -*)
mcCFDT_TYP_UINT := 4, (*Type UINT -*)
mcCFDT_TYP_DINT := 5, (*Type DINT -*)
mcCFDT_TYP_UDINT := 6, (*Type UDINT -*)
mcCFDT_TYP_REAL := 7, (*Type REAL -*)
mcCFDT_TYP_LREAL := 8, (*Type LREAL -*)
mcCFDT_TYP_STRING := 9, (*Type STRING -*)
mcCFDT_TYP_DER := 10, (*Type Derived - Derived data type*)
mcCFDT_TYP_NONE := 11 (*Type NONE - Function does not return a value*)
);
McCfgFunDatTypTypSTRINGType : STRUCT (*Type mcCFDT_TYP_STRING settings*)
Length : UDINT;
END_STRUCT;
McCfgFunDatTypTypDerType : STRUCT (*Type mcCFDT_TYP_DER settings*)
Name : STRING[250]; (*Name*)
END_STRUCT;
McCfgFunDatTypType : STRUCT (*Return data type of function*)
Type : McCfgFunDatTypEnum; (*Function return type selector setting*)
TypeSTRING : McCfgFunDatTypTypSTRINGType; (*Type mcCFDT_TYP_STRING settings*)
TypeDerived : McCfgFunDatTypTypDerType; (*Type mcCFDT_TYP_DER settings*)
END_STRUCT;
McWSCubeDimType : STRUCT (*Dimension parameters*)
X : LREAL; (*Dimension of the cuboid in the x-direction (endpoint) [measurement units]*)
Y : LREAL; (*Dimension of the cuboid in the y-direction (endpoint) [measurement units]*)
Z : LREAL; (*Dimension of the cuboid in the z-direction (endpoint) [measurement units]*)
END_STRUCT;
McWSCubeType : STRUCT
ID : UDINT; (*Unique cuboid ID*)
Translation : McCfgTransXYZType; (*Translation parameters*)
Orientation : McCfgOrientType; (*Orientation parameters*)
Dimension : McWSCubeDimType; (*Dimension parameters*)
END_STRUCT;
McWSCubesType : STRUCT (*Defines cuboids*)
Cuboid : McCfgUnboundedArrayType;
END_STRUCT;
McWSHalfSpcPlEnum :
( (*Defines plane*)
mcWSHSP_PL_XY := 0, (*Plane XY*)
mcWSHSP_PL_YZ := 1, (*Plane YZ*)
mcWSHSP_PL_ZX := 2 (*Plane ZX*)
);
McWSHalfSpcType : STRUCT
ID : UDINT; (*Unique half-space ID*)
Translation : McCfgTransXYZType; (*Translation parameters*)
Orientation : McCfgOrientType; (*Orientation parameters*)
Plane : McWSHalfSpcPlEnum; (*Defines plane*)
END_STRUCT;
McWSHalfSpcsType : STRUCT (*Defines half-spaces*)
HalfSpace : McCfgUnboundedArrayType;
END_STRUCT;
McWSTcConeParType : STRUCT (*Object description parameters*)
BaseRadius : LREAL; (*Base radius of the cone [measurement units]*)
Height : LREAL; (*Height of the cone [measurement units]*)
TopRadius : LREAL; (*Top radius of the cone [measurement units]*)
END_STRUCT;
McWSTcConeType : STRUCT (*Selects object type*)
ID : UDINT; (*Unique object ID*)
Translation : McCfgTransXYZType; (*Translation parameters*)
Orientation : McCfgOrientType; (*Orientation parameters*)
Parameters : McWSTcConeParType; (*Object description parameters*)
END_STRUCT;
McWSTcConesType : STRUCT (*Defines truncated cones*)
TruncatedCone : McCfgUnboundedArrayType; (*Selects object type*)
END_STRUCT;
McWSWorkSpaceType : STRUCT (*Defines the WorkSpace*)
Cuboids : McWSCubesType; (*Defines cuboids*)
HalfSpaces : McWSHalfSpcsType; (*Defines half-spaces*)
TruncatedCones : McWSTcConesType; (*Defines truncated cones*)
END_STRUCT;
McWSSafeSpaceType : STRUCT (*Defines the SafeSpace*)
Cuboids : McWSCubesType; (*Defines cuboids*)
HalfSpaces : McWSHalfSpcsType; (*Defines half-spaces*)
TruncatedCones : McWSTcConesType; (*Defines truncated cones*)
END_STRUCT;
McCfgWorkspaceType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_WS*)
WorkSpace : McWSWorkSpaceType; (*Defines the WorkSpace*)
SafeSpace : McWSSafeSpaceType; (*Defines the SafeSpace*)
END_STRUCT;
McFTRowType : STRUCT
Index : UINT;
X : LREAL;
Y : LREAL;
Z : LREAL;
Angle1 : LREAL;
Angle2 : LREAL;
Angle3 : LREAL;
Description : STRING[250];
END_STRUCT;
McCfgFrmTblType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_FRMTBL*)
Row : McCfgUnboundedArrayType;
END_STRUCT;
McLSPosEnum :
( (*Position selector setting*)
mcLSP_NOT_USE := 0, (*Not used -*)
mcLSP_USE := 1 (*Used -*)
);
McCfgLimPosType : STRUCT (*Type mcLSP_USE settings*)
LowerLimit : LREAL; (*Lower software limit position [Measurement units]*)
UpperLimit : LREAL; (*Upper software limit position [Measurement units]*)
END_STRUCT;
McLSPosType : STRUCT (*Movement range of the axis via two position boundaries*)
Type : McLSPosEnum; (*Position selector setting*)
Used : McCfgLimPosType; (*Type mcLSP_USE settings*)
END_STRUCT;
McLSVelEnum :
( (*Velocity selector setting*)
mcLSV_NOT_USE := 0, (*Not used -*)
mcLSV_BASIC := 1, (*Basic -*)
mcLSV_ADV := 2 (*Advanced -*)
);
McCfgLimVelBaseType : STRUCT (*Type mcLSV_BASIC settings*)
Velocity : REAL; (*Velocity limit in any movement direction [Measurement units/s]*)
END_STRUCT;
McCfgLimVelAdvType : STRUCT (*Type mcLSV_ADV settings*)
Positive : REAL; (*Velocity limit in positive movement direction [Measurement units/s]*)
Negative : REAL; (*Velocity limit in negative movement direction [Measurement units/s]*)
END_STRUCT;
McLSVelType : STRUCT (*Velocity limits*)
Type : McLSVelEnum; (*Velocity selector setting*)
Basic : McCfgLimVelBaseType; (*Type mcLSV_BASIC settings*)
Advanced : McCfgLimVelAdvType; (*Type mcLSV_ADV settings*)
END_STRUCT;
McLSAccEnum :
( (*Acceleration selector setting*)
mcLSA_NOT_USE := 0, (*Not used -*)
mcLSA_BASIC := 1, (*Basic -*)
mcLSA_ADV := 2 (*Advanced -*)
);
McCfgLimAccBaseType : STRUCT (*Type mcLSA_BASIC settings*)
Acceleration : REAL; (*Acceleration limit in any movement direction [Measurement units/s²]*)
END_STRUCT;
McCfgLimAccAdvType : STRUCT (*Type mcLSA_ADV settings*)
Positive : REAL; (*Acceleration limit in positive movement direction [Measurement units/s²]*)
Negative : REAL; (*Acceleration limit in negative movement direction [Measurement units/s²]*)
END_STRUCT;
McLSAccType : STRUCT (*Acceleration limits*)
Type : McLSAccEnum; (*Acceleration selector setting*)
Basic : McCfgLimAccBaseType; (*Type mcLSA_BASIC settings*)
Advanced : McCfgLimAccAdvType; (*Type mcLSA_ADV settings*)
END_STRUCT;
McLSDecEnum :
( (*Deceleration selector setting*)
mcLSD_NOT_USE := 0, (*Not used -*)
mcLSD_BASIC := 1, (*Basic -*)
mcLSD_ADV := 2 (*Advanced -*)
);
McCfgLimDecBaseType : STRUCT (*Type mcLSD_BASIC settings*)
Deceleration : REAL; (*Deceleration limit in any movement direction [Measurement units/s²]*)
END_STRUCT;
McCfgLimDecAdvType : STRUCT (*Type mcLSD_ADV settings*)
Positive : REAL; (*Deceleration limit in positive movement direction [Measurement units/s²]*)
Negative : REAL; (*Deceleration limit in negative movement direction [Measurement units/s²]*)
END_STRUCT;
McLSDecType : STRUCT (*Deceleration limits*)
Type : McLSDecEnum; (*Deceleration selector setting*)
Basic : McCfgLimDecBaseType; (*Type mcLSD_BASIC settings*)
Advanced : McCfgLimDecAdvType; (*Type mcLSD_ADV settings*)
END_STRUCT;
McCfgLimJerkEnum :
( (*Jerk selector setting*)
mcCLJ_NOT_USE := 0, (*Not used -*)
mcCLJ_BASIC := 1, (*Basic -*)
mcCLJ_ADV := 2 (*Advanced -*)
);
McCfgLimJerkBasicType : STRUCT (*Type mcCLJ_BASIC settings*)
Jerk : REAL; (*Jerk limit in any movement direction [Measurement units/s³]*)
END_STRUCT;
McCfgLimJerkAdvType : STRUCT (*Type mcCLJ_ADV settings*)
AccelerationPositive : REAL; (*Jerk limit in positive movement direction during acceleration [Measurement units/s³]*)
AccelerationNegative : REAL; (*Jerk limit in negative movement direction during acceleration [Measurement units/s³]*)
DecelerationPositive : REAL; (*Jerk limit in positive movement direction during deceleration [Measurement units/s³]*)
DecelerationNegative : REAL; (*Jerk limit in negative movement direction during deceleration [Measurement units/s³]*)
END_STRUCT;
McCfgLimJerkType : STRUCT (*Jerk limits*)
Type : McCfgLimJerkEnum; (*Jerk selector setting*)
Basic : McCfgLimJerkBasicType; (*Type mcCLJ_BASIC settings*)
Advanced : McCfgLimJerkAdvType; (*Type mcCLJ_ADV settings*)
END_STRUCT;
McCfgLimForEnum :
( (*Force selector setting*)
mcCLF_NOT_USE := 0, (*Not used -*)
mcCLF_BASIC := 1, (*Basic -*)
mcCLF_ADV := 2 (*Advanced -*)
);
McCfgLimForBasicType : STRUCT (*Type mcCLF_BASIC settings*)
Force : REAL; (*Force limit in any movement direction [N]*)
END_STRUCT;
McCfgLimForAdvType : STRUCT (*Type mcCLF_ADV settings*)
AccelerationPositive : REAL; (*Force limit in positive movement direction during acceleration [N]*)
AccelerationNegative : REAL; (*Force limit in negative movement direction during acceleration [N]*)
DecelerationPositive : REAL; (*Force limit in positive movement direction during deceleration [N]*)
DecelerationNegative : REAL; (*Force limit in negative movement direction during deceleration [N]*)
END_STRUCT;
McCfgLimForType : STRUCT (*Limits for the force of the axis*)
Type : McCfgLimForEnum; (*Force selector setting*)
Basic : McCfgLimForBasicType; (*Type mcCLF_BASIC settings*)
Advanced : McCfgLimForAdvType; (*Type mcCLF_ADV settings*)
END_STRUCT;
McCfgLimSetLinType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_LIMSET_LIN*)
Position : McLSPosType; (*Movement range of the axis via two position boundaries*)
Velocity : McLSVelType; (*Velocity limits*)
Acceleration : McLSAccType; (*Acceleration limits*)
Deceleration : McLSDecType; (*Deceleration limits*)
Jerk : McCfgLimJerkType; (*Jerk limits*)
Force : McCfgLimForType; (*Limits for the force of the axis*)
END_STRUCT;
McCfgLimTorqEnum :
( (*Torque selector setting*)
mcCLT_NOT_USE := 0, (*Not used -*)
mcCLT_BASIC := 1, (*Basic -*)
mcCLT_ADV := 2 (*Advanced -*)
);
McCfgLimTorqBasicType : STRUCT (*Type mcCLT_BASIC settings*)
Torque : REAL; (*Torque limit in any movement direction [Nm]*)
END_STRUCT;
McCfgLimTorqAdvType : STRUCT (*Type mcCLT_ADV settings*)
AccelerationPositive : REAL; (*Torque limit in positive movement direction during acceleration [Nm]*)
AccelerationNegative : REAL; (*Torque limit in negative movement direction during acceleration [Nm]*)
DecelerationPositive : REAL; (*Torque limit in positive movement direction during deceleration [Nm]*)
DecelerationNegative : REAL; (*Torque limit in negative movement direction during deceleration [Nm]*)
END_STRUCT;
McCfgLimTorqType : STRUCT (*Torque limits*)
Type : McCfgLimTorqEnum; (*Torque selector setting*)
Basic : McCfgLimTorqBasicType; (*Type mcCLT_BASIC settings*)
Advanced : McCfgLimTorqAdvType; (*Type mcCLT_ADV settings*)
END_STRUCT;
McCfgLimSetRotType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_LIMSET_ROT*)
Position : McLSPosType; (*Movement range of the axis via two position boundaries*)
Velocity : McLSVelType; (*Velocity limits*)
Acceleration : McLSAccType; (*Acceleration limits*)
Deceleration : McLSDecType; (*Deceleration limits*)
Jerk : McCfgLimJerkType; (*Jerk limits*)
Torque : McCfgLimTorqType; (*Torque limits*)
END_STRUCT;
McPPLPtEnum :
( (*Process point: {/} selector setting*)
mcPPLP_TRAK_PT := 0 (*Trak point - ACOPOSTrak*)
);
McPPLPtTrakPtPosRelToEnum :
( (*Absolute position from which the position is counted*)
mcPPLPTPPRT_ST_OF_SEC := 0, (*Start of sector - Tail of the sector*)
mcPPLPTPPRT_END_OF_SEC := 1 (*End of sector - Head of the sector*)
);
McPPLPtTrakPtBarrFunEnum :
( (*Barrier functionality selector setting*)
mcPPLPTPBF_OFF := 0, (*Off - Disable barrier functionality*)
mcPPLPTPBF_ON := 1 (*On - Enable barrier functionality*)
);
McPPLPtTrakPtBarrFunType : STRUCT (*Enable barrier functionality for process point*)
Type : McPPLPtTrakPtBarrFunEnum; (*Barrier functionality selector setting*)
END_STRUCT;
McPPLPtTrakPtType : STRUCT (*Type mcPPLP_TRAK_PT settings*)
Name : STRING[250]; (*Identifier of point*)
SectorReference : McCfgReferenceType; (*Name of the referenced sector component*)
Position : LREAL; (*Position on the sector [Measurement units]*)
PositionRelativeTo : McPPLPtTrakPtPosRelToEnum; (*Absolute position from which the position is counted*)
TriggerEventBufferSize : UINT; (*Amount of maximum saved trigger point events*)
BarrierFunctionality : McPPLPtTrakPtBarrFunType; (*Enable barrier functionality for process point*)
END_STRUCT;
McPPLPtType : STRUCT
Type : McPPLPtEnum; (*Process point: {/} selector setting*)
TrakPoint : McPPLPtTrakPtType; (*Type mcPPLP_TRAK_PT settings*)
END_STRUCT;
McCfgProcPtLstType : STRUCT (*Main data type corresponding to McCfgTypeEnum mcCFG_PROC_PT_LST*)
ProcessPoints : McCfgUnboundedArrayType;
END_STRUCT;
McCfgLocLenUnitEnum :
( (*Measurement unit for the axis*)
mcCLLU_G_SET := 0, (*Global settings*)
mcCLLU_MILL := 5066068, (*Millimeters*)
mcCLLU_M := 5067858, (*Meters*)
mcCLLU_INCH := 4804168, (*Inches*)
mcCLLU_GEN := -1 (*Generic*)
);
McCfgCntDirEnum :
( (*Direction of the axis in which the position value is increasing*)
mcCCD_STD := 0, (*Standard - Rotary axis: clockwise*)
mcCCD_INV := 1 (*Inverse - Rotary axis: counter-clockwise*)
);
McCfgLocRotUnitEnum :
( (*Measurement unit for the axis*)
mcCLRU_G_SET := 0, (*Global settings*)
mcCLRU_DEG := 17476, (*Degrees*)
mcCLRU_GRAD := 4274481, (*Gradians*)
mcCLRU_REV := 5059636, (*Revolutions*)
mcCLRU_GEN := -1 (*Generic*)
);
McCfgExtLimRefType : STRUCT (*Type mcAML_EXT settings*)
LimitReference : McCfgReferenceType; (*Name of the limit reference*)
END_STRUCT;
McCfgGearBoxType : STRUCT (*Ratio between a gearbox input and output*)
Input : DINT; (*Number of rotations on the encoder side [Revolutions]*)
Output : DINT; (*Number of rotations on the load side which correspond to the number of rotations on the encoder side [Revolutions]*)
END_STRUCT;
McCfgRotToLinTrfType : STRUCT (*Specifies a transformation factor between the output of the gear and the actual load movement*)
ReferenceDistance : LREAL; (*Reference distance which is considered for an axis positioning [Measurement units/Gearbox output revolution]*)
END_STRUCT;
McPTCEnum :
( (*Cyclic task class for command processing*)
mcPTC_CYC_1 := 1, (*Cyclic #1 - Task class 1*)
mcPTC_USE_MP_MOT_SET := 255 (*Use mapp Motion setting - Use the defined setting from the mapp Motion configuration or Task class 1 if no mapp Motion Configuration exists*)
);
McCfgLimJerkBaseType : STRUCT (*Type mcAGFPDPLIJ_BASIC settings*)
Jerk : REAL; (*Jerk limit in any movement direction [Measurement units/s³]*)
END_STRUCT;
McCfgTransXType : STRUCT (*Translation from base to QX*)
X : LREAL; (*Translation in X direction [measurement units]*)
END_STRUCT;
McCfgTransZType : STRUCT (*Translation from QX to QZ*)
Z : LREAL; (*Translation in Z direction [measurement units]*)
END_STRUCT;
McCfgTransXZType : STRUCT (*Translation from QZ to QB*)
X : LREAL; (*Translation in X direction [measurement units]*)
Z : LREAL; (*Translation in Z direction [measurement units]*)
END_STRUCT;
McCfgTransYType : STRUCT (*Translation from QX to QY*)
Y : LREAL; (*Translation in Y direction [measurement units]*)
END_STRUCT;
END_TYPE

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More