Sample Program 1 And 2 (Offset/Gain) - Beckhoff EPP3504-0023 Short Manual

4-channel measuring bridge,(sg) full/half/quarter bridge, 24 bit, 10 ksps
Hide thumbs Also See for EPP3504-0023:
Table of Contents

Advertisement

• Checking NetId: the "EtherCAT" tab of the EtherCAT device shows the configured NetId:
The first four numbers must be identical with the project NetId of the target system. The project NetId
can be viewed within the TwinCAT environment above, where a pull down menu can be opened to
choose a target system (by clicking right in the text field). The number blocks are placed in brackets
there next to each computer name of a target system.
• Modify the NetId: By right clicking on "EtherCAT device" within the solution explorer a context menu
opens where "Change NetId..." have to be selected. The first four numbers of the NetId of the target
computer must be entered; both last values are 4.1 usually.
Example:
◦ NetId of project:       myComputer (123.45.67.89.1.1)
◦ Entry via „Change NetId...":     123.45.67.89.4.1
Preparation to start the sample program (tpzip file/ TwinCAT 3)
• After clicking the Download button, save the zip file locally on your hard disk, and unzip the *.tpzip
-archive file into a temporary working folder.
• Create a new TwinCAT project as described in section:
TwinCAT Quickstart, TwinCAT 3, Startup [} 139]
• Open the context menu of "PLC" within the "Solutionexplorer" and select "Add Existing Item..."
• Select the beforehand unpacked .tpzip file (sample program).
4.3.1

Sample program 1 and 2 (offset/gain)

Download TwinCAT 3 project:
https://infosys.beckhoff.com/content/1033/epp3504/Resources/2152667403/.zip
Program description / function:
• Calculation of an Offset (correction) value on the basis of the amplitudes of an AC input voltage (DC
component ≠ 0) until a deviation of the offset smaller than "wOFFSET_MIN_VAL_REF" (in digits) is
achieved.
• Calculation of a Gain correction value by presetting via "nPRESET_MAX_VAL" (in digits).
The configuration of the minimum permitted input frequency, the order of the Gain and Offset calculations,
and the direct writing to the CoE directory ("PAI Scaler Settings" object) can be done in this sample program
(see Variable declaration).
The following procedure is foreseen:
1. Configuration of "bWriteToCoEEnable" = TRUE, i.e. on completion of the calculation of the correction
values, they are written to the CoE object "PAI Scaler Settings".
EPP3504-0023
Version: 1.2
Commissioning
.
85

Advertisement

Table of Contents
loading

Table of Contents