Project Name: Packaging / Tempctrl / HW / M221: 0 Schneider Electric
Project Name: Packaging / Tempctrl / HW / M221: 0 Schneider Electric
Project Name: Packaging / Tempctrl / HW / M221: 0 Schneider Electric
0
www.schneider-electric.com
CONTENTS
Description ............................................................................................................................................. 4
Bill Of Material ........................................................................................................................................ 5
Controller ................................................................................................................................ 5
Cartridge ................................................................................................................................. 5
Hardware Configuration ......................................................................................................................... 6
TM221CE24T ......................................................................................................................... 6
Digital Inputs ........................................................................................................... 6
Digital Outputs ........................................................................................................ 6
Analog Inputs .......................................................................................................... 7
Fast Counters ......................................................................................................... 7
High Speed Counters ............................................................................................. 7
Pulse Generators .................................................................................................... 7
ETH1 ....................................................................................................................... 7
Modbus TCP ........................................................................................... 8
SL1 (Serial line) ...................................................................................................... 8
IO Bus ..................................................................................................................... 9
Cartridges ............................................................................................................. 10
TMC2PACK01 ....................................................................................... 10
Analog Inputs ......................................................................... 10
Software Configuration ........................................................................................................................ 11
Constant Words .................................................................................................................... 11
KW ........................................................................................................................ 11
KD ......................................................................................................................... 11
KF ......................................................................................................................... 11
Network Objects ................................................................................................................... 12
Input Assembly (Ethernet/Ip) ................................................................................ 12
Output Assembly (Ethernet/Ip) ............................................................................. 12
Input Registers (Modbus Tcp) .............................................................................. 12
Output Registers (Modbus Tcp) ............................................................................ 12
Digital inputs (IOScanner) ..................................................................................... 12
Digital outputs (IOScanner) .................................................................................. 12
Input registers (IOScanner) .................................................................................. 12
Output registers (IOScanner) ................................................................................ 12
Software Objects .................................................................................................................. 13
Timers ................................................................................................................... 13
Counters ............................................................................................................... 13
LIFO/FIFO Registers ............................................................................................ 13
Drums ................................................................................................................... 13
Shift Bit Registers ................................................................................................. 13
Step Counters ....................................................................................................... 13
Schedule Blocks ................................................................................................... 13
RTC ...................................................................................................................... 13
PID ........................................................................................................................ 13
Grafcet Steps ........................................................................................................ 15
Program ............................................................................................................................................... 16
Behavior ............................................................................................................................... 16
Memory Consumption .......................................................................................................... 16
Application Architecture ........................................................................................................ 16
Master Task .......................................................................................................... 16
Periodic Task ........................................................................................................ 16
POU ...................................................................................................................................... 17
Master Task .......................................................................................................... 17
1 - Application_Temperature ................................................................ 17
Rung0 - Rung_0 .................................................................... 17
Rung1 - Rung_1 .................................................................... 17
Rung2 - Rung_2 .................................................................... 18
Rung3 - Rung_3 .................................................................... 18
Rung4 - Rung_4 .................................................................... 18
Rung5 - Rung_5 .................................................................... 19
Rung6 - Rung_6 .................................................................... 19
Rung7 - Rung_7 .................................................................... 19
Rung8 - Rung_8 .................................................................... 20
Symbols ............................................................................................................................................... 21
Cross-Reference Table ........................................................................................................................ 23
Animation table .................................................................................................................................... 26
Animation table_PID0 ........................................................................................................... 26
DESCRIPTION
In addition to this example-project a Vijeo Designer application and a System User Guide are
provided.
********Disclaimer Of Warranty********
THE INFORMATION CONTAINED HEREIN IS PROVIDED "AS IS" WITHOUT WARRANTIES OF
ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ALL IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-
INFRINGEMENT OR OTHER VIOLATION OF RIGHTS. SCHNEIDER ELECTRIC DOES NOT
WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE, VALIDITY, ACCURACY,
OR RELIABILITY OF, OR THE RESULTS OF THE USE OF, OR OTHERWISE, RESPECTING THE
MATERIALS, SPECIFICATIONS, CHARACTERISTICS OR OTHER INFORMATION SPECIFIED
HEREIN. FURTHERMORE, ALL WARRANTIES, CONDITIONS, REPRESENTATIONS,
INDEMNITIES AND GUARANTEES WITH RESPECT TO THE ACCURACY, OPERATION,
CAPACITY, SPEED, FUNCTIONALITY, QUALIFICATIONS, OR CAPABILITIES OF THE SOFTWARE,
SYSTEMS AND SERVICES COMPRISING OR UTILIZED IN THE COURSE OF APPLYING THIS
INFORMATION, SPECIFICATIONS, OR MATERIALS, WHETHER EXPRESS OR IMPLIED, ARISING
BY LAW, CUSTOM, PRIOR ORAL OR WRITTEN STATEMENTS BY SCHNEIDER ELECTRIC, OR
OTHERWISE (INCLUDING, BUT NOT LIMITED TO ANY WARRANTY OF SATISFACTORY
QUALITY, MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSE, TITLE AND NON-
INFRINGEMENT) ARE HEREBY EXPRESSLY EXCLUDED AND DISCLAIMED:
********Disclaimer Of Liability*********
UNDER NO CIRCUMSTANCES (INCLUDING NEGLIGENCE OR FORESEEABLE MISUSE) WILL
SCHNEIDER ELECTRIC BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
PUNITIVE OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION, BUSINESS
INTERRUPTION, DELAYS, LOSS OF DATA OR PROFIT) ARISING OUT OF THE APPLICATION OF
THE INFORMATION, SPECIFICATIONS, CHARACTERISTICS OR MATERIALS CONTAINED
HEREIN EVEN IF SCHNEIDER ELECTRIC HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
************************************
The information, program and configuration contained herein are provided as general training on the
products concerned, in part, by way of theoretical and/or hypothetical examples. Only you, the user,
can be aware of all the conditions and factors present during setup, operation, and maintenance of
your machine and its application; therefore, only you, the user, can determine the automation
equipment and the related safeties and interlocks which can be properly used. When selecting
automation and control equipment and related software for a particular application, you must refer to
the applicable local and national standards and regulations.
************************************
Copyright © 2014 Schneider Electric. All rights reserved.
BILL OF MATERIAL
Controller
Reference TM221CE24T
Description TM221CE24T (screw)
14 digital inputs, 10 source
transistor outputs (0,5 A), 2
analog inputs, 1 serial line
port, 1 Ethernet port, 24 Vdc
power supply controller with
removable terminal blocks.
Power supplied to the IO bus 5V: 520 mA / 24V: 200 mA
Cartridge
Reference TMC2PACK01
Description TMC2PACK01
TMC2 cartridge with 2 analog
voltage or current inputs for
packaging.
HARDWARE CONFIGURATION
TM221CE24T
Digital Inputs
Used Address Filtering Latch Run/Stop Events Priority Subroutine
Digital Outputs
Used Address Status Alarm Fallback value Used by
%Q0.1 0
%Q0.2 0
%Q0.3 0
%Q0.4 0
%Q0.5 0
%Q0.6 0
%Q0.7 0
%Q0.8 0
%Q0.9 0
Analog Inputs
Used Address Type Scope Range Filter Sampling
Fast Counters
Used Address Input Configured Preset Double Word
Pulse Generators
Configured Address Type
ETH1
Device name: M221
IP Mode: Fixed
IP address: 192.168.100.20
Modbus TCP
Device: None
Parity: Even
Data bits: 8
Stop bits: 1
Polarization: No
Protocol Settings
Protocol: Modbus
Addressing: Slave
Address: 1
IO Bus
Cartridges
TMC2PACK01
Analog Inputs
SOFTWARE CONFIGURATION
Constant Words
KW
Allocation: Automatic
Allocated: 6
KD
Allocation: Automatic
Allocated: 6
KF
Allocation: Automatic
Allocated: 6
Network Objects
Input Assembly (Ethernet/Ip)
Used Address Symbol Fallback value Comment
Software Objects
Timers
Allocation: Automatic
Allocated: 2
Counters
Allocation: Automatic
Allocated: 0
LIFO/FIFO Registers
Allocation: Automatic
Allocated: 0
Drums
Allocation: Automatic
Allocated: 0
Allocated: 0
Step Counters
Allocation: Automatic
Allocated: 0
Schedule Blocks
Allocation: Automatic
Allocated: 0
RTC
PID
Used PID Symbol Type Comment
PID 0
General
Input
High: %MW9
Output: %M6
PID
Ti (x0.1s): %MW4
Td (x0.1s): %MW5
AT
No Slow: %M0
Output
Grafcet Steps
Allocation: Automatic
Allocated: 0
PROGRAM
Behavior
Functional level: Level 1.0
Watchdog: 250 ms
Memory consumption
A successful compilation is required to obtain memory information.
Application Architecture
Master Task
Scan mode: Periodic
Period: 20 ms
Periodic Task
Period: 255 ms
POU
Master Task
1 - Application_Temperature
Master Task
Rung0 - Rung_0
Variables used:
Temperature sensor value, read
%IW0.100 IW_TC1PT100
through the Packaging Cartridge
Actual Value / Temperature for PID
%MW1 WTC1_ACTVALUE
controller in degree * 0.1
Rung1 - Rung_1
Variables used:
This bit is assigned to PWM Otput of
%M3 XTC1_PWMOUTPUT
PID.
%M4 XTC1_ENPID This bit Enables the PID controller
This bit indicates Temperature High
%M6 XTC1_TEMPHIGHALARM
Alarm
This bit is set High incase Heater
%M7 XTC1_HEATERAREASAFETY Area safety Alarm. Normally False in
case there is no Alarm.
This bit is set High incase Machine
%M8 X_MACHINEALARMOK Related Alarm. Normally False in case
there is no Alarm.
This bit is set by User to Start
%M9 XTC1_AUTOTUNEUSECMD
Autotune
%M11 XTC1_HEATEROUTPUTHMI Bit to Display Heater Status On HMI
%Q0.0 QXTC1_HEATER Digital Output to control the Heater
Rung2 - Rung_2
This rung change the PID type to PID after completion of Autotunning And also
Comment: resets the command bits.
Variables used:
%M4 XTC1_ENPID This bit Enables the PID controller
This bit is set by User to Start
%M9 XTC1_AUTOTUNEUSECMD
Autotune
%MW0 WTC1_PIDSTATUS This is Status word from PID block
To Set PID type. 0:PID disabled
%MW10 WTC1_PIDTYPE 1:PID only 2:AT+PID 3:AT only 4:PI
only
Rung3 - Rung_3
Comment: This rung change the PID to AT+PID mode when user select Autotune.
Variables used:
This bit is set by User to Start
%M9 XTC1_AUTOTUNEUSECMD
Autotune
To Set PID type. 0:PID disabled
%MW10 WTC1_PIDTYPE 1:PID only 2:AT+PID 3:AT only 4:PI
only
Rung4 - Rung_4
Comment: The final command to start Autotune is set after 500ms after user command.
Variables used:
%M0 XTC1_ATTRIGGER This bit triggers the Autotunning
This bit is set by User to Start
%M9 XTC1_AUTOTUNEUSECMD
Autotune
To Set PID type. 0:PID disabled
%MW10 WTC1_PIDTYPE 1:PID only 2:AT+PID 3:AT only 4:PI
only
%TM0 TAUTOTUNETRIGGER
Rung5 - Rung_5
This Rung Loads default values to Kp,Ti,Td. If Kp =0 then default values are
Comment: loaded. User must change this default values based on his application and Auto
tune parameters.
Variables used:
Specify the PID proportional gain,
%MW3 WTC1_KP
multiplied by 10
Specify the integral time for a
%MW4 WTC1_TI
timebase of 0.1 seconds.
Specify the derivative time for a
%MW5 WTC1_TD
timebase of 0.1 seconds.
Rung6 - Rung_6
This rung called PID 0. %M4 is used to enable the PID and timer is used to
Comment: delay the enabling operation by 300ms
Variables used:
%M4 XTC1_ENPID This bit Enables the PID controller
This timer is to delay enabling of
%TM1 TON_DELAYPID
pID
PID 0 FBPID_0 PID function block
Rung7 - Rung_7
This rung loads default value of High Temperature alarm setpoint as 150 in case
Comment: it is 0.
Variables used:
High Temperature Alarm setpoint
%MW9 WTC1_SETTEMPHIGHALARM
Trigger
Rung8 - Rung_8
This rung converts PID analog output value to scale 0-100% for HMI display
Comment: purpose and also scale Act temp for HMI.
Legend:
1 %MF20 := INT_TO_REAL(%MW6)
2 %MF22 := %MF20 * 100.0
3 %MF24 := %MF22 / 10000.0
4 %MF26 := INT_TO_REAL(%MW1)
5 %MF28 := %MF26 / 10.0
Variables used:
%MF20 R_INTVAR1 This variable is used for calculation
%MF22 R_INTVAR2 This variable is used for calculation
This variable stores PID analog value
%MF24 R_PIDANALOGOPPERHMI
in % for HMI display purpose.
%MF26 R_INTVAR3
This variable stores Actaul
%MF28 R_ACTTEMPVALUEHMI Temperature value in deg for HMI
display purpose.
Actual Value / Temperature for PID
%MW1 WTC1_ACTVALUE
controller in degree * 0.1
Register for Analog Value output from
%MW6 WTC1_ANALOGOP
PID
SYMBOLS
X %TM0 TAUTOTUNETRIGGER
CROSS-REFERENCE TABLE
--(R)--
ANIMATION TABLE
Animation table_PID0
Used Trace Address Symbol Comment