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 BYTES_TO_XX.fct files to utilis-1.0.0 #240

Merged
merged 8 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<Function Name="ASSEMBLE_DWORD_FROM_BYTES" Comment="this Function combines the 2 BYTES 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"/>
<With Var="IN_02"/>
<With Var="IN_03"/>
</Event>
</EventInputs>
<EventOutputs>
<Event Name="CNF" Type="Event" Comment="">
<With Var=""/>
</Event>
</EventOutputs>
<InputVars>
<VarDeclaration Name="IN_00" Type="BYTE" Comment="BYTE 00"/>
<VarDeclaration Name="IN_01" Type="BYTE" Comment="BYTE 01"/>
<VarDeclaration Name="IN_02" Type="BYTE" Comment="BYTE 02"/>
<VarDeclaration Name="IN_03" Type="BYTE" Comment="BYTE 03"/>
</InputVars>
<OutputVars>
<VarDeclaration Name="" Type="DWORD" Comment=""/>
</OutputVars>
</InterfaceList>
<FunctionBody>
<ST><![CDATA[(* this Function combines the 2 BYTES to a DWORD *)
FUNCTION ASSEMBLE_DWORD_FROM_BYTES : DWORD

VAR_INPUT
IN_00 : BYTE; // BYTE 00
IN_01 : BYTE; // BYTE 01
IN_02 : BYTE; // BYTE 02
IN_03 : BYTE; // BYTE 03
END_VAR

ASSEMBLE_DWORD_FROM_BYTES.%B0 := IN_00;
ASSEMBLE_DWORD_FROM_BYTES.%B1 := IN_01;
ASSEMBLE_DWORD_FROM_BYTES.%B2 := IN_02;
ASSEMBLE_DWORD_FROM_BYTES.%B3 := IN_03;

END_FUNCTION
]]></ST>
</FunctionBody>
</Function>
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<Function Name="ASSEMBLE_WORD_FROM_BYTES" Comment="this Function combines the 2 BYTES to a WORD">
<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="BYTE" Comment="BYTE 00"/>
<VarDeclaration Name="IN_01" Type="BYTE" Comment="BYTE 01"/>
</InputVars>
<OutputVars>
<VarDeclaration Name="" Type="WORD" Comment=""/>
</OutputVars>
</InterfaceList>
<FunctionBody>
<ST><![CDATA[(* this Function combines the 2 BYTES to a WORD *)
FUNCTION ASSEMBLE_WORD_FROM_BYTES : WORD

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

ASSEMBLE_WORD_FROM_BYTES.%B0 := IN_00;
ASSEMBLE_WORD_FROM_BYTES.%B1 := IN_01;

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