Home
Manuale User manual
Contents
1. Programming involves the communication port COM2 present in both connectors but only in interface RS232 There are 2 adapters on the side of the terminal that allow a user to program the terminal through connector DB25 or through DB9 15 4 1 Starter Kit Connection of the terminal to the PC n MISERIAS ole Converter USB gt SERIAL Code 1620 00 050 OPTIONAL es PERSONAL COMPUTER i Software PLProg Vers 4 xx TdDesigner Adapter DB9M gt PLUG8 Code 1620 00 040 Adattatore PC RS232 PROGRAM Cable PLUG 8 pins Code 1620 00 047 1620 00 047 Cavo RS232 PROGRAMMAZIONE Terminal Adapter DB2 5M PLUGS Mod TD320 AD Code 1620 00 029 tn SEH 85 45 Adattatore RS485 RS232 PROGRAM DB25FE 5 D See Se Ze Adattatore RS485 Ki RS232 PROGRAM Ze mm pu Adapter DB9M gt PLUG8 Code 1620 00 028 TD320 COM2 16 4 2 The development environment The TD320 is a HMI graphical terminal with an integrated PLC It allows a centralization of all the operational logic of the system that must be supervised and controlled The graphical part of the development environment must manage the visible pages and their fundamental items e g synthesis push buttons numerical and text edit boxes images and the
2. Duration of deceleration ramp time unit Instantaneous velocity of setpoint counts 1000 time unit For correct functioning it is necessary to proceed as follows e Set the starting setpoint in location VD 2 e Set the final setpoint in location VD 4 e Set the maximum velocity of movement in location VD 6 in counts 1000 time unit so as to have 3 decimal digits For example setting 12345 corresponds to a velocity of 12 345 counts time unit e Set the duration of the acceleration ramp in location VD 8 expressed in time units if the duration of the phase of acceleration should be 1 second and the GENSET function is called by an interrupt of 1 mS set 1000 e Set the duration of the ramp of deceleration in location VD 10 e Write 1 in the location VD the location indicated as parameter of the function This gives the start to the function that will automatically begin to write the generated setpoint in the location VD 2 The location VD will be also updated with the actual state while the instantaneous velocity of the setpoint expressed with three decimal digits will be written in the location VD 12 At the end of movement when the location VD 2 attains the value of the final setpoint the functional will automatically enter into a standby phase indicated by the value 0 in the location VD In this mode the GENSET function can remain always enabled even when movement is not necessary 7 23 CONV f
3. EEProm Bit ON in case of reset of the CPU or R W intervention of the watch dog Bit 2 Bit 4 Bit ON in case of stack overflow in R W the area reserved for RAM malfunction in the EEProm malfunction in the clock the timer interrupt Device address Address word of ModBus protocol of the R W device At startup if SM1 0 z 1 the value becomes initialized to 1 otherwise the previously saved data is maintained Bit 5 Bit 7 Bit 8 Bit 10 29 SM3 1003 Cycle time Time of the last scan cycle of the program R resolution 100uS SM4 1004 1005 1006 1007 1008 Minimal cycle time The minimal time found of the program scan R cycle resolution 100uS Maximum cycle time The maximum time found of the program R scan cycle resolution 100uS Interval of timer interrupt n 1 Interval of timer interrupt n 2 Word that defines the interval of the timer R W interrupt The value can be set between 1 and 100 ms example SM6 1 gt 1 ms SM6 100 gt 100 ms For values of SM6 and SM7 not between 1 and 100 the correspondent interrupt is fixed to a default to 100 ms At startup they are both fixed to a default of 100 gt 100 ms In the Ladder code of the two interrupts it is not allowed to use functions that access the areas of EEPROM and MMC LCD contrast LCD display contrast 0 100 gt 0 100 R W At startup if SM1 0 1 the value is i
4. Notes Updates 15
5. gt 8 E 1 8 gt 8 E2 3 gt 7 N 1 9 gt 7 N 2 4 gt 7 0 1 10 gt 7 0 2 5 7 E 1 117 ZE Bit set to 1 enables the free port R W mode 0 returns the serial line control to the protocol selected during the programming phase Num Byte in COM1 reception buffer Num Byte in EXP1 reception buffer Num Byte in COM2 reception buffer For each serial line this word contains the number of valid characters present in the reception buffer It is used in the free port mode to control the number of characters received Anything written to this word will set the value to zero thus emptying the reception buffer COM1 serial baud rate default 9600 baud EXP1 serial baud rate default 9600 baud CON2 serial baud rate default 57600 baud R W 35 SM46 SM50 SM54 The value that is set defines the communication velocity of the serial line for the ModBus protocol if enabled baud Note Because the modifications are active it is necessary to set this word in the initialization code In case no modification is made or if modifications are made in other parts of the program the baud rate will remain at the default rate set at startup 0 110 6 gt 4800 1 gt 150 7 gt 9600 2 gt 300 8 gt 19200 3 gt 600 9 gt 28800 4 gt 1200 10 gt 38400 5 gt 2400 11 gt 57600 COM serial format default 8 N 1 EXP1 serial format default 8 N 1 CON2 serial format 8 N 1 non mo
6. 63 7 20 COM and EXP f nctionsS cc eecccceseeeeeeeeeeeeeeeeaeeees 66 7 21 StartPID PID and SetOutPID functions 67 722 GENSET IUnctlo is eter eroe e entities 70 T23 GONVTUNCHIONS ee 71 8 Notes Updale5 5 ceder occi ie ee te eo donde petentes 73 Introduction Thank you for having chosen a instrument Model TD320 is a graphical touch screen terminal with an integrated PLC adapted for the supervision and control of systems where the participation of an operator HMI is necessary The graphical resources are easily manageable from TdDesigner a simple and versatile development environment while the logic relative to the PLC is managed from the PLProg development environment which is common to other devices PL250 TCT500 etc The waterproof protection of the facade is IP54 and IP30 for the container Model identification Only one version of the terminal TD320 is available in low voltage AC or DC This is indicated in the model identification Ordering code AD 12 24V AC DC 15 50 60Hz 1 Mechanical dimensions and installation 179 mm 0 0 H 0 Memory Card 0 6 0 0 Dima di foratura 181 x 144 mm Frontal panel cut out 42mm 42mm inserimento insert DB25 FE Spessore suggerito 2 9 mm Suggested thickness 2 Display characteristics iti E oa e 4 Kai 3 o m d E o 1 oO electrocl
7. N O N C At activation of coil B the related logical contact will change state if it was closed it will open if it was open it will close A contact N O is closed ON when the bit value is 1 A contact 56 N C is opened ON when the bit value is 0 At the startup of the terminal a contact N O will be open 7 4 Timer T The TD320 has 128 timers of 16 bits Each is available in three modes of functioning TON on delay of activation time begins counting when the coil is activated ON The timer bit contact T will be activated when the current timer value word T becomes greater than or equal to the pre established time preset word PT When the coil is deactivated OFF the current value of the timer is reset zeroed The timer stops in any case when it reaches the maximum value in signed 16 bits 32767 TOFF off delay of deactivation allows delaying the deactivation of an output for a given period of time after the input has been deactivated When the coil is activated ON the time bit contact T is immediately activated and the current value of the timer word T will be set to O At the deactivation of the coil the timer will count until the elapsed time becomes greater than or equal to the pre established time preset word PT Once reached the timer bit deactivates and the current value stops advancing If the input remains inactive for a time that is less than the pre established tim
8. RS485 A cable is available code art 1620 00 057 optional that from connector DB25 provides COM1 in RS485 for a generic connection with other devices for details regarding the communication protocols consult other documentation Code 1620 00 057 BLACK GND Rs485 GREEN Rs485 KE DB25M PIN 16 RS48 PIN 15 Rua Nc m 7 DB25 FE 10 3 2 1 1 2 Cable for COM1 comm in RS485 for PL250 PL300 For communication with other devices PL250 XXAD and PL300 XXAD an optional cable is available that connects the port COM1 in RS485 from connector DB25 of the terminal to the COM port on PLUG of the PLC Adapter COM DB25M gt PLUG8 Cable RS485 Code 1620 00 048 1620 00 048 Cavo RS485 DB25M CORRESPONDENCE PIN Rs485 S 5 DB25 PLUG 14 GND 2 Si O 15 RS485 1 16 RS485 4 COM1 PL300 xxAD 3 2 1 2 Interface RS422 Interface RS422 in DB25 COM1 PIN 14 GND O DB25FE o 13 1 O PIN 16 TX 25 00000 4 e O PIN 17 RX O PIN 18 RX 3 2 2 EXP1 on DB9 and DB25 connector pins The communication port EXP1 is available in the DB9 connector pins in RS232 or RS485 interface and in the DB25 connector pins in RS232 interface protocol baud rate and format are settable 11 3 2 2 1 Interface RS232 Interface RS232
9. access is thus slower than area V and SM and the TD320 executes no control of the integrity of the data stored in this area 5 13 Area of TX RX COM1 The memory area TX RX COM1 is composed of 200 bytes This area is used to manage the data in transit on serial port COM1 The first 100 bytes TX 0 TX 99 are used to load the data to transmit the last 100 bytes RX 0 RX 99 are used to save the data received by the serial port COM1 These bytes are useful only in the free port mode while in normal mode they are managed directly by the protocol selected in the programming phase 5 14 Area of TX RX EXP1 The memory area TX RX EXP1 is composed of 200 bytes This area is used to manage the data in transit on the serial port EXP1 The first 100 bytes TX 0 TX 99 are used to load the data to transmit the last 100 bytes RX 0 RX 99 are used to save the data received by the serial port EXP1 43 These bytes are useful only in the free port mode while in normal mode they are managed directly by the protocol selected in the programming phase 44 6 Communication protocols The TD329 can communicate with all devices that support the following serial protocols e ModBus RTU e Nais Matsushita master The terminal has 3 serial ports of communication COM1 EXP COM2 analyzed from the electrical point of view in chapter 3 Nonetheless the ports are each managed in a different manner and will be analyzed separately 6 1 Manag
10. be created in C Programmi Pisys4T dDiesignersPrajectes TO 320Froject TD 320P roject The development environment can put new project in a directory automatically created or in a folder chosen by user Graphics management is handled in other documentation available with the development kit code art 2100 10 008 and assumed here as known by the user 3 Start PLProg 4 xx Start the PLProg 4 xx software from the Start Program menu or the Desktop icon automatically created at installation Od 4 Create new Ladder diagram file name plp Once the development environment is opened create a new diagram as shown in the figure below 21 ES PLProg4 63 NewFile B m m OQomwo D A V Zi A amp E I E 6 F8 Ez e qeu qeu Fi2 Des Font DjOff O SPEED Automatically executed only once at starting of PLC A window will now open in the center of the screen select the terminal TD320 in the item list Select CPU The guide to the software and the implementation of the Ladder code is available with the development kit code art 2100 10 008 and assumed here as known by the user Compile project file name tdproj Once the implementation of the graphics is finished it is necessary to compile the project as shown in the figure below TdDesigner File Edit View Tools es alslgll ou g eif a LTEM pag kN E Afe This operation is necessary to make the project available as soon as impleme
11. in DB09 EXP1 O PIN 5 GND DB9 FE O PIN 6 TX RS232 ay B Re Interface RS232 on DB25 EXP1 Q PIN 7 GND DB25FE O PIN 22 TX RS232 13 1 O PIN 21 RX RS232 9 Us ne 3 2 2 2 Interface RS485 Interface RS485 in DB09 EXP1 O PIN 5 GND DB9 FE O PIN 9 RS485 Q PIN 4 RS485 e EIN e 3 2 2 2 1 Cable of EXP1 communications in generic RS485 A cable is available code art 1620 00 034 optional which provides EXP1 port from connector DB9 in RS485 for a generic connection with other devices for details regarding the communication protocols consult other documentation 12 Code 1620 00 034 RS485 DB9M GND RS485 ul u E N D D BLACK GND EXP1 PLC 3 2 2 2 2 Cable of EXP1 comm in RS485 for PL250 PL300 For communication with other devices PL250 XXAD and PL300 XXAD an optional cable is available that connects port EXP1 in RS485 from connector DB9 of the terminal to port COM1 on PLUG of the PLC DB9M CORRESPONDENCE PIN Rs485 1 NN DB9 PLUG 6 e9 Q 5 GND 2 w 9 RS485 1 a 4 RS485 4 N D E Adapter DB9M PLUG8 COM1 PL250 xxAD Code 1620 00 028 palin mee 8 Code 1620 00 048 1 1620 00 048 Cavo RS485 3 2 3 COM Interface RS232 13 The communication port
12. interaction between various objects and the memory areas the memory areas which they must reference for push buttons indicators and images The logic of the operation of the system i e the way in which the memory areas must interact among each other is instead managed by the PLC The TD320 terminal is also a PLC therefore it manages graphics on one hand and logic on the other leaving other connected PLCs the sole task of detecting the information e g digital and analog inputs encoders etc and to control the actuators e g digital and analog outputs etc The development environment has two sub environments e TdDesigner manages all resources that are strictly related to the graphics e PLProg manages the interactions between the memory areas of the terminal Ladder code common to other PLCs essentially the PL250 and TCT500 DEVELOPMENT APPLICATION ENVIRONMENT GRAPHICS LOGIC EEN PLProg4 xx 17 TdDesigner Any application managed by the TD320 terminal should therefore be realized using both the development environments implementing therefore two different files strictly connected between them The operation of the terminal anticipates a division of the time dedicated to graphics management implemented with TdDesigner and of the time dedicated to the management of the PLC implemented with PLProg 4 xx The default setup foresees an equal division of the execution cycle
13. memory area M The marker M5 is thus accessible as M1 4 contact bit of the word but also as single bit M5 contact or electrical relay coil 5 6 Area of Analog Inputs AI Memory area Al is composed of 32 words and can be used to contain the state of the analog inputs read from the serial lines of other devices It is organized in words each can represent the state of an analog input 5 7 Area of Analog Outputs AQ Memory area Al is composed of 32 words and can be used to contain the state of the analog outputs read from the serial line of other devices It is organized in words each can represent the state of an analog output 5 8 Areas of Timer T and Preset Timer PT The area of memory for timer T is composed of 128 words If the timer is enabled the variation of the contents of the area of memory is regulated by the type of timer which is set at the moment of activation 41 The area of memory for preset timer PT is composed of 128 words and contains the values of activation of the contacts preset of the respective timers The areas are organized in signed words thus the resolution of the timer and the preset timer is 16 bits 32767 5 9 Area of Counters C and Preset Counters PV The memory area for counters C is composed of 64 words If a counter is enabled the variation of the contents of the memory area is regulated by the type of counter The memory area for preset counters PV is composed of 64 words and con
14. o timer T2 Contact n o timer T128 Contact n o counter C1 Contact n o counter C2 Contact n o counter C64 Bit 0 area special marker SMO Bit 1 area special marker SMO Bit 15 area special marker SM199 Bit 0 area variables VO Bit 1 area variables VO Bit 15 area variables V2000 6 3 Protocol NAIS Matsushita Master This is the protocol that permits the reading and writing of data bit of word of the PLC Nais Matsushita Generally the communications interface is RS232 the velocity is 9600 baud bits sec the format of communications 8 O 1 8 bits of data odd parity 1 stop bit The following table indicates all of the elements that can be read written from the PLC The address of the bit o of the word to read or write is obtained by adding the real address of the bit word between Min and Max to the value indicated in the column Offset Each instruction COM or EXP can read or write to several consecutive data locations the maximum number for each 52 type of data is indicated in the column Max number bit word read written consecutively ACCESS TO BIT MAX NUMBER CONTACT MAX OFFSET READ OF BITS READ WRITE WRITTEN CONSECUTIVELY EXTERNAL 9999 0 8 INPUT EXTERNAL ER 10000 R W 8 OUTPUT INTERNAL us 20000 RAW 8 RELAY ES ee RELAY TIMER T 0 9999 40000 R 8 COUNTER C 0 9999 50000 R 8 ACCESS TO WORD MAX NUMBER WORD NAME DER OFFSET READ OF WORDS READ
15. second 6 1 2 Port COM2 The port COM2 can be configured only by using protocol ModBus slave This port is used for programming the terminal by PC The control of the communication is carried out every scan cycle of the Ladder code This means that the flow of the data in the serial port COM2 will be controlled one time at the end of each scan cycle 6 2 Protocol ModBus RTU The ModBus on the serial line is a Master Slave protocol In a network with this type there is a single node the Master that interrogates and commands the Slaves and processes the results The Slave nodes typically do not transmit data unless specifically requested by the Master and do not communicate directly between each other A device in the serial line a network node is uniquely determined by an identification number ID variable from 1 to 255 called the ModBus Slave address two devices cannot have the same address 46 The addressees of a request one or more Slave nodes are selected by the Master by their ID thus the data that transits on the line has a precise destination The Master controls the line it doesn t have a specific ID address and can read or write data in words or bits with one or more Slave devices specifying the destination ID Data read or written is saved in the destination device in registers identified by a specific ModBus address variable from 1 to 65535 Each ModBus address can correspond to a register word area of
16. start TdDesigner ommum Transfer project to Terminal 25 For eventual modifications of only the PLC part as outlined it is not necessary to start TdDesigner The compilation of the project file name plp will maintain the graphics unchanged and will activate the modifications of the Ladder diagram 5 Memory areas of the TD320 The TD320 makes memory areas available where it is possible to read or to write program data Access to the various areas can occur through instructions that access a single bit b a byte B a word W or a double word D EEP Area of EEPROM MMC Area of EEPROM data COM1 Area of buffer TX RX port COM1 EXP Area of buffer TX RX port EXP1 SIGN AREA V Area of Variable V b W D SM Area of Special Marker b W D Area of Digital Inputs b W Al Area of Analog Inputs Q Area of Digital Outputs M Area of Marker b W B Area of Bistable B AQ Area of Analog Outputs T Area of Timer PT Area of Preset Timer C Area of Counters PV Area of Preset Counters b i B 5 1 Area of Variable V Area variable V is a memory area used by the program to retain the data of the operations It consists of 10000 locations of type word 5000 double word Access can occur through operations on 26 bits words or double words In the last case the number of double words always makes reference to the organization by words therefore in order to access consecutive double word variables it is necessary to in
17. 0 Contacts n o digital outputs Q1 Q16 R 0 Contacts n o digital outputs Q17 Q32 R 0 181 Contacts n o digital outputs Q497 R 0 Q512 200 Contacts n o bistable relays B1 B16 R W 0 201 Contacts n o bistable relays B17 B32 R W 0 50 Contacts n o bistable relays B113 B128 Contacts n o marker M1 M16 Contacts n o marker M17 M32 Contacts n o marker M785 M800 Contacts n o timer T1 T16 Contacts n o timer T17 T32 Contacts n o timer T113 T128 Contacts n o counters C1 C16 Contacts n o counters C17 C32 Contacts n o counters C33 C48 Contacts n o counters C49 C64 R W ACCESS TO BIT MODBUS DESCRIPTION READ RESET ADDRESS n o normally open WRITE VALUE Contact n o positioner POS1 R 0 Contact n o positioner POS2 R 0 Contact n o positioner POS15 R 0 Contact n o tuning position POS1 R 0 Contact n o tuning position POS2 R 0 Contact n o tuning position POS15 R 0 Contact n o digital input I1 R W 0 Contact n o digital input I2 R W 0 2111 Contact n o digital input 1512 R W 0 2400 Contact n o digital output Q1 R W 0 2401 Contact n o digital output Q2 R W 0 2911 Contact n o digital output Q512 R W 0 3200 Contact n o bistable relay B1 R W 0 51 Contact n o bistable relay B2 R W 0 Contact n o bistable relay B128 R W 0 Contact n o marker M1 R W 0 Contact n o marker M2 R W 0 Contact n o marker M800 Contact n o timer T1 Contact n
18. 17 32 Serial state COM1 33 48 Serial state COM1 49 64 R W Serial state COM1 65 80 Serial state COM1 81 96 Serial state COM1 97 112 Serial state COM1 113 128 Serial state COM1 129 144 Serial state COM1 145 160 Serial state COM1 161 176 Serial state COM1 177 192 Serial state COM1 193 208 Serial state COM1 209 224 Serial state COM1 225 240 Serial state COM1 241 256 37 These words contain the state of COM1 serial communication Each bit of each word signals a condition of missing communication off line or error for each of the data transmitted or received using the instructions COM_1 256 for example SM66 9 1 indicates an error in the instruction number COM 154 In the case of a serial line set to slave protocol the error condition is signalled by putting a 1 in all of the bits of the word SM57 At startup all of the words are initialized to O Serial state EXP1 1 16 Serial state EXP1 17 32 Serial state EXP1 33 48 Serial state EXP1 49 64 Serial state EXP1 65 80 Serial state EXP1 81 96 Serial state EXP1 97 112 Serial state EXP1 113 128 Serial state EXP1 129 144 Serial state EXP1 145 160 Serial state EXP1 161 176 Serial state EXP1 177 192 Serial state EXP1 193 208 Serial state EXP1 209 224 Serial state EXP1 225 240 Serial state EXP1 241 256 38 These words contain the state of EXP1 serial communication Each bit of each word signals a conditio
19. 5 10 Area of Bistable Relay bi 42 5 11 Area of EEPROM S ie ena te toe odes tetuer he eonun 42 912 Area o MMO cacce 43 5 13 Area of TX RX COM 43 5 14 Area Of IAIRA EXP Tere e oam tune eoa beo See 43 6 Communication protocols sees 45 6 1 Managing the communication Dot 45 6 1 1 Ports COM1 and EXP Troni her 46 6 1 2 POM COM 2 desea trece boe cosets usu ege d eoe ERE 46 6 2 Protocol ModBus HI 46 6 2 1 ModBus RTU Master 47 6 2 2 ModBus RTU Slave octo eech 48 6 3 Protocol NAIS Matsushita Master 52 7 Ladder programming of the TD320 56 Y 1 Digitalinput Contacls s cde dett te teeth tesa 56 7 2 Digital output contacts OO 56 T9 BistableTeldy EE 56 e mer EE of 7 9 GOUDIBES UO nsi toten ccu oes dictom Siue ied 58 7 6 Mathematic formulas EM 59 7 7 MOV assignments EE 59 7 8 BLKMOV multiple assignments sss 59 7 9 MOVIND indexed assgnments 60 7 10 MOVTXT assonmente nne 60 1 11 Digital input immediate contacts ll 60 TENE Gro LIC eic at e T c 61 7 143 Functions SBIT and ISBIT eiie ttis 61 ER BI e e mm 61 7 15 RANGETunictons ioo e aeec o eacus eee e Uis 61 TAG INOTGOODIBCIS zi m reet e e oto tive oce t iced 62 To Pand INECOMACES ndi emo e eaae E 62 7 19 JSSENDGTUFCUORS EE 62 7 19 TunePOS and POS functions ssuss
20. COM2 is available either in the 25 pin connector or in the 9 pin connector but only in interface RS232 protocol MODBUS SLAVE format 8 N 1 baud rate settable Usually this is the communications port used for programming the terminal through a PC see Chapter 4 3 2 3 1 COM2 on DB25 connector pins Interface RS232 in DB25 COM2 D O PIN7 GND DB25FE O PIN 12 TX RS232 O PIN 11 RX RS232 e eesse e 3 2 3 2 COM2 on DB9 connector pins Interface RS232 in DB09 COM2 H O PIN 5 GND DB9 FE O PIN 3 TX RS232 O PIN 2 RX RS232 e e 3 3 NPN digital inputs In DB25 connector pins 8 NPN digital inputs are present The digital input is active if the respective PIN is short circuited with GND PIN 5 reference 14 Digital inputs NPN O PIN 5 Reference DB25FE Q PIN 6 DI 1 O PIN 8 DI 2 e PIN 9 DI3 e PENES e on a O PIN 13 DI5 O PIN 19 DI 6 O PIN 20 DI O PIN 23 DI 8 PIN 5 PIN 5 PIN 23 PIN 23 DI 8 Digital input not active DI8 Active Digital input 4 Programming the terminal In order to program the terminal it is necessary to connect it to a PC The development kit optional code art 2100 10 008 provides the cable necessary for the connection and the development environment to create applications
21. FE SIGNAL PORT Not used RX RS232 Program COM2 3 TX RS232 Program COM2 4 RS485 EXP1 DB9 PINS 5 GND RS485 RS232 EXP1 COM2 6 TX RS2332 ES I RX RS232 EXP1 08 Not used 9 RS485 EXP1 CONNECTOR DB25 PINS DB25FE PIN N SIGNAL PORT 1 Not used 2 Not used 3 Not used 4 Not used 5 GND Common digital input 6 DI1 digital input NPN T GND RS232 Program COM2 EXP1 8 DI2 digital input NPN 9 DI3 digital input NPN 10 DI4 digital input NPN 11 RX RS232 Program COM2 12 TX RS232 Program COM2 13 DI5 digital input NPN 14 GND isolated RS485 RS422 COM1 15 RS485 TX RS422 COM1 16 RS485 TX RS422 COM1 17 RX RS422 COM1 18 RX RS422 COM1 19 DI6 digital input NPN 20 DI7 digital input NPN 21 RX RS232 EXP1 22 TX RS232 EXP1 23 DI8 digital input NPN 24 Not used 25 Not used 3 2 1 COM1 on DB25 pins The communication port COM is available in connection to 25 pins in interface RS485 or also RS422 protocol baud rate and format are settable 3 2 1 1 Interface RS485 Interface RS485 in DB25 COM1 Q PIN 14 GND DB25FE O PIN 15 RS485 o O PIN 16 RS485 13 l 25 00014 e 3 2 1 1 1 Cable for COM1 communications in generic
22. OPERATOR PANEL TOUCH SCREEN TD320 Manuale User manual TABLE OF CONTENTS Iddee IT Le EE 4 Model identification ccseceescssessseeeeeeeeenseeeeeeensesneeeeseneenees 4 1 Mechanical dimensions and installation 5 2 Display characteristics reist eege deeg 6 3 Electrical connecliolls 5 eoi Eege 7 3 1 Terminal clip CONNECTIONS cece cceccceeeeeeeeeeeeeeseeeeeeeeeees 7 3 2 Serial ports of communication eeesseeesssse 8 SZT COMA on R TEE 10 3 2 2 EXP1 on DB9 and DB25 connector pins 11 3 2 3 COM2 Interface HRZ 13 o9 REENEN 14 4 Programming the terminal 15 4 1 Starter Kit Connection of the terminal to the PC 16 4 2 The development environment nn nnannnannnneennnnnnnnnnne 17 4 2 1 Creation of a new Droe 19 4 2 2 Modification of an already existing project 25 5 Memory areas of the TD320 26 5 1 AreaofvanableV cecccccccccceeeceeeeesseeeeseeeeeeeeeeeeeeaeees 26 5 2 Area of Special Marker M A 27 5 3 Area of Digital Input 40 5 4 Area of Digital Output OO 40 5 5 Area of Marker NM 41 5 6 Area of Analog Inputs Al 41 5 7 Area of Analog Outputs AC 41 5 8 Areas of Timer T and Preset Timer PT 41 5 9 Area of Counters C and Preset Counters PV 42
23. Slave Data of interest by the Master is written in the slave at the ModBus address corresponding to the data to overwrite Each instruction can write up to 16 consecutive words e Read write on a Slave Normally data read from the slave is saved in the Master When the data internal to the TD320 varies by effect of the program it is useful to write the modified data into the Slave Each instruction of read write can operate only on 1 word 6 2 2 ModBus RTU Slave The protocol ModBus Slave can be configured for all three of the ports COM1 EXP1 and COM2 With this configuration all of the resources of the terminal are available to the Master device that is eventually connected The following table indicates all of the data word and bit accessible by use of the ModBus protocol Each area of memory corresponds to a distinct ModBus address for the access of a word or a bit variable from 0 to 65536 The read write access and the value given at startup of the TD320 are shown for each Depending upon the initialization values the following cases occur 48 1 ROM fixed values defined by the program 2 EEP value stored in EEProm memory maintained for at least 10 years even in the absence of power 3 BUFF value stored in RAM with the battery buffer Also this data is maintained in the absence of power but for a limited time around 4 to 6 months 4 DEFINED VALUE the value given to the data at st
24. TC E PL se os I P PE Single direct action 0 Output 0 Setpoint Setpoint P B 2 Setpoint P B 2 Output 100 ze ze ze zen ze DEM aan ze uae ze D I Single direct action 1 Output 0 Setpoint Setpoint P B 2 Setpoint P B 2 Output 100 a Single inverse action 0 M Output 0 Setpoint Setpoint P B 2 Setpoint P B 2 68 Output 10096 Single inverse action 1 Output 0 Setpoint Setpoint P B 2 Setpoint P B 2 Output 100 Double direct action 0 Output 0 Setpoint P B 2 Setpoint Setpoint P B Output 100 aaa ze an aaa ze W IT ze om ze ze Double direct action 1 Output 0 Setpoint P B 2 Setpoint Setpoint P B Output 100 Cor D Ga an ze een aay Double inverse action 0 Output 0 Greng P B 2 Setpoint P B Setpoint SQUE 10096 Double inverse action 1 Output 0 Setpoint P B 2 Setpoint P B Setpoint The PID function for correct operation must be called at the most regular intervals possible thus by timer or for more brief and precise times by an internal interrupt The function SetOutPID is used for the regulation anticipated by the double function automatic manual It serves to avoid oscillation of size control in switching from manual mode to automatic by the PID algorithm 69 The function uses the following parameters e Output value The Output value is set by the PID automat
25. WRITE WRITTEN ES ce e ar amr RELAY E rr pem mem RELAY TIMER T 0 999 400 R 10 COUNTER C 0 999 5000 R 10 INDEX 6000 R W REG X INDEX 6001 R W 1 REG Y INDEX 6002 R W 1 REG D DATA 9999 10000 R W 10 R 7 W REGISTER LINK DATA 9999 20000 R W 10 R 7 W REGISTER Bem prem e ame REGISTER SC D Par rem AREA ELAPSED 9999 50000 R W 10 R 7 W VALUE AREA For the two examples shown below the protocol NAIS Matsushita is selected for the port EXP1 The illustrated instructions that follow write the contents of the 8 words from V10 to V17 of the TD320 in the register EXTERNAL OUTPUT of the PLC NAIS from Y3 to YA Y10 Coil number EXP i Parameters Slave action and address Write on SLAVE na 1 ve Ges Address Word nO Bit number ei 10003 Mak E5535 Area Destination for reading Source for writing Memory area V ward 1 0 Number af consecutive Word readwrltten Min D No Word 18 Max 16 54 The following illustration however reads the register DATA REGISTER of the PLC NAIS the 10 words from DTO to DT9 and copies them in the area of VO to V9 of the TD320 Coil number EXP 1 Parameters Slave action and address Read on SLAVE no v g i Zeg Address Word Min D Wordnumber si 10000 Max 65535 Area Destination for reading Source for writing Memory area V word T E Humbe
26. act is active when the comparison is true 7 13 Functions SBIT and RBIT The function SBIT set bit puts a 1 in a bit of a memory area when the coil of the function is at the active state The function RBIT reset bit puts a O in a bit of a memory area when the coil of the function is at the active state The index of the bit varies from O to 15 the destination area is always a word where bit 0 is the least significant bit LSB 7 14 BIT contacts This operation extracts the value of a bit of an area of memory A contact normally open is closed ON when the bit value is 1 A contact normally closed is open ON when the bit value is 0 The index of the bit varies from O to 15 the destination area is always a word where bit 0 is the least significant bit LSB 7 15 RANGE functions The function RANGE defines the value of the minimum and maxim limits for the analog inputs Al for the trimmer TR for the analog outputs AQ and for the outputs of the PID RANGE Al1 Min 10 Max 200 The function imposes a minimum limit of 10 and maximum limit of 200 for the analog input AI1 If the analog input Al1 corresponds to a potentiometer from a PLC via a serial communication is used to establish the preset PT of a timer of base time 100 mS this 61 provides a variable time from 1 0 to 20 0 seconds according to the value of the potentiometer If input values exceed the limits set in the RANGE function th
27. an area of internal memory e Writing the TD320 continuously writes the data to an area of internal memory in the Slave device s e Reading Writing the TD320 normally reads data of the Slave device and memorizes them in an area of internal memory at the moment in which such internal data to the TD320 is modified by the program the variations will be passed automatically to the Slave device through a write instruction one datum at a time 66 e Number of the Slave address of communication of the Slave device e The type of data word or bit e The address ModBus relative to the datum or data to transfer e The area of internal memory of the PL250A for reading or writing the data e The number of words the instructions of reading and writing can transfer up to consecutive 16 bits words 7 21 StartPID PID and SetOutPID functions The functions StartPID PID and SetOutPID allow the regulation of a size through an algorithm of action that is proportional integral and derived The function StartPID activates the regulation The function can be activated a single time at startup or repeated at a later moment permitting the modification on the fly of the parameters of regulation The integral action of the PID is zeroed only by calling the functions and fixing the integral time to 0 Otherwise even in case of shutdown the system will initialize the regulation maintaining as point of departure the same percentage of inte
28. ap the contact POS normally open will close to indicate the end of positioning Activate the outputs FORWARD and BACKWARD reading the value of the field Output VD 8 If the value of Output is 1 it is necessary to activate the output FORWARD if it is 1 it is necessary to activate the output BACKWARD if it is Q itis not necessary to activate any output Set the value of the field Output to zero when the consent of the function TunePOS or POS is removed to avoid that the output remains forced to forward or backward 64 The following example shows the segment of Ladder code that implements the axis positions as explained in the procedure ESAMPLE TuneF OS and POSFUNCTIONS MOV OO gt Gaul Transfer value of encoder 1 to field Encoder counts MOY vr 10000 Enter 10000 on field Counts for setpoint positioning MAIO vDI 100 Enter 100 an field Counts for absolute maximum gap of positioning MOY VOR 50 Set time in decimals of seconds to attain maximum velocity H TupnebOG vDIO Start Tuning of positioning asis UNICEF and save parameters starting from variable VO TuneF OS HI Closes contact GH after rating parameters at end ot Tuning po lz POS vpn Execute OMPOFF positioning using parameters stored since variable YOO PO Close contact G2 when axis iz positioned YOS 1 FORWARD IF Field Output 1 activate relay FORWARD YOS 1 REVERSE IF Field Outpu
29. artup corresponds to the value indicated in the table ACCESS TO WORD MODBUS READ RESET ADDRESS DESCRIPTION WRITE VALUE R ROM R ROM R ROM R ROM 4 R ROM R BUFF R ROM 1 R W BUFF 1000 1199 Word area special marker SM R W BUFF 2000 2999 Word area variable V R W BUFF 12000 12127 Word area timer T R W 13000 13127 Word area preset timer PT R W 1 39 7 2 Protocol activated on COM1 3 Protocol activated on EXP1 A E 75 0 2 4000 14063 Word area counter C RAW Word area preset counters PV R W 16000 16099 Word area buffer TX COM1 0 OO OO OOCO O o o o DD DDD 17500 17599 Word area buffer RX EXP1 18000 18099 Word area buffer TX COM2 18500 18599 Word area buffer RX COM2 49 19000 19031 Word area analog input Al R 0 R 0 R 0 19800 19927 Word percentage proportional integral derived output PID Action proportional PID1 R 0 Action integral PID1 R BUFF Action derived PID1 R BUFF Output PID1 R BUFF Action proportional PID2 R 0 Output PID128 R BUFF R W EEP R W EEP ACCESS TO WORD MODBUS DESCRIPTION READ RESET ADDRESS n o normally open WRITE VALUE Contacts n o positioners 0 POS1 POS16 Contacts n o tuning positioners 0 POS1 POS16 Contacts n o digital inputs 11 116 0 Contacts n o digital inputs 117 132 0 Contacts n o digital inputs 1497 1512
30. cal inclusive or amp logical AND XOR logical exclusive or lt lt ROL ROtate shift Left gt gt ROR ROtate shift Right between two operators and saves the result in another memory location The operators can be numeric constants or refer to the available areas of memory variables 7 7 MOV assignments The function MOV move assigns a numeric value constant or the contents of another location source area to a specified location in memory destination area An instruction such as MOV A B copies the contents of the memory location B to the memory location A 7 8 BLKMOV multiple assignments The function BLKMOV block move assigns a numerical value or the value from another source block of memory to a destination block of memory An instruction such as BLKMOV A Bi num data 8 copies the contents of memory B into the location of memory Aj the contents of location Bi 4 into the location Aj and the contents of Bi 7into the location A 7 59 7 9 MOVIND indexed assignments MOVIND move with index offset assigns a numerical value constant or the value from another location of memory variable source to the specified location of memory destination as offset by an index for the source and or destination This type of assignment permits various memory areas to be used as vectors of N locations each where the value taken from another location is used as an index It is possible to acces
31. crement by 2 The memorized values are maintained even in the absence of power thanks to the rechargeable battery pad Once charged the battery maintains memorized data for approximately 6 months ACCESS WORD ACCESS DOUBLE WORD VDO VD1 VD2 VD3 VD4 5 2 Area of Special Marker SM Area special marker SM is the memory area used to retain all the data necessary for the Ladder program to interact with the TD320 hardware Some data are initialized at the start with default values indicated in the table below In this area are the storage words that manage the events relative to the graphics the PLC control bits and the setup for the serial ports of communication The table below describes the content of each single location of the special marker area indicating the address for access through the ModBus protocol and the operation allowed at this location R read W write R W read write The bits and words that do not appear in the tables are not used 27 SM N ModBus Description Signification Bit state BitO Bit RUN STOP 1 RUN At startup R W this bit is always forced ON PLC in RUN In STOP the output relays of the PLC are disabled Bit1 Bit always ON for the first scan cycle R of the main program It becomes used for example to execute a subprogram of initialization Bit2 Bit that allows use of a 60 second R clock impulse ON for 30 seconds OFF for 30 seconds Bit3 Bit that al
32. difiable The value that is set defines the communications data format of the serial line for the ModBus protocol if enabled Note Because the modifications are active it is necessary to set this word in the initialization code In case no modification is made or if modifications are made in other parts of the program the baud rate will remain at the default rate set at startup 02 8 N 1 6 gt 8 N 2 1 gt 8 0 1 7 gt 8 0 2 2 gt 8 E 1 8 gt SE 32 7 N 1 9 gt 7 N 2 4 gt 7 0 1 10 gt 7 0 2 5 gt 7 E 1 11 gt 7 E 2 COM1 RX TX delay default 20 mS EXP1 RX TX delay default 100 mS COM RX TX delay default 1 mS 36 R W R W The value set in mS defines R W e Protocol slave The minimum delay between the end of the serial reception of data coming from the master device to the start of transmission of the data of the reply from the TD320 max 100 mS e Protocol master The maximum waiting period between the start of the transmission of interrogation data by the TD320 to the completed reception of the reply data from a slave device Num Errors for signaling COM1 Num Errors for signaling EXP1 Num Errors for signaling COM2 The value set in this word defines the number of consecutive communication errors after which an anomaly will be signaled in the respective bit of the word Serial state The default value for all of the ports is 10 Serial state COM1 1 16 Serial state COM1
33. e output will be blocked to the minimum or maximum allowed value As for the output PID the minimum and maximum values serve to calculate the value of the output generated by the algorithm of regulation Let us consider the following example RANGE PID1 Min 100 Max 500 The function imposes the minimum limit of 100 and the maximum limit of 500 for the PID1 output This means that an output of 0 corresponds to the minimum value imposed 100 and 100 will correspond to an output equal to the maximum value 500 7 16 NOT contacts The contact NOT modifies the state of the flow of current The flow of current stops if it reaches a NOT contact and supplies energy if it doesn t reach it The operation NOT inverts the logical value 0 1 and 1 0 7 17 P and N contacts The transition positive P contact activates the flow of current for one scan cycle of each transition from OFF to ON The transition negative N contact activates the flow of current for one scan cycle of each transition from ON to OFF The instructions that follow in the diagram are thus executed only once per scan cycle for each transition that activates the contact 7 18 SEND functions The function SEND transmits the data through the serial line in free port mode In this mode enabled by the special markers SM39 SM40 and SM41 the protocol that normally manages the serial port is disabled and the Ladder program takes control of the port and of the transmission a
34. e the timer bit remains active To start the count the TOFF operation should sense a transition from state active to non active ON gt OFF TONR with memory time begins counting when the coil is active ON The timer bit contact T is active when the current timer value word T becomes greater than or equal to the pre established time preset word PT When the coil is deactivated OFF the current value of the timer is maintained Thus it is possible to accumulate time for more periods of activation of the coil The current value of the timer can be reset with the operation MOV Tx 0 The timer stops in any case when it reaches the maximum value in signed 16 bits 32767 57 The time base can be selected between 10 mS 100 mS and 1S for each mode of functioning The current value of the timer is a multiple of the selected time base For example a current value of 50 in a timer with a base time of 10 mS corresponds to 500 mS and with a base time of 1S corresponds to 50 S The preset timer PT value can be a constant or the contents of an area VW SMW Al or TR 7 5 Counters C The TD320 has 64 counters of 16 bits These are available in two modes of functioning e MUP forward counter the counter bit contact C is activated when the current value word C is greater than or equal to the pre established value PV The counts increments each time the input of the up count Cx UP is active and decrements each time t
35. ea AIS Bd RITTER DISPLAY Type Back lit LCD resistive touch screen STN Dimensions Active Area 5 7 115 18 W mm x 86 38 H mm Resolution 320x240 pixels Colors 256 8bit Importable Images bitmap of 256 colors bmp 3 Electrical connections Although this instrument is designed to resist the most difficult conditions present in industrial environments it is good practice to observe the following precautions e Distinguish the line bringing live current from those of voltage e Avoid the vicinity of groups of telecommand circuit breakers electromagnetic contacts and high power motors e In particular avoid the vicinity of power installations used to control phase 3 1 Terminal clip connections III V E O OV 92 Ss ALARM 1 E eq III e 12 24V AC DC 15 50 60Hz SUPPLY E 12 to 24V ac dc Alarm output With active contact contact capacity 3A 250V resistive load the voltage V power is available between clips 1 and 2 3 2 Serial ports of communication TD320 terminal communication with other devices is possible through serial connection with RS485 RS232 and RS422 The electrical signals are available in two connectors present at the back of the terminal post DB9 and post DB25 DB9
36. ecified location Address area VD Contents Count for encoder Counts for setpoint positioning Counts for absolute maximum gap of positioning seconds 1 forward 2 backward 63 10 Counts for forward inertia Counts for backward inertia Duration of minimum impulse resolution 0 2 mS 16 Counts of movement after impulse of 100 mS 18 Counts of movement after impulse of 500 mS Counts of movement after impulse of 1000 mS For correct functioning it is necessary to proceed as follows Transfer the count of the encoder connected to a remote device read via a serial line in the field Counts for encoder beginning area of memory Set the count values to the desired position of the axis in the field Counts for setpoint positioning Set the count values for the maximum gap of positioning in the field Counts for absolute maximum gap of positioning Set the time in decimals of seconds needed for the axis to attain maximum velocity Activate the function TunePOS and wait that the contact TunePOS normally open closes to indicate the end of the procedure of auto tuning the axis At this point the inertia data and the reaction time of the axis are automatically memorized in the indicated area of memory remaining available for the function POS Deactivate the function TunePOS Activate the function POS When the axis is positioned to the setting imposed within the pre established g
37. gral action thus limiting the time of transition Parameters of the function StartPID e Proportional band e Integral time e Derived time e Dead band The parameters can be inserted in numerical format or can refer to areas of memory The integral time is expressed in the units of time in which the function PID is called for instance function PID called every 1 second integral time expressed in seconds The derived time however is expressed with an additional decimal digit with respect to the integral time The proportional band and the dead band are instead expressed in numeric values equal to the setpoint and the process to regulate 67 The parameters of the function PID e Setpoint e Process e Output value e Type of regulation action The PID function after acquiring setpoint process type of action and type of output will set in the variable Ouput value the value obtained in the algorithm of regulation Such a value will be obtained rescaling the percentage of the value between 0 and 10000 0 00 100 00 between the minimum and maximum value of the PID output set by the RANGE function The following table indicates 8 types of regulation and the modulation intervals the effective value between the interval is determined also by the actions integral and derivative the table shows only the proportional components Type of regulation action Intervals of modulation Output 100 as Lie DU er P N
38. he input of the down count Cx DOWN is active The counter will be set to zero upon activation of the reset input Cx RESET or when the operation MOV Cx 0 is executed Upon reaching the maximum value 32767 the rise of the next up count will leave the current value unchanged Similarly upon reaching the minimum value 32768 the rise of the next down count will leave the current value unchanged For the forward counters the pre established value PV is compared with the current value at the end of each cycle of the program If the value is greater than or equal to the preset value the counter bit activates counter C otherwise it is deactivated e MDOWN backward counter the counter bit contact C is activated when the current value word C becomes equal to zero The counter decrements from a pre established value PV on the rise of the input of down count Cx DOWN and increments on the rise of the input of up count Cx UP Upon reaching the maximum value 32767 the rise of the next up count will leave the current value unchanged The counter resets the count bit contact C and loads the preset value 58 PV when the input Cx RESET becomes active The counter in backward mode will stop counting when it reaches zero The preset value PV can be a constant or the contents of an area VW SMW Al or TR 7 6 Mathematic formulas FM The functions of math formulas FM execute mathematical operations OR logi
39. he state of the input changes the new state will be accepted only if the input is maintained for the imposed time The data will become accepted after the filter has eliminated disturbances and fixed the lines of the inputs on stable values The TD320 supports filters with times of delay between 0 and 50ms default 10ms Digital inputs R W Bit1 Bit ON gt Digital input DI2 active Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Conf COM1 in mode Free port Conf EXP1 in mode Free port Conf COM2 in mode Free port Word that enables the serial port to function in free port mode and to set its parameters Enabling this mode the communications protocol using the serial port will be disabled allowing direct access to the functions of transmission and reception of the data on the port These parameters are initialized at startup to O free port mode disabled Bit 0 3 These bits set the communication R W velocity of the serial port in the free port mode according to the R W following values baud 34 0 110 6 gt 4800 1 gt 150 7 gt 9600 2 300 8 gt 19200 3 gt 600 9 gt 28800 4 1200 10 gt 38400 5 2400 11 gt 57600 These bits set the format of serial R W port communication data in the free port mode 7 8 number of bits of data N No parity control O Odd parity E Even parity 1 2 number of stop bits 02 8 N 1 6 gt 8 N 2 1 gt 8 0 1 7 gt 8 0 2 2
40. ically calculating the single percentages of the proportional and integral actions In this mode at the switching of manual function to automatic the output value of the PID will take on the value set by manual and will initiate the regulation The function thus should be called only during the manual regulation phase in order to maintain alignment of the output of the PID with that of manual The function will automatically zero the derived action The use of this function with the process outside of the proportional band sets the integral action to zero 7 22 GENSET functions The function GENSET automatically generates a setpoint variable rising or falling with the possibility to set a ramp of acceleration or deceleration The function GENSET operates on a series of variables in contiguous double words starting from the location indicated as a parameter to the function The following table indicates how the data are organized in the memory area used by the function starting from the address of the specified location Address area VD Contents 0 State of the GENSET function 0 gt Stop or end of movement 1 gt Initialization function 2 gt Ramp of acceleration 3 gt Movement at constant velocity 4 gt Ramp of deceleration 2 Initial setpoint setpoint calculated by the function GENSET counts Final setpoint counts Velocity of movement counts 1000 time unit 8 Duration of acceleration ramp time unit
41. ilation was successful now one can carry out the download of the project as shown in the figure below The procedure transfers both the graphical part and the PLC part to the terminal HT TD320 touch 370 240 256col C iDocume 774 SettingsWC4WDocumentixEile P Droe File Comm port PLC Language Tools D ck kl v e Lai amp Fl Fe F3 F4 F5 F B co DI Ge ba 2 x E Fil Fiz Des Font D OFF Ee d E p Transfer to PLC b Read SSFi output active ExP_3 Read_Slavel IND wordi05 vv28 M wordt BIT vw28 0 Mow Sys 1 MOY Vw 0 NOT BIT w28 1 MOV vwa H MOY viwS1 0 NOT BIT w23 2 MOV Sy 1 MOV vw32 0 NOT BIT w23 3 MOV iw33 3H MOV VW33 0 If the TD320 is connected correctly to the PC see diagram of section 4 1 during the transfer the terminal will show this figure on the display 24 At the end of the download the terminal will execute the instructions of the entire application 4 2 2 Modification of an already existing project In the case in which an already existing project must be modified follow the procedure below Start PLProg 4 xx Modify graphics Start TdDesigner and modify project name_file tdproj Compile project name_file tdproj Modify Ladder diagram name file plp 1 Compile Ladder diagram name file plp For modifications of only PLC parts it is not necessary to
42. ing the communication port The communication between the TD320 and other devices is managed by the PLC part of the terminal thus the configuration of the port and the instructions must be implemented in the development environment PLProg 4 xx Generally the coils of the Ladder diagram are executed following the sequential order written in the diagram itself The instruction related to the coil at line n 1 is not executed until the full completion of the instruction related to the coil at line n for coils positioned in the same column The control of transmission and reception of data is instead asynchronous with respect to the cycle of execution of the Ladder code When an instruction of read write of a device must be executed line n control passes immediately to the next instruction line n 1 without waiting for the data to be effectively read written 45 The effective transfer of the data in the serial line is executed in a manner that is independent to the normal scan of Ladder code in different times according to the port that is used 6 1 1 Ports COM1 and EXP1 The ports COM1 and EXP1 can be configured with protocol ModBus master or slave or Nais Matsushita master Control Technique These are the ports typically used for communication with other devices PLC etc The control of the communication is carried out every 1 mS This means that the corresponding flow of serial data will be controlled 1000 times a
43. iting the number corresponding to a page physically created from the TdDesigner in this word will cause an immediate jump to that page otherwise the visualized page will remain as it was before After the page change the word is set back to 0 automatically 31 At startup if SM1 0 1 the value is initialized to 0 gt no change of page otherwise the page previously chosen is maintained Area of last variable modified Word that indicates for a single scan cycle the index corresponding to the last area of memory saved from the graphics In detail indices correspond to these areas Area word V Area word SM Area word Al Area word TR Area word AQ Area word I Area word Q Area word T Area word PT Area word C Area word PV Area double V Area double SM Area word M Area word EEPROM Area word MMC Area byte TX COM1 Area byte RX COM1 Area byte TX EXP1 Area byte RX EXP1 Area byte TX COM2 Area byte RX COM2 5 22 Memory area number of last variable modified Word that indicates for a single scan cycle R the number of the last area of memory saved from the graphics As an example if the graphics modifies the variable VW30 there will be for the scan cycle following the modification SM16 1 and SM17 30 In OO JO Om PS Go gt VV VV Vvvvveovvvvvvvvvvv vwv N 32 SM18 1018 SM19 1019 the successive cycle the two areas will be automaticall
44. lows use of a 1 second R clock impulse ON for 0 5 seconds OFF for 0 5 seconds Bit4 X Bit clock of scan cycles that is active R ON for a cycle and deactivated OFF for the successive cycle It can be used as an input for counting scan cycles Bit6 Bu ON during the transmission R phase of data on serial port COM It is automatically switched OFF at the end of the transmission Bit7 Bit ON during the transmission R phase of data on serial port EXP1 It is automatically switched OFF at the end of the transmission Bit8 Bu ON during the transmission R phase of data on serial port COM2 It is automatically switched OFF at the end of the transmission Bit9 This bit if set ON enables the serial R W port COM1 in modem mode That means that the timeout between one character and another in reception is automatically fixed to 40 mS Bit 10 This bit if set ON enables the serial R W port EXP1 in modem mode That means that the timeout between one character and another in reception is automatically fixed to 40 mS Bit 11 This bit if set ON enables the serial R W port COM2 in modem mode That means that the timeout between one character and another in reception is automatically fixed to 40 mS Diagnostic bit anomaly malfunction BitO Bit ON in case of loss of data kept in R W the area special marker SM Bit1 Bit ON in case of loss of data kept in R W the area variable V the area
45. memory or a single bit of a register particular bit of an area of memory Refer to the following figure for the list of possible operations in a ModBus communication reading and writing of a word or bit single or multiple Main features of protocol Modbus RTU Programmable 8 N 1 8 bit no parity 1 stop default Supported BITS READING 0x01 0x02 function WORDS READING max 30 word 0x03 0x04 SINGLE BIT WRITING 0x05 SINGLE WORD WRITING 0x06 MULTIPLE BITS WRITING OxOF MULTIPLE WORDS WRITING max 30 word 0x10 Error codes ILLEGAL FUNCTION CODE 0x01 ILLEGAL DATA ADDRESS 0x02 ILLEGAL DATA VALUE 0x04 Broadcast Simultaneus writing to all connected slaves using address 0x00 and no answer from slaves Polling with Polling using address OxFF any connected slave can unknown slave answer address 6 2 1 ModBus RTU Master The protocol ModBus Master can be configured only for the ports COM 1 and EXP1 47 With this configuration the TD320 will have control of the transit of the data of the corresponding port For each of the two ports there can be active up to 256 frames active packets at the same time Each frame corresponds to an instruction of direct communication e Reading from a Slave Reading from the slave at the ModBus address corresponding to the data of interest is memorized in the registers of the Master Each instruction can read up to 16 consecutive words e Writing on a
46. n of missing communication off line or error for each of the data transmitted or received using the instructions EXP 1 256 for example SM80 4 1 indicates an error in the instruction number EXP 117 In the case of a serial line set to slave protocol the error condition is signalled by putting a 1 in all of the bits of the word SM73 At startup all of the words are initialized to O Serial state COM 1 16 1090 Serial state COM2 17 32 Serial state COM2 33 48 Serial state COM2 49 64 Serial state COM2 65 80 Serial state COM2 81 96 Serial state COM2 97 112 Serial state COM2 113 128 1097 Serial state COM2 129 144 Serial state COM2 145 160 Serial state COM2 161 176 Serial state COM2 177 192 Serial state COM2 193 208 Serial state COM2 209 224 Serial state COM2 225 240 Serial state COM2 241 256 COM1 time out number EXP1 time out number SM109 1109 COM2 time out number If the corresponding port Is set to a Master protocol this indicates the number of non received packets of information during the communication At startup all counts are initialized to 0 SM106 1106 COM1 number of errors 39 SM108 1108 EXP1 number of errors COM2 number of errors If the corresponding port Is set to a Master protocol this indicates the number of packets of information with errors during the communication At startup all counts are initialized to 0 COM1 mi
47. nd reception buffers 62 After having loaded the buffer with the data to transmit activating the SEND function which has parameters for the serial port and the number of characters to transmit will cause the data to be sent on the serial line During the transmission phase the bits SMO 6 SMO 7 or SMO 8 relative to the transmission port are set to 1 while at the end of the transmission they will be set to 0 It is possible to control an eventual reply of a connected device through the control of SM42 SM43 and SM44 which contain the number of characters received and saved in the reception buffer of each serial port Any writing on any of these special markers causes the emptying of the buffer data in reception of the corresponding port Calls to the SEND function before the end of the preceding transmission or with free port mode disabled are ignored by the program 7 19 TunePOS and POS functions The function TunePOS executes an auto tuning procedure indispensable for extracting the data of reaction time and axis inertia for which a positioning procedure is requested The function POS executes the positioning ON OFF of the axis The functions operate on the variable area VD double word the address of the beginning of the area is requested as a parameter of the functions TunePOS and POS The following table indicates how the data are organized in the area of the two functions from the address of the sp
48. nimum delay for new transmission EXP1 minimum delay for new transmission COM minimum delay for new transmission If the corresponding port is set to a Master R W protocol this sets the minimum delay for a new transmission after the reply of a slave device Possible values 0 100 gt 0 100ms default 5 gt 5ms SM111 SM112 SM113 5 3 Area of Digital Input I Memory area is composed of 32 words and can be used to contain the state of the digital inputs read through the serial lines of other devices It is organized in words each of the 16 bits of a word can represent the state of an input It is accessible also in bits in order to allow the control of each single input 5 4 Area of Digital Output Q Memory area Q is composed of 32 words and can be used to contain the state of the digital outputs to then write them on serial lines of other devices Available from firmware version 1 12 40 It is organized in words each of the 16 bits of a word can represent the state of an output It is accessible also in bits in order to allow the control of each single output 5 5 Area of Marker M Memory area M is comprised of 50 words and contains the state of all the markers contact bits used in the program It is organized in words each of the 16 bits of a word represents the state of a marker For example the state of the marker M5 is memorized in the bit 4 of word 1 in
49. nitialized to 50 gt 50 otherwise the previously saved data is maintained SM9 1009 1010 Minimal lamp time LCD back lighting display 1 1000 R W 1 1000 minutes 0 gt always lit At startup if SM1 0 1 the value is initialized to 0 gt always lit otherwise the previously saved data is maintained Touch screen X SM10 SM11 1011 Touch screen Y Coordinates of the point of contact on the R 30 LCD display X 0 319 Y 0 239 X 0 Y 0 gt upper left corner When the display is not being touched X 500 Y 500 Touch screen FLAGS Bit ON in case of event up down or auto repeat Bit ON in case of down touch pressure on the display Bit ON in case of up touch release of pressure on the display Bit ON in case of touch pressure continuous pressure on the display Language The number of languages for the text R W messages in the graphics is set from TdDesigner This word defines the language for the currently visualized text messages if nis the number of languages set by TdDesigner SM13 can vary from 0 to n 1 At startup if SM1 0 1 the value is initialized to 0 gt first language otherwise the selected language is maintained Number of visualized page Word that indicates the number of the R visualized page default 1 at startup the first page is always visualized Number of page to visualize Word that specifies the page number to R W visualize Wr
50. nted to the development environment PLProg 4 xx The compilation has effect only if PLProg is open and the terminal TD320 has been selected as CPU Compile Ladder diagram file name plp Once the Ladder diagram sketch is finished it is necessary to compile it as shown in the figure below It is this fundamental passage that creates the link between the Ladder file just compiled in the development environment of PLProg4 xx with the file previously compiled in the development environment of TdDesigner Only with this operation will it be in fact possible to communicate to the terminal also the instructions inherent to the graphics of the created project ii TD320 touch 320 240 256col Cf ad SettingsWC4MocumentixEile PLProgiP File Comm port PLC Language Tools DG RH vi Ba QE im c Tt DS SP d me eil ai BB Fl F2 F3 F4 F5 F7 Compile fileja Ep 1 Fi2 Des Font D Off Read SSH output active EXP_3 Read_Slavel IMDIv ardl b vw28 N ward MOV p wwa 81 MOV vw 0 oe BIT w28 1 MOY nw 1 MOY w 0 Nr s BIT v w23 2 MO wwa 41 MOY Vise 0 BIT w28 3 MOV vw33 1 MO VW 0 23 At this point if saved by PLProg file file name plp will contain both the PLC part and the graphical part is not necessary that the file tdproj has the same name of the file plp 7 Transfer the project to the terminal If the comp
51. r af consecutive Wort reac written Min O No Word 10 Max 16 55 7 Ladder programming of the TD320 Programming the PLC part of the TD320 is accomplished with the development environment PLProg 4 xx which provides the user with all the resources necessary for creation of the Ladder diagram The compilation and download procedure discussed in chapter 4 allows the TD320 terminal to achieve the desired functionality The following describes all available elements contacts and coils and the relative characteristics for the creation of the diagram 7 1 Digital input contacts Digital input contacts can contain the state of the inputs read via serial lines of other devices up to a maximum of 512 A contact normally open N O is closed ON when the bit value is 1 input active A contact normally closed N C is opened ON when the bit value is O input non active 7 2 Digital output contacts Q The TD320 has 512 type Q outputs These can be used to contain the state of eventual outputs of other devices communicated by serial lines Each output has a coil and a related logical contact N O normally open or N C normally closed At activation of the coil Q the related logical contact will close if normally open or will open if normally closed 7 3 Bistable relay B There are 128 bistable relays available in the TD320 Each has a coil and related logical contact normally open or closed
52. s the values n 0 n 1 n N 1 of the area An instruction such as MOVIND A B C D copies the contents of the memory location C D into the location A B The index of area C is specified by D which can be another memory location and similarly B is the index of area A 7 10 MOVTXT assignments MOVTXT saves string characters passed as a function parameter to a specified location in memory This function permits the following types of characters of the string in the memory area e ONE CHARACTER_PER_WORD in this format each word of the destination area will contain a single character of the source string e TWO CHARACTERS PER WORD in this format each word in the destination area will contain two characters of the source string starting with the high part If string Example then V 0 Ex V 1 am V 2 pl V 3 e 7 11 Digital input immediate contacts II The digital input contacts II allow the immediate reading of the digital input state The contact normally open is closed ON when the bit value is 1 input active The contact normally closed is open ON when the bit value is 0 input non active 60 7 12 Contacts IF The operations of conditional IF compare the values of two variables of any area of memory It is possible to carry out the following types of comparison equal gt greater than or equal lt less than or equal gt more than lt less than lt gt not equal The cont
53. t 1 activate relay REVERSE F lt gt 65 7 20 COM and EXP functions The communication functions COM and EXP allow programming of the two serial ports COM1 and EXP1 for the reading writing of the data of the connected Slave devices using the Master protocol selected in the project Such functions are active only when a protocol of communication of type Master is selected for the serial port within the project that is a protocol that allows the TD320 to take control of the line governing the flow of data with the slave devices The two functions are analogous the only change is the serial port that is referenced Taking into consideration that an Interface RS485 allows the connection of several devices to the same line while the Interface RS232 allows connection of a single device to the TD320 The instructions are active until the corresponding coil is activated but keep in mind that according to the protocol of communication the time of updating the data can vary significantly and that at the moment of activation of the coil the data read are not available instantly but only after a certain time due to the delay of communication The instructions COM and EXP use the following parameters e Index it is possible to set a maximum of 256 different serial interrogations on each port e Type of operation performed e Reading the TD320 continuously reads the data of the Slave device s and memorizes them in
54. tains the values of activation of the preset contacts of the respective counters The areas are organized in words thus the resolution of the counters and preset counters is 16 bits from 32768 to 32767 5 10 Area of Bistable Relay B The area of memory for bistable relay B is composed of 128 bits It is organized by bits thus each bistable relay is individualized by a single bit 5 11 Area of EEProm The area of memory EEProm is composed of 1000 words This memory is storage for data that must be maintained even if the TD320 remains off for very long periods over 6 months The data saved in this area are in fact tested at startup to verify their integrity and any anomalies are signalled by activating the bit SM1 2 causing the initialization of the entire area to O Access and writing to this area require a time significantly longer than any other order of 30 40 mS thus it is advisable not to use it for continual access there is also a limit to the number of times that an EEProm cell can be written to of an order of 1 000 000 times but only to copy at startup the data stored here for 42 example to memory area V and then use area V for an access that is more rapid order of 5 10us 5 12 Area of MMC The memory area MMC is composed of 3000 words This is the memory storage where it is possible to save large quantities of data and maintain it even in the absence of power The memory is of type EEProm The resulting
55. the terminal will execute the instructions inherent for graphics for 50 of the time and the Ladder instructions of the PLC for the other 50 cyclically Time dedicated to graphics Time dedicated to PLC The time division is settable by the user see chapter 5 An example is shown below in which 80 of the time is dedicated to the graphics and 20 to the PLC Time dedicated to graphics Time dedicated to PLC 18 4 2 1 Creation of a new project Start TdDesigner Create new project 2 name file tdproj Start PLProg 4 xx Create new Ladder diagram 4 name file plp Compile project 9 name file tdproj Compile Ladder diagram 6 name file plp Transfer project to Terminal 19 To create a new project and transfer it to the terminal follow the procedure and described below 1 Start TdDesigner Start the TdDesigner software from the Start Program menu or from the Desktop icon automatically created at installation Ta TdDesigner Create new project name_file tdproj Once the development environment is opened create a new project as shown in the figure below TdDesigner SIN Edit ar lols e od A Eu TES Sav N Import 2 s Compile A Oo phi und EEG Select terminal TD320 320x240 pixel display 5 7 20 Mew project Project type TO320 TO240 3204240 3204240 TO320Project C Programm PissysT dD esigner Projects Browse Iw Create directory The project will
56. unctions The function CONV converts the source data into one of the available formats e TO 7SEG SIGNED Converts the input data a word with sign 32768 32 767 into a number specified in digits already transformed in code for 7 segment display The function will 71 take as parameters the number of digits to convert starting from the least significant digit The coded data will be saved one digit per word starting from the destination word and then in the successive words according to the number of digits requested TO_7SEG_UNSIGNED This is analogous to the above description with the difference that the data of origin is interpreted as a word without sign 0 65535 The code is comprised of a bit set to 1 if a segment should be lit and 0 if the segment should remain dark The association between the bits and the segments of the display is the following B0 s RE TO ASCII SIGNED Convert the input data a word with sign 32768 32767 into ASCII coded digits The function will take as parameters the number of digits to save The coded data will be saved one digit per word starting from the destination word and then in the successive words according to the number of digits requested B3 Gel TO ASCII UNSIGNED This is analogous to the above description with the difference that the data of origin is interpreted as a word without sign 0 65535 12 8 Notes Updates Notes Updates
57. y reset to 0 Time of buzzer activation x10ms Time buzzer is active in multiples of 10ms R W The default value is OxFFFF 65536 buzzer extinguished which is set also at the end of the activation If SM18 0 the buzzer will extinguish only by touch of the display TD320 digital outputs BitO Bit ON gt Output relay active R W between clips 1 and 2 of voltage V SM20 1020 SM21 1021 CPU percentage for graphics Percentage of time used to execute R W instructions relative to the graphics Possible values 10 90 gt 10 90 default 50 gt 50 half time to graphics and half to PLC CPU percentage for graphics of page change Percentage of time used only to execute R W instructions relative to the change of a page Once executed the effective management of the time is decided by SM20 Possible values 10 90 gt 10 90 default 50 gt 50 SM30 1030 Seconds Internal clock seconds 0 59 R W 1031 Minutes Internal clock minutes 0 59 R W 1032 Hours Internal clock hours 0 23 R W SM33 1033 Days Internal clock days 1 31 R W 1034 Months Internal clock months 1 12 R W SM35 1035 Year Internal clock year 0 99 R W 1036 Day of the week Internal clock day of the week 0 gt Sunday R W 33 1039 1040 1041 6 gt Saturday Digital input filter It is possible to filter digital input signals by imposing a time of delay If t
Download Pdf Manuals
Related Search
Related Contents
BK 212 User's Guide for the COAC Website Samsung ST89 راهنمای محصول Benutzerhandbuch Instruction manual Edital Maroo MR-MS3003 OneTouch® UltraEasy® User Guide Italy Copyright © All rights reserved.
Failed to retrieve file