Commissioning
EL125x, EL2258
288
Version: 2.5
Fig. 173: Recording of four channels by the Multi-Timestamp program example
All arrays have to be linked to eight channels with all the necessary status, output and input variables
respectively. This is already be done by the downloadable example:
https://infosys.beckhoff.com/content/1033/el125x_el2258/Resources/zip/2139514763.zip
This example requires a PLC control with a terminal EL2258. You can use either an embedded PC that has
the terminal placed on the right or an IPC with an EtherCAT link of an e.g. RJ‑45 connector to the EK1100
coupler with the terminal (e.g. C6915 + EL2258). Optionally a digital input terminal e.g. EL1004
can be used for program control.
The further procedure is described in section
TwinCAT Quickstart, TwinCAT 3, Starting the controller [
}
71]
.
Example program for EL2258: Multi-Timestamp
Variables declaration:
PROGRAM MAIN
VAR CONSTANT
// Number of used channels of the terminal in this code example
nNumOfSwitchTasks : INT:=4;
END_VAR
VAR_INPUT
// External switch to start by user
bEnable AT%I* : BOOL;
// Reference to check if last tasks were already executed
nOutputOrderFeedback AT%I*: ARRAY[0..7] OF USINT;
END_VAR
VAR_OUTPUT
// Link to terminal EL2258 (Output event time n):
aQE_Time AT%Q* : ARRAY[0..7] OF ARRAY[0..9] OF UDINT;
// Link to terminal EL2258 (Output event state n):
aQE_State AT%Q* : ARRAY[0..7] OF ARRAY[0..9] OF BOOL;
// Outputvariables to reset the output buffers of EL2258
bOutputBufReset AT%Q*: ARRAY[0..7] OF BOOL;
// Real number of fixed State/Time-Events as a Task for EL2258
nNoOfOutputEvents AT%Q*: ARRAY[0..7] OF USINT;
// Start-Event to trigger beginning of task scheduling
nOutputOrderCounter AT%Q*: ARRAY[0..7] OF USINT;
END_VAR
VAR
aSwitchTimes : ARRAY[0..7] OF ARRAY[0..9] OF UDINT:=
// All 8 x 10 time offsets in ms allocated to the 10 states and 8 channels
[
[ // Channel 1 time offsets:
100, 50, 25, 75, 75, 25, 50, 25, 50, 50
]
,[ // Channel 2 time offsets:
100, 25, 50, 25, 50, 50, 25, 75, 75, 50
]
,[ // Channel 3 time offsets:
100, 50, 25, 75, 75, 50, 25, 50, 25, 50
Содержание EL1258
Страница 2: ......
Страница 6: ...Table of contents EL125x EL2258 6 Version 2 5...
Страница 42: ...Mounting and wiring EL125x EL2258 42 Version 2 5 Fig 36 Other installation positions...
Страница 76: ...Commissioning EL125x EL2258 76 Version 2 5 Fig 86 Incorrect driver settings for the Ethernet port...