Program description
Transmission of exemplary filter coefficients via CoE access into the box module.
General settings
• The function block "FB_EcCoESdoWrite" requires the "Tc2_EtherCAT" library
• <AmsNetID> must show the local device EtherCAT NetID in inverted commas (e.g.
'168.57.1.1.5.1')
• <DeviceEtherCATAddress> must show the local device EtherCAT address of the EPP3504‑0023
box module (e.g., 1007)
Variable declaration sample program 5
PROGRAM MAIN
// Variable declaration example program 5
VAR CONSTANT
NumOfFilterCoeff :BYTE:=40;
END_VAR
VAR
// Function block of library "Tc2_EtherCAT" for CoE Object access:
fb_coe_write :FB_EcCoESdoWrite;
userNetId :T_AmsNetId := '???';
userSlaveAddr :UINT := ???;
// Writing PLC state for coefficients transfer (Set to 0 for start)
wState :BYTE:=255;
index :BYTE:=1; // Start index for coefficients transfer
wCoEIndexUserFilterCoeffizents :WORD:=16#8001;
aFilterCoeffs:ARRAY[0..NumOfFilterCoeff] OF LREAL :=
[
// Example filter coefficients FIR band pass: 3600..3900 Hz
// Usage: "User defined FIR Filter" (32)
0.03663651655662163,
0.04299467480848277,
-0.007880289104928245,
0.0664029021294729,
-0.0729038234874446,
-0.00005849791174519834,
0.05628409460964408,
-0.0525134329294473,
0.026329003448584205,
0.00027114381194760643,
-0.03677629552114248,
0.06743018479714939,
-0.0560894442193289,
0.0009722394088121363,
0.05676876756757213,
-0.07775650809213645,
0.05330627422911416,
0.0009941073749156226,
-0.055674804078696793,
0.07874009379691002,
-0.055674804078696793,
0.0009941073749156226,
0.05330627422911416,
-0.07775650809213645,
EPP3504-0023
Version: 1.2
Commissioning
95