Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added LWORD_TO_XX.fct files in splitting to utils-1.0.0 #245

Merged
merged 13 commits into from
Aug 16, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
<?xml version="1.0" encoding="UTF-8"?>
<Function Name="SPLIT_LWORD_INTO_BOOLS" Comment="">
<Identification Standard="61499-1" Description="Copyright (c) 2024 HR Agrartechnik GmbH &#10; &#10;This program and the accompanying materials are made &#10;available under the terms of the Eclipse Public License 2.0 &#10;which is available at https://www.eclipse.org/legal/epl-2.0/ &#10; &#10;SPDX-License-Identifier: EPL-2.0" >
</Identification>
<VersionInfo Version="1.0" Author="franz" Date="2024-02-22">
</VersionInfo>
<CompilerInfo>
</CompilerInfo>
<InterfaceList>
<EventInputs>
<Event Name="REQ" Type="Event" Comment="Normal Execution Request">
<With Var="IN"/>
</Event>
</EventInputs>
<EventOutputs>
<Event Name="CNF" Type="Event" Comment="Execution Confirmation">
<With Var="OUT_00"/>
<With Var="OUT_01"/>
<With Var="OUT_02"/>
<With Var="OUT_03"/>
<With Var="OUT_04"/>
<With Var="OUT_05"/>
<With Var="OUT_06"/>
<With Var="OUT_07"/>
<With Var="OUT_08"/>
<With Var="OUT_09"/>
<With Var="OUT_10"/>
<With Var="OUT_11"/>
<With Var="OUT_12"/>
<With Var="OUT_13"/>
<With Var="OUT_14"/>
<With Var="OUT_15"/>
<With Var="OUT_16"/>
<With Var="OUT_17"/>
<With Var="OUT_18"/>
<With Var="OUT_19"/>
<With Var="OUT_20"/>
<With Var="OUT_21"/>
<With Var="OUT_22"/>
<With Var="OUT_23"/>
<With Var="OUT_24"/>
<With Var="OUT_25"/>
<With Var="OUT_26"/>
<With Var="OUT_27"/>
<With Var="OUT_28"/>
<With Var="OUT_29"/>
<With Var="OUT_30"/>
<With Var="OUT_31"/>
<With Var="OUT_32"/>
<With Var="OUT_33"/>
<With Var="OUT_34"/>
<With Var="OUT_35"/>
<With Var="OUT_36"/>
<With Var="OUT_37"/>
<With Var="OUT_38"/>
<With Var="OUT_39"/>
<With Var="OUT_40"/>
<With Var="OUT_41"/>
<With Var="OUT_42"/>
<With Var="OUT_43"/>
<With Var="OUT_44"/>
<With Var="OUT_45"/>
<With Var="OUT_46"/>
<With Var="OUT_47"/>
<With Var="OUT_48"/>
<With Var="OUT_49"/>
<With Var="OUT_50"/>
<With Var="OUT_51"/>
<With Var="OUT_52"/>
<With Var="OUT_53"/>
<With Var="OUT_54"/>
<With Var="OUT_55"/>
<With Var="OUT_56"/>
<With Var="OUT_57"/>
<With Var="OUT_58"/>
<With Var="OUT_59"/>
<With Var="OUT_60"/>
<With Var="OUT_61"/>
<With Var="OUT_62"/>
<With Var="OUT_63"/>
</Event>
</EventOutputs>
<InputVars>
<VarDeclaration Name="IN" Type="LWORD" Comment=""/>
</InputVars>
<OutputVars>
<VarDeclaration Name="OUT_00" Type="BOOL" Comment="BIT 00"/>
<VarDeclaration Name="OUT_01" Type="BOOL" Comment="BIT 01"/>
<VarDeclaration Name="OUT_02" Type="BOOL" Comment="BIT 02"/>
<VarDeclaration Name="OUT_03" Type="BOOL" Comment="BIT 03"/>
<VarDeclaration Name="OUT_04" Type="BOOL" Comment="BIT 04"/>
<VarDeclaration Name="OUT_05" Type="BOOL" Comment="BIT 05"/>
<VarDeclaration Name="OUT_06" Type="BOOL" Comment="BIT 06"/>
<VarDeclaration Name="OUT_07" Type="BOOL" Comment="BIT 07"/>
<VarDeclaration Name="OUT_08" Type="BOOL" Comment="BIT 08"/>
<VarDeclaration Name="OUT_09" Type="BOOL" Comment="BIT 09"/>
<VarDeclaration Name="OUT_10" Type="BOOL" Comment="BIT 10"/>
<VarDeclaration Name="OUT_11" Type="BOOL" Comment="BIT 11"/>
<VarDeclaration Name="OUT_12" Type="BOOL" Comment="BIT 12"/>
<VarDeclaration Name="OUT_13" Type="BOOL" Comment="BIT 13"/>
<VarDeclaration Name="OUT_14" Type="BOOL" Comment="BIT 14"/>
<VarDeclaration Name="OUT_15" Type="BOOL" Comment="BIT 15"/>
<VarDeclaration Name="OUT_16" Type="BOOL" Comment="BIT 16"/>
<VarDeclaration Name="OUT_17" Type="BOOL" Comment="BIT 17"/>
<VarDeclaration Name="OUT_18" Type="BOOL" Comment="BIT 18"/>
<VarDeclaration Name="OUT_19" Type="BOOL" Comment="BIT 19"/>
<VarDeclaration Name="OUT_20" Type="BOOL" Comment="BIT 20"/>
<VarDeclaration Name="OUT_21" Type="BOOL" Comment="BIT 21"/>
<VarDeclaration Name="OUT_22" Type="BOOL" Comment="BIT 22"/>
<VarDeclaration Name="OUT_23" Type="BOOL" Comment="BIT 23"/>
<VarDeclaration Name="OUT_24" Type="BOOL" Comment="BIT 24"/>
<VarDeclaration Name="OUT_25" Type="BOOL" Comment="BIT 25"/>
<VarDeclaration Name="OUT_26" Type="BOOL" Comment="BIT 26"/>
<VarDeclaration Name="OUT_27" Type="BOOL" Comment="BIT 27"/>
<VarDeclaration Name="OUT_28" Type="BOOL" Comment="BIT 28"/>
<VarDeclaration Name="OUT_29" Type="BOOL" Comment="BIT 29"/>
<VarDeclaration Name="OUT_30" Type="BOOL" Comment="BIT 30"/>
<VarDeclaration Name="OUT_31" Type="BOOL" Comment="BIT 31"/>
<VarDeclaration Name="OUT_32" Type="BOOL" Comment="BIT 32"/>
<VarDeclaration Name="OUT_33" Type="BOOL" Comment="BIT 33"/>
<VarDeclaration Name="OUT_34" Type="BOOL" Comment="BIT 34"/>
<VarDeclaration Name="OUT_35" Type="BOOL" Comment="BIT 35"/>
<VarDeclaration Name="OUT_36" Type="BOOL" Comment="BIT 36"/>
<VarDeclaration Name="OUT_37" Type="BOOL" Comment="BIT 37"/>
<VarDeclaration Name="OUT_38" Type="BOOL" Comment="BIT 38"/>
<VarDeclaration Name="OUT_39" Type="BOOL" Comment="BIT 39"/>
<VarDeclaration Name="OUT_40" Type="BOOL" Comment="BIT 40"/>
<VarDeclaration Name="OUT_41" Type="BOOL" Comment="BIT 41"/>
<VarDeclaration Name="OUT_42" Type="BOOL" Comment="BIT 42"/>
<VarDeclaration Name="OUT_43" Type="BOOL" Comment="BIT 43"/>
<VarDeclaration Name="OUT_44" Type="BOOL" Comment="BIT 44"/>
<VarDeclaration Name="OUT_45" Type="BOOL" Comment="BIT 45"/>
<VarDeclaration Name="OUT_46" Type="BOOL" Comment="BIT 46"/>
<VarDeclaration Name="OUT_47" Type="BOOL" Comment="BIT 47"/>
<VarDeclaration Name="OUT_48" Type="BOOL" Comment="BIT 48"/>
<VarDeclaration Name="OUT_49" Type="BOOL" Comment="BIT 49"/>
<VarDeclaration Name="OUT_50" Type="BOOL" Comment="BIT 50"/>
<VarDeclaration Name="OUT_51" Type="BOOL" Comment="BIT 51"/>
<VarDeclaration Name="OUT_52" Type="BOOL" Comment="BIT 52"/>
<VarDeclaration Name="OUT_53" Type="BOOL" Comment="BIT 53"/>
<VarDeclaration Name="OUT_54" Type="BOOL" Comment="BIT 54"/>
<VarDeclaration Name="OUT_55" Type="BOOL" Comment="BIT 55"/>
<VarDeclaration Name="OUT_56" Type="BOOL" Comment="BIT 56"/>
<VarDeclaration Name="OUT_57" Type="BOOL" Comment="BIT 57"/>
<VarDeclaration Name="OUT_58" Type="BOOL" Comment="BIT 58"/>
<VarDeclaration Name="OUT_59" Type="BOOL" Comment="BIT 59"/>
<VarDeclaration Name="OUT_60" Type="BOOL" Comment="BIT 60"/>
<VarDeclaration Name="OUT_61" Type="BOOL" Comment="BIT 61"/>
<VarDeclaration Name="OUT_62" Type="BOOL" Comment="BIT 62"/>
<VarDeclaration Name="OUT_63" Type="BOOL" Comment="BIT 63"/>
</OutputVars>
</InterfaceList>
<FunctionBody>
<ST><![CDATA[FUNCTION SPLIT_LWORD_INTO_BOOLS
(* this Function extracts the 64 BOOLS from a lword *)

VAR_INPUT
IN : LWORD;
END_VAR

VAR_OUTPUT
OUT_00 : BOOL; // BIT 00
OUT_01 : BOOL; // BIT 01
OUT_02 : BOOL; // BIT 02
OUT_03 : BOOL; // BIT 03
OUT_04 : BOOL; // BIT 04
OUT_05 : BOOL; // BIT 05
OUT_06 : BOOL; // BIT 06
OUT_07 : BOOL; // BIT 07
OUT_08 : BOOL; // BIT 08
OUT_09 : BOOL; // BIT 09
OUT_10 : BOOL; // BIT 10
OUT_11 : BOOL; // BIT 11
OUT_12 : BOOL; // BIT 12
OUT_13 : BOOL; // BIT 13
OUT_14 : BOOL; // BIT 14
OUT_15 : BOOL; // BIT 15
OUT_16 : BOOL; // BIT 16
OUT_17 : BOOL; // BIT 17
OUT_18 : BOOL; // BIT 18
OUT_19 : BOOL; // BIT 19
OUT_20 : BOOL; // BIT 20
OUT_21 : BOOL; // BIT 21
OUT_22 : BOOL; // BIT 22
OUT_23 : BOOL; // BIT 23
OUT_24 : BOOL; // BIT 24
OUT_25 : BOOL; // BIT 25
OUT_26 : BOOL; // BIT 26
OUT_27 : BOOL; // BIT 27
OUT_28 : BOOL; // BIT 28
OUT_29 : BOOL; // BIT 29
OUT_30 : BOOL; // BIT 30
OUT_31 : BOOL; // BIT 31
OUT_32 : BOOL; // BIT 32
OUT_33 : BOOL; // BIT 33
OUT_34 : BOOL; // BIT 34
OUT_35 : BOOL; // BIT 35
OUT_36 : BOOL; // BIT 36
OUT_37 : BOOL; // BIT 37
OUT_38 : BOOL; // BIT 38
OUT_39 : BOOL; // BIT 39
OUT_40 : BOOL; // BIT 40
OUT_41 : BOOL; // BIT 41
OUT_42 : BOOL; // BIT 42
OUT_43 : BOOL; // BIT 43
OUT_44 : BOOL; // BIT 44
OUT_45 : BOOL; // BIT 45
OUT_46 : BOOL; // BIT 46
OUT_47 : BOOL; // BIT 47
OUT_48 : BOOL; // BIT 48
OUT_49 : BOOL; // BIT 49
OUT_50 : BOOL; // BIT 50
OUT_51 : BOOL; // BIT 51
OUT_52 : BOOL; // BIT 52
OUT_53 : BOOL; // BIT 53
OUT_54 : BOOL; // BIT 54
OUT_55 : BOOL; // BIT 55
OUT_56 : BOOL; // BIT 56
OUT_57 : BOOL; // BIT 57
OUT_58 : BOOL; // BIT 58
OUT_59 : BOOL; // BIT 59
OUT_60 : BOOL; // BIT 60
OUT_61 : BOOL; // BIT 61
OUT_62 : BOOL; // BIT 62
OUT_63 : BOOL; // BIT 63
END_VAR

OUT_00 := IN.%X0;
OUT_01 := IN.%X1;
OUT_02 := IN.%X2;
OUT_03 := IN.%X3;
OUT_04 := IN.%X4;
OUT_05 := IN.%X5;
OUT_06 := IN.%X6;
OUT_07 := IN.%X7;
OUT_08 := IN.%X8;
OUT_09 := IN.%X9;
OUT_10 := IN.%X10;
OUT_11 := IN.%X11;
OUT_12 := IN.%X12;
OUT_13 := IN.%X13;
OUT_14 := IN.%X14;
OUT_15 := IN.%X15;
OUT_16 := IN.%X16;
OUT_17 := IN.%X17;
OUT_18 := IN.%X18;
OUT_19 := IN.%X19;
OUT_20 := IN.%X20;
OUT_21 := IN.%X21;
OUT_22 := IN.%X22;
OUT_23 := IN.%X23;
OUT_24 := IN.%X24;
OUT_25 := IN.%X25;
OUT_26 := IN.%X26;
OUT_27 := IN.%X27;
OUT_28 := IN.%X28;
OUT_29 := IN.%X29;
OUT_30 := IN.%X30;
OUT_31 := IN.%X31;
OUT_32 := IN.%X32;
OUT_33 := IN.%X33;
OUT_34 := IN.%X34;
OUT_35 := IN.%X35;
OUT_36 := IN.%X36;
OUT_37 := IN.%X37;
OUT_38 := IN.%X38;
OUT_39 := IN.%X39;
OUT_40 := IN.%X40;
OUT_41 := IN.%X41;
OUT_42 := IN.%X42;
OUT_43 := IN.%X43;
OUT_44 := IN.%X44;
OUT_45 := IN.%X45;
OUT_46 := IN.%X46;
OUT_47 := IN.%X47;
OUT_48 := IN.%X48;
OUT_49 := IN.%X49;
OUT_50 := IN.%X50;
OUT_51 := IN.%X51;
OUT_52 := IN.%X52;
OUT_53 := IN.%X53;
OUT_54 := IN.%X54;
OUT_55 := IN.%X55;
OUT_56 := IN.%X56;
OUT_57 := IN.%X57;
OUT_58 := IN.%X58;
OUT_59 := IN.%X59;
OUT_60 := IN.%X60;
OUT_61 := IN.%X61;
OUT_62 := IN.%X62;
OUT_63 := IN.%X63;
END_FUNCTION
]]></ST>
</FunctionBody>
</Function>
Loading
Loading