ATV320 ATV Logic Manual EN NVE71954 01
ATV320 ATV Logic Manual EN NVE71954 01
NVE71954 04/2016
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 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.
© 2016 Schneider Electric. All Rights Reserved.
2 NVE71954 04/2016
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
The OR Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
The NAND Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
The NOR Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
The XOR (eXclusive OR) Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
The A/C TIMER (Timer) Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
The ADD/SUB Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
The BOOLEAN Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
The CAN Function (Word to Bit Conversion). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
The CNA Function (Bit to Word Conversion). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
The COMPARE (Comparison of two values) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
The EDGE Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
The GAIN Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
The MUL/DIV Arithmetic Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
The MUX Function (Multiplexing) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
The BIT READ Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
The READ Ana Param Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
The READ Reg Param Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
The RS Memory Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
The SHIFT/ROLL Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
The TRIGGER function (Schmitt Trigger) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
The COUNT Up/Down Counter Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
The BIT WRITE Function (WriteBitParam) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
NVE71954 04/2016 3
The WRITE Ana Param function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
The WRITE Reg Param function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
The STU Function (16-bit analog TO 16-bit register). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
The UTS Function (16-Bit Register Input to 16-Bit Analog Output) . . . . . . . . . . . . . . . . . . . . 54
Chapter 4 Description of ATV320 Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Function Block Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Function Block Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Function Block Fault. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Function Block Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Chapter 5 Communication Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
ADL Containers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
FB SYSTEM WORDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Chapter 6 Application Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Windowpane Application Example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4 NVE71954 04/2016
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, service, 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.
Qualification Of Personnel
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.
NVE71954 04/2016 5
Intended Use
This product is a drive for three-phase synchronous and asynchronous motors and intended for industrial
use according to this 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). 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.
WARNING
UNGUARDED EQUIPMENT
Do not use this software and related automation equipment on equipment which does not have point-
of-operation protection.
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 you, the user, machine builder or system integrator can be aware of all the conditions and factors
present during setup, operation, and maintenance of the machine and, therefore, can determine the
automation equipment and the related safeties and interlocks which can be properly used. When selecting
automation and control equipment and related software for a particular application, you 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.
6 NVE71954 04/2016
START-UP AND TEST
Before using electrical control and automation equipment for regular operation after installation, the system
should be given a start-up test by qualified personnel to verify correct operation of the equipment. It is
important that arrangements for such a check be made and that enough time is allowed to perform
complete and satisfactory testing.
WARNING
EQUIPMENT OPERATION HAZARD
Verify that all installation and set up procedures have been completed.
Before operational tests are performed, remove all blocks or other temporary holding means used for
shipment from all component devices.
Remove tools, meters, and debris from equipment.
Failure to follow these instructions can result in death, serious 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 temporary grounds that are not 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:
Remove tools, meters, and debris from equipment.
Close the equipment enclosure door.
Remove all temporary grounds from incoming power lines.
Perform all start-up tests recommended by the manufacturer.
NVE71954 04/2016 7
Product Related Information
WARNING
LOSS OF CONTROL
The designer of any control scheme must consider the potential failure modes of control paths and,
for critical control functions, provide a means to achieve a safe state during and after a path failure.
Examples of critical control functions are emergency stop, overtravel stop, power outage and restart.
Separate or redundant control paths must be provided for critical control functions.
System control paths may include communication links. Consideration must be given to the
implications of unanticipated transmission delays or failures of the link.
Observe all accident prevention regulations and local safety guidelines (1).
Each implementation of the product must be individually and thoroughly tested for proper operation
before being placed into service.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
(1) For USA: Additional information, refer to NEMA ICS 1.1 (latest edition), Safety Guidelines for the
Application, Installation, and Maintenance of Solid State Control and to NEMA ICS 7.1 (latest edition),
Safety Standards for Construction and Guide for Selection, Installation and Operation of Adjustable-Speed
Drive Systems.
8 NVE71954 04/2016
About the Book
At a Glance
Document Scope
The purpose of the document is to describe how to use the ATV logic function for ATV320
The ATV logic functions are only accessible inside the Altivar Machine 320 DTM.
FDT/DTM (Field Device Tool / Device Type Manager) is a new technology chosen by several companies
in automation.
To install the Altivar Machine 320 DTM, you can download and install our FDT: SoMove from
www.schneider-electric.com. It is including the Altivar Machine 320 DTM.
The content of this manual is also accessible through the ATV320 DTM online help.
Validity Note
The technical characteristics of the devices described in this document 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.
Do not include blank spaces in the reference or product range.
To get information on 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 may 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.
NVE71954 04/2016 9
Related Documents
Use your tablet or your PC to quickly access detailed and comprehensive information on all our products
on www.schneider-electric.com
The internet site provides the information you need for products and solutions
The whole catalog for detailed characteristics and selection guides
The CAD files to help design your installation, available in over 20 different file formats
All software and firmware to maintain your installation up to date
A large quantity of White Papers, Environment documents, Application solutions, Specifications... to
gain a better understanding of our electrical systems and equipment or automation
And finally all the User Guides related to your drive, listed below:
You can download these technical publications and other technical information from our website at
http://www.schneider-electric.com/ww/en/download
Terminology
The technical terms, terminology, and the corresponding descriptions in this manual normally use the
terms or definitions in the relevant standards.
In the area of drive systems this includes, but is not limited to, terms such as error, error message, failure,
fault, fault reset, protection, safe state, safety function, warning, warning message, and so on.
Among others, these standards include:
IEC 61800 series: Adjustable speed electrical power drive systems
IEC 61508 Ed.2 series: Functional safety of electrical/electronic/programmable electronic safety-related
EN 954-1 Safety of machinery - Safety related parts of control systems
EN ISO 13849-1 & 2 Safety of machinery - Safety related parts of control systems.
IEC 61158 series: Industrial communication networks - Fieldbus specifications
IEC 61784 series: Industrial communication networks - Profiles
IEC 60204-1: Safety of machinery - Electrical equipment of machines – Part 1: General requirements
In addition, the term zone of operation is used in conjunction with the description of specific hazards, and
is defined as it is for a hazard zone or danger zone in the EC Machinery Directive (2006/42/EC) and in ISO
12100-1.
Also see the glossary at the end of this manual.
10 NVE71954 04/2016
Altivar Machine 320
NVE71954 04/2016
Chapter 1
Introduction to the Function Blocks
NVE71954 04/2016 11
Global Overview of Function Blocks and ATV Logic
Description
Programmable logic functions allow you to write your own application for the ATV320 variable speed drive.
Programmable logic functions interact with:
The drive core control
The I/O, the communication functions
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:
The compiled program
The program transferred into the ATV320
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)
The diagram, where the functions that make up the program are inserted
The Input pins on the left of the diagram where the inputs are positioned
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:
Connection between blocks, : Function block number, : Virtual output pin, : Tool panels: Edit,
Toolbox
12 NVE71954 04/2016
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:
In PRE/POST tasks: Connection to Fast access parameters only
In the AUX task: Connection to Slow and Fast access parameters
(1) Drive Background TASK < 1 ms (2) Drive Background TASK >1 ms
(3) 2 ms (4) t > period duration AUX = FBE fault error TOAU
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.
NVE71954 04/2016 13
Groups of parameters
Tabs PRE and POST are priority to the tabs AUX. 4 groups of parameters are defining:
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
FastWriteFunctionBLocks
M001, M002, M003, M004, M005, M006, M007, M008, S006
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
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 NVE71954 04/2016
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.
NVE71954 04/2016 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 NVE71954 04/2016
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
NVE71954 04/2016 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 NVE71954 04/2016
Altivar Machine 320
NVE71954 04/2016
Chapter 2
Menu Bar
Menu Bar
NVE71954 04/2016 19
Tree View
20 NVE71954 04/2016
Common Edition Commands
Commands
Copy Paste Cut: This allows you to copy, paste or cut one or more selected objects.
Cancel : This allows you to cancel the last action performed.
NVE71954 04/2016 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:
The result of the program check
Used and available resources
NOTE: This check must be performed before the program can be downloaded.
22 NVE71954 04/2016
Manipulating FBD Objects
NVE71954 04/2016 23
Preferences
Access
This function can be accessed via the menu bar: Device → ATVLogic → Preferences.
Commands
This feature edits:
Diagrams
Display or hide the grid
Choose the size of spaces
Choose the zoom
Functions
All function blocks can have an associated comment and block number.
You can choose to display:
All comments
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:
The name of the Programmer
The version
The date
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 NVE71954 04/2016
Altivar Machine 320
NVE71954 04/2016
Chapter 3
Function Blocks Language Elements
NVE71954 04/2016 25
Section 3.1
Special Input Functions
26 NVE71954 04/2016
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
NVE71954 04/2016 27
Section 3.2
Logic Functions
Logic Functions
28 NVE71954 04/2016
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
NVE71954 04/2016 29
The AND Function
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.
[IN1] to [IN4]: 4 Boolean inputs
[Q]: 1 Boolean output
30 NVE71954 04/2016
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.
[IN1] to [IN4]: 4 Boolean inputs
[Q]: 1 Boolean output
NVE71954 04/2016 31
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.
[IN1] to [IN4]: 4 Boolean inputs
[Q]: 1 Boolean output
32 NVE71954 04/2016
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.
[IN1] to [IN4]: 4 Boolean inputs
[Q]: 1 Boolean output
NVE71954 04/2016 33
The XOR (eXclusive OR) Function
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.
[IN1] and [IN2]: 2 Boolean inputs
[Q]: 1 Boolean output
In1 In2 Q
0 0 0
0 1 1
1 0 1
1 1 0
34 NVE71954 04/2016
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:
A function: Timer on-delay, or timer active
C function: Timer off-delay, or timer idle
A/C function: Combination of A and C functions
Inputs/Outputs
[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):
ON delay for function A
OFF delay for function C
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
NVE71954 04/2016 35
A/C Function
The following diagram shows the operation of the timer in function A/C.
36 NVE71954 04/2016
The ADD/SUB Function
Description
Calculation formula
CALCULATION OUTPUT [Q]= [A] + [B] - [C]
Inputs/Outputs
Description of the inputs:
[A]: An analog input
[B]: An analog input
[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:
[Q]: Analog output: this is the value of the calculation formula output.
[Overflow]: This output, which is Boolean type, indicates the presence of any saturation errors. This
output is activated in the following cases.
Result not included in the interval [-32768, +32767]
Example
Addition: Do not use Input [C].
Subtraction: Do not use either [A] or [B].
NVE71954 04/2016 37
The BOOLEAN Function
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:
[IN1], [IN2], [IN3] and [IN4]: 4 Boolean inputs
[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.
38 NVE71954 04/2016
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
[IN]: 1 register input
Q01 to Q16]: 16 Boolean outputs: Bit01 (least significant byte) ... Bit16 (most significant byte).
NVE71954 04/2016 39
The CNA Function (Bit to Word Conversion)
Description
The Bit to Word Conversion function produces a register (16-bit) type output from 16-bit type
inputs.
Inputs/Outputs
[IN01] to [IN10]: 16 Boolean inputs: Bit01 (least significant byte) ... Bit16 (most significant byte)
[OUT]: 1 register output
40 NVE71954 04/2016
The COMPARE (Comparison of two values)
Description
Inputs / Outputs
[IN1]: 1 analog input
[IN2]: 1 analog input
[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.
[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
NVE71954 04/2016 41
The EDGE Function
Description
Inputs/Outputs
Signal tested.
[Q] 1 Boolean Output.
Pulse when the edge is detected.
[IN]: 1 Boolean input.
Configuration
From the Configuration window, adjust the Edge type in the Parameters tab:
Falling
Rising
Twice
42 NVE71954 04/2016
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
[IN]: 1 analog input. This is an integer between -32768 and 32767.
[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
[Q]: 1 analog input. This is the output value of the gain function. This value depends upon the state of
the Enable function input.
[OVERFLOW]: 1 Boolean output. If it is:
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:
A: from -32768 to 32767
B: from -32768 to -1 and from 1 to 32767 (4)
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:
Lower limit: integers between -32768 and 32767
Upper limit: integers between -32768 and 32767
NVE71954 04/2016 43
The MUL/DIV Arithmetic Function
Description
Description of Inputs
[A]: 1 analog input
[B]: 1 analog input
[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
[Q]: 1 analog input. This is the value of the calculation formula output.
[OVERFLOW]: This output, which is Boolean type, indicates the presence of any saturation errors. This
output is activated in the following cases:
- The consequence of the operations is a result that is not in the range [-32768, +32767]
The Error propagation input is active
Input 3 equals 0
Examples
Multiplication: Do not use input [C]
Division: Do not use either the [A] or [B] inputs
44 NVE71954 04/2016
The MUX Function (Multiplexing)
Description
The Multiplexing function carries out dual input channel multiplexing on the output.
Description of Inputs
[SEL]: 1 Boolean input. This input is used to choose the input channel to be applied to the output.
[IN1]: 1 analog input. This is the multiplexer input [IN1].
[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
[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.
NVE71954 04/2016 45
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
1 Boolean input
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.
46 NVE71954 04/2016
The READ Reg Param Function
Description
Inputs / Outputs
1 Boolean input
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:
The Q output is active if the SET has priority option is configured
The Q output is inactive if the RESET has priority option is configured
NVE71954 04/2016 47
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
[IN]: 1 register input
[ENABLE]: 1 Boolean function input
Outputs Description
[Q]: 1 register output
[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
The mode: Shift or Roll.
The direction: Left or right.
The number of bits.
48 NVE71954 04/2016
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:
The [IN] value is less than the minimum value
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
[IN]: 1 analog setpoint input
[ENABLE]: 1 Boolean input
[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.
The figure below shows the possible output states when the Off to On setpoint is higher than the On to Off
setpoint.
NVE71954 04/2016 49
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
[UP]: 1 Boolean upcounter input
[DOWN]: 1 Boolean downcounter input
[RESET]: 1 Boolean input
[LOAD]: 1 Boolean input
[PV]: 1 analog Preset value input
[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:
Upcounter input: Increments the counter
Downcounter input: Decrements the counter
Inputs Description
[Q]: 1 Boolean output
[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:
Upcounting and forcing the counter to 0 on initialization
Upcounting and forcing the counter to 0 on initialization and when the count value is reached
Downcounting and forcing the counter to the preset value on initialization
Downcounting and forcing the counter to the preset value on initialization and when 0 is reached
50 NVE71954 04/2016
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
PARAMETER MODIFICATIONS WITHOUT EFFECT
While parameters are saved to the EEPROM, no other modifications to parameters can be saved since
write access to the EEPROM is unavailable during this process.
Verify that write access to the EEPROM is possible before modifying further parameters (bit 0 of the
internal status register ETI must be 0).
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:
[IN]: 1 Boolean WriteBit input
[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.
NVE71954 04/2016 51
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
PARAMETER MODIFICATIONS WITHOUT EFFECT
While parameters are saved to the EEPROM, no other modifications to parameters can be saved since
write access to the EEPROM is unavailable during this process.
Verify that write access to the EEPROM is possible before modifying further parameters (bit 0 of the
internal status register ETI must be 0).
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:
1 analog input
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.
52 NVE71954 04/2016
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
PARAMETER MODIFICATIONS WITHOUT EFFECT
While parameters are saved to the EEPROM, no other modifications to parameters can be saved since
write access to the EEPROM is unavailable during this process.
Verify that write access to the EEPROM is possible before modifying further parameters (bit 0 of the
internal status register ETI must be 0).
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:
1 register input
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.
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
[IN]: 1 analog input
[Q]: 1 register output
[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.
NVE71954 04/2016 53
The UTS Function (16-Bit Register Input to 16-Bit Analog Output)
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
[IN]: 1 register input
[Q]: 1 analog output
[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.
54 NVE71954 04/2016
Altivar Machine 320
ATV320
NVE71954 04/2016
Chapter 4
Description of ATV320 Parameters
NVE71954 04/2016 55
ATV320
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 ATV320 in stop mode.
ON light: A valid function block program is in the ATV320 in run mode. The drive is considered as being in
run mode and the configuration parameters cannot be modified.
Operation
56 NVE71954 04/2016
ATV320
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.
NVE71954 04/2016 57
ATV320
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).
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.
58 NVE71954 04/2016
Altivar Machine 320
NVE71954 04/2016
Chapter 5
Communication Parameters
Communication Parameters
NVE71954 04/2016 59
ADL Containers
Description
ADL Containers are linked to 6 function blocks
Read Ana Param
Read Reg Param
Write Ana Param
Write Reg Param
ReadBitParam
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:
In PRE/POST tasks: Connection to Fast access parameters only
In the AUX task: Connection to Slow and Fast access parameters
60 NVE71954 04/2016
FB SYSTEM WORDS
NVE71954 04/2016 61
FB SYSTEM WORD 06 Overview
WARNING
PARAMETER MODIFICATIONS WITHOUT EFFECT
Setting bit 14 of [FB SYSTEM WORD 06] parameter to 1 starts saving of parameters to the EEPROM.
While parameters are saved to the EEPROM, no other modifications to parameters can be saved since
write access to the EEPROM is unavailable during this process.
Verify that write access to the EEPROM is possible before modifying further parameters (bit 0 of the
internal status register ETI must be 0).
Failure to follow these instructions can result in death, serious injury, or equipment damage.
62 NVE71954 04/2016
Altivar Machine 320
NVE71954 04/2016
Chapter 6
Application Example
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:
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
NVE71954 04/2016 63
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.
64 NVE71954 04/2016
ATV320_ATVLogic_Manual_EN_NVE71954_01
04/2016