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 WORDS_TO_DWORD.fct under assembling directory in utils typelib #242

Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<Function Name="ASSEMBLE_DWORD_FROM_WORDS" Comment="this Function combines the 2 WORDS to a dword">
<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="">
<With Var="IN_00"/>
<With Var="IN_01"/>
</Event>
</EventInputs>
<EventOutputs>
<Event Name="CNF" Type="Event" Comment="">
<With Var=""/>
</Event>
</EventOutputs>
<InputVars>
<VarDeclaration Name="IN_00" Type="WORD" Comment="WORD 00"/>
<VarDeclaration Name="IN_01" Type="WORD" Comment="WORD 01"/>
</InputVars>
<OutputVars>
<VarDeclaration Name="" Type="DWORD" Comment=""/>
</OutputVars>
</InterfaceList>
<FunctionBody>
<ST><![CDATA[(* this Function combines the 2 WORDS to a dword *)
FUNCTION ASSEMBLE_DWORD_FROM_WORDS : DWORD

VAR_INPUT
IN_00 : WORD; // WORD 00
IN_01 : WORD; // WORD 01
END_VAR

ASSEMBLE_DWORD_FROM_WORDS.%W0 := IN_00;
MoritzO02 marked this conversation as resolved.
Show resolved Hide resolved
ASSEMBLE_DWORD_FROM_WORDS.%W1 := IN_01;

END_FUNCTION
]]></ST>
</FunctionBody>
</Function>
Loading