Beckhoff EPP3504-0023 Short Manual page 86

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

Advertisement

Commissioning
2. Set the box module to "Extended Range" (0) via the object "PAI Settings Ch. 1" 0x8000:2E in the CoE
directory.
3. Connect a periodic signal (triangle, sine, square, ...) to the box module within the selected voltage/
current range via the PAI Settings object 0x8000:01 (Interface).
4. Start the program by setting "bEnable" to "TRUE".
5. The end of the execution is recognizable by the variables "bScaleGainDone" and "bScaleOffsetDone",
which are then both TRUE.
6. If writing is enabled in the CoE ("bWriteToCoEEnable" = TRUE), the values determined should have
been written to the object "PAI Scaler Settings" in the CoE directory (see variable "bError").
th
7. If 6
was executed, the box module can be set to "Linear" (1) via the object "PAI Settings Ch. 1"
0x8000:2E in the CoE directory. As a result, the box module also performs the correction calculation
internally (see: "nScaledSampleVal").
Comments:
Alternatively, the TC3 Analytics Library (TF3510) can be used instead of the function block
"FB_GET_MIN_MAX". The function block "FB_ALY_MinMaxAvg_1Ch" can also be used for the
determination of the min./max. values. The total calculation can then also be modified in this program by
using the mean value provided by this function block.
In the case of the EPP3504‑0023 box module , the "PAI Scaler Settings" object is 0x80n6, in addition to
which the nOffset and nGain variables can also be directly written without the type conversion (REAL to
DINT); scaling of the amplitude correction values with 65536 is also no longer necessary.
Example program 1 and 2 program code:
PROGRAM MAIN
VAR_INPUT
   bEnable               :BOOL; // Start the code (Offset / Gain adjust)
   nPAI_Sample AT%I*     :DINT; // Input samples of the measurement value
END_VAR
VAR
   // Enter your Net-Id here:
   userNetId             :T_AmsNetId := 'a.b.c.d.x.y';
   // Enter EtherCAT device address here:
   nUserSlaveAddr        :UINT := 1002; // Check, if correct
   // Configurations:
   fMinFrequencyIn       :REAL:=1.5; // Hz
   bScalingOrder         :BOOL:=FALSE; // TRUE: Start scale offset first
   bWriteToCoEEnable     :BOOL:=FALSE; // TRUE: Enable writing to CoE
   // ===============================================
   // "Main" State controlling Offset/Gain adjusting:
   nMainCal_State        :BYTE:=0;
   // For CoE Object 0x8005 access:
   fb_coe_write          :FB_EcCoESdoWrite; // FB for writing to CoE
   nSTATE_WRITE_COE      :BYTE := 0;
   nSubIndex             :BYTE;
   nCoEIndexScaler       :WORD := 16#8005; // Use channel 1
   // For EPP3504‑0023 this is 0x8006
   nSubIndScalGain       :BYTE := 16#02;
   nSubIndScalOffs       :BYTE := 16#01;
   nADSErrId             :UDINT; // Copy of ADS-Error ID
   // ===============================================
   fb_get_min_max        :FB_GET_MIN_MAX; // Min/Max values needed
   // Note: you may also use "FB_ALY_MinMaxAvg_1Ch" of TwinCAT analytics)
   // instead; there avg (average values can also be determinated
   // Variables used for offset scaling:
86
Version: 1.2
EPP3504-0023

Advertisement

Table of Contents
loading

Table of Contents