Workbackup

This commit is contained in:
2023-12-08 16:22:22 +01:00
parent 12f2409a82
commit 549e55300d
48 changed files with 1553 additions and 197 deletions

View File

@@ -13,6 +13,7 @@
<TechnologyPackages>
<mapp Version="5.13.0" />
<mappCockpit Version="5.13.1" />
<mappControl Version="5.13.0" />
<mappMotion McAcpDrv="5.13.1" McAcpSim="5.13.1" McAcpSys="5.13.1" McMechSys="5.13.1" McPathXT="5.13.1" McProfGen="5.13.1" Version="5.13.1" />
<mappView Version="5.13.0" />
<TextSystem udbdef="0.1.0" />

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio Version=4.3.4.121 SP?>
<Library Version="5.00.0" Description="This mechatronics library contains basic control function blocks." xmlns="http://br-automation.co.at/AS/Library">
<?AutomationStudio FileVersion="4.9"?>
<Library Version="5.13.0" SubType="binary" Description="This mechatronics library contains basic control function blocks." xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>MTBasics.fun</File>
<File>MTBasics.typ</File>

View File

@@ -1,5 +1,5 @@
{REDUND_OK} FUNCTION_BLOCK MTBasicsDT1 (*First-order derivative action element.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_OK} FUNCTION_BLOCK MTBasicsDT1 (*First-order derivative action element.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
Gain : REAL; (*Gain factor.*)
@@ -21,7 +21,7 @@
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTBasicsDT2 (*Second-order derivative action element.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_OK} FUNCTION_BLOCK MTBasicsDT2 (*Second-order derivative action element.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
Gain : REAL; (*Gain factor.*)
@@ -44,7 +44,7 @@ END_FUNCTION_BLOCK
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTBasicsIntegrator (*Integrator.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_OK} FUNCTION_BLOCK MTBasicsIntegrator (*Integrator.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
Gain : REAL; (*Gain factor. Valid value range: Gain >= 0.*)
@@ -68,7 +68,7 @@ END_FUNCTION_BLOCK
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTBasicsLevelController (*Level controller.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_OK} FUNCTION_BLOCK MTBasicsLevelController (*Level controller.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
Parameter : MTBasicsLevelCtrlParType; (*3-step controller parameters.*)
@@ -87,7 +87,7 @@ END_FUNCTION_BLOCK
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTBasicsLimiter (*Limiter.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_OK} FUNCTION_BLOCK MTBasicsLimiter (*Limiter.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
MinOut : REAL; (*Lower output variable limit. Valid value range: MinOut < MaxOut.*)
@@ -111,7 +111,7 @@ END_FUNCTION_BLOCK
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTBasicsOscillationTuning (*Oscillation tuning for PID.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_OK} FUNCTION_BLOCK MTBasicsOscillationTuning (*Oscillation tuning for PID.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
SetValue : REAL; (*Reference variable (setpoint).*)
@@ -138,7 +138,7 @@ END_FUNCTION_BLOCK
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTBasicsPFM (*Pulse frequency modulator.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_OK} FUNCTION_BLOCK MTBasicsPFM (*Pulse frequency modulator.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
PulseWidth : REAL; (*Pulse width at the output. Unit: [s]. Valid value range: PulseWidth >= task cycle time.*)
@@ -158,7 +158,7 @@ END_FUNCTION_BLOCK
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTBasicsPID (*PID controller.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_OK} FUNCTION_BLOCK MTBasicsPID (*PID controller.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
PIDParameters : MTPIDParametersType; (*PID parameters.*)
@@ -195,7 +195,7 @@ END_FUNCTION_BLOCK
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTBasicsPT1 (*First-order delay element.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_OK} FUNCTION_BLOCK MTBasicsPT1 (*First-order delay element.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
Gain : REAL; (*Gain factor.*)
@@ -219,7 +219,7 @@ END_FUNCTION_BLOCK
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTBasicsPT2 (*Second-order delay element.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_OK} FUNCTION_BLOCK MTBasicsPT2 (*Second-order delay element.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
Gain : REAL; (*Gain.*)
@@ -244,7 +244,7 @@ END_FUNCTION_BLOCK
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTBasicsPWM (*Pulse width modulator.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_OK} FUNCTION_BLOCK MTBasicsPWM (*Pulse width modulator.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
Mode : MTBasicsPWMModeEnum; (*Pulse mode.*)
@@ -265,7 +265,7 @@ END_FUNCTION_BLOCK
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} FUNCTION_BLOCK MTBasicsPWMSchedule (*Multiple pulse width modulator.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_CONTEXT} FUNCTION_BLOCK MTBasicsPWMSchedule (*Multiple pulse width modulator.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
Period : REAL; (*Period for the output actuator pulses. Unit: [s]. Permitted range of values: Period > Task cycle time.*)
@@ -296,7 +296,7 @@ END_FUNCTION_BLOCK
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTBasicsStepTuning (*Step tuning for PID.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_OK} FUNCTION_BLOCK MTBasicsStepTuning (*Step tuning for PID.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
SystemSettlingTime : REAL; (*System settling time.*)
@@ -325,7 +325,7 @@ END_FUNCTION_BLOCK
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} FUNCTION_BLOCK MTBasicsTimeDelay (*Delay element.*) (* $GROUP=mapp Control,$CAT=mapp Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_mappControlTools.png *)
{REDUND_CONTEXT} FUNCTION_BLOCK MTBasicsTimeDelay (*Delay element.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
DelayTime : REAL; (*Delay time. Unit: [s]. Valid value range: 0 <= DelayTime <= "10000 <EFBFBD> task cycle time".*)
@@ -342,3 +342,28 @@ END_FUNCTION_BLOCK
Internal : MTBasicsTimeDelayInternalType; (*Data for internal use.*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTBasicsTransferFcn (*This function block implements a general continuous transfer function G(s). Optional it is possible to implement a discrete transfer function G(z) with DiscreteSampleTime > 0.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enable function block.*) (* *) (*#PAR#*)
Numerator : ARRAY[0..5] OF REAL; (*Coefficients of numerator [b0, b1, b2, ... bn].*) (* *) (*#PAR#*)
Denominator : ARRAY[0..5] OF REAL; (*Coefficients of denominator [a0, a1, a2, ... an].*) (* *) (*#PAR#*)
Mode : MTBasicsTransferFcnModeEnum; (*Mode for transfer function: mtBASICS_CONTINUOUS_TRANSFER_FCN ... continuous transfer fcn; mtBASICS_DISCRETE_TRANSFER_FCN ... discrete transfer function.*) (* *) (*#PAR#OPT#*)
Update : BOOL; (*Parameters update trigger.*) (* *) (*#PAR#*)
In : REAL; (*Input variable.*) (* *) (*#CYC#*)
OutPresetValue : REAL; (*Preset value for Out.*) (* *) (*#CMD#OPT#*)
SetOut : BOOL; (*Sets Out to OutPresetValue on rising edge.*) (* *) (*#CMD#OPT#*)
END_VAR
VAR_OUTPUT
Busy : BOOL; (*Function block is working.*) (* *) (*#PAR#*)
Active : BOOL; (*Function block is active.*) (* *) (*#PAR#*)
Error : BOOL; (*Indicates an error.*) (* *) (*#PAR#*)
StatusID : DINT; (*Status information.*) (* *) (*#PAR#*)
UpdateDone : BOOL; (*Update is sucessful.*) (* *) (*#PAR#*)
Out : REAL; (*Output variable.*) (* *) (*#CYC#*)
SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*) (* *) (*#CMD#OPT#*)
END_VAR
VAR
Internal : MTBasicsTransferFcnInternalType; (*Data for internal use.*)
END_VAR
END_FUNCTION_BLOCK

View File

@@ -135,14 +135,12 @@ TYPE
MTBasicsPFMInternalType : STRUCT (*Internal variables of function block MTBasicsPFM.*)
CycleTime : REAL; (*Task cycle time. Unit: [s].*)
ParametersValid : BOOL; (*Data for internal use.*)
In : REAL; (*Data for internal use.*)
PulseWidth : REAL; (*Data for internal use.*)
MinPause : REAL; (*Data for internal use.*)
Area : REAL; (*Data for internal use.*)
AreaC : REAL; (*Data for internal use.*)
OffTime : REAL; (*Data for internal use.*)
In : REAL; (*Data for internal use.*)
OnTime : REAL; (*Data for internal use.*)
Update : BOOL; (*Data for internal use.*)
OffTime : REAL; (*Data for internal use.*)
PeriodCounter : REAL; (*Data for internal use.*)
MinPause : REAL; (*Data for internal use.*)
UpdateOld : BOOL; (*Data for internal use.*)
EnableOld : BOOL; (*Data for internal use.*)
END_STRUCT;
@@ -339,4 +337,33 @@ TYPE
EnableOld : BOOL; (*Data for internal use.*)
TimeDelayFcnPara : {REDUND_UNREPLICABLE} MTBasicsTimeDelayFcnParaType; (*Data for internal use.*)
END_STRUCT;
MTBasicsTransferFcnModeEnum :
( (*Transfer function mode.*)
mtBASICS_CONTINUOUS_TRANSFER_FCN := 0, (*Continuous transfer function.*)
mtBASICS_DISCRETE_TRANSFER_FCN := 1 (*Discrete transfer function. Sample time = cycle time.*)
);
MTBasicsTransferFcnInternalType : STRUCT (*Internal variables of function block MTBasicsTransferFcn.*)
CycleTime : REAL; (*Task cycle time. Unit: [s].*)
UpdateOld : BOOL; (*Data for internal use.*)
EnableOld : BOOL; (*Data for internal use.*)
EnableDone : BOOL; (*Data for internal use.*)
DisabledBusy : USINT; (*Data for internal use.*)
ParametersValid : BOOL; (*Data for internal use.*)
Numerator : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
Denominator : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
Mode : MTBasicsTransferFcnModeEnum; (*Data for internal use.*)
SysRefParaNew : BOOL; (*Data for internal use.*)
CounterOld : UDINT; (*Data for internal use.*)
Order : USINT; (*Data for internal use.*)
PresetOK : BOOL; (*Data for internal use.*)
PresetCoefficients : LREAL; (*Data for internal use.*)
BVector : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
AVector : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
XVector : ARRAY[0..4]OF LREAL; (*Data for internal use.*)
OutPresetValue : REAL; (*Data for internal use.*)
SetOut : BOOL; (*Data for internal use.*)
SetOutOld : BOOL; (*Data for internal use.*)
nTmp : USINT; (*Data for internal use.*)
SystemReference : MTTransferFcnType; (*Data for internal use.*)
END_STRUCT;
END_TYPE

View File

@@ -23,6 +23,9 @@ VAR CONSTANT
mtBCD_ERR_MIN_PAUSE_HIGH : DINT := -1058012112; (*The selected minimum pause duration is too high.*)
mtBCD_ERR_MODE_INVALID : DINT := -1058012111; (*The selected mode is invalid.*)
mtBCD_ERR_NULL_PTR : DINT := -1058012110; (*Null pointer passed to the input.*)
mtBCD_ERR_DENOM_COEFF_INVALID : DINT := -1058012109; (*Error: Denominator coefficient Denominator[Order] is 0.*)
mtBCD_ERR_TF_ORDER_NOT_MINIMAL : DINT := -1058012108; (*Error: Order of transfer function not minimal.*)
mtBCD_ERR_NON_REALIZABLE_TF : DINT := -1058012106; (*Error: The transfer function is not realizable.*)
END_VAR
(*Warning*)
VAR CONSTANT
@@ -50,6 +53,10 @@ VAR CONSTANT
mtBCD_WRN_RANGE_INVALID : DINT := -2131753938; (*Chosen limitations for the input are invalid.*)
mtBCD_WRN_MIN_PAUSE_HIGH : DINT := -2131753937; (*The selected minimum pause duration is too high.*)
mtBCD_WRN_MODE_INVALID : DINT := -2131753936; (*The selected mode is invalid.*)
mtBCD_WRN_DENOM_COEFF_INVALID : DINT := -2131753933; (*Warning: Denominator coefficients are zero. Retaining the last valid configuration.*)
mtBCD_WRN_TF_ORDER_NOT_MINIMAL : DINT := -2131753932; (*Warning: Order is not minimal. Retaining the last valid configuration.*)
mtBCD_WRN_TF_PRESET_INVALID : DINT := -2131753931; (*Warning: The preset output value is invalid.*)
mtBCD_WRN_NON_REALIZABLE_TF : DINT := -2131753930; (*Warning: The transfer function is not realizable.*)
END_VAR
(*Information*)
VAR CONSTANT

View File

@@ -22,6 +22,10 @@ extern "C"
#define mtBCD_INF_TUNING_ABORTED_BY_USER 1089471511
#define mtBCD_INF_TIME_CONSTANT2_ZERO 1089471510
#define mtBCD_INF_TIME_CONSTANT1_ZERO 1089471509
#define mtBCD_WRN_NON_REALIZABLE_TF (-2131753930)
#define mtBCD_WRN_TF_PRESET_INVALID (-2131753931)
#define mtBCD_WRN_TF_ORDER_NOT_MINIMAL (-2131753932)
#define mtBCD_WRN_DENOM_COEFF_INVALID (-2131753933)
#define mtBCD_WRN_MODE_INVALID (-2131753936)
#define mtBCD_WRN_MIN_PAUSE_HIGH (-2131753937)
#define mtBCD_WRN_RANGE_INVALID (-2131753938)
@@ -46,6 +50,9 @@ extern "C"
#define mtBCD_WRN_THRESHOLD_NOT_DEFINED (-2131753961)
#define mtBCD_WRN_TIME_CONSTANT2_INVALID (-2131753962)
#define mtBCD_WRN_TIME_CONSTANT1_INVALID (-2131753963)
#define mtBCD_ERR_NON_REALIZABLE_TF (-1058012106)
#define mtBCD_ERR_TF_ORDER_NOT_MINIMAL (-1058012108)
#define mtBCD_ERR_DENOM_COEFF_INVALID (-1058012109)
#define mtBCD_ERR_NULL_PTR (-1058012110)
#define mtBCD_ERR_MODE_INVALID (-1058012111)
#define mtBCD_ERR_MIN_PAUSE_HIGH (-1058012112)
@@ -76,6 +83,10 @@ extern "C"
_GLOBAL_CONST signed long mtBCD_INF_TUNING_ABORTED_BY_USER;
_GLOBAL_CONST signed long mtBCD_INF_TIME_CONSTANT2_ZERO;
_GLOBAL_CONST signed long mtBCD_INF_TIME_CONSTANT1_ZERO;
_GLOBAL_CONST signed long mtBCD_WRN_NON_REALIZABLE_TF;
_GLOBAL_CONST signed long mtBCD_WRN_TF_PRESET_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_TF_ORDER_NOT_MINIMAL;
_GLOBAL_CONST signed long mtBCD_WRN_DENOM_COEFF_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_MODE_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_MIN_PAUSE_HIGH;
_GLOBAL_CONST signed long mtBCD_WRN_RANGE_INVALID;
@@ -100,6 +111,9 @@ extern "C"
_GLOBAL_CONST signed long mtBCD_WRN_THRESHOLD_NOT_DEFINED;
_GLOBAL_CONST signed long mtBCD_WRN_TIME_CONSTANT2_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_TIME_CONSTANT1_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_NON_REALIZABLE_TF;
_GLOBAL_CONST signed long mtBCD_ERR_TF_ORDER_NOT_MINIMAL;
_GLOBAL_CONST signed long mtBCD_ERR_DENOM_COEFF_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_NULL_PTR;
_GLOBAL_CONST signed long mtBCD_ERR_MODE_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_MIN_PAUSE_HIGH;
@@ -146,6 +160,11 @@ typedef enum MTBasicsStepTuningStateEnum
mtBASICS_STATE_CALCULATE_PID = 4
} MTBasicsStepTuningStateEnum;
typedef enum MTBasicsTransferFcnModeEnum
{ mtBASICS_CONTINUOUS_TRANSFER_FCN = 0,
mtBASICS_DISCRETE_TRANSFER_FCN = 1
} MTBasicsTransferFcnModeEnum;
typedef struct MTBasicsDT1InternalType
{ float CycleTime;
plcbit ParametersValid;
@@ -288,14 +307,12 @@ typedef struct MTBasicsOscTuningInternalType
typedef struct MTBasicsPFMInternalType
{ float CycleTime;
plcbit ParametersValid;
float In;
float PulseWidth;
float MinPause;
float Area;
float AreaC;
float OffTime;
float In;
float OnTime;
plcbit Update;
float OffTime;
float PeriodCounter;
float MinPause;
plcbit UpdateOld;
plcbit EnableOld;
} MTBasicsPFMInternalType;
@@ -487,6 +504,31 @@ typedef struct MTBasicsTimeDelayInternalType
struct MTBasicsTimeDelayFcnParaType TimeDelayFcnPara;
} MTBasicsTimeDelayInternalType;
typedef struct MTBasicsTransferFcnInternalType
{ float CycleTime;
plcbit UpdateOld;
plcbit EnableOld;
plcbit EnableDone;
unsigned char DisabledBusy;
plcbit ParametersValid;
double Numerator[6];
double Denominator[6];
enum MTBasicsTransferFcnModeEnum Mode;
plcbit SysRefParaNew;
unsigned long CounterOld;
unsigned char Order;
plcbit PresetOK;
double PresetCoefficients;
double BVector[6];
double AVector[6];
double XVector[5];
float OutPresetValue;
plcbit SetOut;
plcbit SetOutOld;
unsigned char nTmp;
struct MTTransferFcnType SystemReference;
} MTBasicsTransferFcnInternalType;
typedef struct MTBasicsDT1
{
/* VAR_INPUT (analog) */
@@ -831,6 +873,31 @@ typedef struct MTBasicsTimeDelay
plcbit Error;
} MTBasicsTimeDelay_typ;
typedef struct MTBasicsTransferFcn
{
/* VAR_INPUT (analog) */
float Numerator[6];
float Denominator[6];
enum MTBasicsTransferFcnModeEnum Mode;
float In;
float OutPresetValue;
/* VAR_OUTPUT (analog) */
signed long StatusID;
float Out;
unsigned long SystemReference;
/* VAR (analog) */
struct MTBasicsTransferFcnInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Enable;
plcbit Update;
plcbit SetOut;
/* VAR_OUTPUT (digital) */
plcbit Busy;
plcbit Active;
plcbit Error;
plcbit UpdateDone;
} MTBasicsTransferFcn_typ;
/* Prototyping of functions and function blocks */
@@ -848,6 +915,7 @@ _BUR_PUBLIC void MTBasicsPWM(struct MTBasicsPWM* inst);
_BUR_PUBLIC void MTBasicsPWMSchedule(struct MTBasicsPWMSchedule* inst);
_BUR_PUBLIC void MTBasicsStepTuning(struct MTBasicsStepTuning* inst);
_BUR_PUBLIC void MTBasicsTimeDelay(struct MTBasicsTimeDelay* inst);
_BUR_PUBLIC void MTBasicsTransferFcn(struct MTBasicsTransferFcn* inst);
#ifdef __cplusplus

View File

@@ -0,0 +1,183 @@
{REDUND_OK} FUNCTION_BLOCK MTFilterBandPass (*Band-pass filter.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
Type : MTFilterTypeEnum; (*Filter type. Valid value range: mtBESSEL, mtBUTTERWORTH*)
Order : USINT; (*Filter order. Valid value range: {1,2}.*)
CenterFrequency : REAL; (*Center frequency. Unit: [Hz]. Valid value range: 0 < CenterFrequency < Sampling frequency/2. Sampling frequency = 1/task cycle time.*)
Bandwidth : REAL; (*Bandwidth. Unit: [Hz]. Valid value range: 0 < Bandwidth < 2<EFBFBD>CenterFrequency.*)
Update : BOOL; (*Updates the parameters listed above on rising edge.*)
In : REAL; (*Input value.*)
END_VAR
VAR_OUTPUT
Busy : BOOL; (*Function block is working.*)
Active : BOOL; (*Function block is active.*)
Error : BOOL; (*Indicates an error.*)
StatusID : DINT; (*Status information.*)
UpdateDone : BOOL; (*Update is done.*)
Out : REAL; (*Output value.*)
SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*)
END_VAR
VAR
Internal : MTFilterBandPassInternalType; (*Data for internal use.*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTFilterBandStop (*Band-stop filter.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
Type : MTFilterTypeEnum; (*Filter type. Valid value range: mtBESSEL, mtBUTTERWORTH*)
Order : USINT; (*Filter order. Valid value range: {1,2}.*)
CenterFrequency : REAL; (*Center frequency. Unit: [Hz]. Valid value range: 0 < CenterFrequency < Sampling frequency/2. Sampling frequency = 1/task cycle time.*)
Bandwidth : REAL; (*Bandwidth. Unit: [Hz]. Valid value range: 0 < Bandwidth < 2<EFBFBD>CenterFrequency.*)
Update : BOOL; (*Updates the parameters listed above on rising edge.*)
In : REAL; (*Input value.*)
END_VAR
VAR_OUTPUT
Busy : BOOL; (*Function block is working.*)
Active : BOOL; (*Function block is active.*)
Error : BOOL; (*Indicates an error.*)
StatusID : DINT; (*Status information.*)
UpdateDone : BOOL; (*Update is done.*)
Out : REAL; (*Output value.*)
SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*)
END_VAR
VAR
Internal : MTFilterBandStopInternalType; (*Data for internal use.*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTFilterBiQuad (*Biquad filter.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
CenterFrequencyNum : REAL; (*Filter frequency numerator. Unit: [Hz]. Valid value range: 0 < FrequencyNumerator < 0.5<EFBFBD>Sampling frequency. Sampling frequency = 1/task cycle time.*)
DampingRatioNum : REAL; (*Damping numerator. Valid value range: 0 = DampingRatioNumerator = 1.*)
CenterFrequencyDen : REAL; (*Filter frequency denominator. Unit: [Hz]. Valid value range: 0 < FrequencyDenominator < 0.5<EFBFBD>Sampling frequency. Sampling frequency = 1/task cycle time.*)
DampingRatioDen : REAL; (*Damping denominator. Valid value range: 0 = DampingRatioDenominator = 1*)
Update : BOOL; (*Updates the parameters listed above on rising edge.*)
In : REAL; (*Input value.*)
END_VAR
VAR_OUTPUT
Busy : BOOL; (*Function block is working.*)
Active : BOOL; (*Function block is active.*)
Error : BOOL; (*Indicates an error.*)
StatusID : DINT; (*Status information.*)
UpdateDone : BOOL; (*Update is done.*)
Out : REAL; (*Output value.*)
SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*)
END_VAR
VAR
Internal : MTFilterBiQuadInternalType; (*Data for internal use.*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTFilterHighPass (*High-pass filter.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
Type : MTFilterTypeEnum; (*Filter type. Valid value range: mtBESSEL, mtBUTTERWORTH*)
Order : USINT; (*Filter order. Valid value range: {1,2,..,5}.*)
CutOffFrequency : REAL; (*Cut-off frequency. Unit: [Hz]. Valid value range: 0 < CutOffFrequency < Sampling frequency/2. Sampling frequency = 1/task cycle time.*)
Update : BOOL; (*Updates the parameters listed above on rising edge.*)
In : REAL; (*Input value.*)
END_VAR
VAR_OUTPUT
Busy : BOOL; (*Function block is working.*)
Active : BOOL; (*Function block is active.*)
Error : BOOL; (*Indicates an error.*)
StatusID : DINT; (*Status information.*)
UpdateDone : BOOL; (*Update is done.*)
Out : REAL; (*Output value.*)
SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*)
END_VAR
VAR
Internal : MTFilterHighPassInternalType; (*Data for internal use.*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTFilterLowPass (*Low-pass filter.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
Type : MTFilterTypeEnum; (*Filter type. Valid value range: mtBESSEL, mtBUTTERWORTH*)
Order : USINT; (*Filter order. Valid value range: {1,2,..,5}.*)
CutOffFrequency : REAL; (*Cut-off frequency. Unit: [Hz]. Valid value range: 0 < CutOffFrequency < Sampling frequency/2. Sampling frequency = 1/task cycle time.*)
Update : BOOL; (*Updates the parameters listed above on rising edge.*)
In : REAL; (*Input value.*)
END_VAR
VAR_OUTPUT
Busy : BOOL; (*Function block is working.*)
Active : BOOL; (*Function block is active.*)
Error : BOOL; (*Indicates an error.*)
StatusID : DINT; (*Status information.*)
UpdateDone : BOOL; (*Update is done.*)
Out : REAL; (*Output value.*)
SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*)
END_VAR
VAR
Internal : MTFilterLowPassInternalType; (*Data for internal use.*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_CONTEXT} FUNCTION_BLOCK MTFilterMovingAverage (*Moving average filter.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
WindowLength : UINT; (*Length of the moving view window. Numbers of values to be averaged Valid value range: 0 < WindowLength < 10000.*)
Update : BOOL; (*Updates the parameters listed above on rising edge.*)
In : REAL; (*Input value.*)
END_VAR
VAR_OUTPUT
Active : BOOL; (*Function block is active.*)
Error : BOOL; (*Indicates an error.*)
StatusID : DINT; (*Status information.*)
UpdateDone : BOOL; (*Update is done.*)
Out : REAL; (*Floating average value.*)
END_VAR
VAR
Internal : MTFilterMovingAvgInternalType; (*Data for internal use.*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTFilterNotch (*Notch filter.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enables/Disables the function block.*)
CenterFrequency : REAL; (*Center frequency. Unit: [Hz]. Valid value range: 0 < CenterFrequency < Sampling frequency/2. Sampling frequency = 1/task cycle time.*)
Bandwidth : REAL; (*Bandwidth. Unit: [Hz]. Valid value range: 0 < Bandwidth < 2<EFBFBD>CenterFrequency.*)
Update : BOOL; (*Updates the parameters listed above on rising edge.*)
In : REAL; (*Input value.*)
END_VAR
VAR_OUTPUT
Busy : BOOL; (*Function block is working.*)
Active : BOOL; (*Function block is active.*)
Error : BOOL; (*Indicates an error.*)
StatusID : DINT; (*Status information.*)
UpdateDone : BOOL; (*Update is done.*)
Out : REAL; (*Output value.*)
SystemReference : {REDUND_UNREPLICABLE} UDINT; (*System reference.*)
END_VAR
VAR
Internal : MTFilterNotchInternalType; (*Data for internal use.*)
END_VAR
END_FUNCTION_BLOCK
{REDUND_OK} FUNCTION_BLOCK MTFilterKalman (*Kalman filter.*) (* $GROUP=mapp Control,$CAT=Control Tools,$GROUPICON=Icon_mapp.png,$CATICON=Icon_MpControlTools.png *)
VAR_INPUT
Enable : BOOL; (*Enable function block.*) (* *) (*#PAR#*)
Numerator : ARRAY[0..4] OF REAL; (*Numerator coefficients [b0, b1, b2, ..., bn]*) (* *) (*#PAR#*)
Denominator : ARRAY[0..4] OF REAL; (*Denominator coefficients [a0, a1, a2, ..., an]*) (* *) (*#PAR#*)
NoiseReduction : REAL := 2; (*Noise reduction factor.*) (* *) (*#PAR#OPT#*)
DisturbanceModel : MTFilterKalmanDisturbanceType; (*Disturbance model mode.*) (* *) (*#PAR#OPT#*)
Update : BOOL; (*Parameters update trigger.*) (* *) (*#PAR#*)
SystemInput : REAL; (*Input signal of the system.*) (* *) (*#CYC#*)
SystemOutput : REAL; (*Output signal of the system.*) (* *) (*#CYC#*)
END_VAR
VAR_OUTPUT
Active : BOOL; (*Function block is active.*) (* *) (*#PAR#*)
Error : BOOL; (*Indicates an error.*) (* *) (*#PAR#*)
StatusID : DINT; (*Status information.*) (* *) (*#PAR#*)
UpdateDone : BOOL; (*Update is sucessful.*) (* *) (*#PAR#*)
FilteredOutput : ARRAY[0..1] OF REAL; (*Filtered output signal of the system and the first derivative.*) (* *) (*#CYC#*)
Disturbance : REAL; (*Filtered Disturbance.*) (* *) (*#CYC##OPT#*)
END_VAR
VAR
Internal : MTFilterKalmanInternalType; (*Data for internal use.*)
END_VAR
END_FUNCTION_BLOCK

View File

@@ -0,0 +1,219 @@
TYPE
MTFilterMovingAvgInternalType : STRUCT (*Internal variables of function block MTFilterMovingAverage.*)
Ts : REAL; (*Data for internal use.*)
ParameterValid : BOOL; (*Data for internal use.*)
NumOfElmements : UINT; (*Number of elements of calculating output.*)
Sum : LREAL; (*Data for internal use.*)
pBuffer : {REDUND_UNREPLICABLE} UDINT; (*Data for internal use.*)
CntAct : UINT; (*Data for internal use.*)
CntOld : UINT; (*Data for internal use.*)
WindowLength : UINT; (*Data for internal use.*)
BufferLength : UINT; (*Length of window.*)
BufferFull : BOOL; (*Data for internal use.*)
MemAllocated : BOOL; (*Data for internal use.*)
Update : BOOL; (*Data for internal use.*)
UpdateOld : BOOL; (*Data for internal use.*)
EnableOld : BOOL; (*Data for internal use.*)
statusTMP : UINT; (*Data for internal use.*)
END_STRUCT;
MTFilterTypeEnum :
( (*Filtertype.*)
mtFILTER_BESSEL := 0, (*Bessel Filter.*)
mtFILTER_BUTTERWORTH := 1 (*Butterworth Filter.*)
);
MTFilterLowPassInternalType : STRUCT (*Internal variables of function block MTFilterLowPass.*)
Ts : REAL; (*Task cycle time. Unit: [s].*)
SamplingFrequency : LREAL; (*Sampling frequency. Unit: [Hz].*)
ParameterValid : BOOL; (*Data for internal use.*)
AngularFrequency : LREAL; (*Data for internal use.*)
Num : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
Den : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
BVector : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
AVector : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
XVector : ARRAY[0..4]OF LREAL; (*Data for internal use.*)
TypeOld : USINT; (*Data for internal use.*)
OrderOld : USINT; (*Data for internal use.*)
CutOffFrequencyOld : REAL; (*Data for internal use.*)
UpdateOld : BOOL; (*Data for internal use.*)
EnableOld : BOOL; (*Data for internal use.*)
EnableDone : BOOL; (*Data for internal use.*)
DisabledBusy : BOOL; (*Data for internal use.*)
CounterOld : UDINT; (*Data for internal use.*)
SysRefParaNew : BOOL; (*Data for internal use.*)
SystemReference : MTTransferFcnType; (*Data for internal use.*)
END_STRUCT;
MTFilterHighPassInternalType : STRUCT (*Internal variables of function block MTFilterHighPass.*)
Ts : REAL; (*Task cycle time. Unit: [s].*)
SamplingFrequency : LREAL; (*Sampling frequency. Unit: [Hz].*)
ParameterValid : BOOL; (*Data for internal use.*)
AngularFrequency : LREAL; (*Frequency in radians*)
Num : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
Den : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
BVector : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
AVector : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
XVector : ARRAY[0..4]OF LREAL; (*Data for internal use.*)
TypeOld : USINT; (*Data for internal use.*)
OrderOld : USINT; (*Data for internal use.*)
CutOffFrequencyOld : REAL; (*Data for internal use.*)
UpdateOld : BOOL; (*Data for internal use.*)
EnableOld : BOOL; (*Data for internal use.*)
EnableDone : BOOL; (*Data for internal use.*)
DisabledBusy : BOOL; (*Data for internal use.*)
CounterOld : UDINT; (*Data for internal use.*)
SysRefParaNew : BOOL; (*Data for internal use.*)
SystemReference : MTTransferFcnType; (*Data for internal use.*)
END_STRUCT;
MTFilterBandPassInternalType : STRUCT (*Internal variables of function block MTFilterBandPass.*)
Ts : REAL; (*Task cycle time. Unit: [s].*)
SamplingFrequency : LREAL; (*Sampling frequency. Unit: [Hz].*)
ParameterValid : BOOL; (*Data for internal use.*)
AngularFrequency : LREAL; (*Frequency in radians*)
BandwidthRad : LREAL; (*Frequency in radians*)
Num : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
Den : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
BVector : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
AVector : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
XVector : ARRAY[0..4]OF LREAL; (*Data for internal use.*)
TypeOld : USINT; (*Data for internal use.*)
OrderOld : USINT; (*Data for internal use.*)
CenterFrequencyOld : REAL; (*Data for internal use.*)
BandwidthOld : REAL; (*Data for internal use.*)
UpdateOld : BOOL; (*Data for internal use.*)
EnableOld : BOOL; (*Data for internal use.*)
EnableDone : BOOL; (*Data for internal use.*)
DisabledBusy : BOOL; (*Data for internal use.*)
CounterOld : UDINT; (*Data for internal use.*)
SysRefParaNew : BOOL; (*Data for internal use.*)
SystemReference : MTTransferFcnType; (*Data for internal use.*)
END_STRUCT;
MTFilterBandStopInternalType : STRUCT (*Internal variables of function block MTFilterBandStop.*)
Ts : REAL; (*Task cycle time. Unit: [s].*)
SamplingFrequency : LREAL; (*Sampling frequency. Unit: [Hz].*)
ParameterValid : BOOL; (*Data for internal use.*)
AngularFrequency : LREAL; (*Data for internal use.*)
BandwidthRad : LREAL; (*Frequency in radians*)
Num : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
Den : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
BVector : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
AVector : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
XVector : ARRAY[0..4]OF LREAL; (*Data for internal use.*)
TypeOld : USINT; (*Data for internal use.*)
OrderOld : USINT; (*Data for internal use.*)
CenterFrequencyOld : REAL; (*Data for internal use.*)
BandwidthOld : REAL; (*Data for internal use.*)
UpdateOld : BOOL; (*Data for internal use.*)
EnableOld : BOOL; (*Data for internal use.*)
EnableDone : BOOL; (*Data for internal use.*)
DisabledBusy : BOOL; (*Data for internal use.*)
CounterOld : UDINT; (*Data for internal use.*)
SysRefParaNew : BOOL; (*Data for internal use.*)
SystemReference : MTTransferFcnType; (*Data for internal use.*)
END_STRUCT;
MTFilterNotchInternalType : STRUCT (*Internal variables of function block MTFilterNotch.*)
Ts : REAL; (*Task cycle time. Unit: [s].*)
SamplingFrequency : LREAL; (*Sampling frequency. Unit: [Hz].*)
ParametersValid : BOOL; (*Data for internal use.*)
UpperFrequency : REAL; (*Data for internal use.*)
LowerFrequency : REAL; (*Data for internal use.*)
BandwidthAct : REAL; (*Data for internal use.*)
DampingConstant : REAL; (*Data for internal use.*)
FilterTimeConstant : REAL; (*Data for internal use.*)
Num : ARRAY[0..2]OF LREAL; (*Data for internal use.*)
Den : ARRAY[0..2]OF LREAL; (*Data for internal use.*)
BVector : ARRAY[0..2]OF LREAL; (*Data for internal use.*)
AVector : ARRAY[0..2]OF LREAL; (*Data for internal use.*)
XVector : ARRAY[0..1]OF LREAL; (*Data for internal use.*)
TypeOld : USINT; (*Data for internal use.*)
OrderOld : USINT; (*Data for internal use.*)
CutOffFrequencyOld : REAL; (*Data for internal use.*)
UpdateOld : BOOL; (*Data for internal use.*)
EnableOld : BOOL; (*Data for internal use.*)
EnableDone : BOOL; (*Data for internal use.*)
DisabledBusy : BOOL; (*Data for internal use.*)
SysRefParaNew : BOOL; (*Data for internal use.*)
CounterOld : UDINT; (*Data for internal use.*)
SystemReference : MTTransferFcnType; (*Data for internal use.*)
END_STRUCT;
MTFilterBiQuadInternalType : STRUCT (*Internal variables of function block MTFilterBiQuad.*)
Ts : REAL; (*Task cycle time. Unit: [s].*)
SamplingFrequency : LREAL; (*Sampling frequency. Unit: [Hz]*)
ParameterValid : BOOL; (*Data for internal use.*)
Num : ARRAY[0..2]OF LREAL; (*Data for internal use.*)
Den : ARRAY[0..2]OF LREAL; (*Data for internal use.*)
BVector : ARRAY[0..2]OF LREAL; (*Data for internal use.*)
AVector : ARRAY[0..2]OF LREAL; (*Data for internal use.*)
XVector : ARRAY[0..1]OF LREAL; (*Data for internal use.*)
FrequencyNumeratorOld : REAL; (*Data for internal use.*)
DampingRatioNumeratorOld : REAL; (*Data for internal use.*)
FrequencyDenominatorOld : REAL; (*Data for internal use.*)
DampingRatioDenominatorOld : REAL; (*Data for internal use.*)
FrequencyNumeratorRad : LREAL; (*Data for internal use.*)
FrequencyDenominatorRad : LREAL; (*Data for internal use.*)
UpdateOld : BOOL; (*Data for internal use.*)
EnableOld : BOOL; (*Data for internal use.*)
EnableDone : BOOL; (*Data for internal use.*)
DisabledBusy : BOOL; (*Data for internal use.*)
SysRefParaNew : BOOL; (*Data for internal use.*)
CounterOld : UDINT; (*Data for internal use.*)
SystemReference : MTTransferFcnType; (*Data for internal use.*)
END_STRUCT;
END_TYPE
(*MTKalmanFilter*)
TYPE
MTFilterKalmanInternalType : STRUCT (*Internal variables of function block MTFilterKalman.*)
CycleTime : LREAL; (*Task cycle time. Unit: [s].*)
InhibitUpdate : BOOL; (*Data for internal use.*)
ParametersValid : BOOL; (*Data for internal use.*)
UpdateOld : BOOL; (*Data for internal use.*)
EnableOld : BOOL; (*Data for internal use.*)
StateSpace : MTFilterKalmanStateSpaceType; (*Data for internal use.*)
Rk : LREAL; (*Covariance matrix of the measuring noise.*)
DisturbanceModel : MTFilterKalmanDisturbanceType; (*Data for internal use.*)
nTmp : USINT; (*Data for internal use.*)
Qk : ARRAY[0..5]OF LREAL; (*Diagonal matrix entries to weight the estimated states.*)
xk : ARRAY[0..5]OF LREAL; (*Discrete states.*)
Pk : ARRAY[0..35]OF LREAL; (*Error covariance matrix.*)
Status : USINT; (*Data for internal use.*)
yk : LREAL; (*Data for internal use.*)
yk_p : LREAL; (*Data for internal use.*)
END_STRUCT;
MTFilterKalmanStateSpaceType : STRUCT (*Data for internal use.*)
Sys : MTFilterKalmanSysType; (*Data for internal use.*)
ExtSys : MTFilterKalmanExtSysType; (*Data for internal use.*)
DiscreteExtSys : MTFilterKalmanDiscreteExtSysType; (*Data for internal use.*)
END_STRUCT;
MTFilterKalmanSysType : STRUCT (*Data for internal use.*)
A : ARRAY[0..15]OF LREAL; (*Data for internal use.*)
b : ARRAY[0..3]OF LREAL; (*Data for internal use.*)
cT : ARRAY[0..3]OF LREAL; (*Data for internal use.*)
d : LREAL; (*Data for internal use.*)
n : USINT; (*System ordern.*)
END_STRUCT;
MTFilterKalmanExtSysType : STRUCT (*Data for internal use.*)
A : ARRAY[0..35]OF LREAL; (*Data for internal use.*)
b : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
cT : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
d : LREAL; (*Data for internal use.*)
n : USINT; (*Extended ystem ordern.*)
END_STRUCT;
MTFilterKalmanDiscreteExtSysType : STRUCT (*Data for internal use.*)
Phi : ARRAY[0..35]OF LREAL; (*Data for internal use.*)
Gamma : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
cT : ARRAY[0..5]OF LREAL; (*Data for internal use.*)
d : LREAL; (*Data for internal use.*)
n : USINT; (*Extended system ordern.*)
END_STRUCT;
MTFilterKalmanDisturbanceType : STRUCT (*Data for internal use.*)
Mode : MTFilterKalmanModeEnum := mtFILTER_NO_DISTURBANCE;
Frequency : REAL;
END_STRUCT;
MTFilterKalmanModeEnum :
( (*Filtertype.*)
mtFILTER_NO_DISTURBANCE := 0, (*No disturbance.*)
mtFILTER_CONST_DISTURBANCE := 1, (*Constant disturbance.*)
mtFILTER_OSCILLATING_DISTURBANCE := 2 (*Harmonic oscillating disturbance.*)
);
END_TYPE

View File

@@ -0,0 +1,32 @@
(*Error*)
VAR CONSTANT
mtBCD_ERR_FILTER_TYPE_INVALID : DINT := -1058012158; (*Filter type is invalid.*)
mtBCD_ERR_FILTER_ORDER_INVALID : DINT := -1058012157; (*Filter order is invalid.*)
mtBCD_ERR_CUTOFF_FREQ_INVALID : DINT := -1058012156; (*Cutoff frequency of the filter is invalid.*)
mtBCD_ERR_CENTER_FREQ_INVALID : DINT := -1058012155; (*Center frequency of the filter is invalid.*)
mtBCD_ERR_FILTER_BANDWIDTH : DINT := -1058012154; (*Bandwidth of the filter is invalid.*)
mtBCD_ERR_FREQ_NUM_INVALID : DINT := -1058012153; (*Filter frequency of the numerator is invalid.*)
mtBCD_ERR_DAMPING_NUM_INVALID : DINT := -1058012152; (*Damping of the numerator is invalid.*)
mtBCD_ERR_FREQ_DEN_INVALID : DINT := -1058012151; (*Filter frequency of the denominator is invalid.*)
mtBCD_ERR_DAMPING_DEN_INVALID : DINT := -1058012150; (*Damping of the denominator is invalid.*)
mtBCD_ERR_FILTER_WINDOW_INVALID : DINT := -1058012149; (*Window length of the filter is invalid.*)
mtBCD_ERR_TRANSFER_FCN_INVALID : DINT := -1058012148; (*Transfer function (Numerator or Denominator) of the FB MTFilterKalman is invalid.*)
mtBCD_ERR_NOISEREDUCTION_INVALID : DINT := -1058012147; (*The parameter NoiseReduction of the FB MTFilterKalman is invalid.*)
mtBCD_ERR_DISTURB_MODEL_INVALID : DINT := -1058012146; (*The disturbance model of the FB MTFilterKalman is invalid.*)
END_VAR
(*Warning*)
VAR CONSTANT
mtBCD_WRN_FILTER_TYPE_INVALID : DINT := -2131753982; (*Filter type is invalid.*)
mtBCD_WRN_FILTER_ORDER_INVALID : DINT := -2131753981; (*Filter order is invalid.*)
mtBCD_WRN_CUTOFF_FREQ_INVALID : DINT := -2131753980; (*Cutoff frequency of the filter is invalid.*)
mtBCD_WRN_CENTER_FREQ_INVALID : DINT := -2131753979; (*Center frequency of the filter is invalid.*)
mtBCD_WRN_FILTER_BANDWIDTH : DINT := -2131753978; (*Bandwidth of the filter is invalid. *)
mtBCD_WRN_FREQ_NUM_INVALID : DINT := -2131753977; (*Filter frequency of the numerator is invalid. *)
mtBCD_WRN_DAMPING_NUM_INVALID : DINT := -2131753976; (*Damping of the numerator is invalid. *)
mtBCD_WRN_FREQ_DEN_INVALID : DINT := -2131753975; (*Filter frequency of the denominator is invalid. *)
mtBCD_WRN_DAMPING_DEN_INVALID : DINT := -2131753974; (*Damping of the denominator is invalid. *)
mtBCD_WRN_FILTER_WINDOW_INVALID : DINT := -2131753973; (*Window length of the filter is invalid. *)
mtBCD_WRN_TRANSFER_FCN_INVALID : DINT := -2131753972; (*Transfer function (Numerator or Denominator) of the FB MTFilterKalman is invalid.*)
mtBCD_WRN_NOISEREDUCTION_INVALID : DINT := -2131753971; (*The parameter NoiseReduction of the FB MTFilterKalman is invalid.*)
mtBCD_WRN_DISTURB_MODEL_INVALID : DINT := -2131753970; (*The disturbance model of the FB MTFilterKalman is invalid.*)
END_VAR

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,508 @@
/* Automation Studio generated header file */
/* Do not edit ! */
#ifndef _MTFILTER_
#define _MTFILTER_
#ifdef __cplusplus
extern "C"
{
#endif
#include <bur/plctypes.h>
#include <brsystem.h>
#include <sys_lib.h>
#include <MTTypes.h>
#ifndef _BUR_PUBLIC
#define _BUR_PUBLIC
#endif
/* Constants */
#ifdef _REPLACE_CONST
#define mtBCD_WRN_DISTURB_MODEL_INVALID (-2131753970)
#define mtBCD_WRN_NOISEREDUCTION_INVALID (-2131753971)
#define mtBCD_WRN_TRANSFER_FCN_INVALID (-2131753972)
#define mtBCD_WRN_FILTER_WINDOW_INVALID (-2131753973)
#define mtBCD_WRN_DAMPING_DEN_INVALID (-2131753974)
#define mtBCD_WRN_FREQ_DEN_INVALID (-2131753975)
#define mtBCD_WRN_DAMPING_NUM_INVALID (-2131753976)
#define mtBCD_WRN_FREQ_NUM_INVALID (-2131753977)
#define mtBCD_WRN_FILTER_BANDWIDTH (-2131753978)
#define mtBCD_WRN_CENTER_FREQ_INVALID (-2131753979)
#define mtBCD_WRN_CUTOFF_FREQ_INVALID (-2131753980)
#define mtBCD_WRN_FILTER_ORDER_INVALID (-2131753981)
#define mtBCD_WRN_FILTER_TYPE_INVALID (-2131753982)
#define mtBCD_ERR_DISTURB_MODEL_INVALID (-1058012146)
#define mtBCD_ERR_NOISEREDUCTION_INVALID (-1058012147)
#define mtBCD_ERR_TRANSFER_FCN_INVALID (-1058012148)
#define mtBCD_ERR_FILTER_WINDOW_INVALID (-1058012149)
#define mtBCD_ERR_DAMPING_DEN_INVALID (-1058012150)
#define mtBCD_ERR_FREQ_DEN_INVALID (-1058012151)
#define mtBCD_ERR_DAMPING_NUM_INVALID (-1058012152)
#define mtBCD_ERR_FREQ_NUM_INVALID (-1058012153)
#define mtBCD_ERR_FILTER_BANDWIDTH (-1058012154)
#define mtBCD_ERR_CENTER_FREQ_INVALID (-1058012155)
#define mtBCD_ERR_CUTOFF_FREQ_INVALID (-1058012156)
#define mtBCD_ERR_FILTER_ORDER_INVALID (-1058012157)
#define mtBCD_ERR_FILTER_TYPE_INVALID (-1058012158)
#else
#ifndef _GLOBAL_CONST
#define _GLOBAL_CONST _WEAK const
#endif
_GLOBAL_CONST signed long mtBCD_WRN_DISTURB_MODEL_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_NOISEREDUCTION_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_TRANSFER_FCN_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_FILTER_WINDOW_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_DAMPING_DEN_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_FREQ_DEN_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_DAMPING_NUM_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_FREQ_NUM_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_FILTER_BANDWIDTH;
_GLOBAL_CONST signed long mtBCD_WRN_CENTER_FREQ_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_CUTOFF_FREQ_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_FILTER_ORDER_INVALID;
_GLOBAL_CONST signed long mtBCD_WRN_FILTER_TYPE_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_DISTURB_MODEL_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_NOISEREDUCTION_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_TRANSFER_FCN_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_FILTER_WINDOW_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_DAMPING_DEN_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_FREQ_DEN_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_DAMPING_NUM_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_FREQ_NUM_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_FILTER_BANDWIDTH;
_GLOBAL_CONST signed long mtBCD_ERR_CENTER_FREQ_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_CUTOFF_FREQ_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_FILTER_ORDER_INVALID;
_GLOBAL_CONST signed long mtBCD_ERR_FILTER_TYPE_INVALID;
#endif
/* Datatypes and datatypes of function blocks */
typedef enum MTFilterTypeEnum
{ mtFILTER_BESSEL = 0,
mtFILTER_BUTTERWORTH = 1
} MTFilterTypeEnum;
typedef enum MTFilterKalmanModeEnum
{ mtFILTER_NO_DISTURBANCE = 0,
mtFILTER_CONST_DISTURBANCE = 1,
mtFILTER_OSCILLATING_DISTURBANCE = 2
} MTFilterKalmanModeEnum;
typedef struct MTFilterMovingAvgInternalType
{ float Ts;
plcbit ParameterValid;
unsigned short NumOfElmements;
double Sum;
unsigned long pBuffer;
unsigned short CntAct;
unsigned short CntOld;
unsigned short WindowLength;
unsigned short BufferLength;
plcbit BufferFull;
plcbit MemAllocated;
plcbit Update;
plcbit UpdateOld;
plcbit EnableOld;
unsigned short statusTMP;
} MTFilterMovingAvgInternalType;
typedef struct MTFilterLowPassInternalType
{ float Ts;
double SamplingFrequency;
plcbit ParameterValid;
double AngularFrequency;
double Num[6];
double Den[6];
double BVector[6];
double AVector[6];
double XVector[5];
unsigned char TypeOld;
unsigned char OrderOld;
float CutOffFrequencyOld;
plcbit UpdateOld;
plcbit EnableOld;
plcbit EnableDone;
plcbit DisabledBusy;
unsigned long CounterOld;
plcbit SysRefParaNew;
struct MTTransferFcnType SystemReference;
} MTFilterLowPassInternalType;
typedef struct MTFilterHighPassInternalType
{ float Ts;
double SamplingFrequency;
plcbit ParameterValid;
double AngularFrequency;
double Num[6];
double Den[6];
double BVector[6];
double AVector[6];
double XVector[5];
unsigned char TypeOld;
unsigned char OrderOld;
float CutOffFrequencyOld;
plcbit UpdateOld;
plcbit EnableOld;
plcbit EnableDone;
plcbit DisabledBusy;
unsigned long CounterOld;
plcbit SysRefParaNew;
struct MTTransferFcnType SystemReference;
} MTFilterHighPassInternalType;
typedef struct MTFilterBandPassInternalType
{ float Ts;
double SamplingFrequency;
plcbit ParameterValid;
double AngularFrequency;
double BandwidthRad;
double Num[6];
double Den[6];
double BVector[6];
double AVector[6];
double XVector[5];
unsigned char TypeOld;
unsigned char OrderOld;
float CenterFrequencyOld;
float BandwidthOld;
plcbit UpdateOld;
plcbit EnableOld;
plcbit EnableDone;
plcbit DisabledBusy;
unsigned long CounterOld;
plcbit SysRefParaNew;
struct MTTransferFcnType SystemReference;
} MTFilterBandPassInternalType;
typedef struct MTFilterBandStopInternalType
{ float Ts;
double SamplingFrequency;
plcbit ParameterValid;
double AngularFrequency;
double BandwidthRad;
double Num[6];
double Den[6];
double BVector[6];
double AVector[6];
double XVector[5];
unsigned char TypeOld;
unsigned char OrderOld;
float CenterFrequencyOld;
float BandwidthOld;
plcbit UpdateOld;
plcbit EnableOld;
plcbit EnableDone;
plcbit DisabledBusy;
unsigned long CounterOld;
plcbit SysRefParaNew;
struct MTTransferFcnType SystemReference;
} MTFilterBandStopInternalType;
typedef struct MTFilterNotchInternalType
{ float Ts;
double SamplingFrequency;
plcbit ParametersValid;
float UpperFrequency;
float LowerFrequency;
float BandwidthAct;
float DampingConstant;
float FilterTimeConstant;
double Num[3];
double Den[3];
double BVector[3];
double AVector[3];
double XVector[2];
unsigned char TypeOld;
unsigned char OrderOld;
float CutOffFrequencyOld;
plcbit UpdateOld;
plcbit EnableOld;
plcbit EnableDone;
plcbit DisabledBusy;
plcbit SysRefParaNew;
unsigned long CounterOld;
struct MTTransferFcnType SystemReference;
} MTFilterNotchInternalType;
typedef struct MTFilterBiQuadInternalType
{ float Ts;
double SamplingFrequency;
plcbit ParameterValid;
double Num[3];
double Den[3];
double BVector[3];
double AVector[3];
double XVector[2];
float FrequencyNumeratorOld;
float DampingRatioNumeratorOld;
float FrequencyDenominatorOld;
float DampingRatioDenominatorOld;
double FrequencyNumeratorRad;
double FrequencyDenominatorRad;
plcbit UpdateOld;
plcbit EnableOld;
plcbit EnableDone;
plcbit DisabledBusy;
plcbit SysRefParaNew;
unsigned long CounterOld;
struct MTTransferFcnType SystemReference;
} MTFilterBiQuadInternalType;
typedef struct MTFilterKalmanSysType
{ double A[16];
double b[4];
double cT[4];
double d;
unsigned char n;
} MTFilterKalmanSysType;
typedef struct MTFilterKalmanExtSysType
{ double A[36];
double b[6];
double cT[6];
double d;
unsigned char n;
} MTFilterKalmanExtSysType;
typedef struct MTFilterKalmanDiscreteExtSysType
{ double Phi[36];
double Gamma[6];
double cT[6];
double d;
unsigned char n;
} MTFilterKalmanDiscreteExtSysType;
typedef struct MTFilterKalmanStateSpaceType
{ struct MTFilterKalmanSysType Sys;
struct MTFilterKalmanExtSysType ExtSys;
struct MTFilterKalmanDiscreteExtSysType DiscreteExtSys;
} MTFilterKalmanStateSpaceType;
typedef struct MTFilterKalmanDisturbanceType
{ enum MTFilterKalmanModeEnum Mode;
float Frequency;
} MTFilterKalmanDisturbanceType;
typedef struct MTFilterKalmanInternalType
{ double CycleTime;
plcbit InhibitUpdate;
plcbit ParametersValid;
plcbit UpdateOld;
plcbit EnableOld;
struct MTFilterKalmanStateSpaceType StateSpace;
double Rk;
struct MTFilterKalmanDisturbanceType DisturbanceModel;
unsigned char nTmp;
double Qk[6];
double xk[6];
double Pk[36];
unsigned char Status;
double yk;
double yk_p;
} MTFilterKalmanInternalType;
typedef struct MTFilterBandPass
{
/* VAR_INPUT (analog) */
enum MTFilterTypeEnum Type;
unsigned char Order;
float CenterFrequency;
float Bandwidth;
float In;
/* VAR_OUTPUT (analog) */
signed long StatusID;
float Out;
unsigned long SystemReference;
/* VAR (analog) */
struct MTFilterBandPassInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Enable;
plcbit Update;
/* VAR_OUTPUT (digital) */
plcbit Busy;
plcbit Active;
plcbit Error;
plcbit UpdateDone;
} MTFilterBandPass_typ;
typedef struct MTFilterBandStop
{
/* VAR_INPUT (analog) */
enum MTFilterTypeEnum Type;
unsigned char Order;
float CenterFrequency;
float Bandwidth;
float In;
/* VAR_OUTPUT (analog) */
signed long StatusID;
float Out;
unsigned long SystemReference;
/* VAR (analog) */
struct MTFilterBandStopInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Enable;
plcbit Update;
/* VAR_OUTPUT (digital) */
plcbit Busy;
plcbit Active;
plcbit Error;
plcbit UpdateDone;
} MTFilterBandStop_typ;
typedef struct MTFilterBiQuad
{
/* VAR_INPUT (analog) */
float CenterFrequencyNum;
float DampingRatioNum;
float CenterFrequencyDen;
float DampingRatioDen;
float In;
/* VAR_OUTPUT (analog) */
signed long StatusID;
float Out;
unsigned long SystemReference;
/* VAR (analog) */
struct MTFilterBiQuadInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Enable;
plcbit Update;
/* VAR_OUTPUT (digital) */
plcbit Busy;
plcbit Active;
plcbit Error;
plcbit UpdateDone;
} MTFilterBiQuad_typ;
typedef struct MTFilterHighPass
{
/* VAR_INPUT (analog) */
enum MTFilterTypeEnum Type;
unsigned char Order;
float CutOffFrequency;
float In;
/* VAR_OUTPUT (analog) */
signed long StatusID;
float Out;
unsigned long SystemReference;
/* VAR (analog) */
struct MTFilterHighPassInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Enable;
plcbit Update;
/* VAR_OUTPUT (digital) */
plcbit Busy;
plcbit Active;
plcbit Error;
plcbit UpdateDone;
} MTFilterHighPass_typ;
typedef struct MTFilterLowPass
{
/* VAR_INPUT (analog) */
enum MTFilterTypeEnum Type;
unsigned char Order;
float CutOffFrequency;
float In;
/* VAR_OUTPUT (analog) */
signed long StatusID;
float Out;
unsigned long SystemReference;
/* VAR (analog) */
struct MTFilterLowPassInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Enable;
plcbit Update;
/* VAR_OUTPUT (digital) */
plcbit Busy;
plcbit Active;
plcbit Error;
plcbit UpdateDone;
} MTFilterLowPass_typ;
typedef struct MTFilterMovingAverage
{
/* VAR_INPUT (analog) */
unsigned short WindowLength;
float In;
/* VAR_OUTPUT (analog) */
signed long StatusID;
float Out;
/* VAR (analog) */
struct MTFilterMovingAvgInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Enable;
plcbit Update;
/* VAR_OUTPUT (digital) */
plcbit Active;
plcbit Error;
plcbit UpdateDone;
} MTFilterMovingAverage_typ;
typedef struct MTFilterNotch
{
/* VAR_INPUT (analog) */
float CenterFrequency;
float Bandwidth;
float In;
/* VAR_OUTPUT (analog) */
signed long StatusID;
float Out;
unsigned long SystemReference;
/* VAR (analog) */
struct MTFilterNotchInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Enable;
plcbit Update;
/* VAR_OUTPUT (digital) */
plcbit Busy;
plcbit Active;
plcbit Error;
plcbit UpdateDone;
} MTFilterNotch_typ;
typedef struct MTFilterKalman
{
/* VAR_INPUT (analog) */
float Numerator[5];
float Denominator[5];
float NoiseReduction;
struct MTFilterKalmanDisturbanceType DisturbanceModel;
float SystemInput;
float SystemOutput;
/* VAR_OUTPUT (analog) */
signed long StatusID;
float FilteredOutput[2];
float Disturbance;
/* VAR (analog) */
struct MTFilterKalmanInternalType Internal;
/* VAR_INPUT (digital) */
plcbit Enable;
plcbit Update;
/* VAR_OUTPUT (digital) */
plcbit Active;
plcbit Error;
plcbit UpdateDone;
} MTFilterKalman_typ;
/* Prototyping of functions and function blocks */
_BUR_PUBLIC void MTFilterBandPass(struct MTFilterBandPass* inst);
_BUR_PUBLIC void MTFilterBandStop(struct MTFilterBandStop* inst);
_BUR_PUBLIC void MTFilterBiQuad(struct MTFilterBiQuad* inst);
_BUR_PUBLIC void MTFilterHighPass(struct MTFilterHighPass* inst);
_BUR_PUBLIC void MTFilterLowPass(struct MTFilterLowPass* inst);
_BUR_PUBLIC void MTFilterMovingAverage(struct MTFilterMovingAverage* inst);
_BUR_PUBLIC void MTFilterNotch(struct MTFilterNotch* inst);
_BUR_PUBLIC void MTFilterKalman(struct MTFilterKalman* inst);
#ifdef __cplusplus
};
#endif
#endif /* _MTFILTER_ */

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Library Version="5.13.0" SubType="binary" Description="This mechatronics library contains function blocks for filtering and basic signal processing." xmlns="http://br-automation.co.at/AS/Library">
<Files>
<File>MTFilter.fun</File>
<File>MTFilter.typ</File>
<File>MTFilter.var</File>
</Files>
<Dependencies>
<Dependency ObjectName="brsystem" />
<Dependency ObjectName="sys_lib" />
<Dependency ObjectName="MTTypes" FromVersion="1.03.0" />
</Dependencies>
</Library>

View File

@@ -24,7 +24,6 @@
<Object Type="Library" Language="Binary" Description="This library provides read and write access to non-cyclic I/O data points.">AsIOAcc</Object>
<Object Type="Library" Language="Binary" Description="The AsZip library offers compressing archive-support">AsZip</Object>
<Object Type="Library" Language="Binary" Description="This mechatronics library contains different system datatypes and general error numbers.">MTTypes</Object>
<Object Type="Library" Language="Binary" Description="This mechatronics library contains basic control function blocks.">MTBasics</Object>
<Object Type="Library" Language="binary" Description="This library contains functionality to execute traces (to sample numeric values periodically for a defined time-span)">CoTrace</Object>
<Object Type="Library" Language="Binary" Description="File explorer for B+R file devices">MpFile</Object>
<Object Type="Library" Language="Binary" Description="Core library for mapp components">MpBase</Object>
@@ -45,5 +44,7 @@
<Object Type="Library" Language="binary" Description="[mapp Motion] Program interpreter library">McProgInt</Object>
<Object Type="Library" Language="binary" Description="The BRSystem library provides the user with a number of system functions for e.g. handling permanent memory, accessing exception information, etc.">brsystem</Object>
<Object Type="Library" Language="binary" Description="[mapp Motion] ACOPOS parameter ID library">McAcpPar</Object>
<Object Type="Library" Language="binary" Description="This mechatronics library contains basic control function blocks.">MTBasics</Object>
<Object Type="Library" Language="binary" Description="This mechatronics library contains function blocks for filtering and basic signal processing.">MTFilter</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="Init, cyclic, exit code">Main.st</File>
<File Description="Local data types" Private="true">Types.typ</File>
<File Description="Local variables" Private="true">Variables.var</File>
</Files>
</Program>

View File

@@ -0,0 +1,18 @@
PROGRAM _INIT
(* Insert code here *)
END_PROGRAM
PROGRAM _CYCLIC
//FixMe H<EFBFBD>henausgleich
gAxisQA;
END_PROGRAM
PROGRAM _EXIT
(* Insert code here *)
END_PROGRAM

View File

View File

View File

@@ -2,6 +2,7 @@
VAR
gstrLogMsgs : ARRAY[0..100] OF STRING[80]; (*Zeilen f. Logdatei*)
gCmd1 : gtyp_CmdInterface; (*Taskbefehle and MachCtrl*)
gHeightInterface : gtyp_HeightInterface; (*Interface Hoehenausgleich*)
END_VAR
(*//-----------------------------------------------------------------------------------------------------*)
(*Analogwerte*)
@@ -35,6 +36,6 @@ VAR RETAIN
gAxRestorePosAxisC : {REDUND_UNREPLICABLE} McAcpAxRestorePosType; (*!!Permanent*)
gAxRestorePosAxisShuttle : {REDUND_UNREPLICABLE} McAcpAxRestorePosType; (*!!Permanent*)
gAxRestorePosAxisShuttle2 : {REDUND_UNREPLICABLE} McAcpAxRestorePosType; (*!!Permanent*)
gAxRestorePosAxisHeight : {REDUND_UNREPLICABLE} McAcpAxRestorePosType; (*!!Permanent*)
gAxAbsOffsetHeight : {REDUND_UNREPLICABLE} LREAL; (*!!Permanent*)
gCalibrationDone : gtyp_CalibrationDone; (*!!Permanent Achskalibrierung erledigt*)
END_VAR

View File

@@ -51,3 +51,25 @@ TYPE
bAxisShuttle2 : BOOL;
END_STRUCT;
END_TYPE
(*//Interface H<>henausgleich*)
TYPE
gtyp_HeightInterface : STRUCT (*Interface mit Hoehenausgleich*)
In : gtyp_HeightInterfaceIn; (*Signale an Hoehenausgleich*)
Ou : gtyp_HeightInterfaceOut; (*Signale von Hoehenausgleich*)
END_STRUCT;
gtyp_HeightInterfaceIn : STRUCT (*Inputs von Hoehenausgleich*)
bHeadIsOk : BOOL; (*Kopf ist OK / Kalibriert / Referenziert und keine St<53>rung*)
bHeadIsMidPos : BOOL := FALSE; (*Kopf ist in Mittelstellung*)
bHeadIsInFollowpos : BOOL := FALSE; (*Kopf ist is in H<>henregelung*)
bHeadCalibrated : BOOL; (*Kopf ist kalibriert*)
bHeadLimitPos : BOOL; (*Grenzwerte*)
END_STRUCT;
gtyp_HeightInterfaceOut : STRUCT (*Ausgaenge an Hoehenausgleich*)
bResetSignal : BOOL; (*Quittieren*)
bMidPos : BOOL := FALSE; (*InMittelpos*)
bFollowPos : BOOL := FALSE; (*Position folgen*)
bCalibrateHeightsensor : BOOL; (*Kalibrieren*)
END_STRUCT;
END_TYPE

View File

@@ -4,13 +4,15 @@ ACTION DoDynVars:
//lRecipe ACCESS ADR (gRecipies[uiRecipe + 1]);
//lCmdInterface ACCESS ADR (gCmd1);
//FixMe H<EFBFBD>henausgleich
gAxisQA;
//Axis Basic - H<EFBFBD>henausgleich
MpFUB.AxBasic_Height.MpLink := ADR (gAxis_Height);
MpFUB.AxBasic_Height.Parameters := ADR (MpData.AxPar_Height);
MpFUB.AxBasic_Height.Enable := TRUE;
//Home
MpData.AxPar_Height.Homing.Position := -gAxAbsOffsetHeight;
//Zusatzbausteine Versorgen
MpFUB.MC_BR_ProcessParID_Height.Axis := ADR (gAxis_Height);
MpFUB.MoveCyclicPos_Height.Axis := ADR (gAxis_Height);
@@ -24,81 +26,122 @@ ACTION DoDynVars:
END_ACTION
//Zeiten berechnen
ACTION DoTimes:
Times.diSteptime := gdiSystemTime - TimesLatch.diSteptime;
END_ACTION
//==========================================================
//Phasenlage X einlesen und kalibrieren
//Phasenlage Hoehenachse einlesen und kalibrieren
//Workcaround f<EFBFBD>r Geberproblem Betrieb Lineal als Inkri
ACTION DoPhasingX:
CASE States.enPhasingX OF
ACTION DoPhasingHeight:
CASE States.enPhasingHeight OF
//Phasenlage Schreiben
enPH_SetPhasing:
MpData.AcpProPar_Height[1].ParID := 995; //PIDENT_MODE
MpData.AcpProPar_Height[1].VariableAddress := ADR (10); //Motor
usTemp := 10; //Motor
MpData.AcpProPar_Height[1].VariableAddress := ADR (usTemp);
MpData.AcpProPar_Height[1].DataType := mcACPAX_PARTYPE_USINT;
MpData.AcpProPar_Height[2].ParID := 1125; //PIDENT_SUB_MODE
MpData.AcpProPar_Height[2].VariableAddress := ADR (31); //Stepper
MpData.AcpProPar_Height[2].DataType := mcACPAX_PARTYPE_UDINT;
MpData.AcpProPar_Height[2].ParID := 276; //PHASING_MODE
MpData.AcpProPar_Height[2].VariableAddress := ADR (3); //Stepper
udTemp := 31; //Stepper
MpData.AcpProPar_Height[2].VariableAddress := ADR (udTemp);
MpData.AcpProPar_Height[2].DataType := mcACPAX_PARTYPE_UDINT;
MpData.AcpProPar_Height[3].ParID := 997; //CMD_PIDENT
uiTemp := 260; //ncStart
MpData.AcpProPar_Height[3].VariableAddress := ADR (uiTemp);
MpData.AcpProPar_Height[3].DataType := mcACPAX_PARTYPE_UINT;
MpFUB.MC_BR_ProcessParID_Height.DataAddress := ADR (MpData.AcpProPar_Height);
MpFUB.MC_BR_ProcessParID_Height.ParID := 63; //MOTOR_COMMUT_OFFSET
MpFUB.MC_BR_ProcessParID_Height.DataType := ncPAR_TYP_REAL ;
MpFUB.MC_BR_ProcessParID_Height.DataAddress := ADR (States.rCommutOffsSINX);
MpFUB.MC_BR_WriteParID_X.Execute := TRUE;
MpFUB.MC_BR_ProcessParID_Height.Mode := mcACPAX_PARID_SET; //Schreiben
MpFUB.MC_BR_ProcessParID_Height.NumberOfParIDs := 3;
IF MpFUB.MC_BR_WriteParID_X.Done THEN
MpFUB.MC_BR_WriteParID_X.Execute := FALSE;
States.enPhasingX := enPH_SetPhasingMode;
END_IF
//IF MpFUB.MC_BR_WriteParID_X.Done THEN
// MpFUB.MC_BR_WriteParID_X.Execute := FALSE;
// States.enPhasingX := enPH_SetPhasingMode;
//END_IF
//Acopos Initialisieren
enPH_SetPhasingMode:
MpFUB.MC_BR_WriteParID_X.ParID := 276; //PHASING_MODE
MpFUB.MC_BR_WriteParID_X.DataType := ncPAR_TYP_UINT; //UINT
MpFUB.MC_BR_WriteParID_X.DataAddress := ADR (DIRECTII);
MpFUB.MC_BR_WriteParID_X.Execute := TRUE;
MpFUB.MC_BR_ProcessParID_Height.Execute := TRUE;
IF MpFUB.MC_BR_WriteParID_X.Done THEN
MpFUB.AxBasic_X.ErrorReset := TRUE;
MpFUB.MC_BR_WriteParID_X.Execute := FALSE;
States.enPhasingX := enPH_HomeEncoder;
END_IF
//IF MpFUB.MC_BR_WriteParID_X.Done THEN
// MpFUB.AxBasic_X.ErrorReset := TRUE;
// MpFUB.MC_BR_WriteParID_X.Execute := FALSE;
// States.enPhasingHeight := enPH_Done;
//END_IF
//Geber Referenzieren
enPH_HomeEncoder:
IF (MpFUB.AxBasic_X.Info.BootState = mpAXIS_BLP_DONE) THEN
MpData.AxPar_X.Home.Mode := mpAXIS_HOME_MODE_DIRECT;
MpData.AxPar_X.Home.Position := States.lrEndatPosX + glrOffsetAxisX;
MpFUB.AxBasic_X.Home := bBlink0_1;
END_IF
IF EDGEPOS (MpFUB.AxBasic_X.IsHomed) THEN
States.enPhasingX := enPH_Done;
END_IF
//enPH_HomeEncoder:
// IF (MpFUB.AxBasic_X.Info.BootState = mpAXIS_BLP_DONE) THEN
// MpData.AxPar_X.Home.Mode := mpAXIS_HOME_MODE_DIRECT;
// MpData.AxPar_X.Home.Position := States.lrEndatPosX + glrOffsetAxisX;
// MpFUB.AxBasic_X.Home := bBlink0_1;
// END_IF
//
// IF EDGEPOS (MpFUB.AxBasic_X.IsHomed) THEN
// States.enPhasingX := enPH_Done;
// END_IF
END_CASE
END_ACTION
//Zeiten berechnen
ACTION DoTimes:
Times.diSteptime := gdiSystemTime - TimesLatch.diSteptime;
Times.diCycletime := gdiSystemTime - TimesLatch.diCycletime;
IF EDGEPOS (MpFUB.MpCNC5Axis.MoveProgram) THEN
//FixMe
TimesLatch.diCNCTime := gdiSystemTime;
END_IF
IF MpFUB.MpCNC5Axis.MoveProgram THEN
Times.diCNCTime := gdiSystemTime - TimesLatch.diCNCTime;
END_IF
Times.diStoptime := gdiSystemTime - TimesLatch.diStoptime;
//==========================================================
//Hoehensensor kalibrieren
ACTION DoCalHeight:
CASE States.enCalHeight OF
//Phasenlage Schreiben
enCal_Wait:
States.usCaPoint := 1;
bOuCalRequest := gHeightInterface.Ou.bCalibrateHeightsensor;
IF bOuCalRequest AND NOT bInCalFinished THEN
States.enCalHeight := enCal_MoveCalPos;
TimesLatch.diSteptime := gdiSystemTime;
END_IF
enCal_MoveCalPos:
MpData.AxPar_Height.Velocity := 2.0; //mm/s:
MpData.AxPar_Height.Position := lrCalPos[States.usCaPoint];
MpFUB.AxBasic_Height.MoveAbsolute := TRUE;
IF MpFUB.AxBasic_Height.MoveDone THEN
MpFUB.AxBasic_Height.MoveAbsolute := FALSE;
States.enCalHeight := enCal_WaitHandshake;
TimesLatch.diSteptime := gdiSystemTime;
END_IF
enCal_WaitHandshake:
IF (Times.diSteptime > 500000) THEN
bOuStrobe := TRUE;
END_IF
IF bInPosReached THEN
bOuStrobe := FALSE;
States.usCaPoint := States.usCaPoint + 1;
IF (States.usCaPoint > 16) THEN
TimesLatch.diSteptime := gdiSystemTime;
States.enCalHeight := enCal_Done;
ELSE
TimesLatch.diSteptime := gdiSystemTime;
States.enCalHeight := enCal_MoveCalPos;
END_IF
END_IF
enCal_Done:
IF bInCalFinished THEN
bOuCalRequest := FALSE;
//Else FixMe Error
END_IF
IF NOT gHeightInterface.Ou.bCalibrateHeightsensor THEN
States.enCalHeight := enCal_Wait;
END_IF
END_CASE
END_ACTION
//FUB Aufruufe am Zyklusanfang
ACTION DoFUBsStartCycle:
//Istpositionen Achsen Gantry
@@ -117,19 +160,17 @@ ACTION DoFUBs:
IF EDGEPOS (gCmd1.bResetErrors) THEN
MpFUB.AxBasic_Height.ErrorReset := MpFUB.AxBasic_Height.Error;
END_IF
//Mapp
MpFUB.InitHome_Height ();
MpFUB.MoveCyclicPos_Height ();
MpFUB.MoveCyclicPos_Height ();
MpFUB.Home_Height ();
MpFUB.AxBasic_Height ();
MpFUB.MC_BR_ProcessParID_Height ();
@@ -165,5 +206,9 @@ ACTION DoFUBs:
MpFUB.AxBasic_Height.Update := FALSE;
END_IF
IF MpFUB.MC_BR_ProcessParID_Height.Done OR MpFUB.MC_BR_ProcessParID_Height.Done THEN
MpFUB.MC_BR_ProcessParID_Height.Execute := FALSE;
END_IF
END_ACTION

View File

@@ -6,11 +6,81 @@ PROGRAM _CYCLIC
//Fubs f<EFBFBD>r Zyklusstart auslesen
DoFUBsStartCycle;
//Zeiten
DoTimes;
//Pahsing
DoPhasingHeight;
//FixMe
rTemp := FC_Scale_Real (iInHeight, 10.0);
//Hoehensensor kalibrieren
DoCalHeight;
//Hoehenwert skalieren
//-Sensor auf 30mm kalibriert
States.lrHeight := FC_Scale_Real (iInHeight, 20.0);
FUBs.LPass_Height.In := LREAL_TO_REAL (States.lrHeight);
FUBs.LPass_Height ();
FUBs.FltAvg_Height.In := LREAL_TO_REAL (States.lrHeight);
FUBs.FltAvg_Height ();
//Positionen anfahren
IF NOT MpFUB.AxBasic_Height.MoveActive THEN
//FixeMe test
IF bTest THEN
MpData.AxPar_Height.Velocity := 0.5;
MpData.AxPar_Height.Position := 0.5;
MpFUB.AxBasic_Height.MoveAbsolute := TRUE;
bTest := FALSE;
END_IF
//OT-Sicherheitspos Anfahren
IF bUp THEN
MpData.AxPar_Height.Velocity := 350;
MpData.AxPar_Height.Position := 0.5;
MpFUB.AxBasic_Height.MoveAbsolute := TRUE;
bUp := FALSE;
END_IF
//Mittelpos anfahren
IF gHeightInterface.Ou.bMidPos THEN
MpData.AxPar_Height.Velocity := 350;
MpData.AxPar_Height.Position := 10.0;
MpFUB.AxBasic_Height.MoveAbsolute := TRUE;
//FixMe
gHeightInterface.Ou.bMidPos := FALSE;
END_IF
//UT-Anfahren
IF bDown THEN
MpData.AxPar_Height.Velocity := 350;
MpData.AxPar_Height.Position := 47;
MpFUB.AxBasic_Height.MoveAbsolute := TRUE;
bDown := FALSE;
END_IF
END_IF
//Positionierung beendet
IF (States.enCalHeight = enCal_Wait) AND MpFUB.AxBasic_Height.MoveDone OR MpFUB.AxBasic_Height.Error THEN
MpFUB.AxBasic_Height.MoveAbsolute := FALSE;
END_IF
//Hoehenregelung
FUBs.PT2_Height.In := LREAL_TO_REAL (MpFUB.AxBasic_Height.Position + (States.lrHeight - lrFlightleve));
FUBs.PT2_Height ();
States.lrHeightPosDest := REAL_TO_LREAL (FUBs.PT2_Height.Out);
IF NOT MpFUB.ReadRealPos_Heigt.Valid THEN
MpFUB.MoveCyclicPos_Height.Enable := FALSE;
END_IF
IF (States.lrHeightPosDest <= 47) AND (States.lrHeightPosDest > 1) THEN
MpFUB.MoveCyclicPos_Height.CyclicPosition := States.lrHeightPosDest;
END_IF
//Kalibrierung

View File

@@ -1,5 +1,70 @@
PROGRAM _INIT
//Dummycall damit Variable initialisiert wird
gAxRestorePosAxisHeight;
//Verfahrparameter
MpData.AxPar_Height.Acceleration := 7500;
MpData.AxPar_Height.Deceleration := 7500;
MpFUB.MoveCyclicPos_Height.AdvancedParameters.Acceleration := 7500; //mm2/s
MpFUB.MoveCyclicPos_Height.AdvancedParameters.Deceleration := 7500; //mm2/s
MpFUB.MoveCyclicPos_Height.AdvancedParameters.Velocity := 350; //mm/s
//Referenzdaten
MpData.AxPar_Height.Homing.Mode := mcHOMING_ABSOLUTE;
gAxAbsOffsetHeight := 417.46;
FUBs.PT2_Height.TimeConstant1 := 0.036;
FUBs.PT2_Height.TimeConstant2 := 0.024;
FUBs.PT2_Height.Gain := 1;
FUBs.PT2_Height.Enable := TRUE;
FUBs.FltAvg_Height.WindowLength := 10;
FUBs.FltAvg_Height.Enable := TRUE;
FUBs.LPass_Height.Order := 1;
FUBs.LPass_Height.CutOffFrequency := 20;
FUBs.LPass_Height.Enable := TRUE;
//Kalibrierpositionen festlegen
//30mm
// lrCalPos[1] := 17;
// lrCalPos[2] := 23;
// lrCalPos[3] := 26;
// lrCalPos[4] := 29;
// lrCalPos[5] := 32;
// lrCalPos[6] := 35;
// lrCalPos[7] := 38;
// lrCalPos[8] := 39.5;
// lrCalPos[9] := 41;
// lrCalPos[10] := 41.6;
// lrCalPos[11] := 42.5;
// lrCalPos[12] := 43.4;
// lrCalPos[13] := 44;
// lrCalPos[14] := 44.9;
// lrCalPos[15] := 45.5;
// lrCalPos[16] := 46.4;
//20
lrCalPos[1] := 47-20;
lrCalPos[2] := 47-16;
lrCalPos[3] := 47-14;
lrCalPos[4] := 47-12;
lrCalPos[5] := 47-10;
lrCalPos[6] := 47-8;
lrCalPos[7] := 47-6;
lrCalPos[8] := 47-5;
lrCalPos[9] := 47-4;
lrCalPos[10] := 47-3.6;
lrCalPos[11] := 47-3;
lrCalPos[12] := 47-2.4;
lrCalPos[13] := 47-2;
lrCalPos[14] := 47-1.4;
lrCalPos[15] := 47-1;
lrCalPos[16] := 47-0.4;
END_PROGRAM

View File

@@ -3,6 +3,10 @@
TYPE
typ_FUB : STRUCT (*Funktionsbausteine*)
TON_PowerHeightCtrl : TON;
PT1_Height : MTBasicsPT1;
PT2_Height : MTBasicsPT2;
LPass_Height : MTFilterLowPass;
FltAvg_Height : MTFilterMovingAverage;
END_STRUCT;
typ_MpFUB : STRUCT (*MApp Funktionsbausteine*)
AxBasic_Height : MpAxisBasic; (*Einzelachsfunktionalit<69>t*)
@@ -14,10 +18,20 @@ TYPE
Home_Height : MC_Home; (*Homing (nur f<>r Kalibrierung)*)
END_STRUCT;
typ_MpData : STRUCT (*MApp Daten*)
AxPar_Height : MpAxisBasicParType;
AxPar_Height : MpAxisBasicParType; (*Daten AxBasick*)
ProcPar_Height_MoveLim : McCfgAxMoveLimType; (*Prozesskonfiguration Bewegungslimits Achse*)
AcpProPar_Height : ARRAY[1..5]OF McAcpAxProcessParIDType;
END_STRUCT;
typ_Times : STRUCT (*Zykluszeiten etc.*)
diSteptime : {REDUND_UNREPLICABLE} DINT; (*[<5B>s]*)
END_STRUCT;
typ_enCalHeight :
( (*H<>hensensor Kalibrieren*)
enCal_Wait, (*Warten*)
enCal_MoveCalPos, (*Position anfahren*)
enCal_WaitHandshake, (*Melden und auf Handshake warten*)
enCal_Done (*Kalibrieren beendet*)
);
typ_enPHASING :
( (*Absolutwertgeber refererenzieren*)
enPH_Wait, (*Warten*)
@@ -26,4 +40,11 @@ TYPE
enPH_HomeEncoder, (*Geberreferenzieren*)
enPH_Done (*Beendet Acopos darf verwendet werden*)
);
typ_States : STRUCT
usCaPoint : USINT; (*Kalibrierpunkt*)
enCalHeight : typ_enCalHeight; (*H<>hensensor kalibrieren*)
enPhasingHeight : typ_enPHASING;
lrHeight : LREAL; (*Skalierter Wert vom Hoehensensor*)
lrHeightPosDest : LREAL; (*Zielwert Hoehenachse*)
END_STRUCT;
END_TYPE

View File

@@ -1,7 +1,20 @@
VAR
bTest : BOOL;
bUp : BOOL;
bDown : BOOL;
rTemp : LREAL;
usTemp : USINT;
uiTemp : UINT;
udTemp : UDINT;
lrCalPos : ARRAY[1..16] OF LREAL;
lrFlightleve : LREAL := 3;
END_VAR
(*//Strukturen*)
VAR
rTemp : LREAL;
MpData : typ_MpData; (*Mapp Daten !!! Kein init wert*)
States : typ_States;
Times : typ_Times;
TimesLatch : typ_Times; (*Gespeicherte Systemzeit*)
END_VAR
(*//Funktionsbl<62>cke*)
VAR

View File

@@ -170,8 +170,8 @@ ACTION DoJogAxis:
VCButtons.X1Axis.bCommand := FALSE;
IF NOT lMachine.bSimulation THEN
MpFUB.AxBasic_XVirtual.JogPositive := gMP7121.XInc AND (States.enSelectedAxis = 0) AND States.bSingleAxMode AND bTemp;
MpFUB.AxBasic_XVirtual.JogNegative := gMP7121.XDec AND (States.enSelectedAxis = 0) AND States.bSingleAxMode AND bTemp;
MpFUB.AxBasic_XVirtual.JogPositive := gMP7121.XInc AND (States.enSelectedAxis = 0) AND States.bSingleAxMode AND bTemp AND gMP7121.KeyLeft;
MpFUB.AxBasic_XVirtual.JogNegative := gMP7121.XDec AND (States.enSelectedAxis = 0) AND States.bSingleAxMode AND bTempAND gMP7121.KeyLeft;
ELSE
MpFUB.AxBasic_XVirtual.JogPositive := VCButtons.AxisJogFw.bCommand AND (States.enSelectedAxis = 0) AND States.bSingleAxMode AND bTemp;
MpFUB.AxBasic_XVirtual.JogNegative := VCButtons.AxisJogBw.bCommand AND (States.enSelectedAxis = 0) AND States.bSingleAxMode AND bTemp;

View File

@@ -16,5 +16,6 @@
<Object Type="Program" Language="IEC" Description="Rezeptverwaltung">Recipies</Object>
<Object Type="Program" Language="IEC" Description="Frametable auslesen">MachParam</Object>
<Object Type="Program" Language="IEC" Description="Höhenregelung Laser">HeightCtrl</Object>
<Object Type="Program" Language="IEC" Description="Zum Anlegen der Achse">DummyPrg</Object>
</Objects>
</Package>

View File

@@ -3,7 +3,9 @@
<AcoposParameterTable>
<Root Name="Parameters">
<Parameter Name="BRAKE_MODE" ID="90" Value="0" Description="Motor holding brake: Mode / Bremse deaktivieren" />
<Parameter Name="SCALE_ENCOD_INCR" ID="109" Value="491520" Description="Encoder1: Encoder scaling: increments per encoder revolution" />
<Parameter Name="ENCOD_LINES_PER_REVO" ID="1571" Value="30" Description="Encoder1: Encoder scaling: Lines/signal periods per encoder revolution" />
<Parameter Name="SCALE_ENCOD_INCR" ID="109" Value="491520" Disabled="FALSE" Description="Encoder1: Encoder scaling: increments per encoder revolution" />
<Parameter Name="ENCOD_LINES_PER_REVO" ID="1571" Value="30" Disabled="FALSE" Description="Encoder1: Encoder scaling: Lines/signal periods per encoder revolution" />
<Parameter Name="VCTRL_ENCOD_REV" ID="330" Value="30" Disabled="TRUE" Description="Motor encoder: Gear: Encoder revolutions" />
<Parameter Name="F_SWITCH" ID="347" Value="20000" Unit="cps" Description="Inverter: Switch frequency" />
</Root>
</AcoposParameterTable>

View File

@@ -1,12 +1,5 @@
$ EZ-EDS Version 3.9 Generated Electronic Data Sheet
$ EZ-EDS Version 3.25.1.20181218 Generated Electronic Data Sheet
$ ****************************************************************************
$
$ File: HILSCHER COMX 100XX-RE_EIS.EDS
$
$ Author: Ralf Hornung, Hilscher GmbH, Hattersheim, Germany
$ hotline@hilscher.com
$ Date: 20.08.06
$
$ ****************************************************************************
$
@@ -16,49 +9,18 @@ $ Changes in this file can cause configuration or communication problems.
$
$ ****************************************************************************
$
$ Changes:
$
$ Version Date Name Description
$ -------------------------------------------------------------------------
$ 1.8 02.12.2011 KaiM - Changed maximum input and output sizes
$ to 504.
$
$ 1.7 05.10.2011 RalfH - ProdName to COMX 100XX-RE/EIS
$
$ 1.6 27.04.2011 KaiM - Changed InterfaceLabel1 and InterfaceLabel2
$ to "port1" and "port2", respectively.
$ - Deleted port section
$
$ 1.5 04.02.2011 KaiM - Added Revision, MaxInst,
$ Number_Of_Static_Instances,
$ and Max_Number_Of_Dynamic_Instances
$ to Ethernet Link Class entry
$
$ 1.4 02.02.2011 KaiM - Changed DLR revision to 2
$
$ 1.3 11.01.2011 KaiM - Added Ehternet Link Class section
$
$ 1.2 14.12.2010 KaiM - Adapted Capacity section
$
$ 1.1 08.12.2010 KaiM - Added input only connection
$ - Added paramters for connection points
$ and adapted corresponding connection paths
$ - Added entry for DLR
$ - Changed MaxMsgConnections to 6
$
$ 1.0 20.08.060 RalfH - created
$
$ ****************************************************************************
[File]
DescText = "EDS-File for comX100XX-RE EtherNet/IP Adapter";
CreateDate = 04-17-2008;
CreateTime = 10:00:00;
ModDate = 12-02-2011;
ModTime = 09:05:55;
Revision = 1.8;
CreateDate = 09-04-2020;
CreateTime = 16:40:00;
ModDate = 09-04-2020;
ModTime = 16:40:00;
Revision = 1.0;
HomeURL = "www.hilscher.com";
[Device]
VendCode = 283;
VendName = "Hilscher GmbH";
@@ -185,6 +147,8 @@ $ ****************************************************************************
; $ decimal places
[Assembly]
Object_Name = "Assembly Object";
Object_Class_Code = 0x04;
Assem100 =
"Bytes Out",
,
@@ -709,8 +673,12 @@ $ ****************************************************************************
16,Param3;
[Connection Manager]
Object_Name = "Connection Manager Object";
Object_Class_Code = 0x06;
PITNS = Yes; $ Support of Network Segment: Production Inhibit Time Milliseconds
PITNS_usec = No; $ Support of Network Segment: Production Inhibit Time Microseconds
Connection1 =
0x04010002, $ Trigger and Transport
0x04070002, $ Trigger and Transport
0x44644405, $ Point Multicast
,Param1,Assem100, $ OT RPI Size format
,Param2,Assem101, $ TO rpi size format
@@ -721,19 +689,19 @@ $ ****************************************************************************
"20 04 24 01 2C [Param6] 2C [Param5]"; $ path
Connection2 =
0x01010002, $ Trigger and Transport
0x01070002, $ Trigger and Transport
0x44244305, $ Point Multicast
,0,, $ OT RPI Size format
,Param2,Assem101, $ TO rpi size format
,, $ config 1
,, $ config 2
"Listen only", $ connection name
"Assembly Object In/Out Data", $ help string
"", $ help string
"20 04 24 01 2C [Param8] 2C [Param5]"; $ path
Connection3 =
0x02010002, $ Trigger and Transport
0x44244305, $ Point Multicast
0x02070002, $ Trigger and Transport
0x44644305, $ Point Multicast
,0,, $ OT RPI Size format
,Param2,Assem101, $ TO rpi size format
,, $ config 1
@@ -742,37 +710,47 @@ $ ****************************************************************************
"", $ help string
"20 04 24 01 2C [Param7] 2C [Param5]"; $ path
[Port]
Port1 =
TCP,
"Port 1",
"20 F5 24 01",
2;
[Capacity]
ConnOverhead = .004; $ Connection Overhead
MaxIOConnections = 3; $ Maximum number of Class 1 Connections
MaxMsgConnections = 6; $ Maximum number of Class 3 Connections
MaxIOConnections = 5; $ Maximum number of Class 1 Connections
MaxMsgConnections = 8; $ Maximum number of Class 3 Connections
TSpec1 = TxRx, 10, 4000; $ packets per sec @ 10 bytes
TSpec2 = TxRx, 504, 3000; $ packets per sec @ 504 bytes
[DLR Class]
Revision = 2;
Revision = 3;
Object_Name = "Device Level Ring Object";
Object_Class_Code = 0x47;
MaxInst = 1;
Number_Of_Static_Instances = 1;
Max_Number_Of_Dynamic_Instances = 0;
[TCP/IP Interface Class]
Revision = 4;
Object_Name = "TCP/IP Interface Object";
Object_Class_Code = 0xF5;
MaxInst = 1;
Number_Of_Static_Instances = 1;
Max_Number_Of_Dynamic_Instances = 0;
[Ethernet Link Class]
Revision = 3;
Revision = 4;
Object_Name = "Ethernet Link Object";
Object_Class_Code = 0xF6;
MaxInst = 2;
Number_Of_Static_Instances = 2;
Max_Number_Of_Dynamic_Instances = 0;
InterfaceLabel1 = "port1";
InterfaceLabel2 = "port2";
[QoS Class]
Revision = 1;
Object_Name = "QoS Object";
Object_Class_Code = 0x48;
MaxInst = 1;
Number_Of_Static_Instances = 1;
Max_Number_Of_Dynamic_Instances = 0;
$ ****************************************************************************
$ EOF
$ ****************************************************************************

View File

@@ -5,17 +5,17 @@ HostName=SL12.xy.org
Destination=192.168.3.1
CommunicationMode=1
[GUI]
SortOrder=0
NameWidth=348
SortOrder=0
ASVarWidth=334
ViewMode=0
SADRWidth=100
SortColumn=0
SADRWidth=100
DescriptionWidth=100
ChannelWidth=316
SplitterPosition=1377
SDVarWidth=376
StateWidth=100
SDVarWidth=376
[Manual]
Timeout=1000
Port=50000

View File

@@ -51,7 +51,7 @@
</Selector>
</Group>
<Group ID="[1]" Description="x">
<Property ID="Name" Value="EStopButton" />
<Property ID="Name" Value="EStopPanel" />
<Property ID="Message" Value="{=$Machine/Alarms/EStopPanel}" />
<Property ID="Code" Value="2" />
<Selector ID="Behavior" Value="UserDefined">

View File

@@ -3,10 +3,10 @@
<Hardware xmlns="http://br-automation.co.at/AS/Hardware">
<Module Name="8AC114.60-2" Type="8AC114.60-2" Version="1.0.0.8">
<Connection Connector="SS" TargetModule="8V1016.50-2" TargetConnector="SS1" />
<Connection Connector="PLK1" TargetModule="X20BC0083" TargetConnector="PLK2" NodeNumber="2">
<Connection Connector="PLK1" TargetModule="X20BC0083" TargetConnector="PLK2" NodeNumber="12">
<Cable Type="PowerlinkCable" Length="10" Version="1.0.0.3" />
</Connection>
<Connection Connector="PLK2" TargetModule="8AC114.60-2a" TargetConnector="PLK1" NodeNumber="2">
<Connection Connector="PLK2" TargetModule="8AC114.60-2a" TargetConnector="PLK1" NodeNumber="12">
<Cable Type="PowerlinkCable" Length="10" Version="1.0.0.3" />
</Connection>
</Module>
@@ -33,27 +33,37 @@
<Parameter ID="ReferenceDistanceIsReadOnly" Location="DriveConfiguration/Channel[1]/RealAxis/MechanicalElements/RotaryToLinearTransformation" Value="0" />
<Parameter ID="ReferenceDistance" Location="DriveConfiguration/Channel[1]/RealAxis/MechanicalElements/RotaryToLinearTransformation" Value="30" />
<Parameter ID="ModeIsReadOnly" Location="DriveConfiguration/Channel[1]/RealAxis/Controller" Value="0" />
<Parameter ID="Mode" Location="DriveConfiguration/Channel[1]/RealAxis/Controller" Value="PositionController" />
<Parameter ID="ProportionalGain" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Position" Value="50.0" />
<Parameter ID="Mode" Location="DriveConfiguration/Channel[1]/RealAxis/Controller" Value="PositionControllerWithTorqueFeedForward" />
<Parameter ID="ProportionalGainIsReadOnly" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Position" Value="0" />
<Parameter ID="ProportionalGain" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Position" Value="500" />
<Parameter ID="IntegrationTimeIsReadOnly" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Position" Value="0" />
<Parameter ID="IntegrationTime" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Position" Value="0.0" />
<Parameter ID="PredictionTime" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Position" Value="0.0004" />
<Parameter ID="TotalDelayTime" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Position" Value="0.0004" />
<Parameter ID="ProportionalGainIsReadOnly" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Speed" Value="0" />
<Parameter ID="ProportionalGain" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Speed" Value="2.0" />
<Parameter ID="ProportionalGain" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Speed" Value="3.6" />
<Parameter ID="IntegrationTimeIsReadOnly" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Speed" Value="0" />
<Parameter ID="IntegrationTime" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Speed" Value="0.0" />
<Parameter ID="FilterTimeIsReadOnly" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Speed" Value="0" />
<Parameter ID="FilterTime" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Speed" Value="0.0" />
<Parameter ID="LoopFilter1" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/LoopFilters" Value="NotUsed" />
<Parameter ID="FilterTime" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/Speed" Value="0.0012" />
<Parameter ID="FeedForwardIsReadOnly" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode" Value="0" />
<Parameter ID="FeedForward" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode" Value="Standard" />
<Parameter ID="TorqueLoad" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/FeedForward" Value="0.0102" />
<Parameter ID="TorquePositive" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/FeedForward" Value="0.1295" />
<Parameter ID="TorqueNegative" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/FeedForward" Value="0.128" />
<Parameter ID="SpeedTorqueFactor" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/FeedForward" Value="0.00867" />
<Parameter ID="Inertia" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/FeedForward" Value="0.000151" />
<Parameter ID="AccelerationFilterTime" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/FeedForward" Value="0.0" />
<Parameter ID="LoopFilter1" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/LoopFilters" Value="Notch" />
<Parameter ID="CenterFrequency" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/LoopFilters/LoopFilter1" Value="2430.386" />
<Parameter ID="Bandwidth" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/LoopFilters/LoopFilter1" Value="400" />
<Parameter ID="LoopFilter2" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/LoopFilters" Value="NotUsed" />
<Parameter ID="LoopFilter3" Location="DriveConfiguration/Channel[1]/RealAxis/Controller/Mode/LoopFilters" Value="NotUsed" />
<Parameter ID="Mode" Location="DriveConfiguration/Channel[1]/RealAxis/Homing" Value="Direct" />
<Parameter ID="Mode" Location="DriveConfiguration/Channel[1]/RealAxis/Homing" Value="Absolute" />
<Parameter ID="Position" Location="DriveConfiguration/Channel[1]/RealAxis/Homing/Mode" Value="0.0" />
<Parameter ID="ReferencePulse" Location="DriveConfiguration/Channel[1]/RealAxis/Homing/Mode" Value="NotUsed" />
<Parameter ID="RestorePositionVariable" Location="DriveConfiguration/Channel[1]/RealAxis/Homing" Value="" />
<Parameter ID="Quickstop" Location="DriveConfiguration/Channel[1]/RealAxis/StopReaction" Value="DecelerationLimit" />
<Parameter ID="DriveError" Location="DriveConfiguration/Channel[1]/RealAxis/StopReaction" Value="DecelerationLimit" />
<Parameter ID="PositionError" Location="DriveConfiguration/Channel[1]/RealAxis/MovementErrorLimits" Value="1.0" />
<Parameter ID="PositionError" Location="DriveConfiguration/Channel[1]/RealAxis/MovementErrorLimits" Value="100" />
<Parameter ID="VelocityErrorMonitoring" Location="DriveConfiguration/Channel[1]/RealAxis/MovementErrorLimits" Value="Automatic1" />
<Parameter ID="JerkFilter" Location="DriveConfiguration/Channel[1]/RealAxis" Value="NotUsed" />
<Parameter ID="Level" Location="DriveConfiguration/Channel[1]/RealAxis/DigitalInputs/HomingSwitch" Value="High" />
@@ -64,7 +74,8 @@
<Parameter ID="Input" Location="DriveConfiguration/Channel[1]/RealAxis/DigitalInputs/Quickstop" Value="Trigger2" />
<Parameter ID="SimulationModeOnPLC" Location="DriveConfiguration/Channel[1]/RealAxis/Simulation" Value="SetValueGeneration" />
<Parameter ID="SimulationModeOnACOPOS" Location="DriveConfiguration/Channel[1]/RealAxis/Simulation" Value="NotUsed" />
<Parameter ID="FeatureRef[1]" Location="DriveConfiguration/Channel[1]/RealAxis/AxisFeatures" Value="ACPTHeight" />
<Parameter ID="FeatureRef[1]" Location="DriveConfiguration/Channel[1]/RealAxis/AxisFeatures" Value="" />
<Parameter ID="FeatureRef[1]" Location="DriveConfiguration/Channel[1]/ChannelFeatures" Value="ACPTH" />
</Module>
<Module Name="8V1045.00-2" Type="8V1045.00-2" Version="2.2.0.0">
<Parameter ID="McAcoposTypeID" Location="DriveConfiguration/Module" Value="AcoposConfig" />
@@ -112,24 +123,28 @@
<Module Name="MotorSynchronous_any" Type="MotorSynchronous_any" Version="2.2.1.0">
<Connection Connector="MT" TargetModule="8V1016.50-2" TargetConnector="MT1" />
<Parameter ID="MOTOR_POLEPAIRS" Location="M1/MotorParameters" Value="1" />
<Parameter ID="MOTOR_SPEED_RATED" Location="M1/MotorParameters" Value="2000" />
<Parameter ID="MOTOR_SPEED_MAX" Location="M1/MotorParameters" Value="2000" />
<Parameter ID="MOTOR_SPEED_RATED" Location="M1/MotorParameters" Value="20000" />
<Parameter ID="MOTOR_SPEED_MAX" Location="M1/MotorParameters" Value="20000" />
<Parameter ID="MOTOR_VOLTAGE_RATED" Location="M1/MotorParameters" Value="230" />
<Parameter ID="MOTOR_CURR_RATED" Location="M1/MotorParameters" Value="1.6" />
<Parameter ID="MOTOR_CURR_STALL" Location="M1/MotorParameters" Value="5.5" />
<Parameter ID="MOTOR_CURR_MAX" Location="M1/MotorParameters" Value="5.5" />
<Parameter ID="MOTOR_TORQ_RATED" Location="M1/MotorParameters" Value="0.14" />
<Parameter ID="MOTOR_TORQ_STALL" Location="M1/MotorParameters" Value="0.48" />
<Parameter ID="MOTOR_TORQ_MAX" Location="M1/MotorParameters" Value="0.48" />
<Parameter ID="MOTOR_VOLTAGE_CONST" Location="M1/MotorParameters" Value="30" />
<Parameter ID="MOTOR_TORQ_CONST" Location="M1/MotorParameters" Value="36.3" />
<Parameter ID="MOTOR_STATOR_RESISTANCE" Location="M1/MotorParameters" Value="9.3" />
<Parameter ID="MOTOR_STATOR_INDUCTANCE" Location="M1/MotorParameters" Value="3" />
<Parameter ID="MOTOR_TORQ_RATED" Location="M1/MotorParameters" Value="0.28" />
<Parameter ID="MOTOR_TORQ_STALL" Location="M1/MotorParameters" Value="0.28" />
<Parameter ID="MOTOR_TORQ_MAX" Location="M1/MotorParameters" Value="0.95" />
<Parameter ID="MOTOR_VOLTAGE_CONST" Location="M1/MotorParameters" Value="15" />
<Parameter ID="MOTOR_TORQ_CONST" Location="M1/MotorParameters" Value="0.173" />
<Parameter ID="MOTOR_STATOR_RESISTANCE" Location="M1/MotorParameters" Value="18.6" />
<Parameter ID="MOTOR_STATOR_INDUCTANCE" Location="M1/MotorParameters" Value="6" />
<Parameter ID="MOTOR_INERTIA" Location="M1/MotorParameters" Value="0.0000037" />
<Parameter ID="MOTOR_AMB_TEMP_RATED" Location="M1/MotorParameters" Value="40" />
<Parameter ID="MOTOR_COMMUT_OFFSET" Location="M1/MotorParameters/EncoderMounting/Angle" Value="1.15" />
<Parameter ID="TemperatureSensor" Location="M1/MotorParameters" Value="NotUsed" />
<Parameter ID="MOTOR_COMMUT_OFFSET" Location="M1/MotorParameters/EncoderMounting/Angle" Value="1.99" />
<Parameter ID="TemperatureSensor" Location="M1/MotorParameters" Value="PTCSwitch" />
<Parameter ID="MOTOR_TEMPSENS_PAR1" Location="M1/MotorParameters/TemperatureSensor" Value="1000" />
<Parameter ID="MOTOR_TEMPSENS_PAR2" Location="M1/MotorParameters/TemperatureSensor" Value="50" />
<Parameter ID="MOTOR_TEMPSENS_PAR3" Location="M1/MotorParameters/TemperatureSensor" Value="110" />
<Parameter ID="TemperatureModel" Location="M1/MotorParameters" Value="NotUsed" />
<Parameter ID="Encoder" Location="M1" Value="NotUsed" />
</Module>
<Module Name="X20AI4222" Type="X20AI4222" Version="1.1.0.0">
<Connection Connector="SS1" TargetModule="X20TB12c" TargetConnector="SS" />
@@ -172,6 +187,9 @@
</Connector>
<Connector Name="IF3">
<Parameter ID="CycleTime" Value="1200" />
<Group ID="Channel1" />
<Parameter ID="ChannelID1" Value="McAcpBroadcast" />
<Parameter ID="ChannelType1" Value="OCTET[96]" />
</Connector>
<Parameter ID="ConfigurationID" Value="KD_Fritzmeier_Batteriewanne_Config1" />
<Parameter ID="PermanentPvSize" Value="1024" />

View File

@@ -1,4 +1,3 @@
VAR_CONFIG
gAxAbsOffsetHeight AT %ML0; (*!!Permanent*)
END_VAR

View File

@@ -22,7 +22,8 @@
<AutomationRuntime Version="D4.90" />
<Build GccVersion="4.1.2" />
<DefaultTargetMemory Tasks="UserROM" />
<Transfer SavedOfflineInstallationFolder="" SavedPipDestinationFolder="" SavedRuntimeUtilityCenterPackagePath="" />
<Safety SafetyRelease="0.0" />
<Transfer AddToUserPart="False" AdditionalUserDir="" AllowDowngrade="True" AllowInitialTransfer="False" AllowPartitioning="False" ExecuteInitExitProgram="True" ForceInitialTransfer="False" IdentificationTypeValue="" IgnoreVersion="True" KeepNonVolatileMemory="False" ModuleSystemForPip="" PreserveVariableValues="True" ProjectConsistent="True" RebootDuringTransfer="False" SavedOfflineInstallationFolder="" SavedPipDestinationFolder="" SavedRuntimeUtilityCenterPackagePath="" TargetIdentificationType="Always" TryToBootInRunMode="False" UserFilesIgnoreDifference="True" />
<Vc FirmwareVersion="V4.72.6" />
<OnlineConfiguration Name="Fritzmeir-Laser-Eval" DeviceType="TCPIP" DeviceParameters="/IF=tcpip /LOPO=11159 /SA=133" ConnectionParameters="/COMT=2500 /RT=1000 /AM=* /SDT=5 /DAIP=192.168.1.98 /REPO=11159 /ANSL=1 /PT=11169" Description="" />
</Configuration>

View File

@@ -6,7 +6,9 @@
</TaskClass>
<TaskClass Name="Cyclic#2" />
<TaskClass Name="Cyclic#3" />
<TaskClass Name="Cyclic#4" />
<TaskClass Name="Cyclic#4">
<Task Name="DummyPrg" Source="MachCtrl.DummyPrg.prg" Memory="UserROM" Language="IEC" Debugging="true" />
</TaskClass>
<TaskClass Name="Cyclic#5" />
<TaskClass Name="Cyclic#6" />
<TaskClass Name="Cyclic#7" />
@@ -16,6 +18,7 @@
</DataObjects>
<NcDataObjects>
<NcDataObject Name="AcpParTab" Source="Parameter.AcpParTab.dob" Memory="UserROM" Language="Apt" />
<NcDataObject Name="AcpParTabH" Source="Parameter.AcpParTabH.dob" Memory="UserROM" Language="Apt" />
</NcDataObjects>
<Binaries>
<BinaryObject Name="FWRules" Source="" Memory="UserROM" Language="Binary" />
@@ -49,7 +52,6 @@
<LibraryObject Name="CoTrace" Source="Libraries.CoTrace.lby" Memory="UserROM" Language="binary" Debugging="true" />
<LibraryObject Name="AsZip" Source="Libraries.AsZip.lby" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="Common" Source="LibrariesUser.Common.lby" Memory="UserROM" Language="IEC" Debugging="true" />
<LibraryObject Name="runtime" Source="" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="astime" Source="" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="fileio" Source="" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="powerlnk" Source="" Memory="UserROM" Language="Binary" Debugging="true" />
@@ -61,10 +63,15 @@
<LibraryObject Name="mpbase" Source="" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="asepl" Source="" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="mcacpax" Source="" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="sys_lib" Source="" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="mpalarmx" Source="" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="asbrstr" Source="" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="dataobj" Source="" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="standard" Source="" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="MTBasics" Source="Libraries.MTBasics.lby" Memory="UserROM" Language="binary" Debugging="true" />
<LibraryObject Name="brsystem" Source="Libraries.brsystem.lby" Memory="UserROM" Language="binary" Debugging="true" />
<LibraryObject Name="sys_lib" Source="Libraries.sys_lib.lby" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="MTTypes" Source="Libraries.MTTypes.lby" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="runtime" Source="Libraries.runtime.lby" Memory="UserROM" Language="Binary" Debugging="true" />
<LibraryObject Name="MTFilter" Source="Libraries.MTFilter.lby" Memory="UserROM" Language="binary" Debugging="true" />
</Libraries>
</SwConfiguration>

View File

@@ -6,4 +6,5 @@ VAR_CONFIG
HeightCtrl:bInTest AT %IX."X20DI9371".DigitalInput12;
HeightCtrl:bOuCalRequest AT %QX."X20DO9322".DigitalOutput02;
HeightCtrl:bOuStrobe AT %QX."X20DO9322".DigitalOutput01;
gdiSystemTime AT %ID."X20CP0483".SystemTime;
END_VAR

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Configuration>
<Element ID="ACPTHeight" Type="axisfeature">
<Element ID="ACPTH" Type="axisfeature">
<Selector ID="Type" Value="ParTab">
<Property ID="ParTabRef" Value="AcpParTab" />
<Property ID="ParTabRef" Value="AcpParTabH" />
</Selector>
</Element>
</Configuration>

View File

@@ -15,23 +15,23 @@
<Group ID="Position">
<Property ID="LowerLimitMin" Value="-1.79769313486231E308" />
<Property ID="UpperLimitMax" Value="1.79769313486231E308" />
<Property ID="LowerLimit" Value="0" />
<Property ID="UpperLimit" Value="38" />
<Property ID="LowerLimit" Value="0.5" />
<Property ID="UpperLimit" Value="47" />
</Group>
<Property ID="VelocityIsReadOnly" Value="0" />
<Selector ID="Velocity">
<Property ID="VelocityMax" Value="3.4E38" />
<Property ID="Velocity" Value="10.0" />
<Property ID="Velocity" Value="350" Description="Velocity limit in any movement direction (Reicht f. Bewegung 20mm aus)" />
</Selector>
<Property ID="AccelerationIsReadOnly" Value="0" />
<Selector ID="Acceleration">
<Property ID="AccelerationMax" Value="3.4E38" />
<Property ID="Acceleration" Value="50.0" />
<Property ID="Acceleration" Value="7500" Description="Acceleration limit in any movement direction 5000" />
</Selector>
<Property ID="DecelerationIsReadOnly" Value="0" />
<Selector ID="Deceleration">
<Property ID="DecelerationMax" Value="3.4E38" />
<Property ID="Deceleration" Value="50.0" />
<Property ID="Deceleration" Value="7500" />
</Selector>
</Selector>
<Selector ID="Alarms" Value="None" />