State Machine Function Block

ALLEN-BRADLEY
BULLETIN 1336 IMPACT
STATE MACHINE FUNCTION BLOCK
APPLICATION NOTE # 1336E - 7
August 27, 1997
PURPOSE
The purpose of this document is to provide guidelines for wiring and control
schemes for the Bulletin 1336 IMPACT AC Drive. This document is to be used as
a suggestion only. Users must ensure that installations meet applicable codes
and are suitable for the existing conditions.
The Bulletin 1336E User Manual should be used as a reference to ensure that
proper wire selection, routing and fusing guidelines are followed. Refer to
application note #1336E - 4 for an overview of Function Block concepts.
WHAT THIS NOTE
CONTAINS
This note contains descriptions and possible uses for the State Machine function
block incorporated into the 1336E drive
INTENDED
AUDIENCE
This application note is intended to be used by personnel familiar with the
hardware components and programming procedure necessary to operate the
Bulletin 1336S.
WHERE IT
IS USED
The diagrams, parameter settings and auxiliary hardware used in this application
note are designed to address specific issues in many different applications. Some
changes by the User may be necessary to apply the concepts of this document to
a specific application.
TERMS AND
DEFINTIONS
[ ] - Indicates a parameter name
Link - A link is a software connection between two parameters that lets one
parameter receive information from another.
- This represents a source which is a link parameter that provides the
information.
- This represents a destination which is a link parameter receiving the
information.
DESCRIPTION
The state machine block is a function generator. The signal at In1 is routed to a
timer that delays the true/false state of this input. The result is logically compared
with the true/false state of In2 to determine which one of four signals will be
routed to the output. To configure the drive with the State Machine circuit the
[Function Sel] parameter (212) must be programmed appropriately. Refer to
figure
1.
Faxback Document # 3053 Revision Date 8/27/97 Web location Http://WWW.AB.COM
Page 1 of 6
Figure 1
EVALUATING THE
FUNCTION INPUTS
VALUE
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
The “Function Evaluation Select” parameters (200,203,206) are used to
precondition the inputs. The numbers 0-15 correspond to the 16 different
evaluations available. Refer to table 1 for the descriptions.
Table 1
EVALUATION (1 = on = true = set = closed) (0 = off = false = reset = open)
Pass the value directly through the function block
Mask the value (logical AND the input value with a value)
Send a true value when all bits that are set in the mask are on in the input value
Send a true value when all bits that are set in the mask are off in the input value
Send a true value when any bits that are set in the mask are on in the input value
Send a true value when any bits that are set in the mask are off in the input value
Send a true value when the input value is equal to the value of the mask
Send a true value when the input value is not equal to the value of the mask
Send a true value when the signed input value is < the value of the mask
Send a true value when the signed input value is < or = to the value of the mask
Send a true value when the signed input value is > the value of the mask
Send a true value when the signed input value is > or = to the value of the mask
Send a true value when the unsigned input value is < the value of the mask
Send a true value when the unsigned input value is < or = to the value of the mask
Send a true value when the unsigned input value is > the value of the mask
Send a true value when the unsigned input value is > or = to the value of the mask
Faxback Document # 3053 Revision Date 8/27/97 Web location Http://WWW.AB.COM
Page 2 of 6
State Machine
When [Function Sel] is set to eight, the State Machine function will send In1 to an
on/off delay timer circuit, then compare the true/false states of In1 and In2. One
of the values at In3, In6, In7,or In8 become the output depending on the true/false
state of both In1 and In2. Refer to figure 2.
Figure 2
If In2 is:
True
True
False
False
And In1 Timer is:
True
False
True
False
Output used is:
In8
In7
In6
In3
APPLICATION
CONSIDERATION
The Function Input parameters for the state machine block are linkable
destination type parameters. This means that other parameter values may be
directly sent to, or linked, to these locations. All function inputs that are used by
the function block must be programmed with a constant value or have a link.
The Function Output parameter is a source parameter. This parameter must be
linked to a destination parameter.
The LINK menu of the Human Interface Module is used to create parameter links.
An example of the link display is shown below.
Drive/Inv Status
<15> <
DESTINATION PARAMETER
Use the ▲ or ▼ keys to select the
desired Destination Parameter.
0
Arrow Indicates the
direction of data
Faxback Document # 3053 Revision Date 8/27/97 Web location Http://WWW.AB.COM
Page 3 of 6
APPLICATION
EXAMPLE
The state machine block can be used to configure the drive for four different
speed settings that are dependent upon the position of the machine that is being
controlled. The input signals used in the example are simulating proximity
switches on the machinery.
Faxback Document # 3053 Revision Date 8/27/97 Web location Http://WWW.AB.COM
Page 4 of 6
The following plot shows a function block setting four different command speeds based on two inputs. Our inputs
happened to be switches to simulate either photo-eyes or other process switches. Below CH1 is switch1 input, CH2
is switch2 input, CH3 is speed feedback and CH4 is commanded speed.
Here we can see the timing of the function block. 1.) Switch1 goes true and starts the timer for Input1. 2.) After 3
seconds the command speed is changed and the drive decel’s to that speed. 3.) Switch2 goes true and the command
speed is immediately changed since there is no timer on Input2 and the drive accel’s to the commanded speed.
1
2
3
Faxback Document # 3053 Revision Date 8/27/97 Web location Http://WWW.AB.COM
Page 5 of 6
4.) Switch1 then goes false and 3 seconds later the command speed is set the third reference. 5.) Switch2 goes false
and the command speed is changed to the fourth and original speed reference immediately since again there is no
timer on Input2.
4
5
Faxback Document # 3053 Revision Date 8/27/97 Web location Http://WWW.AB.COM
Page 6 of 6