Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 14 of 15

Programmable controller Twido Catalog, pages 66 to 69

Pages 66 to 69 of 76: Functions (continued); Functions (continued); Functions (continued)

The original document is the PDF (3.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Schneider ABE 7E16EPN20, Schneider ABE 7E16SPN20, Schneider TWDALM3LT, Telemecanique ABE 7E16SPN22 and Telemecanique ABE 7E16SRM20

Page 66

Functions (continued)

0

Twido programmable controller TwidoSoft programming software Programming

Programming TwidoSoft allows the user to write a controller program in either Ladder language or instruction List language. The language selected depends on user preference and does not affect the application: b Ladder language consists of a series of ladder rungs, represented graphically, together with text comments. b Instruction List language consists of a series of text-based instructions. In either language, the program is "written" in the logical order required to control the machine or process. It is recommended that the programs be "documented" by adding comments (explanatory text inserted at program instruction level). These two languages are reversible, provided that a few basic rules are followed: Ladder programming A program written in Ladder language consists of networks of linked graphical elements (similar to electromagnetic contact diagrams), organized into rungs which are executed sequentially by the controller when it is in RUN mode. Each rung comprises graphical elements (contacts, coils) linked by horizontal and vertical “lines”, organized into a programming grid starting with a potential bar on the left and ending with a second potential bar on the right. The graphical elements are associated with: b Controller inputs and outputs, such as sensors, pushbuttons and relays b Arithmetic, logic and numeric value comparison operations b Control system function blocks, such as timers, counters, drum controllers, registers b Controller internal variables, such as internal bits and words In on-line mode (PC connected to the Twido base controller) phrases (rungs) can be modified, added or deleted. These modifications can be made when the Twido controller is in either “STOP” or “RUN” mode. Instruction List programming A program written in instruction List language consists of a series of instructions executed sequentially by the controller. Each instruction is represented by a single program line and consists of three components: b Line number - line numbers are generated automatically when the instructions are entered. b Instruction code - the instruction code is a symbol linked to an operand identifying the operation to be performed on this operand. These operations are generally of the Boolean and numerical type. b Operand - an operand is a reference, a symbol or a number representing a piece of physical data. For example, in the program opposite, the operand %I0.4 is the reference corresponding to a controller discrete input. Programmable controller variables An instruction can include from zero to three operands, depending on the type of instruction code. The operands may be: b Sensor image inputs (detectors, control buttons, etc.) b Preactuator output images (contactors, solenoid valves, pilot lights, etc.) b Internal bits (equivalent to the internal relays in electromagnetic control equipment) b Control system function blocks (timers, counters, drum controllers, registers). Application configuration data (%KW, timer preset, counter preset, communication port parameters) can be modified in on-line mode (PC connected to the Twido base controller).

66

0

Page 67

Functions (continued)

0

Twido programmable controller

0

TwidoSoft programming software Programming, integrated functions, software set-up

Macros for Modbus network or CANopen bus In order to make programming easier, a system of macros simplifies writing of the program and improves understanding of the code. This system is presented according to different families of equipment: generic equipment, variable speed drives or motor starters. For each family, a list of macros is suggested to facilitate exchanges between the Twido programmable controller and a device connected to a Modbus network or to a CANopen bus. These macros are in the form of configurable families to describe the network characteristics of the device involved (Modbus network or CANopen bus, slave address, ect.). The instances thus configured can be run within the program. For each macro, symbols for objects used can be generated automatically in order to provide further assistance in terms of readability of the application. For each macro inserted in the program, TwidoSoft software automatically generates code in instruction List language, encapsulated in a subroutine. The macro’s code call line is compiled by the TwidoSoft software by calling a subroutine. After calling up a macro, the code generated in instruction List language can be displayed. No modifications to the content of subroutines generated n this way are allowed. This macro system requires a version of TwidoSoft software u V3.0 and a version u V3.0 of the Twido base controller micro-program.

Built-in functions for expandable controller versions u 2.0 PID b 14 PID programming loops b “Autotuning” algorithm (for software version u 2.5) b Analog / PWM output b Linear conversion of measuring input b 2 alarm levels (high and low) on the “measurement” b Command output limits b Direct and inverse action b 2 animated modes forPID: configuration mode, debugging mode Event processing b Event management by the application b 2 priority levels b 3 types of source: v4 event sources based on the basic inputs v4 event sources based on the very fast threshold counter (VFcounter) v1 event source based on the periodic event (Timer) b Command masked and enabled by the system bits b Each event executes a single user logic subroutine b Updating of “reflex” outputs

Software set-up for controller versions u 2.0 The AS-Interface cabling system is configured using TwidoSoft software. The services offered are based on the principle of simplicity: b Management of profile tables, parameters and data by the master (management transparent to the user) b Topological addressing of I/O: any AS-Interface slave defined on the cabling system has a topological address assigned to it on the cabling system, in a way that is transparent to the user b Each AS-Interface module sensor/actuator is seen by Twido in the same way as any I/O Configuration of the AS-Interface cabling system Configuration of all the modules present on the AS-Interface cabling system is carried out by following the on-screen instructions: Definition of the AS-Interface cabling system master module Module TWD NOI 10M3 is defined like any I/O module. Configuration of AS-Interface slave modules From the definition screen, it is possible to configure all the slave modules corresponding to all the I/O of the interfaces present on the AS-Interface cabling system. The user selects the reference of the AS-Interface module shown in the Schneider Electric catalog, among the various discrete, analog or safety modules. This selection automatically determines the AS-Interface profile and parameters associated with each interface module. After configuration, the I/O connected to the AS-Interface cabling system are processed by the application program in the same way as any of the PLCs “In-rack” I/O, either by their address (e.g. %I\4.0\16.2, input 2 of slave 16 on the AS-Interface cabling system), or by their associated symbol (e.g. Start_conveyor).

67

Page 68

Functions (continued)

0

Twido programmable controller TwidoSoft programming software Integrated counter, positioning

Integrated counter function The counter function allows the controller to count a large number of pulses, within one program scan cycle. Using its integrated 16-bit fast counters, Twido can count up to 65 535 pulses generated by c 24 V sensors. (With 32 bit counters, up to 4 294 967 295 pulses, for software version u 2.5). It can compare the current counter value with a preset value and trigger an output when the preset value is reached. This type of counter function can be used for counting parts or events, or for measuring length or position. The number of integrated fast-counters depends on the type of base controller: Base controller type TWD Counter VFC (20 kHz) Counter FC (5 kHz)

Compact LCpA 10/12/24 DRF 1 3

Modular LMDA 20DpK/20DRT/40DpK 2 2

Very fast counter - VFC (20 kHz) The 20 kHz VFC (Very Fast Counter) is an up/down counter with possibility of auxiliary inputs. The counter is accessed by means of a function block (%VFCi) programmed using TwidoSoft. The %VFCi function block can be used to execute one of the following 5 functions, all with a maximum frequency of 20 kHz: b Up/Down counter b Up/Down counter with detection of running direction b Single Up counter b Single Down counter b Frequency meter The pulses to be counted may come from an incremental encoder or from 2 proximity sensors (up/down counting) connected to inputs I0 and I1 of Twido base controllers. Fast counter - FC (5 kHz) The fast counter is available for up or down counting of pulses (rising edges) on the discrete inputs of Twido base controllers, at a maximum frequency of 5 kHz. The Up and Down counters are accessed by means of a function block (%VFCi) programmed using TwidoSoft. Using the configuration editor, the user must select either Up or Down counting mode for each function block, define the initial value of the preset %FCi.P (1...65 535), (1...4 294 967 295 for software version u 2.5) and select the attribute "adjustable" in order to be able to dynamically change the preset value %FCi.P and the current value %FCi.V. Within function block %FCi, the current value %FCi.V varies by: b Incrementing the value 0 to the preset value %FCi.P in counter mode b Decrementing the preset value %FCi.P to 0 in down counter mode.

Positioning Twido modular controllers include two positioning functions (frequency 7 kHz) which can be used, for example, for controlling step motors: b Function PLS (pulse) - pulse generator output b Function PWM - pulse width modulation output. This function can also be used for applications with light or sound intensity control (controller function). PLS function (pulse, 7 kHz) The PLS function block generates pulses of fixed ratio. In some cases, the frequency can be fixed and in others it is variable (as in control of slopes when driving step motors). The %PLS function block can be programmed to generate a specific number of pulses. %PLS function blocks are assigned to outputs %Q0.0.0 or %Q0.0.1 on modular base controllers. The pulse generator signal has a variable period, but with a constant duty cycle which establishes an ON to OFF ratio of 50 % of the period (see illustration opposite). PWM function (7 kHz) The PWM function block generates pulses of fixed frequency, with a variable ratio between the high state and low state of the output signal. The ON to OFF duration ratio is a dynamic variable called %PWM.R, with a range from 0 % to 100 %. PWM function blocks are assigned to outputs %Q0.0.0 or %Q0.0.1 on a base controller. The PWM function can be used to control analog module outputs. The user-defined %PWM function block generates a signal on output %Q0.0.0 or %Q0.0.1 of modular base controllers (see illustration opposite).

68

0

Page 69

Characteristics

0

Twido programmable controller

0

TwidoSoft programming software

Characteristics Instructions Combinational List instructions b LD, LDN, LDR, LDF : read the state of a bit, (direct, inverse, rising and falling edges) b ST, STN, S, R : write an output (direct, inverse, set, reset) b AND, ANDN, ANDR, ANDF : logic AND with a bit (direct, inverse, rising and falling edges) b OR, ORN, ORR, ORF : logic OR with a bit (direct, inverse, rising and falling edges) b LD (, AND (, OR(,) : open and close brackets (8 possible levels) b XOR, XORN, XORR, XORF : exclusive OR with a bit b MPS, MRD, MPP : buffer memory management for divergence towards output bits b N : negation

Grafcet List instructions b -*-i : step (1 ≤ i ≤ 62) b =*=i : initial step (1 ≤ i ≤ 62) b #i : activate step i, after deactivation of current step b # : deactivate current step b #Di : deactivate step i after another step b =*=POST : start post-processing b %Xi : bit associated with step i

Instructions on program b END, ENDC, ENDCN : end of program (conditional or unconditional) b JMP, JMPC, JMPCN : jump to a label % L (conditional or unconditional) b SRn : call subroutine n (0 ≤ n ≤ 15) b RET : end of subroutine b NOP : non-operative instruction

List title and comments b Title : 122 characters before each LD, LDN, LDR, LDF instruction b Comments : 4 lines of 122 characters before each LD, LDN, LDR, LDF instruction b Possibility of associating a comment of 122 characters with each instruction

Ladder rungs b 10 contacts of 7 lines with 1 output per line b Title : 122 characters per rung b Comments : 4 lines of 122 characters

Ladder language graphical symbols b Normally open, normally closed and on edge contacts b Direct, inverse, SET and RESET coils b Program jump, subroutine call

Standard function blocks (1)

b Timers : %TMi (0 ≤ i ≤ 31) 0 to 9999 (word) b Up/Down counters : %Ci (0 ≤ i ≤ 15) 0 to 9999 (word) b 4 16-bit LIFO or FIFO registers : %Ri (0 ≤ i ≤ 3) b 4 Drum controllers : %DRi (0 ≤ i ≤ 3) 8 steps b Real-time clock : %RTCi (0 ≤ i ≤ 15) month, day, hour, minute

Specific function blocks (1)

b Transmission/reception of message of 64 words maximum (internal or constant) : EXCH b Exchange control : %MSG available output, fault output b 8 shift bit registers : %SBRi (0 ≤ i ≤ 7), shift one step to the left or right (max. 16 steps) b 8 step counter blocks : %SCi (0 ≤ i ≤ 7), move forward or back one step (max. 256 steps) b Fast counter (5 kHz ), Up/Down counter : %FC b Very fast counter 20 kHz, Up/Down counter, frequency meter %VFC b Pulse width modulated output : %PWM with modular base controller b Pulse generator output : %PLS with modular base controller

Numerical instructions b Assignment in word, indexed word, word table bit strings : := b Arithmetic : +, -, x, /, REM, SQRT b Logic : AND, OR, XOR, NOT, INC, DEC b Shift operation : SHL, SHR, ROL, ROR (logic and rotate) b Conversion : BTI, ITB (BCD <-> Binary) b Comparison: >, <, <=, >=, =, <>

Specific functions b 1 input for controller RUN/STOP command b 1 Security output : controller "block" error b Real time display of Grafcet steps used b Symbol table management

Arithmetic functions with variables b +, -, *, / b SQRT b ABS b TRUNC b LOG b LN b EXP b EXPT (1) When the numbers of objects are not indicated, see characteristics pages 8 and 14.

69