sigmadue CU-02 & MP-01 IEC 61131-3 Function Block Library IEC 61131-3 Function Block Library M.U. CU02-IEC-FB 06/11.05 Cod.
Copyright © 2007, 2011 Ascon Tecnologic Srl All rights reserved No part of this document may be stored in a retrieval system, or transmitted in any form, electronic or mechanical, without prior written permission of Ascon Tecnologic Srl. Ascon has used the best care and effort in preparing this manual and believes that the information contained in this publication is accurate.
INDEX Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Chapter 1 AsconACLib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1-1 1-2 1-3 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Descritpion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description of the individual Function Blocks . . . . . . . . . . .
Index (continued) 1-3-41 1-3-42 1-3-43 1-3-44 Slope Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TIMER_ADV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TOTALIZER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TOTALIZER_ADV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 2 AsconBasicIOLib 53 54 55 57 .................................... 59 Purpose . . . . . . . . . . . . . . . . . . .
Index (continued) Chapter 4 AsconCPULib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1 4-2 4-3 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2-1 CANopen network definition . . . . . . . . . . . . . . . . . . . . . . . . . Function Block Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index (continued) 5-3-34 5-3-35 5-3-36 5-3-37 5-3-38 5-3-39 5-3-40 MODEM_SMS_SEND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MP SERIAL Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PROFIBUS PORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SEND_EMAIL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SERIAL Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SYS_OPRS_MNGT . . . . . . . . . . . . . . .
Introduction The products described in this manual should be installed, operated and maintained only by qualified application programmers and software engineers who are almost familiar with EN 61131-3 concepts of PLC programming, automation safety topics and applicable national standards. Using this manual Specifications within the text of this manual are given in the International System of Units (SI), with non SI equivalents in parentheses.
sigmadue - IEC 61131-3 Function Block Library Purpose The purpose of this document is to describe the structure and use of Ascon Spa’s proprietary IEC61131-3 libraries. These libraries cover different aspects of the features of the CU-02 and MP-01 units: from I/O modules interface to Modbus access from the control to the logic management. Caution The function blocks of the various libraries are valid for both CU-02 and MP-01 units except when it is expressly indicated.
Chapter 1 AsconACLib 1-1 Purpose The purpose of this document is to provide a complete description of the library AsconACLib. 1-2 Descritpion The AsconACLib is a function block library that contains a set of generic functionalities that come from the Ascon AC Station Device useful for the IEC 61131 programming. The table here reported gives the complete list of the function blocks of the library.
sigmadue - IEC 61131-3 Function Block Library FLIPFLOP_JK HOLD_VALUE HR_DRY_WET_BULB INBETWEEN LIMITER_VALUE MASS FLOW MIN_MAX_SELECTOR MONOSTABLE_DS MONOSTABLE_NED MONOSTABLE_PED MONOSTABLE_PUL MP_RTD_LIN MUX_A8 MUX_A16 MUX_D8 MUX_D16 RESCALE SAMPLING_TIME SLOPE_LIMIT TIMER_ADV TOTALIZER TOTALIZER_ADV 2 Flip - Flop JK Type Analogue Holding value Relative humidity calculation method with dry/wet bulb Analogue Middle Selector Analogue value Limiter Compensate Flow calculation Minimum/Maximum analogue Sele
Chapter 1 - AsconACLib 1-3 Description of the individual Function Blocks 1-3-1 ALARM_ABSOLUTE MODULE FB Prototype ALARM_ABS VALUE ABS_HIGH HY_AHIGH ABS_LOW HY_ALOW ¡ ¡ ¡ ¡ ¡ REAL REAL REAL REAL REAL BOOL BOOL ¡ ¡ ABS_H ABS_L Input parameters Label VALUE ABS_HIGH HY_AHIGH ABS_LOW HY_ALOW Type REAL REAL REAL REAL REAL Description Input value Absolute Alarm Max Hysteresis Absolute Alarm Max Absolute Alarm Min Hysteresis Absolute Alarm Min Output parameters Label ABS_H ABS_L Description Type BOO
sigmadue - IEC 61131-3 Function Block Library 1-3-2 ALARM_ADVANCED FB Prototype ALARM_ADVANCED VALUE REF ABS_HIGH HY_AHIGH ABS_LOW HY_ALOW DEV_HIGH HY_DHIGH DEV:LOW HY_DLOW SP_BND HY_BND ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL BOOL BOOL BOOL BOOL BOOL BOOL ¡ ¡ ¡ ¡ ¡ ¡ ABS_H ABS_L DEV_H DEV_L BND_O BND_I Input parameters Label VALUE REF ABS_HIGH HY_AHIGH ABS_LOW HY_ALOW Type REAL REAL REAL REAL REAL REAL Description Input value Reference value Absolute
Chapter 1 - AsconACLib Default values Input VALUE REF ABS_HIGH HY_AHIGH ABS_LOW HY_ALOW Output ABS_H ABS_L DEV_H DEV_L BND_O BND_I Default values 0.0 0.0 0.0 1.0 0.0 1.
sigmadue - IEC 61131-3 Function Block Library 1-3-3 ALARM_BAND MODULE FB Prototype ALARM_BND VALUE REF SP_BND HY_BND ¡ ¡ ¡ ¡ REAL REAL REAL REAL BOOL BOOL ¡ ¡ BND_O BND_I Input parameters Label VALUE REF SP_BND HY_BND Type REAL REAL REAL REAL Description Input value Reference value Band Alarm Hysteresis Band Alarm Output parameters Label BND_O BND_I Description Type BOOL BOOL Description Band Out Alarm Band In Alarm This function block generates only independent BAND inside or outside alarm
Chapter 1 - AsconACLib 1-3-4 ALARM_DEVIATION MODULE FB Prototype ALARM_DEV VALUE REF DEV_HIGH HY_DHIGH DEV_LOW HY_DLOW ¡ ¡ ¡ ¡ ¡ ¡ REAL REAL REAL REAL REAL REAL BOOL BOOL ¡ ¡ DEV_H DEV_L Input parameters Label VALUE REF DEV_HIGH HY_DHIGH DEV_LOW HY_DLOW Type REAL REAL REAL REAL REAL REAL Description Input value Reference value Deviation Alarm Max Hysteresis Deviation Alarm Max Deviation Alarm Min Hysteresis Deviation Alarm Min Output parameters Label DEV_H DEV_L Description Type BOOL BOOL De
sigmadue - IEC 61131-3 Function Block Library 1-3-5 ALARM RATE FB Prototype ALARM_RATE ENABLE VALUE SLOPE_UP SLOPE_DOWN HYST ¡ ¡ ¡ ¡ ¡ BOOL REAL REAL REAL REAL BOOL BOOL ¡ ¡ CONFIRM DOUT Input parameters Label ENABLE VALUE SLOPE_UP SLOPE_DOWN HYST Type BOOL REAL REAL REAL REAL Description Function block enable input Measure value input UP rate input variation per second DOWN rate input variation per second Hysteresis Output parameters Label CONFIRM DOUT Description Type BOOL BOOL Description
Chapter 1 - AsconACLib 1-3-6 AVG_ADV_8REAL FB Prototype AVG_ADV_8REAL ENABLE IN_SEL AI_1 AI_2 AI_3 AI_4 AI_5 AI_6 AI_7 AI_8 HIGH_LIM LOW_LIM ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ BOOL DWORD REAL REAL REAL REAL BOOL DWORD REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL ¡ ¡ ¡ ¡ ERROR ERR_CODE AVG_VALUE AVG_MAX AVG_MIN VALID_AI Input parameters Label Type Description Range ENABLE BOOL Command to enable average calculation Bit mask to enable/disable the AI 2#00000000...
sigmadue - IEC 61131-3 Function Block Library Input AI_5 AI_6 AI_7 AI_8 HIGH_LIM LOW_LIM Default Value 0.0 0.0 0.0 0.0 999.0 -99.0 Reference Table Output ERR_CODE.0 ERR_CODE.1 ERR_CODE.2 ERR_CODE.3 ERR_CODE.4 ERR_CODE.5 ERR_CODE.6 ERR_CODE.7 ERR_CODE.
Chapter 1 - AsconACLib 1-3-7 AVG_MOVING FB Prototype AVG_MOVING ENABLE AI T_SAMP NR_DATA HIGH_LIM LOW_LIM ¡ ¡ ¡ ¡ ¡ ¡ BOOL REAL REAL USINT REAL REAL BOOL DWORD BOOL REAL ¡ ¡ ¡ ¡ ERROR ERR_CODE BUFF_FULL AVG_VALUE Input parameters Label ENABLE AI T_SAMP NR_DATA Type BOOL REAL REAL REAL Description Range Command to enable average calculation Analogue input value [e.u.] LOW_LIM... HIGH_LIM Analogue input sampling time value [ss] 0.1... 3600.0 No. of samples to be computed [num] 1...
sigmadue - IEC 61131-3 Function Block Library Output ERR_CODE.5 ERR_CODE.
Chapter 1 - AsconACLib 1-3-8 AVG_RUNNING FB Prototype AVG_RUNNING ENABLE AI T_SAMP NR_DATA HIGH_LIM LOW_LIM ¡ ¡ ¡ ¡ ¡ ¡ BOOL DWORD BOOL REAL BOOL REAL REAL USINT REAL REAL ¡ ¡ ¡ ¡ ERROR ERR_CODE BUFF_FULL AVG_VALUE Input parameters Label ENABLE AI T_SAMP NR_DATA Type BOOL REAL REAL REAL Description Range Command to enable average calculation Analogue input value [e.u.] LOW_LIM... HIGH_LIM Analogue input sampling time value [ss] 0.1... 3600.0 Number of samples to be computed [num] 1...
sigmadue - IEC 61131-3 Function Block Library Output Description ERR_CODE.5 AI value higher than the admitted value ERR_CODE.
Chapter 1 - AsconACLib 1-3-9 CHARACTERIZER 8 SEGMENTS FB Prototype CHARACTERIZER_8 AI N_SEG Px_1 Py_1 Px_2 Py_2 Px_3 Py_3 Px_4 Py_4 Px_5 Py_5 Px_6 Py_6 Px_7 Py_7 Px_8 Py_8 Px_9 Py_9 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ REAL REAL UINT REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL ¡ AOUT Input parameters Label Type REAL UINT REAL REAL AI N_SEG Px_1 ÷ Px_9 Py_1 ÷ Py_9 Description Input value Number of segments X Coordinates of the segments Y Coordinat
sigmadue - IEC 61131-3 Function Block Library 1-3-10 CHARACTERIZER 16 SEGMENTS FB Prototype CHARACTERIZER_16 AI N_SEG Px_1 Py_1 Px_2 Py_2 Px_3 Py_3 Px_4 Py_4 Px_5 Py_5 Px_6 Py_6 Px_7 Py_7 Px_8 Py_8 Px_9 Py_9 Px_10 Py_10 Px_11 Py_11 Px_12 Py_12 Px_13 Py_13 Px_14 Py_14 Px_15 Py_15 Px_16 Py_16 Px_17 Py_17 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ REAL REAL UINT REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL R
Chapter 1 - AsconACLib Default values Inputs AI N_SEG Default values 0.0 0 Outputs AOUT Default values 0.
sigmadue - IEC 61131-3 Function Block Library 1-3-11 COMPARATOR FB Prototype COMPARATOR AI REF HYST ¡ ¡ ¡ REAL REAL REAL BOOL BOOL BOOL ¡ ¡ ¡ HIGH EQUAL LOW Input parameters Label AI REF HYST Type REAL REAL REAL Description Input value Reference value Hysteresis (symmetrical respect to reference) Output parameters Description Label HIGH Type BOOL Description Digital output for AI > REF + HYST EQUAL BOOL Digital output for REF – HYST ⬉ AI ⬉ REF + HYST LOW BOOL Digital output for AI < REF
Chapter 1 - AsconACLib 1-3-12 BYTE A/D CONVERTER FB Prototype CONV_AD8 INPUT ¡ BYTE BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DO_1 DO_2 DO_3 DO_4 DO_5 DO_6 DO_7 DO_8 Input parameters Label INPUT Type BYTE Description Analog input Output parameters Label DO_1... DO_8 Description Type BOOL Description 8 bit representation of the analog input This function block converts the analog input BYTE into an 8 single bits format. Default values Label INPUT Output DO_1...
sigmadue - IEC 61131-3 Function Block Library 1-3-13 WORD A/D CONVERTER FB Prototype CONV_AD16 INPUT ¡ WORD BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DO_1 DO_2 DO_3 DO_4 DO_5 DO_6 DO_7 DO_8 DO_9 DO_10 DO_11 DO_12 DO_13 DO_14 DO_15 DO_16 Input parameters Label INPUT Type WORD Description Analog input Output parameters Label Type DO_1...
Chapter 1 - AsconACLib 1-3-14 DWORD A/D CONVERTER FB Prototype CONV_AD32 INPUT ¡ DWORD BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DO_1 DO_2 DO_3 DO_4 DO_5 DO_6 DO_7 DO_8 DO_9 DO_10 DO_11 DO_12 DO_13 DO_14 DO_15 DO_16 DO_17 DO_18 DO_19 DO_20 DO_21 DO_22 DO_23 DO_24 DO_25 DO_26 DO_27 DO_28 DO_29 DO_30 DO_31 DO_32 Input para
sigmadue - IEC 61131-3 Function Block Library 1-3-15 BYTE D/A CONVERTER FB Prototype CONV_DA8 DI_1 DI_2 DI_3 DI_4 DI_5 DI_6 DI_7 DI_8 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BYTE OUTPUT Type BOOL Description 8 bits digital input Input parameters Label DI_1... DI_8 Output parameters Label OUTPUT Description Type BYTE Description byte representation of converted digital input This function block converts 8 input bits to an output value. Default values Label DI_1...
Chapter 1 - AsconACLib 1-3-16 WORD D/A CONVERTER FB Prototype CONV_DA16 DI_1 DI_2 DI_3 DI_4 DI_5 DI_6 DI_7 DI_8 DI_9 DI_10 DI_11 DI_12 DI_13 DI_14 DI_15 DI_16 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ WORD BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL ¡ OUTPUT Input parameters Label DI_1...
sigmadue - IEC 61131-3 Function Block Library 1-3-17 DWORD D/A CONVERTER FB Prototype CONV_DA32 DI_1 DI_2 DI_3 DI_4 DI_5 DI_6 DI_7 DI_8 DI_9 DI_10 DI_11 DI_12 DI_13 DI_14 DI_15 DI_16 DI_17 DI_18 DI_19 DI_20 DI_21 DI_22 DI_23 DI_24 DI_25 DI_26 DI_27 DI_28 DI_29 DI_30 DI_31 DI_32 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL DWOR
Chapter 1 - AsconACLib 1-3-18 COUNTER FB Prototype COUNTER DI DSEL RESET UP_DOWN MAXCOUNT ¡ ¡ ¡ ¡ ¡ REAL BOOL BOOL BOOL BOOL BOOL REAL ¡ ¡ AOUT ROLLOVER Input parameters Label DI DSEL RESET Type BOOL BOOL BOOL Description Counter input Counter enable Counter reset UP_DOWN BOOL Up/down count MAXCOUNT REAL Maximum limit for the output Range FALSE = up, TRUE = down max. value = 999999.
sigmadue - IEC 61131-3 Function Block Library 1-3-19 DIGITAL DECODER FB Prototype DECODER_8 DS_1 DS_2 DS_3 D_SEL RESET ¡ ¡ ¡ ¡ ¡ BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DO_1 DO_2 DO_3 DO_4 DO_5 DO_6 DO_7 DO_8 Input parameters Label DS_1 DS_2 DS_3 D_SEL RESET Type BOOL BOOL BOOL BOOL BOOL Description Digital selection input Digital selection input Digital selection input Decoder enable input Decoder reset input Output parameters Label DO_1...
Chapter 1 - AsconACLib 1-3-20 DEW_POINT FB Prototype DEW_POINT ENABLE SEL_C_F TEMP HR HIGH_LIM LOW_LIM ¡ ¡ ¡ ¡ ¡ ¡ BOOL DWORD REAL BOOL BOOL REAL REAL REAL REAL ¡ ¡ ¡ ERROR ERR_CODE DP_VALUE Input parameters Label ENABLE SEL_C_F Type Description BOOL Command to enable average calculation BOOL Temperature engineering unit [°C or °F] Range TEMP REAL Temperature input value [in °C or °F] HR REAL Relative Humidity input value [%] LOW_LIM... HIGH_LIM 0.0... 100.
sigmadue - IEC 61131-3 Function Block Library 1-3-21 F0_CALCULATION FB Prototype F0_CALCULATION ENABLE SEL_C_F RESET AI T_SAMP Z_FACT F0_MM HIGH_LIM LOW_LIM ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ BOOL DWORD BOOL REAL BOOL BOOL REAL REAL REAL REAL REAL REAL BOOL ¡ ¡ ¡ ¡ ERROR ERR_CODE CONFIRM F0_TIME Input parameters Label ENABLE SEL_C_F RESET Type Description BOOL Command to enable calculation BOOL Temperature engineering unit [°C or °F] BOOL Function 0 time calculation reset AI REAL Sterilization temperature input v
Chapter 1 - AsconACLib Input F0_MM HIGH_LIM LOW_LIM Default Value 10.0 999.0 -99.0 Reference Table Output ERR_CODE.0 ERR_CODE.1 ERR_CODE.2 ERR_CODE.3 ERR_CODE.4 ERR_CODE.5 ERR_CODE.6 ERR_CODE.7 ERR_CODE.
sigmadue - IEC 61131-3 Function Block Library 1-3-22 FLIP FLOP D FB Prototype FLIPFLOP_D DI CLKIN RESET ¡ ¡ ¡ BOOL BOOL BOOL BOOL ¡ DOUT Input parameters Label DI CLKIN RESET Type BOOL BOOL BOOL Description Data input Clock input Reset input Output parameters Label DOUT Description Type BOOL Description Digital output This function block performs the D-Latch flip flop function, as shown in following diagram.
Chapter 1 - AsconACLib 1-3-23 FLIP FLOP JK FB Prototype FLIPFLOP_JK DI_J DI_K ¡ ¡ BOOL BOOL BOOL ¡ DOUT Input parameters Label DI_J DI_K Type BOOL BOOL Description Data input J Data input K Output parameters Label DOUT Description Type BOOL Description Digital output This function block performs the JK-Latch flip flop function, as described in following table.
sigmadue - IEC 61131-3 Function Block Library 1-3-24 HOLD VALUE FB Prototype HOLD_VALUE AI D_HLD ¡ ¡ REAL BOOL REAL ¡ AOUT Input parameters Label AI D_HLD Type REAL BOOL Description Input Value Hold Command Output parameters Label AO UT Description Type REAL Description Function Block Output This FB has the functionality of a Sample and Hold circuit. It latches the value of the analog input AI on the output AOUT, in correspondence of the rising edge of the latch digital input D_HLD.
Chapter 1 - AsconACLib 1-3-25 HR_DRY_WET_BULB FB Prototype HR_DRY_WET_BULB ENABLE SEL_C_F TEMP_DRY TEMP_WET P_ATM HIGH_LIM LOW_LIM ¡ ¡ ¡ ¡ ¡ ¡ ¡ BOOL DWORD REAL REAL REAL REAL BOOL BOOL REAL REAL REAL REAL REAL ¡ ¡ ¡ ¡ ¡ ¡ ERROR ERR_CODE HR_VALUE PSAT_DRY PSAT_WET ST_PART_P Input parameters Input ENABLE Type Description BOOL Command to enable calculation Temperature engineering unit SEL_C_F BOOL [°C or °F] Dry bulb temperature input value TEMP_DRY REAL [°C or F] Wet bulb temperature input value TEM
sigmadue - IEC 61131-3 Function Block Library Input TEMP_WET P_ATM HIGH_LIM LOW_LIM Default Value 25.0 101.3 (value referred to the sea level) 999.0 -99.0 Reference Table Output ERR_CODE.0 ERR_CODE.1 ERR_CODE.2 ERR_CODE.3 ERR_CODE.4 ERR_CODE.
Chapter 1 - AsconACLib 1-3-26 IN BETWEEN FB Prototype INBETWEEN AI_1 AI_2 AI_3 ¡ ¡ ¡ REAL REAL REAL REAL ¡ AOUT Input parameters Label AI_1... AI_3 Type REAL Description Analog input n. 1, 2 and 3 Output parameters Label AOUT Description Type REAL Description Middle value This function block transfers to the output AOUT the input value that is in between the other 2 input values. Default values Input AI_1... Al_3 Output AO UT Default values 0.0 Default values 0.
sigmadue - IEC 61131-3 Function Block Library 1-3-27 ANALOG LIMITER FB Prototype LIMITER_VALUE AI HIGH LOW ¡ ¡ ¡ REAL REAL REAL REAL ¡ AOUT Input parameters Label AI HIGH LOW Type REAL REAL REAL Description Input value High limit Low limit Output parameters Label AOUT Description Type REAL Description Limited value This function block limits the output value between high and low limits. Default values Input AI HIGH LOW Output AOUT 36 Default values 0.0 100.0 0.0 Default values 0.
Chapter 1 - AsconACLib 1-3-28 MASS_FLOW FB Prototype MASS_FLOW ENABLE SEL_C_F Q_IN T_IN P_IN COMP_TYPE T_REF P_REF P_ABS ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ BOOL DWORD REAL BOOL BOOL REAL REAL REAL USINT REAL REAL REAL ¡ ¡ ¡ ERROR ERR_CODE Q_COMP Input parameters Label SEL_C_F Description Command to ENABLE/DISABLE the BOOL FB execution BOOL Temperature engineering unit [°C or °F] Q_IN REAL Actual Flow input value [e.u.] -3.4E-38... 3.4E+38 T_IN REAL Actual Temperature value [°C or °F] -3.4E-38... 3.
sigmadue - IEC 61131-3 Function Block Library Input P_IN Default Value 15.0 0 = no compensation, 1 = temperature compensation only, COMP_TYPE 2 = pressure compensation only, 3 = both temperature and pressure compensation T_REF 25.0 P_REF 30.0 P_ABS 1.013 Q_HIGH_LIM 100.0 Q_LOW_LIM 0.0 Reference Table Output ERR_CODE.0 ERR_CODE.1 ERR_CODE.2 ERR_CODE.
Chapter 1 - AsconACLib 1-3-29 MIN MAX SELECTOR FB Prototype MIN_MAX_SELECTOR AI_1 AI_2 AI_3 AI_4 N_AI ¡ ¡ ¡ ¡ ¡ REAL REAL REAL REAL UINT REAL REAL ¡ ¡ AI_MIN AI_MAX Input parameters Label Type AI_1 ... AI_4 REAL N_AI UINT Description Analog input value n.
sigmadue - IEC 61131-3 Function Block Library 1-3-30 MONOSTABLE DELAY SHIFTED FB Prototype MONOSTABLE_DS DI RESET DELAY ¡ ¡ ¡ BOOL BOOL DINT BOOL ¡ DOUT Input parameters Label DI RESET DELAY Type BOOL BOOL DINT Description Digital input Reset input Monostable delay (ms) Output parameters Label DOUT Description Type BOOL Description Digital output This function block provides a time delay between input and output signals, as shown in the following diagram: DI DOUT DLY DLY Default values In
Chapter 1 - AsconACLib 1-3-31 MONOSTABLE NEGATIVE EDGE DELAY FB Prototype MONOSTABLE_NED DI RESET DELAY ¡ ¡ ¡ BOOL BOOL DINT BOOL ¡ DOUT Input parameters Label DI RESET DELAY Type BOOL BOOL DINT Description Digital input Reset input Monostable delay (ms) Output parameters Label DOUT Description Type BOOL Description Digital output This function block provides a time delay between input and output signals, as shown in the following diagram: DI DOUT DLY Default values Input DI RESET DELAY Ou
sigmadue - IEC 61131-3 Function Block Library 1-3-32 MONOSTABLE POSITIVE EDGE DELAY FB Prototype MONOSTABLE_PED DI RESET DELAY ¡ ¡ ¡ BOOL BOOL DINT BOOL ¡ DOUT Input parameters Label DI RESET DELAY Type BOOL BOOL DINT Description Digital input Reset input Monostable delay (ms) Output parameters Label DOUT Description Type BOOL Description Digital output This function block provides a time delay between input and output signals, as shown in the following diagram: DI DOUT DLY Default values
Chapter 1 - AsconACLib 1-3-33 MONOSTABLE PULSE FB Prototype MONOSTABLE_PUL DI RESET DELAY ¡ ¡ ¡ BOOL BOOL DINT BOOL ¡ DOUT Input parameters Label DI RESET DELAY Type BOOL BOOL DINT Description Digital input Reset input Monostable delay (ms) Output parameters Label DOUT Description Type BOOL Description Digital output This function block provides a time delay between input and output signals, as shown in the following diagram: DI DOUT DLY Default values Input DI RESET DELAY Output DOUT Def
sigmadue - IEC 61131-3 Function Block Library 1-3-34 RTD LINEAR RESCALING (FOR MICROPAC ONLY) FB Prototype MP_RTD_LIN AI AI_M AI_Q SEL_C_F TAU ¡ ¡ ¡ ¡ ¡ REAL REAL REAL REAL BOOL REAL ¡ RTD_OUT Input parameters Label AI Type Description REAL Analogue input value.
Chapter 1 - AsconACLib 1-3-35 ANALOG MULTIPLEXER 8 CHANNELS FB Prototype MUX_A8 AI_1 AI_2 AI_3 AI_4 AI_5 AI_6 AI_7 AI_8 DS_1 DS_2 DS_3 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ REAL REAL REAL REAL REAL REAL REAL REAL REAL BOOL BOOL BOOL ¡ AOUT Input parameters Input AI_1... AI_8 DS_1 DS_2 DS_3 Type REAL BOOL BOOL BOOL Description Analog Input 1...
sigmadue - IEC 61131-3 Function Block Library 1-3-36 ANALOG MULTIPLEXER 16 CHANNELS FB Prototype MUX_A16 AI_1 AI_2 AI_3 AI_4 AI_5 AI_6 AI_7 AI_8 AI_9 AI_10 AI_11 AI_12 AI_13 AI_14 AI_15 AI_16 DS_1 DS_2 DS_3 DS_4 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL REAL BOOL BOOL BOOL BOOL ¡ AOUT Input parameters Label AI_1... AI_16 DS_1 DS_2 DS_3 DS_4 Type REAL BOOL BOOL BOOL BOOL Description Analog Input 1...
Chapter 1 - AsconACLib DS_4 TRUE TRUE DS_3 TRUE TRUE DS_2 TRUE TRUE DS_1 FALSE TRUE AOUT AI_15 AI_16 Default values Input AI_1... AI_16 DS_1... DS_4 Output AOUT Default values 0.0 FALSE Default values 0.
sigmadue - IEC 61131-3 Function Block Library 1-3-37 DIGITAL MULTIPLEXER 8 CHANNELS FB Prototype MUX_D8 DI_1 DI_2 DI_3 DI_4 DI_5 DI_6 DI_7 DI_8 DS_1 DS_2 DS_3 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL ¡ DOUT Input parameters Label DI_1... DI_8 DS_1 DS_2 DS_3 Type BOOL BOOL BOOL BOOL Description Digital Input 1...
Chapter 1 - AsconACLib 1-3-38 DIGITAL MULTIPLEXER 16 CHANNELS FB Prototype MUX_D16 DI_1 DI_2 DI_3 DI_4 DI_5 DI_6 DI_7 DI_8 DI_9 DI_10 DI_11 DI_12 DI_13 DI_14 DI_15 DI_16 DS_1 DS_2 DS_3 DS_4 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL ¡ DOUT Input parameters Label DI_1... DI_16 DS_1 DS_2 DS_3 DS_4 Type BOOL BOOL BOOL BOOL BOOL Description Digital Input 1...
sigmadue - IEC 61131-3 Function Block Library Default values 50 Input DI_1...D_16 DS_1...
Chapter 1 - AsconACLib 1-3-39 RESCALE FB Prototype RESCALE AI IN_HIGH IN_LOW OUT_HIGH OUT_LOW ¡ ¡ ¡ ¡ ¡ REAL REAL REAL REAL REAL REAL BOOL BOOL BOOL ¡ ¡ ¡ ¡ AOUT ERR OVER UNDER Input parameters Label Type AI REAL IN_HIGH REAL IN_LOW REAL OUT_HIGH REAL OUT_LOW REAL Description Analog input value High Scale Analog input value Low Scale Analog input value High Scale Analog output value Low Scale Analog output value Output parameters Label AOUT ERR OVER UNDER Description Type REAL BOOL BOOL BOOL D
sigmadue - IEC 61131-3 Function Block Library 1-3-40 SAMPLING_TIME FB Prototype SAMPLING_TIME ENABLE ¡ BOOL TIME TIME TIME ¡ ¡ ¡ TSAM_MAX TSAM_ACT TSAM_MIN Input parameters Label ENABLE Type Description BOOL Command to ENABLE/DISABLE the FB execution Output parameters Label TSAM_MAX TSAM_ACT TSAM_MIN Description Type Description TIME Max. cycle time reached by the application from the power ON TIME Last actual cycle time of the application TIME Min.
Chapter 1 - AsconACLib 1-3-41 SLOPE LIMIT FB Prototype SLOPE_LIMIT ENABLE AI SL_UP SL_DOWN ¡ ¡ ¡ ¡ BOOL REAL REAL REAL REAL ¡ AOUT Input parameters Label ENABLE AI SL_UP SL_DOWN Type BOOL REAL REAL REAL Description Enable Slope Function Analog input value Slope Up Analog Value Slope Down Analog Value Output parameters Label AOUT Description Type REAL Description Analog Output Value conditionated by the Slopes This function block limit the Output value rate of change in according to the specif
sigmadue - IEC 61131-3 Function Block Library 1-3-42 TIMER_ADV FB Prototype TIMER_ADV START RUN_HOLD T_RESET TIME_HH TIME_MM TIME_SS ¡ ¡ ¡ ¡ ¡ ¡ BOOL BOOL BOOL REAL REAL REAL BOOL BOOL BOOL BOOL REAL REAL REAL ¡ ¡ ¡ ¡ ¡ ¡ ¡ START_STS RUN_STS HOLD_STS END_TIMER COUNT_HH COUNT_MM COUNT_SS Input parameters Label START RUN_HOLD T_RESET TIME_HH TIME_MM TIME_SS Type BOOL BOOL BOOL REAL REAL REAL Description Digital command to start the Timer Digital command to Run or Hold the Timer count Digital command
Chapter 1 - AsconACLib 1-3-43 TOTALIZER FB Prototype TOTALIZER ENABLE AI RESET MINVAL SCALE PULSE ROLL ¡ ¡ ¡ ¡ ¡ ¡ ¡ BOOL DWORD BOOL REAL BOOL BOOL REAL BOOL REAL REAL REAL REAL ¡ ¡ ¡ ¡ ¡ ERROR ERR_CODE DOUT AOUT ROLLED Input parameters Input Description Command to enable the internal code ENABLE BOOL execution AI Type Range Full range of the REAL data-type REAL Analogue input value [e.u.] RESET BOOL Digital reset Input dropout minimum value.
sigmadue - IEC 61131-3 Function Block Library Input SCALE PULSE ROLL Default Value 1.0 100.0 1000.0 Reference Table Output ERR_CODE.0 ERR_CODE.1 ERR_CODE.
Chapter 1 - AsconACLib 1-3-44 TOTALIZER_ADV FB Prototype TOTALIZER_ADV ENABLE AI RESET MINVAL SCALE PULSE ROLL T_BASE ¡ ¡ ¡ ¡ ¡ BOOL DWORD BOOL REAL BOOL BOOL REAL BOOL REAL REAL REAL REAL USINT ¡ ¡ ¡ ¡ ERROR ERR_CODE DOUT AOUT ROLLED Input parameters Label Description Command to enable the internal code ENABLE BOOL execution AI Type REAL Analogue input value [e.u.] Range Full range of the REAL data-type RESET BOOL Digital reset Input dropout minimum value.
sigmadue - IEC 61131-3 Function Block Library Default Values Table Label ENABLE AI RESET MINVAL SCALE PULSE ROLL T_BASE Default Value FALSE 0.0 FALSE 0.0 1.0 100.0 1000.0 0 Reference Table Output ERR_CODE.0 ERR_CODE.1 ERR_CODE.
Chapter 2 AsconBasicIOLib 2-1 Purpose The purpose of this document is to supply a complete description of AsconBasicIOLib Library project. 2-2 Caution This library can be used only with the CU-02 unit. Description AsconBasicIOLib is a Function Block library enabling the access of Ascon SpA sigmadue line devices from OpenPCS programming environment.
sigmadue - IEC 61131-3 Function Block Library bAI02UI bAI04RT bAI08TC bAI08HL bAI08DP bAO08HL bAO08DP bERRORSTATEAN bERRORSTATEDIG Interface FB with AI-02UI module Interface FB with AI-04RT module Interface FB with AI-08TC module Interface FB with AI-08HL module Interface FB with AI-08DP module Interface FB with AO-08HL module Interface FB with AO-08DP module FBs for error status management during communication for analogue output modules FBs for error status management during communication for digital ou
Chapter 2 - AsconBasicIOLib The following is a network (CU-02 plus three modules) architecture definition, emphasizing the integration mode of the modules dedicated to the definition the output status in error conditions. The first figure shows the scheme with no use of these FBs; the second one shows also the output modules. The figures show the entering mode of output status configuration FBs in case of communication error.
sigmadue - IEC 61131-3 Function Block Library 2-3 Description of the individual Function Blocks 2-3-1 bDI16LV FB Prototype bDI16LV NETWORK NODEID ¡ ¡ DWORD USINT BOOL DWORD ¡ CONFIRM INPUT Input parameters Label Network NodeID Type DWORD USINT Description CAN Network Connection CANopen Device Identifier Output parameters Label Confirm Input Description 2-3-2 Type BOOL DWORD Description Function Block Confirm Input State This Function Block acquires the input data from the module, and retu
Chapter 2 - AsconBasicIOLib 2-3-3 bDO04RL FB Prototype bDO04RL NETWORK NODEID OUTPUT ¡ ¡ ¡ DWORD USINT DWORD BOOL ¡ CONFIRM Input parameters Label Network NodeID Output Type DWORD USINT DWORD Description CAN Network Connection CANopen Device Identifier Output State Output parameters Label Confirm Description 2-3-4 Type BOOL Description Function Block Confirm This Function Block sets the output of the module using the provided “Output” value signal.
sigmadue - IEC 61131-3 Function Block Library 2-3-5 bDO04TX FB Prototype bDO04TX NETWORK NODEID OUTPUT ¡ ¡ ¡ DWORD USINT DWORD BOOL ¡ CONFIRM Input parameters Label Network NodeID Output Type DWORD USINT DWORD Description CAN Network Connection CANopen Device Identifier Output State Output parameters Label Confirm Description 2-3-6 Type BOOL Description Function Block Confirm This Function Block sets the output of the module using the provided “Output” value signal.
Chapter 2 - AsconBasicIOLib 2-3-7 bDO16TP FB Prototype bDO16TP NETWORK NODEID OUTPUT ¡ ¡ ¡ DWORD USINT DWORD BOOL ¡ CONFIRM Input parameters Label Network NodeID Output Type DWORD USINT DWORD Description CAN Network Connection CANopen Device Identifier Output State Output parameters Label Confirm Description 2-3-8 Type BOOL Description Function Block Confirm This Function Block sets the output of the module using the provided “Output” value signal.
sigmadue - IEC 61131-3 Function Block Library 2-3-9 bDM08TS FB Prototype bDM08TS NETWORK NODEID CHMODE OUTPUT ¡ ¡ ¡ ¡ DWORD USINT BYTE DWORD BOOL DWORD ¡ ¡ CONFIRM INPUT Input parameters Label Network NodeID ChMode Output Type DWORD USINT BYTE DWORD Description CAN Network Connection CANopen Device Identifier Channel Direction (default value = 0x00) Output State Output parameters Label Confirm Input Description 66 Type BOOL DWORD Description Function Block Confirm Input State This Function
Chapter 2 - AsconBasicIOLib 2-3-10 aDM08TS FB Prototype aDM08TS NETWORK NODEID CHMODE OUTPUT INPUT_OPTION OUTPUT_OPTION RESETLATCH PWM_FREQUENCY PWM_DUTYCYCLE1 PWM_DUTYCYCLE2 STARTPWM3 STARTPWM4 FREQUENCY_RANGE PULSE STARTPULSE STARTCOUNTER1 RESETCOUNTER1 STARTCOUNTER2 RESETCOUNTER2 MS_TIME1 MS_TIME2 MS_TIME3 MS_TIME4 MS_TIME5 MS_TIME6 MS_TIME7 MS_TIME8 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DWORD USINT BYTE DWORD BYTE BYTE BYTE REAL REAL REAL BOOL BOOL BYTE REAL BOOL BOOL BOOL BOOL BOOL
sigmadue - IEC 61131-3 Function Block Library Input Type MS_Time4 REAL MS_Time5 REAL MS_Time6 REAL MS_Time7 REAL MS_Time8 REAL Description Input Monostable Time Channel 4 [s] (from 5ms to 65.0s step by 5ms - default value = 1.0) Input Monostable Time Channel 5 [s] (from 5ms to 65.0s step by 5ms - default value = 1.0) Input Monostable Time Channel 6 [s] (from 5ms to 65.0s step by 5ms - default value = 1.0) Input Monostable Time Channel 7 [s] (from 5ms to 65.0s step by 5ms - default value = 1.
Chapter 2 - AsconBasicIOLib Input Special Function Frequency Measurement For the channels 1 and channel 2 it is possible to activate the function of frequency measurement. The module is able to provide the frequency of the digital input signals connected to the device. The outputs Frequency1 and Frequency2 contain the measured values while the user must specify the range of the input signal using the Frequency_Range parameter: 0 for the range 0.015Hz... 2KHz and 1 for the range 1Hz... 20KHz.
sigmadue - IEC 61131-3 Function Block Library Output Special Function PWM Signal Generation For the channel 3 and channel 4 it is possible to activate the function of PWM signal generation. The module is able to generate two different digital PWM signals with variable duty cyle (PWM_DutyCycleX) using the same frequency (PWM_Frequency).
Chapter 2 - AsconBasicIOLib 2-3-11 bDM16TS FB Prototype bDM16TS NETWORK NODEID OUTPUT ¡ ¡ ¡ DWORD USINT DWORD BOOL DWORD ¡ ¡ CONFIRM INPUT Input parameters Label Network NodeID Output Type DWORD USINT DWORD Description CAN Network Connection CANopen Device Identifier Output State Output parameters Label Confirm Input Description Type BOOL DWORD Description Function Block Confirm Input State This Function Block sets the outputs using the provided “Output” value signal, and it returns the input
sigmadue - IEC 61131-3 Function Block Library 2-3-13 bAI02UI FB Prototype bAI02UI NETWORK NODEID CH1TYPE CH2TYPE ¡ ¡ ¡ ¡ DWORD USINT ASCON_SENSOR ASCON_SENSOR BOOL REAL REAL ¡ ¡ ¡ CONFIRM CH1 CH2 Input parameters Label Network NodeID Ch1Type Ch2Type Type DWORD USINT ASCON_SENSOR ASCON_SENSOR Description CAN Network Connection CANopen Device Identifier Input Type Channel 1 (default value = TCJ) Input Type Channel 2 (default value = TCJ) Output parameters Label Confirm Ch1 Ch2 Type BOOL REAL REAL
Chapter 2 - AsconBasicIOLib The following table gives in detail the Range for each input that may be connected to the module. String TCJ TCK TCL TCN TCR TCS TCT PT100 PT1000 V010 MV0150 MA420 MA020 POT Range Lo -210°C (-346°F) -200°C (-328°F) -200°C (-328°F) 0°C (32°F) 0°C (32°F) 0°C (32°F) -200°C (-328°F) -200°C (-328°F) -200°C (-328°F) 0V 0mV 4mA 0mA 0% Range Hi 1200°C (2192°F) 1372°C (2501.
sigmadue - IEC 61131-3 Function Block Library 2-3-14 bAI04RT FB Prototype bAI04RT NETWORK NODEID CH1TYPE CH2TYPE CH3TYPE CH4TYPE ¡ ¡ ¡ ¡ ¡ ¡ DWORD USINT ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR BOOL REAL REAL REAL REAL ¡ ¡ ¡ ¡ ¡ CONFIRM CH1 CH2 CH3 CH4 Input parameters Label Network NodeID Ch1Type Ch2Type Ch3Type Ch4Type Type DWORD USINT ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR Description CAN Network Connection CANopen Device Identifier Input Type Channel 1 (default value =
Chapter 2 - AsconBasicIOLib The following table gives in detail the Range for each input that may be connected to the module. String Range Lo Range Hi TCJ -210°C (-346°F) 1200°C (2192°F) TCK -200°C (-328°F) 1372°C (2501.
sigmadue - IEC 61131-3 Function Block Library 2-3-15 bAI08TC FB Prototype bAI08TC NETWORK NODEID CH1TYPE CH2TYPE CH3TYPE CH4TYPE CH5TYPE CH6TYPE CH7TYPE CH8TYPE ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DWORD USINT ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR BOOL REAL REAL REAL REAL REAL REAL REAL REAL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ CONFIRM CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8 Input parameters Label Network NodeID Ch1Type Ch2Type Ch3Type Ch4Type Ch5Type Ch6Type Ch7Type Ch8Type T
Chapter 2 - AsconBasicIOLib Input tables The configuration of the module inputs is done using the following strings. For example, if the value “MV0100” is assigned to the signal "Ch1Type", this means that the input channel 1 is configured as 0...100mV input. String TCJ (default value) TCK TCL TCN TCR TCS TCT MV0100 MV01000 MVPM100 MVPM1000 Sensor Thermocouple J Thermocouple K Thermocouple L Thermocouple N Thermocouple R Thermocouple S Thermocouple T Linear Input 0... 100 mV Linear Input 0...
sigmadue - IEC 61131-3 Function Block Library 2-3-16 bAI08HL FB Prototype bAI08HL NETWORK NODEID CH1TYPE CH2TYPE CH3TYPE CH4TYPE CH5TYPE CH6TYPE CH7TYPE CH8TYPE ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DWORD USINT ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR BOOL REAL REAL REAL REAL REAL REAL REAL REAL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ CONFIRM CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8 Input parameters Label Type Description Network DWORD CAN Network Connection NodeID USINT CANope
Chapter 2 - AsconBasicIOLib 2-3-17 bAI08DP FB Prototype bAI08DP NETWORK NODEID CH1TYPE CH2TYPE CH3TYPE CH4TYPE CH5TYPE CH6TYPE CH7TYPE CH8TYPE ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DWORD USINT ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR BOOL REAL REAL REAL REAL REAL REAL REAL REAL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ CONFIRM CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8 Input parameters Label Type Description Network DWORD CAN Network Connection NodeID USINT CANopen Device Identifie
sigmadue - IEC 61131-3 Function Block Library 2-3-18 bAO08HL FB Prototype bAO08HL NETWORK NODEID CH1TYPE CH2TYPE CH3TYPE CH4TYPE CH5TYPE CH6TYPE CH7TYPE CH8TYPE CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DWORD USINT ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR ASCON_SENSOR REAL REAL REAL REAL REAL REAL REAL REAL BOOL ¡ CONFIRM Input parameters Label Type Description Network DWORD CAN Network Connection NodeID Ch1Type USINT
Chapter 2 - AsconBasicIOLib Input tables The configuration of the module output is done using the following strings. For example, if value "MA420" is assigned to the signal "Ch1Type”, this means that the output channel 1 is configured to generate current signals with the range 4... 20 mA. The numerical value expected from the Function Block is a number between 0.0 (for 4mA) and 100.0 (for 20mA) . String Sensor V010 (default value) Linear Output 0... 10V MA020 Linear Output 0...
sigmadue - IEC 61131-3 Function Block Library 2-3-19 bAO08DP FB Prototype bAO08DP NETWORK NODEID CH1 CH2 CH3 CH4 CH5 CH6 CH7 CH8 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DWORD USINT REAL REAL REAL REAL REAL REAL REAL REAL BOOL ¡ CONFIRM Input parameters Label Type Description Network DWORD CAN Network Connection NodeID USINT CANopen Device Identifier Ch1 REAL Input1 in [± 100%] Ch2 REAL Input2 in [± 100%] Ch3 REAL Input3 in [± 100%] Ch4 REAL Input4 in [± 100%] Ch5 REAL Input5 in [± 100%] Ch6 REA
Chapter 2 - AsconBasicIOLib 2-3-20 bERRORSTATEAN FB Prototype bERRORSTATEAN NETWORK NODEID MODE EVAL1 EVAL2 EVAL3 EVAL4 EVAL5 EVAL6 EVAL7 EVAL8 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DWORD USINT DWORD REAL REAL REAL REAL REAL REAL REAL REAL DWORD DWORD ¡ NETWORK_OUT ¡ NODEID_OUT Input parameters Label Type Description Network DWORD CAN Network Connection NodeID USINT CANopen Device Identifier Mode DWORD Error Mode Settingv (default value = 0xFF) Eval1 REAL Error Value Channel 1 in [0...
sigmadue - IEC 61131-3 Function Block Library The following figure represents the way of use of this Function Block. NETWORK connection from S2_CU02 bERRORSTATEAN NETWORK 8 255 NODEID NETWORK_OUT NODEID__OUT bAO08DP NETWORK CONFIRM NODEID MODE CH1 EVAL1 CH2 EVAL2 CH3 EVAL3 CH4 EVAL4 CH5 EVAL5 CH6 EVAL6 CH7 EVAL7 CH8 EVAL8 Note: Mode parameter The bERRORSTATEAN works with bAO08DP and bAO08HL function block of the AsconBasicIOLib.
Chapter 2 - AsconBasicIOLib 2-3-21 bERRORSTATEDIG FB Prototype bERRORSTATEDIG NETWORK NODEID MODE EVAL ¡ ¡ ¡ ¡ DWORD USINT DWORD DWORD DWORD USINT ¡ ¡ NETWORK_OUT NODEID_OUT Input parameters Label Type Description Network DWORD CAN Network Connection NodeID USINT CANopen Device Identifier Mode DWORD Error Mode Setting (default value = 0xFF) Eval DWORD Error Value (default value = 0x00) oUTput parameters Label Description Type Description Network_Out DWORD CAN Network Connection
sigmadue - IEC 61131-3 Function Block Library Mode parameter MODE Bit31-8 Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0 0 actual actual actual actual actual actual actual actual actual EVAL EVAL EVAL EVAL EVAL EVAL EVAL EVAL EVAL 1 31-8 bit bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 In case of error If the n-th bit of the mode parameter is 0 the output remains at the actual value; if the n-th bit is 1 the n-th output assume the value at the n-th position of EVAL input.
Chapter 3 AsconControlLib 3-1 Purpose The purpose of this document is to provide a complete description of the AsconControlLib. 3-2 Description The AsconControlLib is a function block library dedicated to the process control. It uses the basic functionalities dedicated to the P.I.D. implementation present in the firmware of the control unit (CU-02 and MP-01) device in order to provide solution ready to use.
sigmadue - IEC 61131-3 Function Block Library 3-3 Function Block Decription 3-3-1 S2_CONTROLLER FB Prototype S2_CONTROLLER ¡ TI ¡ TD ¡ AT_RUN ¡ AT_ABORT ¡ AUTOUPDATE ¡ SP ¡ MEAS ¡ ATB ¡ M_RES ¡ FFWD ¡ OC ¡ OCRB ¡ ACT_TYPE ¡ DTRK ¡ TRK ¡ DAM ¡ AM_VAL ¡ DAUX ¡ AUX ¡ PV_LO ¡ PV_HI ¡ OUTLO ¡ OUTHI ¡ PB ------------------------REAL------------------------------------------------REAL------------------------------------------------REAL-----------------------BOOL BOOL BOOL REAL REAL REAL REAL REAL REAL REAL
Chapter 3 - AsconControlLib Label DAM AM_VAL DAUX Type Description BOOL Output Digital Auto/Manual Command REAL Output Auto/Manual value [%] BOOL Output Digital Auxiliary command AUX REAL Output Auxiliary Signal [%] PV_LO PV_HI OUTLO OUTHI REAL REAL REAL REAL PV input Low range value [e.u.] PV input High range value [e.u.] Control Output Low limit value [%] Control Output High limit value [%] Range 0…100.0 OUTLO… OUTHI 0…100.0 0…100.
sigmadue - IEC 61131-3 Function Block Library The following picture shows an example using CFC languages..
Chapter 3 - AsconControlLib Parameter OCRB ACT_TYPE DTRK TRK DAM AM_VAL DAUX AUX PV_LO PV_HI OUTLO OUTHI OUT TPB TTI TTD AT_STS AT_FAIL Parameters Default Description Defines the zone across the setpoint where the PID algorithm is not affected by the overshoot control Selection of the control output direction: direct or reverse. Tracking Operating mode Command Tracking signal value Automatic/Manual Operating Mode Command Manual Value [0…100.
sigmadue - IEC 61131-3 Function Block Library Input AM_VAL DAUX AUX PVLO PVHI OUTLO OUTHI Output OUT TPB TTI TTD AT_STS AT_FAIL Default Value 0.0 FALSE 0.0 0.0 100.0 0.0 100.0 Default Value 0.0 0.0 0.0 0.0 FALSE FALSE Manual Access Parameters The FB provides all the functionalities the operator needs to interact with the loop. The loop is controlled by one PID, connected internally to an AutoManual block.
Chapter 3 - AsconControlLib 3-3-2 S2_HC_CONTROLLER FB Prototype S2_HC_CONTROLLER ¡ TI ¡ TD ¡ RCGA ¡ AT_RUN ¡ AT_ABORT ¡ AUTOUPDATE ¡ SP ¡ MEAS ¡ ATB ¡ M_RES ¡ FFWD ¡ OC ¡ OCRB ¡ ACT_TYPE ¡ DTRK ¡ TRK ¡ DAM ¡ AM_VAL ¡ DAUX ¡ AUX ¡ PV_LO ¡ PV_HI ¡ OUTLO ¡ OUTHI ¡ PB ------------------------REAL------------------------------------------------REAL------------------------------------------------REAL------------------------------------------------REAL-----------------------BOOL BOOL BOOL REAL REAL REAL REAL
sigmadue - IEC 61131-3 Function Block Library Label AM_VAL DAUX Type Description REAL Output Auto/Manual value [%] BOOL Output Digital Auxiliary command AUX REAL Output Auxiliary Signal [%] PV_LO PV_HI OUTH_HI OUTC_HI REAL REAL REAL REAL PV input Low range value [e.u.] PV input High range value [e.u.] Heat Control Output High limit value [%] Cool Control Output High limit value [%] Range -100.0…100.0 -OUTC_HI … OUTH_HI 0… 100.0 0… 100.
Chapter 3 - AsconControlLib The following picture shows an example using CFC languages.
sigmadue - IEC 61131-3 Function Block Library Input OCRB DBND DTRK TRK DAM AM_VAL DAUX AUX PV_LO PV_HI OUTH_HI OUTC_HI Output OUTH OUTC OUTHC OVERLAP TPB TTI TTD TRCGA AT_STS AT_FAIL Parameters Default Description Output for the Heat Action Output for the Cool Action Global output value for the visualization Active if both OUTH and OUTC are active Pb calculated from the tuning algorithm Ti calculated from the tuning algorithm Td calculated from the tuning algorithm RCGA calculated from the tuning algorit
Chapter 3 - AsconControlLib Input OCRB AT_RUN AT_ABORT DBND AUTOUPDATE DTRK TRK DAM AM_VAL DAUX AUX PV_LO PV_HI OUTH_HI OUTC_HI Default Value 0.5 FALSE FALSE 0.0 FALSE FALSE 0.0 FALSE 0.0 FALSE 0.0 0.0 100.0 100.0 100.0 Output Parameters Default Output OUTH OUTC OUTHC OVERLAP TPB TTI TTD TRCGA AT_STS AT_FAIL Default Value 0.0 0.0 0.0 FALSE 0.0 0.0 0.0 0.0 FALSE FALSE Manual Access Parameters The FB provides all the functionalities the operator needs to interact with the loop.
sigmadue - IEC 61131-3 Function Block Library • If DTRK (Track) is active, the outputs are set according to the value of the analog input TRK. This signal, with range [-100.0... 100.0], drives both OUTH and OUTC through a phase splitter. When its value is in the range [-100.0 … 0] it means that a Cool action must be taken; therefore, OUTH is set to 0, while OUTC is set to the value of TRK, with the sign inverted. Inversely, when it is in the range [0... 100.0] OUTC is set to 0, while OUTH is set to TRK.
Chapter 3 - AsconControlLib 3-3-3 S2_TNATFREQ FB Prototype S2_TNATFREQ ENABLE SP MEAS ACT_TYPE OUTLO OUTHI ¡ ¡ ¡ ¡ ¡ ¡ BOOL REAL REAL BOOL REAL REAL REAL REAL REAL REAL BOOL BOOL BOOL ¡ ¡ ¡ ¡ ¡ ¡ ¡ TOUT TPB TTI TTD TDBMP TRUNNING TVALID Input parameters Input ENABLE SP MEAS ACT_TYPE OUTLO OUTHI Type BOOL REAL REAL BOOL REAL REAL Description Function block enable Setpoint value [0…100.0] Measure value [0…100.0] PID action type Lo value for OUT output [0…100.0] Hi value for OUT output [0…100.
sigmadue - IEC 61131-3 Function Block Library 3-3-4 S2_TSTEPRESP FB Prototype S2_TSTEPRESP ENABLE SP MEAS ACT_TYPE OUTLO OUTHI ¡ ¡ ¡ ¡ ¡ ¡ BOOL REAL REAL BOOL REAL REAL REAL REAL REAL REAL BOOL BOOL BOOL ¡ ¡ ¡ ¡ ¡ ¡ ¡ TOUT TPB TTI TTD TDBMP TRUNNING TVALID Input parameters Input ENABLE SP MEAS ACT_TYPE OUTLO OUTHI Type BOOL REAL REAL BOOL REAL REAL Description Function block enable Setpoint value [0…100.0] Measure value [0…100.0] P.I.D. action type Lo value for OUT output [0…100.
Chapter 3 - AsconControlLib 3-3-5 S2_TFUZZY FB Prototype S2_TFUZZY ENABLE SP MEAS ACT_TYPE OUTLO OUTHI ¡ ¡ ¡ ¡ ¡ ¡ BOOL REAL REAL BOOL REAL REAL REAL REAL REAL REAL BOOL BOOL BOOL ¡ ¡ ¡ ¡ ¡ ¡ ¡ TOUT TPB TTI TTD TDBMP TRUNNING TVALID Input parameters Input ENABLE SP MEAS ACT_TYPE OUTLO OUTHI Type BOOL REAL REAL BOOL REAL REAL Description Function block enable Setpoint value [0…100.0] Measure value [0…100.0] P.I.D. action type Lo value for OUT output [0…100.0] Hi value for OUT output [0…100.
sigmadue - IEC 61131-3 Function Block Library 3-3-6 S2_HC_TNATFREQ FB Prototype S2_HC_TNATFREQ ENABLE SP MEAS OUTH_HI OUTC_HI ¡ ¡ ¡ ¡ ¡ BOOL REAL REAL REAL REAL REAL REAL REAL REAL REAL BOOL BOOL BOOL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ TOUT TPB TTI TTD TRCGA TDBMP TRUNNING TVALID Input parameters Input ENABLE SP MEAS OUTH_HI OUTC_HI Type BOOL REAL REAL REAL REAL Description Function block enable Setpoint value [-100.0…100.0] Measure value [-100.0…100.0] Limit value for heat action output [0... 100.
Chapter 3 - AsconControlLib 3-3-7 S2_HC_TSTEPRESP FB Prototype S2_HC_TSTEPRESP ENABLE SP MEAS OUTH_HI OUTC_HI ¡ ¡ ¡ ¡ ¡ BOOL REAL REAL REAL REAL REAL REAL REAL REAL REAL BOOL BOOL BOOL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ TOUT TPB TTI TTD TRCGA TBMP TRUNNING TVALID Input parameters Input ENABLE SP MEAS OUTH_HI OUTC_HI Type BOOL REAL REAL REAL REAL Description Function block enable Setpoint value [-100.0…+100.0] Measure value [-100.0…+100.0] Limit value for heat action output [0...100.
sigmadue - IEC 61131-3 Function Block Library 3-3-8 S2_HC_TFUZZY FB Prototype S2_HC_TFUZZY ENABLE SP MEAS OUTH_HI OUTC_HI ¡ ¡ ¡ ¡ ¡ BOOL REAL REAL REAL REAL REAL REAL REAL REAL REAL BOOL BOOL BOOL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ TOUT TPB TTI TTD TRCGA TBMP TRUNNING TVALID Input parameters Input ENABLE SP MEAS OUTH_HI OUTC_HI Type BOOL REAL REAL REAL REAL Description Function block enable Setpoint value [0…100.0] Measure value [0…100.0] Limit value for heat action output [0...100.
Chapter 3 - AsconControlLib 3-3-9 S2_EZ_TUNE FB Prototype S2_EZ_TUNE ENABLE SP MEAS ACT_TYPE ATB OUTLO OUTHI ¡ ¡ ¡ ¡ ¡ ¡ ¡ REAL REAL REAL REAL BOOL BOOL BOOL BOOL REAL REAL BOOL REAL REAL REAL ¡ ¡ ¡ ¡ ¡ ¡ ¡ TOUT TPB TTI TTD TDBMP TRUNNING TVALID Input parameters Input ENABLE SP MEAS ACT_TYPE ATB OUTLO OUTHI Type BOOL REAL REAL BOOL REAL REAL REAL Description Function block enable Setpoint value [0…100.0] Measure value [0…100.0] P.I.D. action type Threshold value [0....100.
sigmadue - IEC 61131-3 Function Block Library S2_HC_EZ_TUNE FB Prototype S2_HC_EZ_TUNE ENABLE SP MEAS ATB OUTH_HI OUTC_HI ¡ ¡ ¡ ¡ ¡ ¡ REAL REAL REAL REAL BOOL BOOL BOOL BOOL REAL REAL REAL REAL REAL ¡ ¡ ¡ ¡ ¡ ¡ ¡ TOUT TPB TTI TTD TDBMP TRUNNING TVALID Input parameters Input ENABLE SP MEAS ATB OUTH_HI OUTC_HI Type BOOL REAL REAL REAL REAL REAL Description Function block enable Setpoint value [0...100.0] Measure value [0...100.0] Threshold value [0...100.0] Limit value for heat action output [0...
Chapter 3 - AsconControlLib 3-3-10 S2_MV FB Prototype S2_MV MVH MVC DBND DTRK TRK DAM AM_VAL DAUX AUX ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ REAL REAL REAL BOOL REAL BOOL BOOL BOOL REAL REAL REAL REAL BOOL BOOL ¡ ¡ ¡ ¡ ¡ OUTH OUTC OUTHC DBMP OVERLAP Input parameters Input Type MVH REAL MVC REAL DBND DTRK TRK DAM AM_VAL DAUX AUX REAL BOOL REAL BOOL REAL BOOL REAL Description Analog input, corresponding to the control output (also named manipulated output) of the Heat P.I.D. module. Value in [0…100.
sigmadue - IEC 61131-3 Function Block Library occurs; for each value included in the dead band (now named cross band), both the OUTC and the OUTH are different from 0. • If DTRK (Track) is active, the outputs are set according to the value of the analog input TRK. This signal has a range from [-100.0...+100.0] and it drives both OUTH and OUTC. When its value is in the range -100.0...0, it means that a Cool action must be taken; therefore, OUTH is set to 0.
Chapter 3 - AsconControlLib 3-3-11 S2_HCMV FB Prototype S2_HCMV MVH MVC DBND DTRK TRK DAM AM_VAL DAUX AUX ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ REAL REAL REAL BOOL REAL BOOL BOOL BOOL REAL REAL REAL REAL BOOL BOOL ¡ ¡ ¡ ¡ ¡ OUTH OUTC OUTHC DBMP OVERLAP Input parameters Input Type MVH REAL MVC REAL DBND DTRK TRK DAM AM_VAL DAUX AUX REAL BOOL REAL BOOL REAL BOOL REAL Description Analog input, corresponding to the control output (also named manipulated output) of the Heat PID module. Value in [0…100.0].
sigmadue - IEC 61131-3 Function Block Library the OUTC and the OUTH output are 0. When it is negative, the opposite occurs; for each value included in the dead band (now named cross band), both the OUTC and the OUTH are different from 0. • If DTRK (Track) is active, the outputs are set according to the value of the analog input TRK. This signal has a range from [-100.0 … +100.0] and it drives both OUTH and OUTC. When its value is in the range -100.0...
Chapter 3 - AsconControlLib 3-3-12 S2_SPLITMV FB Prototype S2_SPLITMV MV DBND RCGA DTRK TRK DAM AM_SL DAUX AUX ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ REAL REAL REAL BOOL REAL BOOL BOOL BOOL REAL REAL REAL REAL REAL BOOL BOOL REAL ¡ ¡ ¡ ¡ ¡ ¡ ¡ OUTH OUTC OUTHC BMP_MV DBMP OVERLAP SPLIT_PB Input parameters Input Type MV REAL DBND RCGA DTRK TRK DAM AM_VAL DAUX AUX REAL REAL BOOL REAL BOOL REAL BOOL REAL Description Controlled variable (also named manipulated variable).
sigmadue - IEC 61131-3 Function Block Library Depending on these digital inputs, the functionality of the module changes as follows: • If none of these digital signals are active, the module split the input MV into the two action MVH and MVC. The DBND parameter defines how the Cool and the Heat channel interact each other. When it is positive, this parameter defines the dead band width, centered around the value 50.0 of the input. It means that when the input is in the range [50.0 – DBND…50.
Chapter 3 - AsconControlLib 3-3-13 S2_FILTER FB Prototype S2_FILTER INPUT TAU ¡ ¡ REAL REAL REAL ¡ OUTPUT Input parameters Input INPUT Type REAL TAU REAL Description Filter input (default value = 0.0) Filter time constant: a value of 0.0 is intended to disable the filter action and the output will assume the input value [s] (default value = 0.1) Output parameters Output OUTPUT Description Type REAL Description Filter output (default value = 0.
Chapter 4 AsconCPULib 4-1 Purpose The purpose of this document is to provide a complete description of the library AsconCPULib. 4-2 Caution This library can be used only with the CU-02 unit. Description The AsconCPULib is a function block library that allows the access to the control unit (CU-02) device of the Ascon sigmadue line, from the OpenPCS programming tool.
Chapter 4 - AsconCPULib 4-2-1 CANopen network definition The use of the S2_CU02 joined with the library for the IO modules (please see the AsconBasicIOLib documentation), allows the user to define easly the architecture of his CANopen network.
sigmadue - IEC 61131-3 Function Block Library initialization phase of the communication. The FB provide also a global indication of both communication error state and emergency error condition using the COMMERR and the EMCYSTS signals, and a punctual indication using the DEVCOMMSTS array and the DEVEMCYSTS matrix. Finally the FB is able to set the local digital output of the CPU and to read the state of the digital input.
Chapter 4 - AsconCPULib 4-3-2 SPLIT_ENABLE FB Prototype SPLIT_ENABLE NETWORK NODEID ¡ ¡ DWORD USINT BOOL ¡ ENABLE Input parameters Label Network NodeID Type DWORD USINT Description CAN Network Connection CANopen Device Identifier Output parameters Label ENABLE Description 4-3-3 Type BOOL Description Function Block Output This Function Block sets the boolean “Enable” output on the basis of the value of the n-th bit of the “Network” input.
sigmadue - IEC 61131-3 Function Block Library 4-3-4 SET_TT_MODULE (note) FB Prototype SET_TT_MODULE NODE TT_RX TT_TX Note: ¡ ¡ ¡ USINT ARRAY[1...4] of BOOL ARRAY[1...4] of BOOL BOOL WORD ¡ ¡ CONFIRM RESULT System Function Block Input parameters Label Node TT_Rx TT_Tx Type Description USINT CANopen Device Identifier ARRAY[1...4] of BOOL Transmission Type for the RxPDOs ARRAY[1...
Chapter 5 AsconMBCommLib 5-1 Purpose The purpose of this document is to supply a complete description of AsconMBCommLib Library project. 5-2 Description AsconMBCommLib is a Function Block library which simplifies the access to the MODBUS communication ports available in Ascon SpA sigmadue line devices. The following is the list of FBs present in the library.
sigmadue - IEC 61131-3 Function Block Library MB_SLV_WR8_REAL MB_SLV_WR16_WORD MB_SLV_WR32_DIGITAL MB_SLV_WR_DIGITAL MB_SLV_WR_DWORD MB_SLV_WR_REAL MB_SLV_WR_WORD MODEM_CHECK MODEM_CONF MODEM_SMS_SEND MP_SERIAL_PORTS PROFIBUS_PORT SEND_EMAIL SERIAL_PORTS SYS_OPRS_MNGT TCP_IP_PORT 120 Modbus Slave: writing of 8 REAL values Modbus Slave: writing of 16 WORD values Modbus Slave: writing of 32 digital values Modbus Slave: writing of 1 digital value Modbus Slave: writing of 1 DWORD value Modbus Slave: writing
Chapter 5 - AsconMBCommLib 5-2-1 Communication port configuration The SERIAL_PORTS/MP_SERIAL_PORT and TCP_IP_PORT FBs enable the communication port configuration. The communication parameters (baudrate, logic ports), the desired protocol type (MODBUS SLAVE, MODBUS MASTER), the desired communication port (RS232, RS485 or Ethernet connection) can be thus assigned. The figure below shows an example of port communication configuration.
sigmadue - IEC 61131-3 Function Block Library 5-2-2 Modbus Slave Protocol Once the communication port has been configured as slave (or server in case of MODBUS/TCP), the data exchange between the program written in the IEC61131 environment and the memory area, that can be seen from the master (or client in case of MODBUS/TCP), can occur in two different ways: • by declaring and using the %M variables; • by using the Function Blocks in AsconMBCommLib library.
Chapter 5 - AsconMBCommLib WRITE ACCESS THE MODBUS MASTER ACCESSES THE DEDICATED PLC MEMORY AREA READ ACCESS MB_SLV_RDX_YYY MB_SLV_WRX_YYY MODBUS MASTER UNIT %MW - %MX MEMORY AREA DEDICATED TO MODBUS INTERFACE THE PLC PROGRAM UPDATES THE MEMO ARE VISIBLE FROM T MODBUS MASTER UN IEC 61131-3 PROGRAM For further details on these Function Blocks, see the specific documentation of the individual module.
sigmadue - IEC 61131-3 Function Block Library 5-2-3 Modbus Master protocol The sigmadue CPU device firmware includes the communications primitives for MODBUS MASTER RTU (see “Serial Communication Function Block Library”). The definition of Function Blocks simplifies its use and enables to define the sequence of messages to be generated by the MODBUS master, after correctly configurating the communications port. The following example shows how to use the library master Function Blocks1.
Chapter 5 - AsconMBCommLib 5-3 Description of the individual Function Blocks 125
sigmadue - IEC 61131-3 Function Block Library 5-3-1 MODBUS MASTER SYNCHRONIZER FB Prototype MB_MST_SYNC ENABLE NR_CMD ¡ ¡ BOOL USINT USINT ¡ NR_SEQ Input parameters Label Type Description ENABLE BOOL Enable/Disable the Modbus master synchronization NR_CMD USINT Number of inquires to be managed [num] Range 1...
Chapter 5 - AsconMBCommLib 5-3-2 Modbus MASTER COIL READ FB Prototype MB_MST_RD_COIL SEQ NR_SEQ NODE MB_FUNC ID_COIL NR_COIL T_OUT RETRY ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ USINT USINT USINT USINT UINT UINT UINT USINT DWORD BOOL BOOL BOOL USINT USINT ¡ ¡ ¡ ¡ ¡ ¡ RD_COIL MB_FAIL MB_TOUT MB_ERR MB_STS MB_OPRS Input parameters Label Type SEQ USINT NR_SEQ USINT NODE MB_FUNC ID_COIL NR_COIL USINT USINT UINT UINT T_OUT UINT RETRY USINT Description Sequence identifiable number.
sigmadue - IEC 61131-3 Function Block Library Output Label MB_STS MB_OPRS 128 Description 0 = No operation/OK 1 = Transaction in progress 2 = Data available 3 = Timeout expired 4 = Agent event error 0 = No operation / OK 1 = Port not available 2 = Timeout expired 4 = CRC error 16 = ExCode error
Chapter 5 - AsconMBCommLib 5-3-3 Modbus MASTER COIL WRITE FB Prototype MB_MST_WR_COIL SEQ NR_SEQ NODE ID_COIL NR_COIL WR_COIL T_OUT RETRY ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ USINT USINT USINT UINT UINT DWORD UINT USINT BOOL BOOL BOOL USINT USINT ¡ ¡ ¡ ¡ ¡ MB_FAIL MB_TOUT MB_ERR MB_STS MB_OPRS Input parameters Label Type Description Sequence identifiable number.
sigmadue - IEC 61131-3 Function Block Library Output Label MB_STS MB_OPRS 130 Description 0 1 2 3 4 0 1 2 4 16 = No operation/OK = Transaction in progress = Data available = Timeout expired = Agent error event = No operation/OK = Port not available = Timeout expired = CRC error = ExCode error
Chapter 5 - AsconMBCommLib 5-3-4 Modbus MASTER WORD READ FB Prototype MB_MST_RD_WORD SEQ NR_SEQ NODE MB_FUNC ID_REG NR_REG T_OUT RETRY ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ USINT USINT USINT USINT UINT UINT UINT USINT ARRAY [1..16] OF WORD BOOL BOOL BOOL USINT USINT ¡ ¡ ¡ ¡ ¡ ¡ RD_REG MB_FAIL MB_TOUT MB_ERR MB_STS MB_OPRS Input parameters Label Type SEQ USINT NR_SEQ USINT NODE USINT MB_FUNC USINT ID_REG UINT NR_REG UINT T_OUT UINT RETRY USINT Description Sequence identifiable number.
sigmadue - IEC 61131-3 Function Block Library Output Label MB_STS MB_OPRS 132 Description 0 1 2 3 4 0 1 2 4 16 = No operation / OK = Transaction in progress = Data available = Timeout expired = Agent error event = No operation / OK = Port not available = Timeout expired = CRC error = ExCode error
Chapter 5 - AsconMBCommLib 5-3-5 Modbus MASTER WORD WRITE FB Prototype MB_MST_WR_WORD SEQ NR_SEQ NODE ID_REG NR_REG WR_REG T_OUT RETRY ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ USINT USINT USINT UINT UINT ARRAY [1..16] OF WORD UINT USINT BOOL BOOL BOOL USINT USINT ¡ ¡ ¡ ¡ ¡ MB_FAIL MB_TOUT MB_ERR MB_STS MB_OPRS Input parameters Input Type SEQ USINT NR_SEQ USINT NODE USINT MB_FUNC USINT ID_REG UINT NR_REG UINT WR_REG T_OUT RETRY Description Sequence identifiable number.
sigmadue - IEC 61131-3 Function Block Library Rerefence table Input Input SEQ NODE MB_FUNC ID_REG NR_REG T_OUT RETRY Description Value from 1 to what specified as NR_CMD for the MB_MST_Sync function block (max. 255) 0... 247 6 or 16, in according to the Modbus Specifications 1... 65535 1... 16 1... 65535. Deafult value 10 (1000 ms) 1... 255.
Chapter 5 - AsconMBCommLib 5-3-6 MODBUS MASTER 16WORD TO ARRAY FB Prototype MB_16WORD_TO_ARRAY WORD_1 WORD_2 WORD_3 WORD_4 WORD_5 WORD_6 WORD_7 WORD_8 WORD_9 WORD_10 WORD_11 WORD_12 WORD_13 WORD_14 WORD_15 WORD_16 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD ARRAY [1..16] OF WORD ¡ WR_REG Input parameters Input Type Description Range WORD_1 WORD 1st word to be packed [num] 0...
sigmadue - IEC 61131-3 Function Block Library 5-3-7 MODBUS MASTER ARRAY TO 16WORD FB Prototype MB_ARRAY_TO_16WORD RD_REG ¡ ARRAY [1..16] OF WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ WORD_1 WORD_2 WORD_3 WORD_4 WORD_5 WORD_6 WORD_7 WORD_8 WORD_9 WORD_10 WORD_11 WORD_12 WORD_13 WORD_14 WORD_15 WORD_16 Input parameters Label Type ARRAY [1..
Chapter 5 - AsconMBCommLib 5-3-8 MODBUS MASTER CONVERSION TO 8 DINT VALUES FB Prototype MB_MST_RD8_DINT RD_REG SWAP ¡ ¡ ARRAY [1..16] OF WORD BOOL DINT DINT DINT DINT DINT DINT DINT DINT ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DINT_1 DINT_2 DINT_3 DINT_4 DINT_5 DINT_6 DINT_7 DINT_8 Input parameters Label Type Description ARRAY [1..
sigmadue - IEC 61131-3 Function Block Library 5-3-9 MODBUS MASTER CONVERSION TO 8 DWORD VALUES FB Prototype MB_MST_RD8_DWORD RD_REG SWAP ¡ ¡ ARRAY [1..16] OF WORD BOOL DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DWORD_1 DWORD_2 DWORD_3 DWORD_4 DWORD_5 DWORD_6 DWORD_7 DWORD_8 Input parameters Label Type Description Range ARRAY [1..
Chapter 5 - AsconMBCommLib 5-3-10 MODBUS MASTER CONVERSION TO 8 REAL VALUES FB Prototype MB_MST_RD8_REAL RD_REG SWAP ¡ ¡ ARRAY [1..16] OF WORD BOOL REAL REAL REAL REAL REAL REAL REAL REAL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ REAL_1 REAL_2 REAL_3 REAL_4 REAL_5 REAL_6 REAL_7 REAL_8 Input parameters Label Type Description Range ARRAY [1..
sigmadue - IEC 61131-3 Function Block Library 5-3-11 MODBUS MASTER CONVERSION TO 8 UDINT VALUES FB Prototype MB_MST_RD8_UDINT RD_REG SWAP ¡ ¡ ARRAY [1..16] OF WORD BOOL UDINT UDINT UDINT UDINT UDINT UDINT UDINT UDINT ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ UDINT_1 UDINT_2 UDINT_3 UDINT_4 UDINT_5 UDINT_6 UDINT_7 UDINT_8 Input parameters Label Type Description Range ARRAY [1..
Chapter 5 - AsconMBCommLib 5-3-12 MODBUS MASTER CONVERSION FROM 8 DINT VALUES FB Prototype MB_MST_WR8_DINT DINT_1 DINT_2 DINT_3 DINT_4 DINT_5 DINT_6 DINT_7 DINT_8 NR_DATA SWAP ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DINT DINT DINT DINT DINT DINT DINT DINT UINT BOOL UINT ARRAY [1..16] OF WORD ¡ ¡ NR_REG WR_REG Input parameters Label Type Description Range DINT_1 DINT 1st DINT_2 DINT 2nd variable to be converted [num] -2147483648... 2147483647 DINT_3 DINT 3rd variable to be converted [num] -2147483648...
sigmadue - IEC 61131-3 Function Block Library 5-3-13 MODBUS MASTER CONVERSION FROM 8 DWORD VALUES FB Prototype MB_MST_WR8_DWORD DWORD_1 DWORD_2 DWORD_3 DWORD_4 DWORD_5 DWORD_6 DWORD_7 DWORD_8 NR_DATA SWAP ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD UINT BOOL UINT ARRAY [1..16] OF WORD ¡ ¡ NR_REG WR_REG Input parameters Label Type Description Range st DWORD_1 DWORD 1 converted variable [num] 0... 4294967295 DWORD_2 DWORD 2nd converted variable [num] 0...
Chapter 5 - AsconMBCommLib 5-3-14 MODBUS MASTER CONVERSION FROM 8 REAL VALUES FB Prototype MB_MST_WR8_REAL REAL _1 REAL _2 REAL _3 REAL _4 REAL _5 REAL _6 REAL _7 REAL _8 NR_DATA SWAP ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ REAL REAL REAL REAL REAL REAL REAL REAL UINT BOOL UINT ARRAY [1..16] OF WORD ¡ ¡ ¡ ¡ NR_REG WR_REG Input parameters Label Type Description Range REAL _1 REAL 1st variable to be converted [num] -3.4E-38... 3.4E+38 REAL _2 REAL 2nd variable to be converted [num] -3.4E-38... 3.
sigmadue - IEC 61131-3 Function Block Library 5-3-15 MODBUS MASTER CONVERSION FROM 8 UDINT VALUES FB Prototype MB_MST_WR8_UDINT UDINT_1 UDINT_2 UDINT_3 UDINT_4 UDINT_5 UDINT_6 UDINT_7 UDINT_8 NR_DATA SWAP ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ UDINT UDINT UDINT UDINT UDINT UDINT UDINT UDINT UINT BOOL UINT ARRAY [1..16] OF WORD ¡ ¡ NR_REG WR_REG Input parameters Label Type Description Range UDINT_1 UDINT 1st variable to be converted [num] 0... 4294967295 UDINT_2 UDINT 2nd variable to be converted [num] 0...
Chapter 5 - AsconMBCommLib 5-3-16 MB_SLV_RD8_DWORD FB Prototype MB_SLV_RD8_DWORD PROTOCOL REGISTER AD_MODE ¡ ¡ ¡ ASCON_SERIALPROTOCOL UINT BOOL USINT DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ OPRS OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 OUT8 Input parameters Label Type PROTOCOL ASCON_SERIALPROTOCOL REGISTER UINT AD_MODE BOOL Description Reference Protocol Register Addressing Mode Setting (default value = TRUE) Output parameters Label OPRS OUT1 – OUT8 Description Reference tab
sigmadue - IEC 61131-3 Function Block Library 5-3-17 MB_SLV_RD8_REAL FB Prototype MB_SLV_RD8_REAL PROTOCOL REGISTER AD_MODE → → → ASCON_SERIALPROTOCOL UINT BOOL USINT REAL REAL REAL REAL REAL REAL REAL REAL → → → → → → → → → OPRS OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 OUT8 Input parameters Label PROTOCOL REGISTER AD_MODE Type Description ASCON_SERIALPROTOCOL Reference Protocol UINT Register Addressing Mode Setting BOOL (default value = TRUE) Output parameters Label Type OPRS USINT OUT1 – OUT8 REAL De
Chapter 5 - AsconMBCommLib 5-3-18 MB_SLV_RD16_WORD FB Prototype MB_SLV_RD16_WORD PROTOCOL REGISTER AD_MODE → → → ASCON_SERIALPROTOCOL UINT BOOL USINT DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD → → → → → → → → → → → → → → → → → OPRS OUT1 OUT2 OUT3 OUT4 OUT5 OUT6 OUT7 OUT8 OUT9 OUT10 OUT11 OUT12 OUT13 OUT14 OUT15 OUT16 Input parameters Label PROTOCOL REGISTER AD_MODE Type Description ASCON_SERIALPROTOCOL Reference Protocol UINT Register Addressing
sigmadue - IEC 61131-3 Function Block Library 5-3-19 MB_SLV_RD32_DIGITAL FB Prototype MB_SLV_RD32_DIGITAL PROTOCOL REGISTER AD_MODE ¡ ¡ ¡ ASCON_SERIALPROTOCOL UINT BOOL USINT BOOL ¡ ¡ OPRS DATA Input parameters Input PROTOCOL REGISTER Type ASCON_SERIALPROTOCOL UINT AD_MODE BOOL Description Reference Protocol Register Addressing Mode Setting (default value = TRUE) Output parameters Output OPRS DATA Description Reference Tables Type BOOL DWORD Description Function block result Data This Func
Chapter 5 - AsconMBCommLib 5-3-20 MB_SLV_RD_DIGITAL FB Prototype MB_SLV_RD_DIGITAL PROTOCOL REGISTER AD_MODE ¡ ¡ ¡ ASCON_SERIALPROTOCOL UINT BOOL USINT BOOL ¡ ¡ OPRS DATA Input parameters Label Type Description PROTOCOL ASCON_SERIALPROTOCOL Reference Protocol REGISTER UINT Register Addressing Mode Setting AD_MODE BOOL (default value = TRUE) Output parameters Label OPRS DATA Description Reference tables Type BOOL BOOL Description Function block result Data This Function Block reads a digital val
sigmadue - IEC 61131-3 Function Block Library 5-3-21 MB_SLV_RD_DWORD FB Prototype MB_SLV_RD_DWORD PROTOCOL REGISTER AD_MODE ¡ ¡ ¡ ASCON_SERIALPROTOCOL UINT BOOL USINT BOOL ¡ ¡ OPRS DATA Input parameters Label PROTOCOL REGISTER AD_MODE Type Description ASCON_SERIALPROTOCOL Reference Protocol UINT Register Addressing Mode Setting BOOL (default value = TRUE) Output parameters Label OPRS DATA Description Reference tables Type USINT DWORD Description Function block result Data This Function Block
Chapter 5 - AsconMBCommLib 5-3-22 MB_SLV_RD_REAL FB Prototype MB_SLV_RD_REAL PROTOCOL REGISTER AD_MODE ¡ ¡ ¡ ASCON_SERIALPROTOCOL UINT BOOL USINT BOOL ¡ ¡ OPRS DATA Input parameters Label PROTOCOL REGISTER AD_MODE Type Description ASCON_SERIALPROTOCOL Reference Protocol UINT Register Addressing Mode Setting BOOL (default value = TRUE) Output parameters Label OPRS DATA Description Reference tables Type BOOL REAL Description Function block result Data This Function Block reads a REAL value from
sigmadue - IEC 61131-3 Function Block Library 5-3-23 MB_SLV_RD_WORD FB Prototype MB_SLV_RD_WORD PROTOCOL REGISTER AD_MODE ¡ ¡ ¡ ASCON_SERIALPROTOCOL UINT BOOL USINT BOOL ¡ ¡ OPRS DATA Input parameters Label PROTOCOL REGISTER AD_MODE Type Description ASCON_SERIALPROTOCOL Reference Protocol UINT Register Addressing Mode Setting BOOL (default value = TRUE) Output parameters Description Reference tables Label OPRS Type USINT Description Function block result DATA WORD Data This Function Block
Chapter 5 - AsconMBCommLib 5-3-24 MB_SLV_WR8_DWORD FB Prototype MB_SLV_WR8_DWORD PROTOCOL REGISTER DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 DATA8 AD_MODE → → → → → → → → → → → ASCON_SERIALPROTOCOL UINT DWORD DWORD DWORD DWORD DWORD DWORD DWORD DWORD BOOL USINT → OPRS Input parameters Label Type Description PROTOCOL ASCON_SERIALPROTOCOL Reference Protocol REGISTER UINT Register DATA1 – DATA8 DWORD Data Addressing Mode Setting AD_MODE BOOL (default value = TRUE) Output parameters Label OPRS Descript
sigmadue - IEC 61131-3 Function Block Library 5-3-25 MB_SLV_WR8_REAL FB Prototype MB_SLV_WR8_REAL PROTOCOL REGISTER DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 DATA8 AD_MODE → → → ASCON_SERIALPROTOCOL UINT REAL REAL REAL REAL REAL REAL REAL REAL BOOL USINT → OPRS Input parameters Label PROTOCOL REGISTER DATA1 – DATA8 Type ASCON_SERIALPROTOCOL UINT REAL AD_MODE BOOL Description Reference Protocol Register Data Addressing Mode Setting (default value = TRUE) Output parameters Label OPRS Description
Chapter 5 - AsconMBCommLib 5-3-26 MB_SLV_WR16_WORD FB Prototype MB_SLV_WR16_WORD PROTOCOL REGISTER DATA1 DATA2 DATA3 DATA4 DATA5 DATA6 DATA7 DATA8 DATA9 DATA10 DATA11 DATA12 DATA13 DATA14 DATA15 DATA16 AD_MODE → → → → → → → → → → → → → → → → → → → ASCON_SERIALPROTOCOL UINT WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD WORD BOOL USINT → OPRS Input parameters Label Type PROTOCOL ASCON_SERIALPROTOCOL REGISTER UINT DATA1 – DATA16 WORD AD_MODE BOOL Description Reference Pro
sigmadue - IEC 61131-3 Function Block Library 5-3-27 MB_SLV_WR32_DIGITAL FB Prototype MB_SLV_WR32_DIGITAL PROTOCOL REGISTER DATA AD_MODE ¡ ¡ ¡ ¡ ASCON_SERIALPROTOCOL UINT REAL BOOL USINT ¡ OPRS Input parameters Label PROTOCOL REGISTER DATA AD_MODE Type Description ASCON_SERIALPROTOCOL Reference Protocol UINT Register DWORD Data Addressing Mode Setting BOOL (default value = TRUE) Output parameters Label OPRS Description Reference tables Type BOOL Description Function block result This Function
Chapter 5 - AsconMBCommLib 5-3-28 MB_SLV_WR_DIGITAL FB Prototype MB_SLV_WR_DIGITAL PROTOCOL REGISTER DATA AD_MODE ¡ ¡ ¡ ¡ ASCON_SERIALPROTOCOL UINT REAL BOOL USINT ¡ OPRS Input parameters Label PROTOCOL REGISTER DATA Type ASCON_SERIALPROTOCOL UINT BOOL AD_MODE BOOL Description Reference Protocol Register Data Addressing Mode Setting default value = TRUE) Output parameters Label OPRS Description Reference tables Type BOOL Description Function block result This Function Block writes the digi
sigmadue - IEC 61131-3 Function Block Library 5-3-29 MB_SLV_WR_DWORD FB Prototype MB_SLV_WR_DWORD PROTOCOL REGISTER DATA AD_MODE ¡ ¡ ¡ ¡ ASCON_SERIALPROTOCOL UINT REAL BOOL USINT ¡ OPRS Input parameters Label PROTOCOL REGISTER DATA Type Description ASCON_SERIALPROTOCOL Reference Protocol UINT Register DWORD Data Addressing Mode Setting BOOL (default value = TRUE) AD_MODE Output parameters Label OPRS Description Reference tables Type BOOL Description Function block result This Function Block
Chapter 5 - AsconMBCommLib 5-3-30 MB_SLV_WR_REAL FB Prototype MB_SLV_WR_REAL PROTOCOL REGISTER DATA AD_MODE ¡ ¡ ¡ ¡ ASCON_SERIALPROTOCOL UINT REAL BOOL USINT ¡ OPRS Input parameters Label PROTOCOL REGISTER DATA Type Description ASCON_SERIALPROTOCOL Reference Protocol UINT Register BOOL Data Addressing Mode Setting BOOL (default value = TRUE) AD_MODE Output parameters Label OPRS Description Reference tables Type BOOL Description Function block result This Function Block writes the REAL value
sigmadue - IEC 61131-3 Function Block Library 5-3-31 MB_SLV_WR_WORD FB Prototype MB_SLV_WR_WORD PROTOCOL REGISTER DATA AD_MODE ¡ ¡ ¡ ¡ ASCON_SERIALPROTOCOL UINT REAL BOOL USINT ¡ OPRS Input parameters Label Type PROTOCOL ASCON_SERIALPROTOCOL REGISTER UINT DATA WORD AD_MODE BOOL Description Reference Protocol Register Data Addressing Mode Setting (default value = TRUE) Output parameters Label OPRS Description Reference tables Type BOOL Description Function block result This Function Block wri
Chapter 5 - AsconMBCommLib 5-3-32 MODEM_CHECK FB Prototype MODEM_CHECK CHK_MODEM COM_PORT ¡ ¡ BOOL MODEM_PORT BOOL BOOL DWORD INT INT ¡ ¡ ¡ ¡ ¡ CONFIRM ERROR ERR_CODE SIGN_PWR SIGN_ERR Input description Label Type CHK_MODEM BOOL Description Command to perform the modem operational status, evaluated on the rising edge ONLY!!! Output description Label CONFIRM ERROR Type BOOL BOOL Description Function block operational status Error status ERR_CODE DWORD Error code.
sigmadue - IEC 61131-3 Function Block Library 5-3-33 MODEM_CONF FB Prototype MODEM_CONF INIT_MODEM COM_PORT DTE_SPEED DTE_FORMAT TXT_MODE COM_MNGT_1 COM_MNGT_2 ¡ ¡ ¡ ¡ ¡ ¡ ¡ BOOL MODEM_PORT STRING(20) STRING(20) STRING(20) STRING(20) STRING(20) BOOL BOOL DWORD USINT ¡ ¡ ¡ ¡ CONFIRM ERROR ERR_CODE STATUS Input description Label Type INIT_MODEM DTE_SPEED BOOL STRING(20) Description Command to perform the modem initialisation, evaluated on the rising edge ONLY!!! DTE speed configuration string [c
Chapter 5 - AsconMBCommLib Ascon Tecnologic APS2MODEMEGxxx modem. It returns also detailed information on the possible errors. Note: For parameter description and meaning, please search for a good reference document about AT commands by searching the “AT commands for GSM/GPRS wireless modem” manual from MultiTech Systems.
sigmadue - IEC 61131-3 Function Block Library 5-3-34 MODEM_SMS_SEND FB Prototype MODEM_SMS_SEND SEND_SMS COM_PORT PHONE_NUMS PHONE_NUM1 PHONE_NUM2 PHONE_NUM3 PHONE_NUM4 PHONE_NUM5 MSG_TXT ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ BOOL MODEM_PORT USINT STRING(16) STRING(16) STRING(16) STRING(16) STRING(16) STRING(100) BOOL BOOL DWORD USINT ¡ ¡ ¡ ¡ CONFIRM ERROR ERR_CODE STATUS Input description Label SEND_SMS Type BOOL PHONE_NUMS USINT Description Command to start the procedure to send the SMS message, evaluated on the r
Chapter 5 - AsconMBCommLib and default values of the parameters has been successfully tested with the Ascon Tecnologic APS2MODEMEGxxx modem. It returns also detailed information on the possible errors. The function block should be used in conjunction with the MODEM_CONF and MODEM_CHECK in order to have a complete set of operations before to proceed with the normal modem data activities.
sigmadue - IEC 61131-3 Function Block Library 5-3-35 MP SERIAL Ports Caution This Function Block can be used only with the MP-01 unit.
Chapter 5 - AsconMBCommLib Label PROTOCOL BAUD PARITY STOP DATA T_OUT Options ASCII = Serial ASCII interface SLAVE1 = Modbus SLAVE_1 Agent (default value) SLAVE2 = Modbus SLAVE_2 Agent MASTER = Modbus MASTER Agent B2400 = 2.4 kbps B4800 = 4.8 kbps B9600 = 9.6 kbps (default value) B19200 = 19.2 kbps B38400 = 38.4 kbps B57600 = 57.6 kbps B115200 = 115.2 kbps NOPAR = NONE (default value) EVEN = EVEN ODD = ODD 1 or 2 (default value = 1) 7 or 8 (default value = 8) 0... 65535.
sigmadue - IEC 61131-3 Function Block Library 5-3-36 PROFIBUS PORT FB Prototype PROFIBUS_PORT ENABLE ADDR IN_BYTES OUT_BYTES PAGE_MODE PAGE_OUT ¡ ¡ ¡ ¡ ¡ ¡ BOOL DWORD USINT BOOL USINT USINT USINT BOOL USINT ¡ ¡ ¡ ERROR ERR_CODE PAGE_ACT Input parameters Label Type ENABLE BOOL ADDR USINT IN_BYTES USINT OUT_BYTES USINT PAGE_MODE BOOL PAGE_OUT USINT Description Command to enable/disable the PROFIBUS DP port operations [bit] Profibus DP slave node address, evaluated ONLY on the ENABLE rising e
Chapter 5 - AsconMBCommLib Output ERR_CODE.4 ERR_CODE.
sigmadue - IEC 61131-3 Function Block Library 5-3-37 SEND_EMAIL FB Prototype SEND_EMAIL ENABLE SERVER_ADDR PORT USER_NAME PASSWORD TIME_DATE MAIL_FROM RCPT_TO SUBJECT MESSAGE ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ BOOL STRING(45) UINT STRING(32) STRING(32) STRING(20) STRING(45) STRING(250) STRING(250) STRING(250) BOOL UINT ¡ ¡ CONFIRM ERR_CODE Input parameters Input ENABLE SERVER_ADDR PORT USER_NAME PASSWORD TIME_DATE MAIL_FROM RCPT_TO SUBJECT MESSAGE Type BOOL STRING UINT STRING STRING STRING STRING STRING STRING ST
Chapter 5 - AsconMBCommLib Some practical indications on how to simplify the FB use: • before to start a new e-mail sending procedure or in case of error, could be useful to execute the FB one time with the ENABLE input at FALSE to be sure the internal FB variables have been reset and ready to restart in the correct way • while an e-mail sending procedure is active, it is important to verify the CONFIRM and ERR_CODE output.
sigmadue - IEC 61131-3 Function Block Library In addition to the above described errors, it is possible to get the ones complaining the RFC5321 standard: 221 Service closing transmission channel 251 User not local; will forward to 252 Cannot VRFY user 421 Service not available, closing transmission channel (This may be a reply to any command if the service knows it must shut down) 432 A password transition is needed 450 Requested mail action not taken: mailbox un
Chapter 5 - AsconMBCommLib 5-3-38 SERIAL Ports Caution This Function Block can be used only with the CU-02 unit.
sigmadue - IEC 61131-3 Function Block Library Label PORT PROTOCOL BAUD PARITY STOP DATA T_OUT Options X1 = Communication Port X1 RS232 X3 = Communication Port X3 RS232 X4 = Communication Port X4 RS485 (default value) ASCII = Serial ASCII interface SLAVE1 = Modbus SLAVE_1 Agent (default value) SLAVE2 = Modbus SLAVE_2 Agent MASTER = Modbus MASTER Agent B2400 = 2.4 kbps B4800 = 4.8 kbps B9600 = 9.6 kbps (default value) B19200 = 19.2 kbps B38400 = 38.4 kbps B57600 = 57.6 kbps B115200 = 115.
Chapter 5 - AsconMBCommLib 5-3-39 SYS_OPRS_MNGT FB Prototype SYS_OPRS_MNGT EN_MB_RTU EN_MB_TCP DELAY_MB_RTU DELAY_MB_TCP ¡ ¡ ¡ ¡ BOOL BOOL USINT USINT BOOL BOOL TIME TIME TIME ¡ ¡ ¡ ¡ ¡ STS_MB_RTU STS_MB_TCP TSAM_MAX TSAM_ACT TSAM_MIN Input parameters Label Type EN_MB_RTU BOOL EN_MB_TCP BOOL DELAY_MB_RTU USINT DELAY_MB_TCP USINT Description Range Modbus RTU delay activation command evaluated on the rising edge ONLY!!! Modbus TCP delay activation command evaluated on the rising edge ONLY!!! Mo
sigmadue - IEC 61131-3 Function Block Library 5-3-40 TCP/IP Port FB Prototype TCP_IP_Port ENABLE PORT USESEC T_OUT ¡ ¡ ¡ ¡ BOOL UINT BOOL UINT BOOL USINT ¡ ¡ ERROR ERCODE Input parameters Label Type ENABLE BOOL PORT UINT USESEC BOOL T_OUT UINT Description Command to enable the TCP/IP port operations Required server TCP/IP port (default value = 502) Enable/Disable security functions (default value = FALSE) Communication time out factor (this value is a multiple of 100ms - eg.
Appendix A Reference documents [1] “Infoteam OpenPCS programming system – user manual” – version 6.0 english [2] “IEC 61131-3: Programming Industrial Automation Systems” – Karl-Heinz John, Michael Tiegelkamp - Springer [3] “Ascon Firmware Function Block Library” [4] “IEC 61131-3 Function Block Library”. [5] “Estensioni per gestire porte di comunicazione dell’ambiente OpenPCS” V1.
Sigmadue - microPAC MP-01 - User manual 178