ST_IEC870_5_101AcquisitionParams

From product version:

Configuration parameters for cyclic data acquisition. The initialisation sequence commands configured in the arrInitSeq array are executed once after receipt of M_EI_NA_1 (end of initialisation) or after the connection is established. The cyclic commands configured via the structure parameters testCmd, clockSync, arrGenro, arrCoro or genCmd are then executed.

TYPE ST_IEC870_5_101AcquisitionParams :
STRUCT
    (* Initialization sequence steps *)
    arrInitSeq : ARRAY[IEC870_MIN_ISTEP..IEC870_MAX_ISTEP] OF E_IEC870_5_101InitSeqStep :=
    eIEC870_ISTEP_TEST, (* Send test command *)
    eIEC870_ISTEP_CLOCK, (* Send clock synchronization command *)
    eIEC870_ISTEP_GENRO, (* Send general interrogation command *)
    eIEC870_ISTEP_CORO, (* Send counter interrogation command *)
    eIEC870_ISTEP_UNUSED; (* Reserved *)(* Test command polling settings *)
    testCmd : ST_IEC870_5_101TestPollParams := (
    asduAddr := IEC870_ASDUADDR_SYSPARA,
    tPollCycle := T#60s,
    bEnable := TRUE );

    (* Clock synchronisation polling settings *)
    clockSync : ST_IEC870_5_101ClockPollParams := (
    asduAddr := IEC870_ASDUADDR_SYSPARA,
    tPollCycle := T#60s,
    bEnable := TRUE );

    (* Station interrogation polling settings *)
    arrGenro : ARRAY[0..16] OF ST_IEC870_5_101GenroPollParams := (
    asduAddr := IEC870_ASDUADDR_SYSPARA,
    tPollCycle := T#60s,
    eQOI := eIEC870_QOI_INROGEN,
    bEnable := TRUE );

    (* Counter interrogation polling settings *)
    arrCoro : ARRAY[0..4] OF ST_IEC870_5_101CoroPollParams := (
    asduAddr := IEC870_ASDUADDR_SYSPARA,
    tPollCycle := T#60s,
    eRQT := eIEC870_RQT_REQCOGEN,
    eFRZ := eIEC870_FRZ_READ,
    bEnable := TRUE );

  (* General command acquisition settings *)
 genCmd : ST_IEC870_5_101GenCmdPollParams := (
    tPollCycle := T#1h,
    bEnable := FALSE );

  (* Delay command acquisition settings *)
 delayCmd : ST_IEC870_5_101DelayPollParams := (
    tDelay := T#5s );


    eAODBType : E_IEC870_5_101AODBType := eIEC870_AODB_STATIC;
END_STRUCT
END_TYPE

arrInitSeq: Initialisation sequence. The initialisation sequence is always executed once after receipt of M_EI_NA_1 (end of initialisation) or after the connection is established.

testCmd: Parameter for cyclic test commands. Default: One test command every 60 seconds.

clockSync: Parameter for cyclic time synchronization commands. Default: Time synchronisation every 60 s.

arrGenro: Parameter for cyclic station query commands. Station queries for up to 17 datapoint groups may be configured. Default: One station query from the 'General' group every 60 s.

arrCoro: Parameter for cyclic counter query commands. Counter queries for up to 5 counter groups may be configured. Default: One counter query from the 'General' group every 60 s.

genCmd: Parameter for cyclic transmission of data points in controlling direction (single-commands, double-commands, setpoint-commands and so forth). Default: Execute all commands every 60 minutes.

delayCmd: Parameter for delay commands. Execution delay time of the next initialization step command. Default: Delay time = 5 s.

 

eAODBType: Application database type. This parameter defines how the data points are stored in the application database.

 

Example in ST:

In the following program section cyclic data acquisition is configured as follows: All initialisation steps are deactivated. The cyclic test command and time synchronisation command are also deactivated. In addition to the standard station query a further station query from group 1 is configured (every 100 s). In addition to the standard counter query, a counter query (freezing) from counter group 1 is configured (every 200 s).

PROGRAM P_AcquisitionConfig
VAR_IN_OUT
    acqPara : ST_IEC870_5_101AcquisitionParams;
END_VAR
acqPara.arrInitSeq[0]        := eIEC870_ISTEP_UNUSED;
acqPara.arrInitSeq[1]       := eIEC870_ISTEP_UNUSED;
acqPara.arrInitSeq[2]       := eIEC870_ISTEP_UNUSED;
acqPara.arrInitSeq[3]       := eIEC870_ISTEP_UNUSED;
acqPara.arrInitSeq[4]       := eIEC870_ISTEP_UNUSED;

acqPara.testCmd.bEnable         := FALSE;

acqPara.clockSync.bEnable           := FALSE;

acqPara.arrGenro[1].asduAddr    := IEC870_ASDUADDR_SYSPARA;
acqPara.arrGenro[1].eQOI        := eIEC870_QOI_INRO1;
acqPara.arrGenro[1].tPollCycle  := T#100s;
acqPara.arrGenro[1].bEnable     := TRUE;

acqPara.arrCoro[1].asduAddr     := IEC870_ASDUADDR_SYSPARA;
acqPara.arrCoro[1].eFRZ         := eIEC870_FRZ_FREEZE;
acqPara.arrCoro[1].eRQT         := eIEC870_RQT_REQCO1;
acqpara.arrCoro[1].tPollCycle   := T#200s;
acqPara.arrCoro[1].bEnable      := TRUE;

 

Requirements

Development Environment

Target System

PLC Libraries to include

TwinCAT v2.10.0 Build >= 1301

PC or CX (x86, ARM)

TcIEC870_5_101.Lib
( Standard.Lib; TcBase.Lib; TcSystem.Lib; TcUtilities.Lib;  are included automatically )