Vous êtes sur la page 1sur 15
R014 V2.0 How can I work on TesysT Custom Logic ? I- Type of publication

R014

V2.0

R014 V2.0 How can I work on TesysT Custom Logic ? I- Type of publication Typical

How can I work on TesysT Custom Logic ?

I- Type of publication
I- Type of publication
Typical application
Typical application
Best know Method (BKM)
Best know Method (BKM)
Troubleshooting guide
Troubleshooting guide
Level 2 use
Level 2 use
Internal use
Internal use
Customer
Customer
II- Product
II- Product

- Product range :

TesysT
TesysT

- Product family :

LTMR
LTMR
III- Introduction
III- Introduction

This document describes you which is the right way to make a basic program in custom mode. We show you the main step to build a program and download it into TesysT.

ENVIRONMENT OF

CUSTOM LOGIC

MODE

PROGRAMMING IN

STRUCTURED

TEXT

TOOLS TO TEST YOUR CUSTOM FILE

1 2 3 4 5 6
1
2
3
4
5
6

PROGAMMING IN

FUNCTION

BLOCKS

EXAMPLE OF

CUSTOM MODE

BY EXERCISES

DOWNLOAD AN

APPLICATION

INTO TesysT

Page 1/15

R014 V2.0 IV- Description ENVIRONMENT OF CUSTOM LOGIC MODE PROGRAMMING IN STRUCTURED TEXT TOOLS TO

R014

V2.0

R014 V2.0 IV- Description ENVIRONMENT OF CUSTOM LOGIC MODE PROGRAMMING IN STRUCTURED TEXT TOOLS TO TEST
IV- Description
IV- Description

ENVIRONMENT OF

CUSTOM LOGIC

MODE

PROGRAMMING IN

STRUCTURED

TEXT

TOOLS TO TEST YOUR CUSTOM FILE

1 2 3 4 5 6
1
2
3
4
5
6

PROGAMMING IN

FUNCTION

BLOCKS

EXAMPLE OF

CUSTOM MODE

BY EXERCISES

DOWNLOAD AN

APPLICATION

INTO TesysT

First of all, you should configure TesysT in Custom Mode with the Menu “Settings/Motor and

Control”. In this menu, you select Custom Mode and choose your “Custom ID”. The Custom ID is your program number. This number should be absolutely between 256 and 511. After, you access to Custom Logic Editor by the menu “Custom Logic” to create your program. You have two sub-parts:

- Structured Text

- Function Blocks

STEP 1 STEP 2 STEP 3
STEP 1
STEP 2
STEP 3

You can program in list format a complete application with Structured Text. In the directory of PowerSuite you already have Structured Text files (see below Part 3 of the Technical Resolution) for pre- defined operating mode like 2 wires Reverser, 3 wires Overload, 2 Wires 2 steps……… The function blocks is used to program one part of an application or a basic program to make a logic function between inputs and outputs. You cannot make or have a pre-defined Operating mode in function blocks.

Page 2/15

R014 V2.0 ENVIRONMENT OF CUSTOM LOGIC MODE PROGRAMMING IN STRUCTURED TEXT TOOLS TO TEST YOUR

R014

V2.0

R014 V2.0 ENVIRONMENT OF CUSTOM LOGIC MODE PROGRAMMING IN STRUCTURED TEXT TOOLS TO TEST YOUR CUSTOM

ENVIRONMENT OF

CUSTOM LOGIC

MODE

PROGRAMMING IN

STRUCTURED

TEXT

TOOLS TO TEST YOUR CUSTOM FILE

1 2 3 4 5 6
1
2
3
4
5
6

PROGAMMING IN

FUNCTION

BLOCKS

EXAMPLE OF

CUSTOM MODE

BY EXERCISES

DOWNLOAD AN

APPLICATION

INTO TesysT

BY EXERCISES DOWNLOAD AN APPLICATION INTO TesysT ToolBox You can make a program with logic blocks

ToolBox

You can make a program with logic blocks :

LIBRARY FOR

LOGIC BLOCK

Pre-defined function Write a value into a memory area (bit or word format) Read a
Pre-defined function
Write a value into a memory
area (bit or word format)
Read a value from a memory
area (bit or word format)
Mathematic operation
Logic operation

- Logic blocks

INVERSION OF AND BLOCK OR BLOCK STATUS BIT
INVERSION OF
AND BLOCK
OR BLOCK
STATUS BIT

Page 3/15

- Function blocks R014 V2.0 COUNTER BLOCK : You increase or decrease a value. This

- Function blocks

R014

V2.0

- Function blocks R014 V2.0 COUNTER BLOCK : You increase or decrease a value. This last
COUNTER BLOCK : You increase or decrease a value. This last data is compared to
COUNTER BLOCK : You increase or decrease a
value. This last data is compared to “Constant
value” entered.
TIMER BLOCK : Time base 100 ms/1s. The
output “Timed” is seted up after the delay entered
(Input “Time”)
CONSTANT VALUE
SET/RESET BLOCK
MULTIPLEXER BLOCK : the status of the input
A/B (“0” or “1”) defines if Out = B or Out = A. Out,
A and B are word format.

Note : all blocks with “NV” (Non Volatile) marking have their status stored even if you power down. Blocks without “NV” marking are initialized on each TesysT power up (excepted LTMR blocks which also stores their status).

- Computation blocks

COMPARE BLOCK

SUBSTRACTION BLOCK

MULTIPLICATION BLOCK

- Computation blocks COMPARE BLOCK SUBSTRACTION BLOCK MULTIPLICATION BLOCK ADDITION BLOCK DIVISION BLOCK Page 4/15
- Computation blocks COMPARE BLOCK SUBSTRACTION BLOCK MULTIPLICATION BLOCK ADDITION BLOCK DIVISION BLOCK Page 4/15
- Computation blocks COMPARE BLOCK SUBSTRACTION BLOCK MULTIPLICATION BLOCK ADDITION BLOCK DIVISION BLOCK Page 4/15

ADDITION BLOCK

DIVISION BLOCK

- Computation blocks COMPARE BLOCK SUBSTRACTION BLOCK MULTIPLICATION BLOCK ADDITION BLOCK DIVISION BLOCK Page 4/15
- Computation blocks COMPARE BLOCK SUBSTRACTION BLOCK MULTIPLICATION BLOCK ADDITION BLOCK DIVISION BLOCK Page 4/15

Page 4/15

R014 V2.0 - Input blocks READING BLOCK TEMPORARY REGISTER : You have word or bit

R014

V2.0

R014 V2.0 - Input blocks READING BLOCK TEMPORARY REGISTER : You have word or bit format.

- Input blocks

READING BLOCK TEMPORARY REGISTER :

You have word or bit format. You can set up a Temporary Register Value between 0 and 69.

You can set up a Temporary Register Value between 0 and 69. READING BLOCK NON VOLATILE

READING BLOCK NON VOLATILE REGISTER :

You have word or bit format. You can set up a Non volatile Register Value between 0 and 31.

can set up a Non volatile Register Value between 0 and 31. READING BLOCK LTMR REGISTER
can set up a Non volatile Register Value between 0 and 31. READING BLOCK LTMR REGISTER
can set up a Non volatile Register Value between 0 and 31. READING BLOCK LTMR REGISTER

READING BLOCK LTMR REGISTER :

You have word or bit format. The LTMR Register Value matches to the TesysT mapping.

READING CONSTANT VALUE :

You have bit or word format.

- Output blocks

WRITING BLOCK TEMPORARY REGISTER :

You have word or bit format. You can set up a Temporary Register Value between 0 and 69.

You can set up a Temporary Register Value between 0 and 69. READING BLOCK LTMR REGISTER

READING BLOCK LTMR REGISTER :

You have word or bit format. The LTMR Register Value matches to the TesysT mapping.

The LTMR Register Value matches to the TesysT mapping. READING BLOCK NON VOLATILE REGISTER : You
The LTMR Register Value matches to the TesysT mapping. READING BLOCK NON VOLATILE REGISTER : You
The LTMR Register Value matches to the TesysT mapping. READING BLOCK NON VOLATILE REGISTER : You

READING BLOCK NON VOLATILE REGISTER :

You have word or bit format. You can set up a Non volatile Register Value between 0 and 31.

Page 5/15

- Characteristics of blocks R014 V2.0 YOU CAN ADD COMMENTS FOR EACH BLOCK (SEE BELOW)

- Characteristics of blocks

R014

V2.0

- Characteristics of blocks R014 V2.0 YOU CAN ADD COMMENTS FOR EACH BLOCK (SEE BELOW) Compilation
YOU CAN ADD COMMENTS FOR EACH BLOCK (SEE BELOW) Compilation
YOU CAN ADD
COMMENTS FOR EACH
BLOCK (SEE BELOW)
Compilation

Before the downloading of the program you should convert the function block into Structured Text. The program can be only transfered in Structured Text into TesysT.

the function block into Structured Text. The program can be only transfered in Structured Text into

Page 6/15

R014 V2.0 Grid SELECT « FALSE » YOU CAN EXTEND THE GRID TO HAVE MORE

R014

V2.0

R014 V2.0 Grid SELECT « FALSE » YOU CAN EXTEND THE GRID TO HAVE MORE AREA
Grid SELECT « FALSE »
Grid
SELECT
« FALSE »

YOU CAN EXTEND THE GRID TO HAVE MORE AREA :

1) GO ON “VIEW” MENU AND SELECT “FALSE” FOR THE OPTION “RESTRICT TO CANVAS”.

2) SELECT “ZOOM OUT”

Page 7/15

R014 V2.0 ENVIRONMENT OF PROGRAMMING IN CUSTOM LOGIC STRUCTURED MODE TEXT TOOLS TO TEST YOUR

R014

V2.0

R014 V2.0 ENVIRONMENT OF PROGRAMMING IN CUSTOM LOGIC STRUCTURED MODE TEXT TOOLS TO TEST YOUR CUSTOM
ENVIRONMENT OF PROGRAMMING IN CUSTOM LOGIC STRUCTURED MODE TEXT TOOLS TO TEST YOUR CUSTOM FILE
ENVIRONMENT OF
PROGRAMMING IN
CUSTOM LOGIC
STRUCTURED
MODE
TEXT
TOOLS TO TEST
YOUR CUSTOM
FILE
1
2
3
4
5
6
PROGAMMING IN
EXAMPLE OF
DOWNLOAD AN
FUNCTION
CUSTOM MODE
APPLICATION
BLOCKS
BY EXERCISES
INTO TesysT

Pre-defined programCUSTOM MODE APPLICATION BLOCKS BY EXERCISES INTO TesysT On Schneider-electric.com, you have all files in relation

On Schneider-electric.com, you have all files in relation to the pre defined mode available on TesysT (see link below). You can read and modify a : 3 wire 2 speed mode, 3 Wire Independent mode…

-For firmware 1.7-1.8:

http://www.global-download.schneider-

electric.com/852574FA005AF23D/all/C125713F005265E2C12574500032F444/$File/operating%20modes.zip

-For firmware 2.1:

on Directory PowerSuite V2.5_LTMConf V4.12.0.14 : C:\ProgramFiles\Schneider electric\PowerSuite\ps1\TesysT\Configurations

electric\PowerSuite\ps1\TesysT\Configurations Format of Structured Program REGISTER 2 bit 1 WRITE PROGRAM

Format of Structured Programelectric\PowerSuite\ps1\TesysT\Configurations REGISTER 2 bit 1 WRITE PROGRAM NUMBER CORRESPONDING TO THE

REGISTER 2 bit 1
REGISTER 2 bit 1

WRITE PROGRAM NUMBER CORRESPONDING TO THE NUMBER ENTERED INTO CUSTOM_ID (SEE SETTINGS/MOTOR&CONTROL MENU)

YOU CAN ADD COMMENT INTO YOUR PROGRAM USING : « // »

INSTRUCTION

Page 8/15

In Structured Text we have a list of instruction to make the program : Register

In Structured Text we have a list of instruction to make the program :

Register (Comp, And, Or, Xor, On_Set)

Boolean (Load, Or, Set)

Timers

Latch

Counters

Math (ON_ADD, ON_SUB, ON_MUL, ON_DIV)

R014

V2.0

Counters Math (ON_ADD, ON_SUB, ON_MUL, ON_DIV) R014 V2.0 You can find more details about each instruction

You can find more details about each instruction on the user manual “Custom Logic” (This manual is attached in the Technical Resolution link).

ENVIRONMENT OF PROGRAMMING IN CUSTOM LOGIC STRUCTURED MODE TEXT TOOLS TO TEST YOUR CUSTOM FILE
ENVIRONMENT OF
PROGRAMMING IN
CUSTOM LOGIC
STRUCTURED
MODE
TEXT
TOOLS TO TEST
YOUR CUSTOM
FILE
1
2
3
4
5
6
PROGAMMING IN
EXAMPLE OF
DOWNLOAD AN
FUNCTION
CUSTOM MODE
APPLICATION
BLOCKS
BY EXERCISES
INTO TesysT

For all exercises in custom mode, there are some important registers to know :

- Register 457 bit 0 (Read register) : Input 1 status (LI1) to bit 9 for Input 10 status

(LI10)

- Register 458 bit 0 (Read Register) : Output 1 status (LO1) to bit 3 for Input 4 status

(LO4)

- Register 1200 bit 12 (Write/Read Register) : Output 1 Control (LO1) to bit 15 for

Output 4 control (LO4)

- Registers 1301 to 1399 : memory available by PLC and custom mode. You can write registers through PLC to send values into the program customized.

At the moment you have finished Exercises A or B you can go directly on the Part 5 and 6 to simulate and test it.

can go directly on the Part 5 and 6 to simulate and test it. Exercise A

Exercise A :

A customer uses the TesysT T in a Reverser application. He controls the outputs in local mode by logic inputs (LI1 to LI6). But, he wants to control the LO2 (Run Reverse) with the input 3 (LI3) and acknowledge the faults by the input 2 (LI2). In this case TesysT will use switch button.

These features match to a 2 Wire Reverser mode. By default, for this last mode this is the input characteristics:

- LI1 : Run forward

- LI2 : Run Reverse

- LI3 : free

- LI4 : free

- LI5 : Acknowledge fault

- LI6 : Local/Remote mode

Note : LI3 is a free input for all pre defined operating mode (2 wire/3 wire reverser, ind., 2 speed, 2 step, Overload).

Page 9/15

You should open the pre defined file and make the modification : R014 V2.0 CHANGE

You should open the pre defined file and make the modification :

R014

V2.0

the pre defined file and make the modification : R014 V2.0 CHANGE THE CUSTOM_ID WITH A
CHANGE THE CUSTOM_ID WITH A VALUE BETWEEN 256 AND 511
CHANGE THE
CUSTOM_ID WITH
A VALUE BETWEEN
256 AND 511

You should change the function of LI2 and LI5. We look for Register 457 bit 1 and bit 4 (press “CTRL” + “F” to search “457 1” and “457 4” :

YOU REPLACE “457 1” BY “457 2” TO MAKE “Run Reverse” WITH LI3. YOU REPLACE
YOU REPLACE “457 1” BY “457 2”
TO MAKE “Run Reverse” WITH LI3.
YOU REPLACE ALL OTHER 457 1
FOUND BY 457 2
457 2

Now, you can make “Run Reverse” by the input 3 (LI3). Also, in the exercise you should acknowledge a fault by the input 2 and not the input 5 (configuration by default). So you look for the input 5 (register 457 4) :

YOU REPLACE “457 4” BY “457 1” TO ACKNOWLEDGE A FAULT BY LI2. 457 1
YOU REPLACE “457 4” BY “457 1”
TO ACKNOWLEDGE A FAULT BY
LI2.
457 1

Page 10/15

R014 V2.0 The “exercise A" is finished. We re-designed the organization of the inputs :

R014

V2.0

R014 V2.0 The “exercise A" is finished. We re-designed the organization of the inputs : -

The “exercise A" is finished. We re-designed the organization of the inputs :

- LI1 : Run forward

- LI2 : Acknowledge a fault

- LI3 : Run reverse

- LI4 : free

- LI5 : free

- LI6 : Local/Remote mode

Exercise B : SH RESET START STOP SL MODBUS NETWORK DEF
Exercise B :
SH
RESET
START
STOP
SL
MODBUS NETWORK
DEF

Drawing of the application for Example B

For this application, the customer’s requirements are :

- Control in local mode by push buttons (“START”, “STOP”) to fill the tun

- Sensors indicate High Level (“SH”) and Low Level (“SL”) for the tun

- The Sensor High Level stops the motor when the tun is completely filled

- The light “DEFAULT” switches on when the tun level is below the sensor “SL”

- The light “Default” can be switched off by the push button (“RESET”)

- You start the motor if you push the button “START” and if the PLC has sent the information “INSTALLATION READY” by a bit on the network

- You can stop the motor with the push button “STOP” or if the PLC has sent the information “INSTALLATION IN FAULT” by a bit on the network.

Page 11/15

R014 V2.0 This application matches to a “3-Wire Independent mode”. By default, the features for

R014

V2.0

R014 V2.0 This application matches to a “3-Wire Independent mode”. By default, the features for a

This application matches to a “3-Wire Independent mode”. By default, the features for a 3 wire Independent mode are :

- LI1 : Run

- LI2 : Switch On Output 2

- LI3 : free

- LI4 : Stop Run

- LI5 : Reset fault

- LI6 : Local/Remote mode

Now we create the behavior that the customer wants in Function block (Program for a TesysT Firmware 1.8):

INFORMATION SENT BY THE PLC : INSTALLATION READY
INFORMATION SENT BY
THE PLC : INSTALLATION
READY

INFORMATION SENT BY THE PLC : INSTALLATION IN FAULT

THE INPUT 1 IS SWITCHED ON :

START BUTTON PRESSED

IN FAULT THE INPUT 1 IS SWITCHED ON : START BUTTON PRESSED CONDITION APPLICATION READY IF

CONDITION APPLICATION READY

ON : START BUTTON PRESSED CONDITION APPLICATION READY IF INPUT 2 IS NOT ACTIVATED (Level in

IF INPUT 2 IS NOT ACTIVATED (Level in the tun below the Sensor Level Low) THUS ACTIVATE OUTPUT 2

the tun below the Sensor Level Low) THUS ACTIVATE OUTPUT 2 OUTPUT 2 = RED LIGHT

OUTPUT 2 = RED LIGHT FOR DANGEROUS LOW LEVEL IN THE TUN

tun below the Sensor Level Low) THUS ACTIVATE OUTPUT 2 OUTPUT 2 = RED LIGHT FOR
tun below the Sensor Level Low) THUS ACTIVATE OUTPUT 2 OUTPUT 2 = RED LIGHT FOR

Page 12/15

R014 V2.0 YOU CAN STOP THE MOTOR EITHER BY : PRESSING STOP BUTTON OR BY

R014

V2.0

R014 V2.0 YOU CAN STOP THE MOTOR EITHER BY : PRESSING STOP BUTTON OR BY :

YOU CAN STOP THE MOTOR EITHER BY : PRESSING STOP BUTTON OR BY : READING INFORMATION INSTALLATION IN FAULT OR BY : REACHING HIGH LEVEL IN THE TUN

PRESS STOP BUTTON (N.C. contact) <=> STATUS = 0

INFORMATION INSTALLATION IN FAULT HIGH LEVEL REACHED INTO THE TUN
INFORMATION INSTALLATION IN FAULT
HIGH LEVEL REACHED INTO THE TUN
INSTALLATION IN FAULT HIGH LEVEL REACHED INTO THE TUN The function block is finished, you can

The function block is finished, you can convert the program above and you copy/paste (expect the first line with “LOGIC_ID”) at the end of the program “3 wire independent mode” already available into PowerSuite.

You should change the LOGIC_ID “5” to a right value (256 to 511). Also, in the program “3 wire independent mode” the output 2 is already used so you should put in comment the line involved (see Temporary bits 15.13) to avoid perturbation with the exercise made before. You remove the condition 457 0 by the Temporary bit 30.0 and the condition 457 3 by the temporary bit 30 1.

So we open a “3 wires Independent mode“ and modify regarding customer’s requirements :

- LI1 : Start

- LI2 : SL

- LI3 : SH

- LI4 : Stop

- LI5 : Reset fault and Stop light

- LI6 : Local/Remote mode

- Output 2 : Light Low level in the tun

Note : You can find all the results of these exercises (Function block and Structured Text files) on the Technical Resolution link.

Page 13/15

R014 V2.0 ENVIRONMENT OF PROGRAMMING IN CUSTOM LOGIC STRUCTURED MODE TEXT TOOLS TO TEST YOUR

R014

V2.0

R014 V2.0 ENVIRONMENT OF PROGRAMMING IN CUSTOM LOGIC STRUCTURED MODE TEXT TOOLS TO TEST YOUR CUSTOM
ENVIRONMENT OF PROGRAMMING IN CUSTOM LOGIC STRUCTURED MODE TEXT TOOLS TO TEST YOUR CUSTOM FILE
ENVIRONMENT OF
PROGRAMMING IN
CUSTOM LOGIC
STRUCTURED
MODE
TEXT
TOOLS TO TEST
YOUR CUSTOM
FILE
1
2
3
4
5
6
PROGAMMING IN
EXAMPLE OF
DOWNLOAD AN
FUNCTION
CUSTOM MODE
APPLICATION
BLOCKS
BY EXERCISES
INTO TesysT
Simulator

You can test all our programs with a tool “Logic Simulator”. This tool is only available to check a Structured Text program or Function Block converted into Structured Text. Before testing, we you must compile your program (for more details regarding compilation see Part 6).

REGISTER BIT TO CONTROL OUTPUTS : LO1, LO2, LO3, LO4 OUPUTS STATUS REGISTER BIT :
REGISTER BIT
TO CONTROL
OUTPUTS : LO1,
LO2, LO3, LO4
OUPUTS STATUS
REGISTER BIT : LO1,
LO2, LO3, LO4
INPUTS
STATUS
REGISTER
THESE BOXS CAN
SIMULATE THE TesysT
LOGIC INPUTS
YOU WRITE A LTMR
REGISTER VALUE
LIKE A PLC
YOU OPEN THE FILE
THAT YOU WANT TO
SIMULATE
(FileName.lf)

Page 14/15

R014 V2.0 ENVIRONMENT OF PROGRAMMING IN CUSTOM LOGIC STRUCTURED MODE TEXT TOOLS TO TEST YOUR

R014

V2.0

R014 V2.0 ENVIRONMENT OF PROGRAMMING IN CUSTOM LOGIC STRUCTURED MODE TEXT TOOLS TO TEST YOUR CUSTOM
ENVIRONMENT OF PROGRAMMING IN CUSTOM LOGIC STRUCTURED MODE TEXT TOOLS TO TEST YOUR CUSTOM FILE
ENVIRONMENT OF
PROGRAMMING IN
CUSTOM LOGIC
STRUCTURED
MODE
TEXT
TOOLS TO TEST
YOUR CUSTOM
FILE
1
2
3
4
5
6
PROGAMMING IN
EXAMPLE OF
CUSTOM MODE
BY AN EXERCISE
DOWNLOAD AN
FUNCTION
APPLICATION
BLOCKS
INTO TesysT

You should execute two steps to download a Custom application into the TesysT :

Step 1 : Compilationtwo steps to download a Custom application into the TesysT : COMPILE YOUR PROGRAM BOTTOM OF

a Custom application into the TesysT : Step 1 : Compilation COMPILE YOUR PROGRAM BOTTOM OF

COMPILE YOUR

PROGRAM

the TesysT : Step 1 : Compilation COMPILE YOUR PROGRAM BOTTOM OF THE SCREEN Step 2
the TesysT : Step 1 : Compilation COMPILE YOUR PROGRAM BOTTOM OF THE SCREEN Step 2
the TesysT : Step 1 : Compilation COMPILE YOUR PROGRAM BOTTOM OF THE SCREEN Step 2

BOTTOM OF

THE SCREEN

Step 2 : Download the settings & Custom File: Compilation COMPILE YOUR PROGRAM BOTTOM OF THE SCREEN 3. DOWNLOAD SETTINGS 1. CONNECT 2. DOWNLOAD

3. DOWNLOAD SETTINGS 1. CONNECT
3. DOWNLOAD SETTINGS
1. CONNECT
settings & Custom File 3. DOWNLOAD SETTINGS 1. CONNECT 2. DOWNLOAD CUSTOM FILE Note : after

2. DOWNLOAD

CUSTOM FILE

3. DOWNLOAD SETTINGS 1. CONNECT 2. DOWNLOAD CUSTOM FILE Note : after the first downloading, for

Note : after the first downloading, for each custom modification, you download only the custom file. You will transfer again the “settings” if you change the “CUSTOM_ID” or a setting

Page 15/15