Visual Logic Programmer ..................................... 3

advertisement
DISCOVER CONTROL IDE
Visual Logic Programmer ..................................... 3
Main window .................................................... 3
Logic parameters .............................................. 3
Functional blocks .............................................. 4
Inputs ............................................................. 4
Outputs ........................................................... 4
Constants ........................................................ 5
Variables ......................................................... 5
Creating program ............................................. 5
Emulator ......................................................... 8
Online mode .................................................... 8
Quick example ................................................. 9
Visualization Tool...............................................17
HMI concept ...................................................18
Main window ...................................................18
Widgets ..........................................................19
Analog widgets ................................................20
Show value ...................................................20
Bar graph .....................................................22
Gauge ..........................................................24
Digital Widgets ................................................26
Command Widgets ..........................................27
Command.....................................................28
Set value ......................................................29
1
Sounds .............................................................30
Device variables ................................................31
STANDALONE HMI .............................................32
DC PowerStream PLC .........................................33
Power Supply ..................................................35
Default IP address ...........................................35
Digital inputs ..................................................36
Analog inputs ..................................................36
Digital outputs ................................................37
Factory reset ..................................................38
Appendix A .......................................................40
2
Visual Logic Programmer
Main window
The VLP have a one main window with a horizontal and vertical
toolbar. Each button has its tooltip. Also there is console section for
error and warning messages, expansion box for device properties and
adding menu.
Logic parameters
On the right side of the VLP window is located properties expansion
box. On this menu user can choose between using Emulator or real
physical device. If the user chose physical device, below this chooser is
located an IP address button. Also the common parameter for both
configurations is Device scan time. On this button user can set PLC
sampling period. The value is in range from 0ms to up. The very low
3
value may not be achieved, and depend of the program structure and
size. The common value in industry is 200ms.
Also there is a field to set device PIN. The Device PIN is a secret string
that allows communication with a device. Only the owner of the right
PIN can program, read and set data to PLC. Every device has its own
PIN. The PIN is there to protect your system if your device is available
from internet.
Functional blocks
Blocks are the elements from which the VLP software builds program.
You can program PLC by creating and interconnecting blocks in
appropriate ways. All Functional blocks have inputs and outputs. They
can have two types B (as logical Boolean) and I (as integer).
The descriptions of blocks supported on device see in (Appendix A)
Inputs
From the input expansion box on the left side, user can choose digital
or analog inputs by drag & drop to drawing area. There are 8 digital
and 4 analog inputs. Emulator can support this number of inputs but
for the physical device it depends on the device model. Inputs are
enumerated from 0 to 7 and 0 to 3. Digital inputs value is [0, 1] and
analog has value in range [0, 1024]. In online mode all inputs can be
decupled and simulated.
Outputs
From the output expansion box on the left side, user can choose digital
outputs by drag & drop to drawing area. There are 8 digital outputs.
The Emulator can support this number of outputs but for the physical
device it depends on the device model. Outputs are enumerated from
0 to 7. Digital output value is [0, 1]. In online mode all outputs can be
decupled and simulated see chapter 4.
4
Constants
Creating constants is available from popup menu or from button on
the vertical toolbar.
Constants values are in range [-2147483648, 2147483647]. Number
of constants is limited by PLC type from 32 to up.
Variables
Variables are parts of memory that can be written or read from
program diagram. They are created by user. They are represented like
inputs or outputs if they are used to read value or to store value. Also
they can by read or set by other application and programs from
communication ( HMI, SCADA ). Number of variables is limited by PLC
type from 32 to up. All variables are of type (I) and in range of [2147483648, 2147483647].
Creating program
The main goal of VLP is to provide easy programming without
knowledge for procedural programming languages and also to visualize
process on the PLC. By adding functional blocks and connecting
outputs and inputs, user can create the desired process flow chart. The
main features of this type of PLC programming are named as Function
Block Diagram.
A Function Block Diagram (FBD) is a block diagram that describes a
function between input variables and output variables. A function is
described as a set of elementary blocks. Input and output variables
are connected to blocks by connection lines. An output of a block may
also be connected to an input of another block. Inputs and outputs of
the blocks are wired together with connection lines, or links. Single
lines may be used to connect two logical points of the diagram:
 An input variable and an input of a block
 An output of a block and an input of another block
 An output of a block and an output variable
The connection is oriented, meaning that the line carries associated
data from the left end to the right end. The left and right ends of the
connection line must be of the same type.
5
Multiple right connections, also called divergence can be used to
broadcast information from its left end to each of its right ends. All
ends of the connection must be of the same type.
Figure 1
Function block diagram is one of five languages
for logic or control configuration supported by standard IEC 611313 for a control system such as a Programmable Logic Controller (PLC)
or a Distributed Control System (DCS).
After successfully creating program and setting parameters on the
button on horizontal too bar, user can create Power Stream program
and download to Emulator or physical device. In case there is any
error, this button will be disabled. If target device is Emulator the VLP
will automatically start it. If the PowerStream is properly downloaded
to the device or emulator and started the VLP will play short beep
signal and appear message box. If something is wrong, the VLP will
play deep horn sound and appear message.
6
Figure 2
Figure 3
7
Emulator
The Discover Control provides software emulator of physical device.
Emulator is fully compatible with physical device. In other words the
user can fully make the project, and test it, simulate all inputs and
outputs. User has to select emulator as target.
Online mode
Online mode provides full monitoring of current process on the
physical device. Also with options of decupling inputs and setting
simulated values the user can simulate any physical process in order
to test and debug program. When the device is running the user can
monitor process any time, if user has a proper project file. If the
project file is not the same as program on the device the VLP, online
mode will not work properly. To prevent this, the VLP will compare the
project file and program on the device before running online mode and
alert user whether something is wrong. To go to online mode user
needs to open proper project file and to choose target device (PLC or
Emulator). Next just press “Play” button on horizontal toolbar.
8
Figure 4
If everything is correct the background of VLP will change color in
green or yellow depending whether device or emulator is in use.
Otherwise the user will get notice that there is communication error or
mismatch.
Now VLP is in online mode. Each connection between functions inputs
and outputs are colored in blue or red. Each connection has its own
value. The line is blue when value is 0 otherwise is red. In online mode
the user can edit diagram only allow actions are zoom in and zoom out
, stop online mode , and decupling inputs outputs and setting values to
its and to variables.
Decupling inputs is features of Power Stream to cut out all physical
signal information and to allow to user to set the value what is need.
Next the PLC will continue to workout with new forced value until the
user couple its input or device reset. In implementation job or testing
this feature is wary power full. This is providing by right click to input
(digital or analog)
Digital outputs have the same features as inputs the user can decupled
output from value that is currently calculate in ladder an force what is
need.
Quick example
I Start VLP
II Set device IP and scan time
 Click on the vertical button “Program Settings”
 Click on the button “Device IP address” to set device IP (not
required if use Emulator)
 Click on the button “Device scan time” to set program scan time
9
III Add digital inputs


Click on the
button in the vertical tool bar to expand input
menu
Select desired input drag & drop to droving area
10
IV Add functional blocks


Click on the
button in the vertical tool bar to expand block
menu
Select desired input drag & drop to droving area
11
V Create a new variable






Click on the
button to in the vertical tool bar to expand input
menu
To create new variable click on “New Variable”
In the dialog entry “Var name ” type desired name (no special
carcters, no space use _ instead)
In the dialog entry ”Var Descriptions” type hint or description
After creating variable just drag & drop to droving area
To set value to variable choose “Assign Var”, to read value use
“Read Var”
12
13
VI Add outputs


Click on the
button to in the vertical tool bar to expand
output menu
Select desired output and just drag & drop to droving area
VII Connecting diagram
 Point mouse on the output of block left click and move to
another block input and release mouse button
14
VII Sort Create Download and Start Online
 Click on the sort button to sort functional blocks execution order
 Chose target device or emulator
 Save
 Build and download to target
 Go to on line mode
15
VIII Force inputs
 Right click on the input
 Click on the “Decouple/Coupled” to decuple or couple
 Click on the On/Off to set value
16
Visualization Tool
17
HMI concept
A human–machine interface or HMI is the apparatus which presents
process data to a human operator, and through which the human
operator controls the process. The HMI package for the SCADA system
typically includes a drawing program that the operators or system
maintenance personnel use to change the way these points are
represented in the interface. These representations can be as simple
as an on-screen traffic light, which represents the state of an actual
traffic light in the field, or as complex as a multi-projector display
representing the position of all of the elevators in a skyscraper or all of
the trains on a railway. The DC VT is two in one visualization tool and
standalone executive HMI.
Main window
The VT has a one main window with horizontal and vertical toolbar.
Each button have own tool tip. Also there are console section for error
and warning messages, expansion box for device manager, adding
menu and picture properties. On the figure (1) is explained all buttons
and sections.
18
Main window VT
Widgets
The VT has two types of widgets active and passive. The active
widgets are dynamically change their appearance depending of their
type and expression that is assigned to them on the another side the
passive widgets are only icons that use to improve visual appearance.
Active widgets have tree main categories analog, digital and
commands. All widgets have the common features: size, position..
19
Analog widgets
Analog widgets are using to represent the values from process in tree
ways, as number value, as bar graph and as gauge. As all others
widgets they use espressinon made from variables of target device to
manage their appearance.
Show value
Show value is rectangular form with numerical label inside. This string
is a current value of assigned expression. The features of Show value
are:
 Position on the screen
 Dimension
 Color of the rectangular background (can be transparent)
 Color of the numerical label
 Expression
 Tooltip label
To add show value to drawing area just drag&drop from active widgets
expansion menu sub menu analog. To format widget right click and
choose properties.
20
Adding Show value
Show value properties
21
Bar graph
A bar chart or bar graph is a chart with rectangular bars
with lengths proportional to the values that they represent. The bars
can be plotted vertically or horizontally. A vertical bar chart is
sometimes called a column bar chart. As the Show value represented
value as number the bar graph representing as graphical ratio of the
current value and the value range. The features of Bar graph are:
 Position on the screen
 Dimension
 Color of the rectangular background (can be transparent)
 Color of the value fill
 Direction and orientation
 Expression
 Tooltip label
The filled area size is proportion of the current value and the value
ratio defines with Max and Min fields defined in properties menu.
To add show value to drawing area just drag&drop from active widgets
expansion menu sub menu analog. To format widget right click and
choose properties.
22
Adding Bar graph
23
Bar graph properties
Gauge
A dial gauge is used to give a visual representation of an analogue
value. A pointer will rotate about the gauge to give a representation of
the magnitude of the monitored value.
This gauge has no background only pointer, to make background use
Background scene.
The features of Gauge are:
 Position on the screen
 Dimension
 Color of the value fill
 Direction and orientation
 Expression
 Tooltip label
 Max value range
 Min value range
 Start angle
 End angle
Start angle is the angle of the pointer and vertical axe (12 o’clock),
when value is equal to Min.
Stop angle is the angle of the pointer and vertical axe (12 o’clock),
when value is equal to Max.
The pointer uprising is in clock counter direction.
24
Adding Gauge
25
Gauge properties
Digital Widgets
Digital widgets are in use to signalize states. Depend of the dedicate
expression matrix they appeared predefined symbols. Also they can
continuously switching two predefined symbols (blinking). The symbols
are png pictures stored in VT dedicate folders that may be edited by
end user.
One widget may have up to seven expressions, and for each
expression that his evaluation is different from 0 (zero) widget can
appear one symbol (png picture) or blinking of two symbols (png
picture). If the more that one expression is different from 0 the
appearance is appropriate to the last one expression.
Adding Universal
26
Universal properties
Adding new symbols to VT is simple. Create new directory in
c:\\DiscoverControl\VT\Resources\Images\Symbols\ with
your custom name and put png pastures that you want, also is
possible to just add pictures in already existing folders in this path.
After when you open properties in Browse area tree will find new
symbols.
Command Widgets
Command widgets are widget that uses to set value on the plc to the
associated variable.
27
There are two types simple Command and Set Value. Command is
represented as button that sent value 1 to the associated variable on
PLC when is pressed. Set Value is widget that show current value of
variable on PLC but when is clicked On it appear numerical dialog for
setting a integer value to the variable.
Command
Command widget is essential widget for sending command to the PLC.
VT does not guaranty that variable is set after button is pressed. So
the user should add some indication (Universal widget) that will
confirm action. (See example 1)
Adding Command
The expression filed should only contain name of the PLC variable.
The features of Command are:
 Position on the screen
28







Dimension
Color of the Label
Label name
Expression (PLC variable)
Command type (ON/OFF, set 1/0 to PLC variable)
Tooltip label
Button image (background)
Command properties
Set value
Set value widget is combination of Show value and Command. All
time while working it shows current value of assigned plc variable. Left
click over it appear dialog with numerical keyboard to type integer
value to be set.
29
Sounds
VT also can alert user by sounds alerts. By clicking on the sound icon
on the left side, VT will expand the sound table. Sounds have two
dedicate features, expression and sound file. Every two seconds VT
evaluates expression and if expression is true it will play sound.
Depend of the VT version can be used speech filed. Like common
sound when expression is evaluated VT will read expression in speech
field evaluate and transform to speech. Only English is available.
30
Add background scene
To add background image, right click to VT drawing area, select “Add
background scene ”. Find your *.png image and check “Use
background scene”.
Sounds
Device variables
VT can communicate with more than one DCPLC device. The all
communication getting values end commanding is going over
variables. Variables are inter memory space in PLC device. Depend of
the PLC type it can be up to 32 variables. All active widgets in VT are
reading or writing values to dedicated variables. The table Device
variables are interface between VLP project and VT. User can
manually adding variable from various PLC device or can automatic
import all used variables from VLP project. Variable features are:
 Unique name
 Unique address on the PLC device [0,31]
 Ip address of the parent PLC
VT like VLP can work with emulator, and on the Device variables
menu is chooser to chose between work with device Ip addresses or
with emulator Ip address.
Important: Emulator can emulate only one PLC at time, variable
name must be unique in table even if there is variables from
different address and plc address.
31
Device variables
STANDALONE HMI
The VT standard packet allow to user to create an executive
standalone PC HMI application. After the VT project is done and well
tested user has option in the Tool tab Create PC HMI . This option
create new directory on the Desktop of PC with in exe application of
current project. This directory can be copy to another pc and use this
HMI application without of installing Discover Control IDE.
32
ANDROID HMI
Once user starts Android HMI application, it will create necessary
folders on user SD card (“Dicover Control” folder in root). After this
user needs to transfer saved HMI image and its background to proper
folders, HMI->HMI, and image->Backgrounds. HMI image and
background need to have the same name.
After that user needs to start Android VT and start his HMI image. First
select image, then you will see “Current image” name, and afterwards
you can start HMI.
Discover Control Android HMI
33
DC PowerStream PLC
Discover Control PLC is a device that provides effective automation
inside the Discover Control environment. The device possesses 8
digital inputs, 4 digital outputs through relays or 8 direct outputs, 4
analogue inputs and a network card. Power Stream operating system
guarantees execution period and processing of the programmed
34
circuits. The operating system is based on periodical algorithm, which
goes through acquisition, processing of time, processing of the whole
diagram of circuits and distribution of signals.
Power Supply
The power supply for device is in range 8 to 16 [V] DC or AC. There is
no direction of wiring because of the grec diodes.
Power Supply
Default IP address
The device has Ethernet communication module only. Only way to
communicate with plc is over Ethernet. So the default IP address is
192.168.100.150. The IP address can be changed by VLP “Tools ->
Set device IP address”. Also is set new IP address as “0.0.0.0” the
35
device will get dynamic IP address from router. If user set invalid IP
address or forget same it can be revert to default ip by factory reset
jumper.
Digital inputs
PLC has 6 digital inputs with independent positive and negative
connection points. The current direction is not important. The input
voltage in range from 2 to 36 [V] will be seen as logical one. Inputs
are protected with optocuplers.
Digital inputs
Analog inputs
PLC has 4 analog inputs in range of 0 to 20 [V]. There is protection
from over load. The programming value range is 0 1024. The wire
orientation is important.
36
Analog inputs
Digital outputs
PLC has 8 digital outputs, 4 with relays on board. The relays can bi
connect to the outputs or disconnect, every of them has dedicated
jumper. All digital outputs are connected to pin connector, this is
important for connecting with another devices or boards. First four
digital outputs are connected to the onboard relays. Relays are with
three connections. Read specification on relay box.
37
Digital outputs
Factory reset
The factory reset is using to set revert ip address to default and to
delete ladder form device. This is only way to fix device if there is any
problem with communication and running ladder. Set jumper on
HWReset to position 2-3, and reset device on button and wait until
HART Led stop blinking. After return jumper on position 1-2, and rest
device again on button. Now the ip is 192.168.100.150 and there is on
program on device. The HART Led is on.
38
Factory reset
39
Appendix A
40
I0
I1
I0
I1
I2
I0
I1
I0
I1
I2
I0
I0
I1
I0
I1
I
I0
I1
I0
I1
I2
I0
I1
I0
I1
I0
I1
I2
Q
Q = I0 & I1
Q
Q = I0 & I1 & I2
Q
Q = I0 | I1
Q
Q = I0 | I1 | I2
Q
Q
Q = ! I0
Q = ! ( I0 | I1)
Q
Q = ! (I0 & I1)
Out1
Out2
Out3
Out4
Sum
I = 0 Out1,2,3,4 = 0
= 1 Out1 =1 Out2,3,4 =
= 2 Out2 =1 Out1,3,4 =
= 3 Out3 =1 Out1,2,4 =
= 4 Out4 =1 Out1,2,3 =
I > 4 Out1,2,3,4 = 0
Sum = I0 + I1
Sum
Sum = I0 + I1 + I2
Sub
Sub = I0 - I1
Mul
Mul = I0 * I1
Mul
Mul = I0 * I1 * I2
I
I
I
I
0
0
0
0
41
I0
I1
In
(Enable)
Mod
(counter
max Out
value)
In
Mod
Sel
I0
I1
Sel
I0
I1
I2
I3
I0
I1
I0
I1
I2
I0
I1
I0
I1
I2
A
B
I2
A
B
A
B
Q
Q = I0 / I1
Q
I > 0 Q[t] = (Q[t - 1] + 1) %
(count
Mod
from 0
to Mod 1)
Out
Q = In % Mod
Out
Sel = 0 Out = I0
Sel = 1 Out = I1
Out
Sel
Sel
Sel
Sel
=
=
=
=
0
1
2
3
Out
Out
Out
Out
=
=
=
=
I0
I2
I3
I4
Q
Q = max (I0 , I1)
Q
Q = max (I0 , I1, I2)
Min
Q = min (I0 , I1)
Min
Q = min (I0 , I1, I2)
AgB
AlB
AeB
AlB
A > B AgB = 1 AlB,AeB = 0
A < B AlB = 1 AgB,AeB = 0
A = B AeB = 1 AgB,AlB = 0
A < B AlB = 1
A > = B AlB = 0
A = B AeB = 1
A < > B AeB = 0
AeB
42
R
S
I
Q
Q
It-1 = 0, It = 1
Qt = 1 Qt+ 1 = 0 Qt-1 = 0
I
Q
I
Out
It-1 = 1, It = 0
Qt = 1 Qt+ 1 = 0 Qt-1 = 0
Out = I(t – 1)
VAL
VAR
VAR
On
Off
OnOff
T = t0 VAR = VAL (init)
T = t0 + n VAR = VAR ()
IN
PT
Q
ET
T0, On = 1 & Off = 0, T > T0
OnO = 1
T0, Off = 1 T > T0 OnO = 0
Timer ON delay
See diagrams below
IN
PT
IN
PT
Q
ET
Q
ET
Timer OFF Delay
See diagrams below
Pulse generator
See diagrams below
43
TP Timing diagram
TON Timing diagram
TOF Timing diagram
44
Download