Small refactoring
- Moved fb's around - Removed libraries from repo
This commit is contained in:
65
PLC/POUs/Analog/FB_AnalogOutput.TcPOU
Normal file
65
PLC/POUs/Analog/FB_AnalogOutput.TcPOU
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TcPlcObject Version="1.1.0.1">
|
||||
<POU Name="FB_AnalogOutput" Id="{5ea9527b-d363-4c01-ba95-f8c298545979}" SpecialFunc="None">
|
||||
<Declaration><![CDATA[FUNCTION_BLOCK FINAL FB_AnalogOutput
|
||||
VAR_INPUT
|
||||
// Setpoint
|
||||
rSetpoint : REAL;
|
||||
|
||||
// config data for analog output scaling
|
||||
stScalingConfig : ST_ANALOG_IO_CONFIG;
|
||||
|
||||
// Global switch to dissable all errors
|
||||
xReleaseErrors : BOOL := TRUE;
|
||||
|
||||
// Enables or dissables hardware errors
|
||||
xReleaseHardwareErrors : BOOL := TRUE;
|
||||
|
||||
// Input to confirm all errors
|
||||
xConfirmAlarms : BOOL;
|
||||
|
||||
// Input to tell the fb thats ist used inside a unit test
|
||||
// Fb will not throw error messages
|
||||
{attribute 'hide'}
|
||||
xInUnitTestMode : BOOL := FALSE;
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
iAnalogValue AT %Q* : INT;
|
||||
|
||||
// Error in function block
|
||||
xError : BOOL;
|
||||
END_VAR
|
||||
VAR
|
||||
// Setpoint
|
||||
_rSetpointInternal : REAL;
|
||||
|
||||
// Name of the function block
|
||||
_sName : STRING;
|
||||
|
||||
// Scaling factor for conversion
|
||||
_rConversionFactor : REAL;
|
||||
|
||||
// Base offset for scaling factor
|
||||
_rBaseOffset : REAL;
|
||||
|
||||
// Temporary calculated analog value
|
||||
_rTempAnalogValue : REAL;
|
||||
|
||||
// Config error
|
||||
_xConfigError : BOOL;
|
||||
|
||||
// Max process value
|
||||
_rPVMax : REAL;
|
||||
|
||||
// Min process value
|
||||
_rPVMin : REAL;
|
||||
|
||||
// Config error alarm
|
||||
_fbAlarmConfigError : FB_TcAlarm;
|
||||
END_VAR
|
||||
]]></Declaration>
|
||||
<Implementation>
|
||||
<ST><![CDATA[]]></ST>
|
||||
</Implementation>
|
||||
</POU>
|
||||
</TcPlcObject>
|
||||
Reference in New Issue
Block a user