Atv32 Atv Logic Manual en s1b90747 01
Atv32 Atv Logic Manual en s1b90747 01
Atv32 Atv Logic Manual en s1b90747 01
S1B90747 10/2012
Altivar 32
Variable speed drives
for synchronous and asynchronous motors
www.schneider-electric.com
The information provided in this documentation contains general descriptions and/or technical character-
istics of the performance of the products contained herein. This documentation is not intended as a
substitute for and is not to be used for determining suitability or reliability of these products for specific
user applications. It is the duty of any such user or integrator to perform the appropriate and complete
risk analysis, evaluation and testing of the products with respect to the relevant specific application or use
thereof. Neither Schneider Electric nor any of its affiliates or subsidiaries shall be responsible or liable for
misuse of the information that is contained herein. If you have any suggestions for improvements or
amendments or have found errors in this publication, please notify us.
No part of this document may be reproduced in any form or by any means, electronic or mechanical,
including photocopying, without express written permission of Schneider Electric.
All pertinent state, regional, and local safety regulations must be observed when installing and using this
product. For reasons of safety and to help ensure compliance with documented system data, only the
manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant instructions must
be followed.
Failure to use Schneider Electric software or approved software with our hardware products may result
in injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.
© 2012 Schneider Electric. All rights reserved.
2 S1B90747 10/2012
Table of Contents
Safety Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 1 Introduction to the Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Global Overview of Function Blocks and ATV Logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Creating an FBD Application Using Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Function Block Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Display Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Chapter 2 Menu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Tree View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Common Edition Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Execution Order Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Check the Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Manipulating FBD Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Configure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Function BlocksBlock Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Chapter 3 Function Blocks Language Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.1 Special Input Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
NUM (analog) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
NUM (register). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
TRUE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
FALSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.2 Logic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
NOT Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
The AND Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
The OR Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
The NAND Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
The NOR Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
The XOR (eXclusive OR) Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
The A/C TIMER (Timer) Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
The ADD/SUB Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The BOOLEAN Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The CAN Function (Word to Bit Conversion) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
The CNA Function (Bit to Word Conversion) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
The COMPARE (Comparison of two values) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
The EDGE Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
The GAIN Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
The MUL/DIV Arithmetic Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
The MUX Function (Multiplexing) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
The BIT READ Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
The READ Ana Param Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
The READ Reg Param Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
The RS Memory Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
The SHIFT/ROLL Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
The TRIGGER function (Schmitt Trigger) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
The COUNT Up/Down Counter Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
The BIT WRITE Function (WriteBitParam) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
The WRITE Ana Param function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
The WRITE Reg Param function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
The STU Function (16-bit analog TO 16-bit register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
The UTS Function (16-Bit Register Input to 16-Bit Analog Output). . . . . . . . . . . . . . . . . . . . . . 50
S1B90747 10/2012 3
Chapter 4 Description of ATV32 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Function Block Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Function Block Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Function Block Fault . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Function Block Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Chapter 5 Communication Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
ADL Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
FB SYSTEM WORDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Chapter 6 Application Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Windowpane Application Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4 S1B90747 10/2012
Safety Information
§
Important Information
NOTICE
Read these instructions carefully, and look at the equipment to become familiar with the device before
trying to install, operate, or maintain it. The following special messages may appear throughout this
documentation or on the equipment to warn of potential hazards or to call attention to information that
clarifies or simplifies a procedure.
PLEASE NOTE
Electrical equipment should be installed, operated, serviced, and maintained only by qualified personnel.
No responsibility is assumed by Schneider Electric for any consequences arising out of the use of this
material.
A qualified person is one who has skills and knowledge related to the construction and operation of
electrical equipment and its installation, and has received safety training to recognize and avoid the
hazards involved.
S1B90747 10/2012 5
WARNING
UNGUARDED MACHINERY CAN CAUSE SERIOUS INJURY
z Do not use this software and related automation equipment on equipment which does not have point-
of-operation protection.
z Do not reach into machinery during operation.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
This automation equipment and related software is used to control a variety of industrial processes. The
type or model of automation equipment suitable for each application will vary depending on factors such
as the control function required, degree of protection required, production methods, unusual conditions,
government regulations, etc. In some applications, more than one processor may be required, as when
backup redundancy is needed.
Only the user can be aware of all the conditions and factors present during setup, operation, and
maintenance of the machine; therefore, only the user can determine the automation equipment and the
related safeties and interlocks which can be properly used. When selecting automation and control
equipment and related software for a particular application, the user should refer to the applicable local
and national standards and regulations. The National Safety Council’s Accident Prevention Manual
(nationally recognized in the United States of America) also provides much useful information.
In some applications, such as packaging machinery, additional operator protection such as point-of-
operation guarding must be provided. This is necessary if the operator’s hands and other parts of the
body are free to enter the pinch points or other hazardous areas and serious injury can occur. Software
products alone cannot protect an operator from injury. For this reason the software cannot be substituted
for or take the place of point-of-operation protection.
Ensure that appropriate safeties and mechanical/electrical interlocks related to point-of-operation
protection have been installed and are operational before placing the equipment into service. All
interlocks and safeties related to point-of-operation protection must be coordinated with the related
automation equipment and software programming.
NOTE: Coordination of safeties and mechanical/electrical interlocks for point-of-operation protection is
outside the scope of the Function Block Library, System User Guide, or other implementation referenced
in this documentation.
CAUTION
EQUIPMENT OPERATION HAZARD
z Verify that all installation and set up procedures have been completed.
z Before operational tests are performed, remove all blocks or other temporary holding means used
for shipment from all component devices.
z Remove tools, meters, and debris from equipment.
Failure to follow these instructions can result in injury or equipment damage.
Follow all start-up tests recommended in the equipment documentation. Store all equipment
documentation for future references.
Software testing must be done in both simulated and real environments.
Verify that the completed system is free from all short circuits and grounds, except those grounds
installed according to local regulations (according to the National Electrical Code in the U.S.A, for
instance). If high-potential voltage testing is necessary, follow recommendations in equipment
documentation to prevent accidental equipment damage.
Before energizing equipment:
z Remove tools, meters, and debris from equipment.
z Close the equipment enclosure door.
z Remove ground from incoming power lines.
z Perform all start-up tests recommended by the manufacturer.
6 S1B90747 10/2012
OPERATION AND ADJUSTMENTS
The following precautions are from the NEMA Standards Publication ICS 7.1-1995 (English version
prevails):
z Regardless of the care exercised in the design and manufacture of equipment or in the selection and
ratings of components, there are hazards that can be encountered if such equipment is improperly
operated.
z It is sometimes possible to misadjust the equipment and thus produce unsatisfactory or unsafe
operation. Always use the manufacturer’s instructions as a guide for functional adjustments. Personnel
who have access to these adjustments should be familiar with the equipment manufacturer’s
instructions and the machinery used with the electrical equipment.
z Only those operational adjustments actually required by the operator should be accessible to the
operator. Access to other controls should be restricted to prevent unauthorized changes in operating
characteristics.
S1B90747 10/2012 7
8 S1B90747 10/2012
About the Book
At a Glance
Document Scope
The purpose of this document is to describe how to use the ATV Logic functions for Altivar32.
The ATV logic functions are only accessible inside the Altivar 32 DTM.
FDT/DTM (Field Device Tool / Device Type Manager) is a new technology chosen by several companies
in automation.
To install the Altivar 32 DTM, you can download and install our FDT: SoMove Lite on www.schneider-
electric.com. It is including the Altivar 32 DTM
The content of this manual is also accessible through the ATV32 DTM online help..
Validity Note
The technical characteristics of the devices described in this manual also appear online. To access this
information online:
Step Action
1 Go to the Schneider Electric home page www.schneider-electric.com.
2 In the Search box type the reference of a product or the name of a product range.
z Do not include blank spaces in the model number/product range.
z To get information on a grouping similar modules, use asterisks (*).
3 If you entered a reference, go to the Product datasheets search results and click on the reference that
interests you.
If you entered the name of a product range, go to the Product Ranges search results and click on the product
range that interests you.
4 If more than one reference appears in the Products search results, click on the reference that interests you.
5 Depending on the size of your screen, you maybe need to scroll down to see the data sheet.
6 To save or print a data sheet as a .pdf file, click Download XXX product datasheet.
The characteristics that are presented in this manual should be the same as those characteristics that
appear online. In line with our policy of constant improvement, we may revise content over time to
improve clarity and accuracy. If you see a difference between the manual and online information, use the
online information as your reference.
Related Documents
S1B90747 10/2012 9
Title of Documentation Reference Number
ATV32 EtherCAT manual S1A28703
ATV32 communication parameters manual S1A44568
ATV32 certificates, see www.schneider-electric.com NA
You can download these technical publications and other technical information from our website at
www.schneider-electric.com.
DANGER
UNINTENDED EQUIPMENT OPERATION
z The use of function blocks must be performed by qualified person.
z Perform the appropriate and complete risk analysis, evaluation and testing of your function blocks
programming.
Failure to follow these instructions will result in death or serious injury.
Only appropriately trained persons who are familiar with and understand the contents of this manual and
all other pertinent product documentation are authorized to work on and with this product. In addition,
these persons must have received safety training to recognize and avoid hazards involved. These
persons must have sufficient technical training, knowledge and experience and be able to foresee and
detect potential hazards that may be caused by using the product, by changing the settings and by the
mechanical, electrical and electronic equipment of the entire system in which the product is used.
All persons working on and with the product must be fully familiar with all applicable standards, directives,
and accident prevention regulations when performing such work.
Intended use
The functions described in this manual are only intended for use with the basic product; you must read
and understand the appropriate product manual.The product may only be used in compliance with all
applicable safety regulations and directives, the specified requirements and the technical data.Prior to
using the product, you must perform a risk assessment in view of the planned application. Based on the
results, the appropriate safety measures must be implemented.Since the product is used as a component
in an entire system, you must ensure the safety of persons by means of the design of this entire system
(for example, machine design).
Operate the product only with the specified cables and accessories. Use only genuine accessories and
spare parts.Any use other than the use explicitly permitted is prohibited and can result in
hazards.Electrical equipment should be installed, operated, serviced, and maintained only by qualified
personnel.The product must NEVER be operated in explosive atmospheres (hazardous locations, Ex
areas).
User Comments
We welcome your comments about this document. You can reach us by e-mail at
[email protected].
10 S1B90747 10/2012
Altivar 32
S1B90747 10/2012
1
What Is in This Chapter?
This chapter contains the following topics:
Topic Page
Global Overview of Function Blocks and ATV Logic 12
Creating an FBD Application Using Function Blocks 15
Function Block Configuration 16
Display Options 18
S1B90747 10/2012 11
Global Overview of Function Blocks and ATV Logic
Description
Programmable logic functions allow you to write your own application for the Altivar 32 variable speed
drive.
Programmable logic functions interact with:
z The drive core control
z The I/O, the communication functions
z The HMI via M0xx (local or external graphic keypad)
It is based on an FBD instruction set: Boolean and transfer operations, arithmetic operations, timers,
counters, etc. ATV Logic is seen by the drive as a terminal.
The program in the edit window corresponds to:
z The compiled program
z The program transferred into the ATV32
To create an FBD program, insert various function blocks in the diagram, and link them together.
All types of function block can be placed on the sheet, except for inputs and outputs.
The ATV Logic tab of SoMove DTM consists of a workspace with 3 layers that can be selected via tabs
(PRE, POST, AUX)
z The diagram, where the functions that make up the program are inserted
z The Input pins on the left of the diagram where the inputs are positioned
z The Output pins on the right of the diagram where the outputs are positioned
Each area contains the FBD edit panel itself and configurable ports, symbolically represented on both
sides of the edit panel by terminal pins.
Legend:
12 S1B90747 10/2012
Interaction of the Function Block Tasks with the Drive Tasks
ATV Logic provides graphic programming based on predefined function blocks.
In Function Blocks/ATV Logic, there are three types of task: PRE, POST and AUX.
The rule for using the task is:
z In PRE/POST tasks: Connection to Fast access parameters only
z In the AUX task: Connection to Slow and Fast access parameters
FRD RFR
A01
b Speed reference
calculation
b Application functions
b Motor control
b Communication
b ...
RDY
(3)
(1)
(4)
(2)
(1) Drive Background TASK < 1 ms (2) Drive Background TASK >1 ms
(3) 2 ms (4) t > period duration AUX = FBE fault error TOAU
S1B90747 10/2012 13
The FB PRE and POST tasks are executed in the Drive Application Task which is itself executed every
2 ms. The Drive Application Task duration is less than 2 ms. This leaves between 500 µs and 1 ms to
carry out the Drive Application Task. However, the Drive Background Task may be interrupted each
time the Drive Application Task has to execute.
The Drive Background Task may be loaded and therefore executed several times between two Drive
Application Tasks. (See Drive Background TASK < 1 ms)
On the other hand, if the Drive Background Task is under a heavy load, it will be frequently interrupted
by the Drive Application Task. (See Drive Background Task > 1 ms)
Since the AUX task execution time can be interrupted by the Drive Application Task, it is not possible
to determine whether its duration is fixed or less than a predefined level.
However the Period duration parameter helps to ensure that the AUX task is refreshed sufficiently often
for the application.
NOTE: If Run and Stop commands are managed in the AUX task, their activation can be delayed due to
Pre and Post task priorities.
Groups of parameters
Tabs PRE and POST are priority to the tabs AUX. 4 groups of parameters are defining:
z FastReadFunctionBLocks
ETA, RFR, FRH, LCR, OTR, ETI, ULN, UOP, THD, OPR
THR1, THR2, THR3
LRS1, LRS2, LRS3, LRS4, LRS5, LRS6, LRS7, LRS8
IL1I, IL1R, OL1R, AI1C, AI2C, AI3C, AO1R, AO1C
RFRD, FRHD, SPD
M001, M002, M003, M004, M005, M006, M007, M008
S001, SLSS, STOS, SS1S
z FastWriteFunctionBLocks
M001, M002, M003, M004, M005, M006, M007, M008, S006
z SlowReadFunctionBLocks
HSP, LSP, BSP, ETA, RFR, FRH, LCR, OTR, ETI, ULN, UOP, THD, OPR
THR1, THR2, THR3, APH , RTH , PTH , UNT
LRS1, LRS2, LRS3, LRS4, LRS5, LRS6, LRS7, LRS8
IL1I, IL1R, OL1R, AI1C, AI2C, AI3C, AO1R, AO1C
RFRD, FRHD, ACC, DEC, AC2, DE2, INR, FRO
JPF, JF2, JF3, JFH
SP2, SP3, SP4, SP5, SP6, SP7, SP8
SP9, SP10, SP11, SP12, SP13, SP14, SP15, SP16
RPI, RP2, RP3, RP4, RPG, RIG, RDG, RPE, RPF, RPC, RPO, SPD
M001, M002, M003, M004, M005, M006, M007, M008
S001, SLSS, STOS, SS1S
z SlowWriteFunctionBLocks
HSP, LSP, BSP, RPR, ACC, DEC, AC2, DE2, INR, JPF
JF2, JF3, JFH, SP2, SP3, SP4, SP5, SP6, SP7, SP8
SP9, SP10, SP11, SP12, SP13, SP14, SP15, SP16, RPI, RP2
RP3, RP4, RPG, RIG, RDG, M001, M002, M003, M004, M005
M006, M007, M008, S006
14 S1B90747 10/2012
Creating an FBD Application Using Function Blocks
OAXX must be in the range [0 - 8192] if used on OA1. Other values generate the OA1 max. value.
When you double-click on an input/output, only this port can be changed; the others are grayed-out.
S1B90747 10/2012 15
Function Block Configuration
Legend:
: Parameters tab: Most function blocks have a Parameters tab. In this tab, you need to set the
function block’s specific parameters. These parameters are described in detail for each of the blocks.
: Comments tab: All the blocks can have an associated comment. These comments are displayed
under the block in the diagram.
: Display block number: Displays the block number. This option is activated by default.
: Display comment: When a comment has been added to a function block, the comment is displayed
if the Display comment box is checked. This option is activated by default.
16 S1B90747 10/2012
Configuration: Virtual Input or Output
Each diagram input or output has a configuration window.
By double-clicking on the start point or end point, a configuration window appears.
Legend:
: Commentstab: These comments are displayed under the block in the diagram.
: Display block number: Displays the block number. This option is activated by default.
: Display comment: When a comment has been added to a function block, the comment is displayed
if the Display comment box is checked. This option is activated by default.
Type of Link
Table with three columns
S1B90747 10/2012 17
Display Options
Diagram Dimensions
It is possible to change the diagram dimensions.
Resize the diagram by clicking on the right-hand edge and dragging it to the left or right.
18 S1B90747 10/2012
Altivar 32
S1B90747 10/2012
Menu Bar
2
What Is in This Chapter?
This chapter contains the following topics:
Topic Page
Tree View 20
Common Edition Commands 21
Execution Order Commands 21
Check the Application 22
Manipulating FBD Objects 23
Preferences 24
Configure 24
Function BlocksBlock Password 24
S1B90747 10/2012 19
Tree View
20 S1B90747 10/2012
Common Edition Commands
Commands
z Copy Paste Cut: This allows you to copy, paste or cut one or more selected objects.
z Cancel : This allows you to cancel the last action performed.
S1B90747 10/2012 21
Check the Application
Description
With the Device → ATVLogic → Edition → Check the compilation command, you launch the
compilation (check) of the program.
The result of compilation is displayed in the compilation report window.
In this window, the following information appears:
z The result of the program check
z Used and available resources
NOTE: This check must be performed before the program can be downloaded.
22 S1B90747 10/2012
Manipulating FBD Objects
S1B90747 10/2012 23
Preferences
Access
This function can be accessed via the menu bar: Device → ATVLogic → Preferences.
Commands
This feature edits:
z Diagrams
z Display or hide the grid
z Choose the size of spaces
z Choose the zoom
z Functions
All function blocks can have an associated comment and block number.
You can choose to display:
z All comments
z All numbers
Configure
Access
This function can be accessed via the menu bar: Device → ATVLogic → Configure.
This window has two tabs: Application Informationand Tasks.
Application Informationtab
This tab lets you enter information relating to the program:
z The name of the Programmer
z The version
z The date
z Add a comment
Taskstab
This tab specifies the maximum time allowed for the AUX task to be performed.
This is similar to a WATCHDOG action (control of the module cycle time).
Access
This function can be accessed via the menu bar: Device → ATVLogic → Password.
Description
The purpose of the password is to help protect your program and prevent others from reading it.
The password can protect the programmer’s intellectual property but in no way prevent the configuration
being uploaded.
NOTE: To disable the password, enter 0000. If an incorrect password entered is three times, the program
is deleted, and a blank program is available for editing.
24 S1B90747 10/2012
Altivar 32
S1B90747 10/2012
3
What Is in This Chapter?
This chapter contains the following sections:
Section Topic Page
3.1 Special Input Functions 26
3.2 Logic Functions 28
S1B90747 10/2012 25
3.1 Special Input Functions
26 S1B90747 10/2012
NUM (analog)
Description
The numerical constant NUM is an analog integer with a value between -32768 and +32767.
The value of the constant can be set in the Parameters window.
NUM (register)
Description
The numerical constant NUM is a register integer with a value between 0 and 65535.
The value of the constant can be set in the Parameters window.
TRUE
Description
FALSE
Description
S1B90747 10/2012 27
3.2 Logic Functions
28 S1B90747 10/2012
Introduction
Logic Function
FIn FBD language, it is possible to use logic functions in the block diagrams.
These functions can be accessed from These functions can be accessed from the Function block set.
If one or more inputs are not connected, their state is not taken into account when calculating the number
of functions.
However, Enable inputs are always activated.
NOT Function
Description
In Q
0 1
1 0
Description
If all the inputs are active or not connected, the output is active. If at least one input is connected,
the output is inactive.
z [IN1] to [IN4]: 4 Boolean inputs
z [Q]: 1 Boolean output
S1B90747 10/2012 29
The OR Function
Description
If at least one input is active, the output is active. If all the inputs are inactive or not connected,
the output is inactive.
z [IN1] to [IN4]: 4 Boolean inputs
z [Q]: 1 Boolean output
30 S1B90747 10/2012
The NAND Function
Description
If at least one input is inactive, the output is active. If all the inputs are active or not connected,
the output is inactive.
z [IN1] to [IN4]: 4 Boolean inputs
z [Q]: 1 Boolean output
S1B90747 10/2012 31
The NOR Function
Description
If all the inputs are inactive or not connected, the output is active. If at least one input is active,
the output is inactive.
z [IN1] to [IN4]: 4 Boolean inputs
z [Q]: 1 Boolean output
Description
If one input is inactive and the other input is active or not connected, the output is active. If both
inputs are active or inactive, or not connected, the output is inactive.
z [IN1] and [IN2]: 2 Boolean inputs
z [Q]: 1 Boolean output
In1 In2 Q
0 0 0
0 1 1
1 0 1
1 1 0
32 S1B90747 10/2012
The A/C TIMER (Timer) Function
Description
The Timer function is used to delay, prolong, and control actions over a predefined time.
The Timer has three functions:
z A function: Timer on-delay, or timer active
z C function: Timer off-delay, or timer idle
z A/C function: Combination of A and C functions
Inputs/Outputs
z [IN]: 1 Boolean input[Q]: 1 Boolean output
Configuration
You can adjust the parameters from the Configuration window.
In the Parameters tab, you can adjust the value of the delays for each of the functions (A, C and A/C):
z ON delay for function A
z OFF delay for function C
z A combination of both the ON and OFF delays can be used to adjust function A/C.
A Function
The following diagram shows the operation of the timer in function A.
: ON delay
C Function
The following diagram shows the operation of the timer in function C.
: OFF delay
S1B90747 10/2012 33
A/C Function
The following diagram shows the operation of the timer in function A/C.
34 S1B90747 10/2012
The ADD/SUB Function
Description
Calculation formula
CALCULATION OUTPUT [Q]= [A] + [B] - [C]
Inputs/Outputs
Description of the inputs:
z [A]: An analog input
z [B]: An analog input
z [C]: An analog input
NOTE: If the inputs are not connected, they are set to 0. It is not possible to do mathematical operations
on registers.
Description of the outputs:
z [Q]: Analog output: this is the value of the calculation formula output.
z [Overflow]: This output, which is Boolean type, indicates the presence of any saturation errors. This
output is activated in the following cases.
z Result not included in the interval [-32768, +32767]
Example
Addition: Do not use Input [C].
Subtraction: Do not use either [A] or [B].
Description
The BOOLEAN function gives the value of the output according to the combination of inputs.
The function has four inputs, and therefore 16 combinations. These combinations can be found in a truth
table; for each of these, the output value can be adjusted. The number of configurable combinations
depends on the number of inputs connected to the function.
Non-connected inputs are set to 0.
Inputs/Outputs
Description of the inputs:
z [IN1], [IN2], [IN3] and [IN4]: 4 Boolean inputs
z [OUT]: 1 Boolean output
Configuration
From the Configuration window, you can adjust the parameters.
In the parameters tab you can choose the ADL Container (LA0x) to be used
Having connected at least one input, configure the value of the output in the truth table, in the Parameters
window.
The output values can be 0 for the Inactive state, and 1 for the Active state.
S1B90747 10/2012 35
The CAN Function (Word to Bit Conversion)
Description
The Word to Bit Conversion function breaks down a register type input (16-bit) into 16-bit
outputs.
Inputs/Outputs
z [IN]: 1 register input
z Q01 to Q16]: 16 Boolean outputs: Bit01 (least significant byte) ... Bit16 (most significant byte).
Description
The Bit to Word Conversion function produces a register (16-bit) type output from 16-bit type
inputs.
Inputs/Outputs
z [IN01] to [IN10]: 16 Boolean inputs: Bit01 (least significant byte) ... Bit16 (most significant byte)
z [OUT]: 1 register output
36 S1B90747 10/2012
The COMPARE (Comparison of two values)
Description
Inputs / Outputs
z [IN1]: 1 analog input
z [IN2]: 1 analog input
z [ENABLE]: 1 Boolean input
If the [IN1] or [IN2] input is not connected, the value is set to 0.Note:The function block output is not
updated because if the function block output is set to 1 and the Enable input switches to 0, the output
will remain at 1.
z [Q]: 1 Boolean output
Configuration
From the Configuration window, in the Parameters tab you can choose the following comparison
operators:
Greater than
Greater than or equal to
Equal to
Different
Less than or equal to
Less than
S1B90747 10/2012 37
The EDGE Function
Description
Inputs/Outputs
z Signal tested.
[Q] 1 Boolean Output.
z Pulse when the edge is detected.
[IN]: 1 Boolean input.
Configuration
From the Configuration window, adjust the Edge type in the Parameters tab:
z Falling
z Rising
z Twice
In
38 S1B90747 10/2012
The GAIN Function
Description
The Gain function allows analog values to be converted by changing the scale and the offset.
Gain calculation formula:
[Q] = (A / B) x INPUT + [C].
Inputs Description
z [IN]: 1 analog input. This is an integer between -32768 and 32767.
z [ENABLE]: 1 Boolean input. This is the gain function input command.
The state of this input determines the block operation: if the Enable Function input is inactive, the
Calculation output retains the last calculated value.
Outputs Description
z [Q]: 1 analog input. This is the output value of the gain function. This value depends upon the state of
the Enable function input.
z [OVERFLOW]: 1 Boolean output. If it is:
z Active: the Calculation output is equal to the result of the gain calculation formula.
Configuration
From the Configuration window, set in the Parameters tab:
A/B which corresponds to the gain applied by the function with:
z A: from -32768 to 32767
z B: from -32768 to -1 and from 1 to 32767 (4)
z C is the offset applied by the function, and is an integer between -32768 and 32767(5)
In addition, it is possible to define an operating range by setting limits for the function output:
z Lower limit: integers between -32768 and 32767
z Upper limit: integers between -32768 and 32767
S1B90747 10/2012 39
The MUL/DIV Arithmetic Function
Description
Description of Inputs
z [A]: 1 analog input
z [B]: 1 analog input
z [C]: 1 analog input
NOTE: If the INPUTS are not connected, they are set to 1. It is not possible to do mathematical operations
on registers.
Description of Outputs
z [Q]: 1 analog input. This is the value of the calculation formula output.
z [OVERFLOW]: This output, which is Boolean type, indicates the presence of any saturation errors.
This output is activated in the following cases:
z - The consequence of the operations is a result that is not in the range [-32768, +32767]
z The Error propagation input is active
z Input 3 equals 0
Examples
z Multiplication: Do not use input [C]
z Division: Do not use either the [A] or [B] inputs
Description
The Multiplexing function carries out dual input channel multiplexing on the output.
Description of Inputs
z [SEL]: 1 Boolean input. This input is used to choose the input channel to be applied to the output.
z [IN1]: 1 analog input. This is the multiplexer input [IN1].
z [IN2]: 1 analog input. This is the multiplexer input [IN2]
NOTE: If channels [IN1] or [IN2] are not connected, they are set to 0.
Description of Outputs
z [Q]: 1 analog input. This is the multiplexer output [Q].
This value depends upon the state of the Command input [SEL].
NOTE: The function block output is not updated because if the function block output is set to 1 and the
Enable input switches to 0, the output will remain at 1.
40 S1B90747 10/2012
The BIT READ Function
Description
The BIT READ function block is used for reading one bit of the parameters.
Configuration
From the Configuration window, you can adjust the parameters.
In the Parameters tab you can choose the ADL Container (LA0x) that will be used.
Description
Inputs / Outputs
z 1 Boolean input
z 1 analog output
NOTE: The function block output is not updated because if the function block output is set to 1 and the
Enable input switches to 0, the output will remain at 1.
Configuration
From the Configuration window, you can adjust the parameters.
In the Parameters tab you can choose the ADL Container (LA0x) to be used.
S1B90747 10/2012 41
The READ Reg Param Function
Description
Inputs / Outputs
z 1 Boolean input
z 1 register output
Configuration
From the Configuration window, you can adjust the parameters.
In the Parameters tab you can choose the ADL Container (LA0x) to be used.
Description
Configuration
From the Configuration window, you can change settings in the Parameters tab.
If both inputs are active, the state of the output depends on how the function is configured:
z The Q output is active if the SET has priority option is configured
z The Q output is inactive if the RESET has priority option is configured
42 S1B90747 10/2012
The SHIFT/ROLL Function
Description
ROLL moves bits in the selected direction and replaces new empty bits with bits ejected from
the register. It is a circular register.The CARRY output contains the level (0/1) of the last bit moved.
The function is used to shift or roll the [IN] value of a fixed number of bits to the left/right.
At each cycle if the ENABLE signal is set, the logic block will perform a shift/roll to the left/right to the
Number Bit request concerning the parameter configuration.
SHIFT moves bits in the selected direction and replaces empty bits with 0.
ROLL moves bits in the selected direction and replaces new empty bits with bits ejected from the register.
It is a circular register. The CARRY output contains the level (0/1) of the last bit moved.
NOTE: It is impossible to shift records with analog values.
Inputs Description
z [IN]: 1 register input
z [ENABLE]: 1 Boolean function input
Outputs Description
z [Q]: 1 register output
z [CARRY]: 1 Boolean output. The carry output tells you the value of the last bit shifted.
NOTE: The function block output is not updated because if the function block output is set to 1 and the
Enable input switches to 0, the output will remain at 1.
Configuration
From the Configuration window, you can change settings in the Parameters tab
z The mode: Shift or Roll.
z The direction: Left or right.
z The number of bits.
S1B90747 10/2012 43
The TRIGGER function (Schmitt Trigger)
Description
The Schmitt Trigger function allows an analog value to be monitored relative to two thresholds.
The output changes state if:
z The [IN] value is less than the minimum value
z The [IN] value is greater than the maximum value
If the [IN] input is between the two, the [Q] output does not change state.
Two setpoints - On to Off and Off to On - can be set as the minimum or maximum value. This involves
reverse operation of the function.These two operations are shown in the diagrams.
If the [ENABLE] input is inactive, the [Q] output remains inactive. The [Q] output does not change state
if the [ENABLE] input changes from Active to Inactive.
Inputs/Outputs
z [IN]: 1 analog setpoint input
z [ENABLE]: 1 Boolean input
z [Q]: 1 Boolean output
NOTE: The function block output is not updated because if it is set to 1 and the Enable input changes to
0, the output will remain at 1.
Operating Diagrams
The figure below shows the possible output states when the On to Off setpoint is higher than the Off to
On setpoint.
[ENABLE]
Value to
compare
On to Off
Off to On
[N]
[Q]
The figure below shows the possible output states when the Off to On setpoint is higher than the On to
Off setpoint.
[ENABLE]
Value to
compare
On to Off
Off to On
[N]
[Q]
44 S1B90747 10/2012
The COUNT Up/Down Counter Function
Description
The Up/Down Counter function is used to up/down count from a preset value resulting from a
calculation outside the function.
Inputs Description
z [UP]: 1 Boolean upcounter input
z [DOWN]: 1 Boolean downcounter input
z [RESET]: 1 Boolean input
z [LOAD]: 1 Boolean input
z [PV]: 1 analog Preset value input
z [ENABLE]: 1 input
Activation of the [LOAD] input to 1 is used to change the counter with the value available at the [PV] input.
The [PV] input can be connected to a NUM constant, to an analog input, or to any other kind of function
block output that delivers an analog type value.
A rising edge on the:
z Upcounter input: Increments the counter
z Downcounter input: Decrements the counter
Inputs Description
z [Q]: 1 Boolean output
z [CURRENT]: The current counter value
NOTE: The function block output is not updated because if it is set to 1 and the Enable input changes to
0, the output will remain at 1.
Available Functions
Several functions are available:
z Upcounting and forcing the counter to 0 on initialization
z Upcounting and forcing the counter to 0 on initialization and when the count value is reached
z Downcounting and forcing the counter to the preset value on initialization
z Downcounting and forcing the counter to the preset value on initialization and when 0 is reached
S1B90747 10/2012 45
[RESET]
+ 32767
[PV]
[CURRENT]
– 32768
[Q]
46 S1B90747 10/2012
The BIT WRITE Function (WriteBitParam)
Description
The WriteBitParam function block is used to write one bit of the parameters.
To write one bit of the drive parameters:
You must use the ADL containers to link the drive parameters (see description of [ADL CONTAINERS]
(FAd-)).
WARNING
RISK OF INEFFECTIVE PARAMETER MODIFICATION
When EEPROM saving is in progress, WriteBitParam and WriteParam are no longer operational.
Check that the save operation is complete (ETI bit 0=0) before starting a new parameter modification.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
To store or reuse a value: The M00x parameters are easy to use to store data. You can store values for
reuse by the functions blocks and communication protocol (see description of [FB PARAMETERS]
(FbP-)).
Inputs/Outputs
The WriteBitParam function uses:
z [IN]: 1 Boolean WriteBit input
z [ENABLE]: 1 Boolean input
NOTE: The function block output is not updated because if it is set to 1 and the Enable input changes to
0, the output will remain at 1.
Configuration
You can adjust the parameters from the Configuration window:
In the Parameters tab, you can select the ADL Container (LA0x) to be used.
S1B90747 10/2012 47
The WRITE Ana Param function
Description
The WRITE Ana Param function block is used to write one bit of the parameters.
To write drive parameters:
You must use the ADL containers to link the drive parameters (see description of [ADL CONTAINERS]
(FAd-)).
WARNING
RISK OF INEFFECTIVE PARAMETER MODIFICATION
When EEPROM saving is in progress, WriteBitParam and WriteParam are no longer operational.
Check that the save operation is complete (ETI bit 0=0) before starting a new parameter modification.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
To store or reuse a value: The M00x parameters are easy to use to store data. You can store values for
reuse by the functions blocks and communication protocol (see description of [FB PARAMETERS]
(FbP-)).
Inputs/Outputs
The WriteBitParam function uses:
z 1 analog input
z 1 Boolean input
NOTE: The function block output is not updated because if it is set to 1 and the Enable input changes to
0, the output will remain at 1.
Configuration
You can adjust the parameters from the Configuration window:
In the Parameters tab, you can select the ADL Container (LA0x) to be used.
48 S1B90747 10/2012
The WRITE Reg Param function
Description
The WRITE Reg Param function block is used to write one bit of the parameters.
To write drive parameters:
You must use the ADL containers to link the drive parameters (see description of [ADL CONTAINERS]
(FAd-)).
WARNING
RISK OF INEFFECTIVE PARAMETER MODIFICATION
When EEPROM saving is in progress, WriteBitParam and Write Reg Param are no longer operational.
Check that the save operation is complete (ETI bit 0=0) before starting a new parameter modification.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
To store or reuse a value: The M00x parameters are easy to use to store data. You can store values for
reuse by the functions blocks and communication protocol (see description of [FB PARAMETERS]
(FbP-)).
Inputs/Outputs
The WriteBitParam function uses:
z 1 register input
z 1 Boolean input
NOTE: The function block output is not updated because if it is set to 1 and the Enable input changes to
0, the output will remain at 1.
Configuration
You can adjust the parameters from the Configuration window:
In the Parameters tab, you can select the ADL Container (LA0x) to be used.
S1B90747 10/2012 49
The STU Function (16-bit analog TO 16-bit register)
Description
The STU function block is used to convert an analog signal to a register signal by limiting.
Analog input range: –32768 to +32767.
Register output range: 0 to 32767.
Inputs/Outputs
z [IN]: 1 analog input
z [Q]: 1 register output
z [OVERFLOW]: 1 Overflow output
[OVERFLOW] is a Boolean output. If the analog input [IN] value is negative, [OVERFLOW] = 1. If the
analog input [IN] value is positive, [OVERFLOW] = 0.
Description
The UTS function block is used to convert a 16-bit register input to a 16-bit analog output (with
limiting).
Register input range: 0 to 65535.
Register output range: –32768 to +32767.
Inputs/Outputs
z [IN]: 1 register input
z [Q]: 1 analog output
z [OVERFLOW]: 1 Overflow output
The [OVERFLOW] output is of Boolean type. This output is active if the register input value exceeds
32767; the analog output value will be set to 32767.
In
50 S1B90747 10/2012
Altivar 32
S1B90747 10/2012
4
What Is in This Chapter?
This chapter contains the following topics:
Topic Page
Function Block Status 52
Function Block Command 54
Function Block Fault 55
Function Block Parameters 56
S1B90747 10/2012 51
Function Block Status
Description
This indicates the function block status in the HMI.
Example of display of function block status in the graphic display terminal:
OFF light: A valid function block program is in the ATV32 in stop mode.
ON light: A valid function block program is in the ATV32 in run mode. The drive is considered as being in
run mode and the configuration parameters cannot be modified.
Operation
52 S1B90747 10/2012
New program downloaded
Factory setting
IDLE
No FB operation
CHECK
Check program
INIT
Do check of possibility to
run the program (conf) FAULT Acknowledge
Init FB RAM (if possible)
INIT OK
AND
Drive ready INIT NOT OK
RUN
Drive in gatting on
S1B90747 10/2012 53
Function Block Command
Description
Appears in the HMI menu to command the function block to switch automatically from Run to STOP.
WARNING
LOSS OF CONTROL
If the [FB start mode] (FbrM) or [FB Command] (FbCd) parameters are modified by the
communication network, the communication status must be monitored with Bit 11, 12 and 13 of [FB
SYSTEM WORD 06] (S002).
Failure to follow these instructions can result in death, serious injury, or equipment damage.
FB execution has the same effect as motor rotation, the configuration is locked and transfers are
prohibited.
54 S1B90747 10/2012
Function Block Fault
Description
If the drive is in FbE fault mode, see the FbFt [FB fault] parameter.
Code Name/Description
FbFt [FB fault]
nO [No]: No fault detected
Int [Internal]: Internal fault detected
bIn [Binary file]: Binary fault detected
InP [Intern para.]: Internal parameter fault detected
PAr [Para. RW]: Parameter access fault detected
CAL [Calculation]: Calculation fault detected
tOAU [TO AUX]: TimeOut AUX task
tOPP [TO synch]: TimeOut in PRE/POST task
AdL [Bad ADLC]: ADLC with bad parameter
In [Input assign.]: Input not configured
Errors do not persist, switching ON and OFF resets the FB fault (as it was detected again).
S1B90747 10/2012 55
Function Block Parameters
Description
The 8 Function block parameters (M001 to M008) can store values, which can be used to configure or
monitored the application. Because, the M00x are in reading and writing on the drive.
NOTE: The M001 to M004 are saved in EEprom but the M005 to M008 are written in RAM.
56 S1B90747 10/2012
Altivar 32
S1B90747 10/2012
Communication Parameters
5
What Is in This Chapter?
This chapter contains the following topics:
Topic Page
ADL Containers 58
FB SYSTEM WORDS 59
S1B90747 10/2012 57
ADL Containers
Description
ADL Containers are linked to 6 function blocks
z Read Ana Param
z Read Reg Param
z Write Ana Param
z Write Reg Param
z ReadBitParam
z WriteBitParam
Depending on which task in the Read/Write Ana/Reg Param logic block is implemented, it will allow
connection to Fast or Slow parameters.
The rule is:
z In PRE/POST tasks: Connection to Fast access parameters only
z In the AUX task: Connection to Slow and Fast access parameters
58 S1B90747 10/2012
FB SYSTEM WORDS
S1B90747 10/2012 59
FB SYSTEM WORD 06 Overview
WARNING
RISK OF PARAMETER MODIFICATION INEFFECTIVE
When [FB SYSTEM WORD 06] bit 13 is written to 1, EEPROM memorization is launched, and the other
parameters can no longer be modified.
Check that memorization has finished (ETI bit 0=0) before attempting further parameter modification.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
60 S1B90747 10/2012
Altivar 32
S1B90747 10/2012
Application Example
6
Windowpane Application Example
Overview
This example describes how the glass panes in a greenhouse can be managed automatically.
Specifications
The owner of a greenhouse wishes to manage opening and closing of the ventilation panes located on
the greenhouse roof.
The greenhouse has two panes to provide ventilation.
The opening of these panes is controlled by a motor and two sensors that indicate whether the panes are
open or closed:
M
During the day, the panes open to ventilate the structure when the temperature reaches 25ºC. If the
temperature falls below 20ºC, the panes must close again.
Input/Output Tables
S1B90747 10/2012 61
The detailed procedure is explained in the Creating an FBD Application Using Function Blocks
(see page 15) section.
Program Creation
Drag and drop function blocks from the Function Block Set window. Set the required links between inputs,
function blocks and outputs.
The detailed procedure is explained in the Creating an FBD Application Using Function Blocks
(see page 15) and Function Block Configuration (see page 16) sections.
To optimize the cycle time you can adjust the program order of execution.
62 S1B90747 10/2012
ATV32_ATV_Logic_Manual_EN_S1B90747_01
S1B90747 10/2012