PLC Programming Guide For Dse Controllers
PLC Programming Guide For Dse Controllers
ISSUE 1
Amd. No.
Comments
First release
Typeface : The typeface used in this document is Arial. Care must be taken not to mistake the upper
case letter I with the numeral 1. The numeral 1 has a top serif to avoid this confusion.
Table of Contents
1
2
BIBLIOGRAPHY .................................................................................................. 4
INTERNAL PLC DESCRIPTION .......................................................................... 4
2.1
DSE CONTROLLER COMPATIBILITY ............................................................................... 5
2.2
FUNCTIONS, FLAGS AND MATHS.................................................................................... 6
2.2.1
PLC FUNCTIONS......................................................................................................... 6
2.2.2
FLAGS ......................................................................................................................... 6
2.2.3
PLC MATHEMATICS.................................................................................................... 6
2.2.3.1
2.2.3.2
3.1.2
3.1.3
3.1.3.1
3.1.3.2
3.1.3.3
3.1.3.4
3.1.3.5
3.1.3.6
3.1.3.7
3.1.3.8
3.1.3.9
3.1.4
3.1.4.1
3.1.4.2
3.1.4.3
3.1.4.4
3.1.4.5
3.1.4.6
3.1.4.7
3.1.4.8
4
5
ACTIONS ................................................................................................................... 14
TRIGGER TYPE......................................................................................................... 14
CONTROLLING USER PLC FLAGS .....................................................................................15
COUNTER CONTROL..........................................................................................................15
MATHEMATICAL .................................................................................................................16
COPY ..................................................................................................................................16
CLOCK ADJUST ..................................................................................................................17
TIMER .................................................................................................................................17
FUNCTION ..........................................................................................................................18
OVERRIDE GENCOMM .......................................................................................................19
ALARM RESET ....................................................................................................................19
TOOLS ....................................................................................................................... 20
COUNTERS .........................................................................................................................20
TIMERS ...............................................................................................................................20
REGISTERS ........................................................................................................................21
STORES ..............................................................................................................................21
ADD LABEL .........................................................................................................................21
IMPORT RUNG(S) ...............................................................................................................22
SEARCH FOR USAGE .........................................................................................................22
MEMORY STATUS ..............................................................................................................22
Introduction
1 BIBLIOGRAPHY
This document refers to and is referred to by the following DSE publications, obtained from the DSE
website www.deepseaplc.com.
DSE Part
057-051
057-157
057-077
057-160
057-119
057-127
057-164
057-174
057-203
Description
DSE Configuration Suite PC Software Installation & Operation Manual
DSE335 Configuration Suite PC Software Manual
DSE7200 and DSE7300 Series Configuration Suite PC Software Manual
DSE7410 and DSE7420 Configuration Suite PC Software Manual
DSE8600 Series Configuration Suite PC Software Manual
DSE8700 Series Configuration Suite PC Software Manual
DSE8810 Configuration Suite PC Software Manual
DSE8860 Configuration Suite PC Software Manual
DSEE800 Configuration Suite PC Software Manual
NOTE: It is the responsibility of the PLC programmer to ensure that the PLC program
operates exactly as intended. DSE cannot be held responsible for any issues arising from
unintended actions of the PLC program.
Introduction
2.1
At the time of writing, the following controllers include the internal PLC with the following features:
Feature
Number Of Nodes
Counters
Timers
Plc Functions
User Plc Flags
Flag Test
Flag Set, Reset, Drive, Toggle
Calendar Test
Instrumentation Test
Button Press Test
Import / Export Rungs
Alarm Reset
Label Space
Editable Timer And Counter Names
PLC SCADA
Override Gencomm
Registers
Stores
Module Display of Counters & Timers
Module Display of Register & Stores
Front Panel Editing of Counter and Timer
Set Points
Front Panel Editing of Registers
Front Panel Editing of Stores
Maths Functions
Clock Adjust (+/- 1hr)
DSE335
50
10
10
20
20
DSE72xx
100
10
10
20
20
DSE73xx
100
10
10
20
20
1024
DSE74xx
200
10
10
20
40
2048
DSEE800
400
20
20
20
40
2048
DSE86xx
400
20
20
20
40
2048
20
8
DSE87xx
200
10
10
20
40
2048
DSE88xx
200
10
10
20
40
2048
2.2
The PLC operates using key components Functions, Flags and Maths. Almost every PLC program
consists of checking Flags and activating Functions or setting user Flags. Additionally more complex
programs may include some mathematical operations.
2.2.1
PLC FUNCTIONS
PLC functions can be considered as Virtual Inputs. For example, a PLC Function is configured in
exactly the same way as a Digital Input. The difference is that the PLC Function is activated by the
PLC and does not require hard wiring. In addition it does not use up one of the modules hardware
inputs.
2.2.2
FLAGS
Flags can be considered as Status Items within the DSE controller. Any operating state or alarm that
occurs can be detected by the PLC program. Decisions can then be made as to what action to
perform upon particular conditions.
It is also possible to create user flags to store the result of a condition or set of conditions. These are
known as PLC Output Flags.
Module outputs can then be set to operate upon the PLC Output Flags or upon the modules inbuilt
Flags.
These Flags are often called Output Sources.
2.2.3
PLC MATHEMATICS
PLC mathematics allows the user to manipulate instrumentation values with mathematical functions,
placing values and results into the modules Registers or Stores for access later either by the PLC
itself or via the controllers display.
2.2.3.1
USER REGISTERS
Values placed in the User Registers are lost when the module DC power is removed and after
configuration upload from the DSE Configuration Suite PC Software.
User Registers are able to be viewed in the module instrumentation screens after selection using the
DSE Configuration Suite PC Software. Refer to the section entitled Module Display elsewhere in this
document for further details.
2.2.3.2
USER STORES
Values placed in the User Stores are maintained, even when the module DC power is removed.
The values are stored in Non-Volatile (N.V.) memory. To minimise the number of writes to the N.V.
memory (extending its life), the values are stored at intervals of one minute since the last write to the
N.V. memory and then only if the value has changed.
User Stores are able to be viewed and edited in the module instrumentation screens after selection
using the DSE Configuration Suite PC Software. Refer to the section entitled Module Display
elsewhere in this document for further details.
3.1
PLC LOGIC
Icons for testing Conditions
Icons for Actions
Icons for Tools
To create a program, click and drag the icons from the Condition and Actions toolbar onto the
program area.
The PLC program is evaluated every 100 ms (10 times per second).
The evaluation time of each rung is indeterminate as each rung consists of a variety of functions,
each one with a variable execution time.
Actions are queued by the PLC during the evaluation of the rungs, then executed in order at the
completion of the program, before the cycle begins again.
This means that the order of the items in the PLC may change the way the program operates.
3.1.1
CONDITIONS
Items on the Conditions toolbar allow for a variety of conditions to be tested (checked). Not all items
are available with all controllers.
Test Flag
Test
Instrumentation
Value
3.1.1.1
Test Timer
Test Calculated
Value
Test
Counter
Test Button
Press
TEST FLAG
A Flag is an internal state of the controller. Some examples of flags include operating mode and
current alarm conditions. The list of testable flags varies depending upon the controller being
configured and is the same list for configuring the modules output relays. A full list along with
descriptions is contained within the relevant DSE Configuration Suite PC Software Manual.
3.1.1.2
Mathematical Symbol
< (Or Value is Under Range)
<= (Or Value is Under Range)
=
>= (Or Value is Over Range or at another Sentinel Value)
> (Or Value is Over Range or at another Sentinel Value)
>= AND <= (And Value is not at a Sentinel Value)
The list of testable flags varies depending upon the controller. A full list of module instrumentation is
contained within the relevant Operator Manual.
Not all instrumentation can be read from all controllers. These include :
Instruments that are not supported by the controller. For example Mains Voltage is only
available in controllers with Mains Sensing.
Instruments not configured in the controller. For example the Fuel Level Input may be
configured to be not used.
Instruments that are under range or over range. For example if the Coolant Temperature is
below the measurable range of the temperature sensor being used.
Instruments that are in a fault condition. For example the Oil Pressure Sensor may be open
circuit.
Instruments whose condition cannot be determined. For example Power Factor is not
measurable when there is no load applied to the generator.
In these circumstances the module returns a sentinel value as listed overleaf. The actual value
returned for a given state varies depending upon the size and type of instrument being read.
NOTE: It is the responsibility of the PLC programmer to ensure that the PLC program
operates exactly as intended. DSE cannot be held responsible for any issues arising from
unintended actions of the PLC program.
Sentinel Values
(Hexadecimal)
0xFFFF
0xFFFE
0xFFFD
0xFFFC
0xFFFB
0xFFFA
0xFFF9
0xFFF8
0x7FFF
0x7FFE
0x7FFD
0x7FFC
0x7FFB
0x7FFA
0x7FF9
0x7FF8
0xFFFFFFFF
0xFFFFFFFE
0xFFFFFFFD
0xFFFFFFFC
0xFFFFFFFB
0xFFFFFFFA
0xFFFFFFF9
0xFFFFFFF8
0x7FFFFFFF
0x7FFFFFFE
0x7FFFFFFD
0x7FFFFFFC
0x7FFFFFFB
0x7FFFFFFA
0x7FFFFFF9
0x7FFFFFF8
Sentinel Values
(Decimal)
65535
65534
65533
65532
65531
65530
65529
65528
32767
32766
32765
32764
32756
32763
32762
32761
4294967295
4294967294
4294967293
4294967292
4294967291
4294967290
4294967289
4294967288
2147483647
2147483646
2147483645
2147483644
2147483643
2147483642
2147483641
2147483640
10
Description
Unimplemented
Over measurable range
Under measurable range
Transducer fault
Bad data
High digital input
Low digital input
Reserved
Unimplemented
Over measurable range
Under measurable range
Transducer fault
Bad data
High digital input
Low digital input
Reserved
Unimplemented
Over measurable range
Under measurable range
Transducer fault
Bad data
High digital input
Low digital input
Reserved
Unimplemented
Over measurable range
Under measurable range
Transducer fault
Bad data
High digital input
Low digital input
Reserved
3.1.1.3
NOTE: On some controllers, Calculated Values are available in the Test Instrumention
section.
Calculated values are predefined by DSE and are included to provide additional ways of testing of the
controllers instrumentation.
Selection
Average
Difference
Maximum
Minimum
Minimum Index
Maximum Index
Description
An average of the instrumentation
The difference between the maximum and the minimum
The highest instrumentation value
The lowest instrumentation value
Indicates the lowest of the three phases (L1=1, L2=2, L3=3)
Indicates the highest of the three phases (L1=1, L2=2, L3=3)
Example:
L1 = 230 V AC
L2 = 233 V AC
L3 = 224 V AC
Results of the Calculated Values operators are as follows:
Average
Difference Maximum Minimum
233
224
229
9
((230+233+224)/3)
(233-224)
Maximum
Value
Minimum
Value
11
Minimum Index
3
Maximum Index
2
L3 is the minimum
of the three phases
L2 is the maximum of
the three phases
3.1.1.4
TEST COUNTER
3.1.1.5
TEST TIMER
3.1.1.6
Test Time and Date are a collection of tests that allows an action based upon a specific time, date or
time and date.
Icon
Name
Time of Day
Day of Week
Day of Month
Week in Month
Month
Description
Allows testing for a specific time ie 10:32 am
Allows testing for a specific day(s) ie Tuesday
Allows testing for a specific date(s) in the month ie 25th
Allows testing for a specific week(s) in the month ie Week 3
Allows testing to a specific month(s) ie September
It is also possible to combine two or more of these tests to make a more specific test.
For example:
+ +
allows a test for a specifc time, day and month, for instance 10:32am on any Tuesday in
September.
12
3.1.1.7
Allows the PLC program to check if any of the control buttons are being pressed on the controller.
Depending upon controller type this allows testing for the following button presses:
DSEGenset Range
Stop/Reset
Manual
Auto
Test
Start
Mains
Gen
Mute
DSEATS Range
Start Inhibit
Manual
Auto
Mode
Mute
Information
S1
S2
This example drives PLC Flag 1 when the Test button AND Start button is pressed:
13
3.1.2
ACTIONS
The action toolbar contains the icons that allow the PLC to perform certain actions. These are
described in the following sections.
Methods of
Controlling User
Flags
Mathematical
Counter Control
Copy
3.1.3
Timer
Clock
adjust
PLC Function
Alarm Reset
Override
Gencomm
TRIGGER TYPE
Some Actions are edge triggered. This means the action takes place when the preceeding
Condition(s) change. If a Condition remains unchanged, the Action is not repeated.
Some Actions are level triggered. This means the action takes place if the Condition(s) are true and
continues to be actioned until the Condition(s) become false.
Action Type
Set Flag
Drive Flag
Reset Flag
Toggle Flag
Increment Counter
Decrement Counter
Zero Counter
Mathematical
Copy
Clock Adjust
Timer
Plc Function
Gencomm Override
Alarm Reset
Trigger Type
Edge
Edge
Edge
Edge
Edge
Edge
Edge
Level
Level
Edge
Level
Level
Level
Level
14
3.1.3.1
Four different ways of controlling the User Settable PLC Flags are possible.
Icon
Name
Set Flag
Reset Flag
Toggle Flag
Drive Flag
3.1.3.2
Description
Sets a Flag. The flag remains set until another a Reset or Toggle action
changes it. Removal of the condition that activated the Set command has
no effect on the state of a flag.
This is useful for remembering that a condition has occurred.
If a flag is in a Set position, this action resets the flag.
Changes the state of a flag. If the flag is currently set, it resets it.
If the flag is currently reset, it sets it.
This action makes the flag state follow the condition that preceeds it.
For example if the condition is true, the flag is set. If the condition is
subsequently removed, the flag is automatically reset.
COUNTER CONTROL
Name
Increment
counter
Decrement
counter
Zero counter
Description
Adds one to the specified counter until the counter reaches its configured
counter limit.
Subtracts one from the specified counter (unless the counter is already
zero (0)).
Sets the specified counter to Zero.
15
3.1.3.3
MATHEMATICAL
Actions to allow mathematical functions to be performed and the results placed in a Register or Store.
Item
Operation
Value 1
Value 2
Target
Description
Addition: Value1 + Value 2
Subtraction: Value 1 Value 2
Multiply: Value 1 * Value 2
Divide: Value 1 / Value 2 (remainder is lost)
Remainder: The remainder of Value 1 / Value 2
Magnitude: The value with its sign removed. For example both 6 and -6 give a
value of 6.
Minimum: The lowest of Value 1 and Value 2. For example Value 1 = 5, Value
2 = 7. The Minimum is 5.
Maximum: The highest of Value 1 and Value 2. For example Value 1=5, Value
2 = 7. The Maximum is 7.
The location where the result of the mathematical operation is to be placed.
Register: Values placed in the User Registers are lost when the module DC
power is removed.
Store: Values placed in the User Stores are maintained, even when the module
DC power is removed.
For further details of Registers and Stores, see the section entitled PLC Maths
elsewhere in this document.
3.1.3.4
COPY
Target
Description
Fixed Value: Enter the value manually.
Calculated Value: Select the calculated instrumentation value from a list of
prefined options.
Instrumentation Value: Select one of the modules instrumentation items.
Register: Select one of the Registers.
Store: Select one of the Stores.
The location where the Value is to be placed.
Register: Values placed in the Registers are lost when the module DC power is
removed.
Store: Values placed in the Stores are maintained, even when the module DC
power is removed.
For further details of Registers and Stores, see the section entitled PLC Maths
elsewhere in this document.
16
3.1.3.5
CLOCK ADJUST
Included to ease Daylight Saving adjustments, this allows one hour to be added to or subtracted from
the modules internal clock.
Example:
Showing the addition of one hour on the fourth Sunday in March at 1 am. Addtionally this is setting a
User Store to the value of 1. This allows us to check in the PLC SCADA or in the module
instrumention if DST is active:
Example:
Showing the subtraction of one hour on the fourth Sunday in October at 2 am. We additionally check
the status of DST (Store 1) to ensure the clock is not continually adjusted one hour later!
3.1.3.6
TIMER
17
3.1.3.7
FUNCTION
PLC functions can be considered as Virtual Inputs. For example a PLC Function is configured in
exactly the same way and has the same selections as a Module Digital Input. The difference is that
the PLC Function is activated by the PLC and does not require hard wiring.
Item
Function
Polarity
Action
(Only applicable when
function is set to User
Configured)
Description
User Configured: Allows the user to configure the Function to perform
an alarm or status indication.
Digital Input Selection List: Allows the user to select from a predefined
selection list. Refer to the DSE Configuration Suite PC Software Manual
for the host controller in use for a full description of possible selections.
Close to Activate: The Function is normally inactive and must be
driven in the PLC in order to activate it.
Open to Activate: The Function is normally active and must driven in
the PLC in order to de-activate it.
Electrical Trip: When activated, an electrical trip alarm is generated, the
load switch is opened (if closed) and the generator placed into the
cooling run before stopping.
Indication: No alarm condition is generated and the set continues to
run. This is often used to create status indications or be monitored by the
users PLC logic.
Warning: When activated, a warning alarm is generated but the set
remains running.
Shutdown: When activated, a shutdown alarm is generated, the load
switch (if closed) is immediately opened and the set is immediately
stopped.
Example using a function to prevent starting the generator upon a mains failure during the whole of
Sunday. This uses PLC Function 1, configured to Auto Start Inhibit.
18
3.1.3.8
OVERRIDE GENCOMM
Using an external PLC that has a Modbus master serial port, it is possible to write values to the DSE
controllers to change certain parameters. The protocol used for this is called Gencomm.
Using the DSE internal PLC, it is possible to change these same values using the Override Gencomm
action.
Depending upon controller type, the parameters that can be changed vary. Some controllers have no
adjustable parameters using this function.
Example 1: Using Override Gencomm, the Run Priority of the set can be changed.
Example 2: Using Override Gencomm, the amount of power the generator is producing can be
changed.
3.1.3.9
ALARM RESET
This action allows individual alarms to be reset. An alarm can only be reset if the condition that
generated the alarm is no longer present.
To perform an action that resets ALL alarms, its more appropriate to drive a PLC Function that has
been configured to Alarm Reset.
19
3.1.4
TOOLS
Import PLC
Rung(s)
Setup
Timers
Setup
Counters
Setup
Registers
3.1.4.1
Setup
Stores
Add a Label
COUNTERS
Click and
Drag to Set
the Counter
Limit
Click to
Rename the
Counter
(DSE8xxx
series only)
Scroll down
to access all
the counters.
3.1.4.2
TIMERS
Click to
Rename the
Timer
Click and
drag to set
the Timer
Limit
(DSE8xxx
series only)
Scroll down
to access all
the timers.
20
3.1.4.3
REGISTERS
Allows the user registers to be named for easier referencing and display on the module screen.
Click to
rename the
Register
3.1.4.4
STORES
Allows the user registers to be named for easier referencing and display on the module screen.
Click to
Rename the
Stores
3.1.4.5
ADD LABEL
Clicking Add Label generates a blank label in the PLC Ladder. This allows the designer to place notes
in the PLC Ladder.
Delete the
Label
21
3.1.4.6
IMPORT RUNG(S)
Allows the designer to import a PLC program containing one or more rungs into the current program.
This is useful for reusing functions created in other configurations.
Care must be taken when using this function as Flags, Registers, Stores, Counters, Timers and PLC
Functions may be called that are already in use in the current program.
3.1.4.7
Shows a list of currently used Functions, Counters, Timers, Registers and Stores. This makes it
easier when adding additional counters and timers by allowing the designer to see which ones are
already in use.
3.1.4.8
MEMORY STATUS
The PLC memory status is contained at the bottom of the PLC Logic page. The amount of available
memory differs between controller ranges.
22
Module Display
4 MODULE DISPLAY
NOTE: This section is not available on all controllers. See the section entitled DSE
Controller Compatibility elsewhere in this document.
This section allows the user to select up to eight items from the complete list of Counters, Timers,
Registers or Stores for display on the host modules instrumentation display.
After selection for display on the host controller, Counters, Timers, Registers and Stores are able to
be viewed and/or edited as below on the controller display.
Parameter
Counter Value
Counter Limit
Timer Value
Timer Limit
Register
Store
View
Edit
NOTE: All Stores are able to be edited in the SCADA | PLC | PLC Stores section of the
DSE Configuration Suite PC Software regardless of their selection in the Module Display |
Displayed Pages section of the configuration. For details of this, refer to the relevant control
DSE Configuration Suite PC Software Manual as listed in the Bibliography section of this
manual.
23
The fundamental issue in creating a PLC program is knowing exactly what is required!
It is usually best to start with a written description. As the DSE PLC is based around the internal
system of inputs and outputs, keep these functions in mind when designing the solution.
5.2
For example, if a function is required to silence the controllers alarm 30 seconds after it begins, the
designer must consider how to determine if the alarm is active and then how to perform the silencing
function.
Looking through the list of Flags we find Audible Alarm. This flag is set whenever the controllers
internal audible alarm is active.
Therefore, in the PLC Logic screen we can drag the
following options box appears:
Parameter
Condition Type
Polarity
Source
OK
Cancel
Description
The type of condition to check for. This is automatically set when the icon is
dragged from the Condition toolbar but can be changed if the wrong one is
inadvertently selected.
Normally Open: Tests if the condition is True.
Normally Closed: Tests if the condition is False.
Contains the list of available Flags.
This list differs between controller types. A full list of sources is included in the
relevant controllers Configuration Suite manual.
Click to add the condition to the PLC program.
Click to cancel and return to the editor without adding the condition.
In our example we select Flag Test, Normally Open, Audible Alarm and click
Our example program is now as below. If it isnt, then go back and check what went wrong.
24
The next thing we need to do is set a timer that expires in 30 seconds after the audible alarm begins.
Drag the
(Delay) icon from the Action Toolbar and drop it just to the right of the black line to the
right of the Audible Alarm symbol that has just been placed.
Parameter
Action Type
Timer #
Next click
Description
The type of action to perform. This is automatically set when the icon is dragged
from the Action toolbar but can be changed if the wrong one is inadvertently
selected.
The number of the timer to be operated.
, the Timer Limit settings box appears.
This program now checks for an audible alarm and start a timer that runs for 30 seconds (so long as
the audible alarm remains active). Next we need to configure what happens when the timer expires.
We need a new Condition:
(Timer Test). Drag this from the Condition Toolbar into the empty
space below the first PLC rung. The details window appears. Make selections as shown below. This
checks to see if Timer # 1 has expired.
25
We have now just one more item to add to the PLC Ladder.
When the 30 second timer expires, we want it to silence the audible alarm. This is achieved using a
PLC Function. Drag the (Trigger Function) icon and drop it to the right of the Timer Limit 1 condition.
Parameter
Action Type
Function #
Description
The type of action to perform. This is automatically set when the icon is dragged
from the Action toolbar but can be changed if the wrong one is inadvertently
selected.
The number of the Function to be operated.
This program now checks for an audible alarm and start a timer that runs for 30 seconds (so long as
the audible alarm remains active).
When the timer expires, Function 1 is triggered.
Finally we have to configure what Function 1 is used for.
Select PLC Functions 1-4 from the Configuration Editor:
26
For our example PLC program, we need to select Alarm Mute, a predefined function that silences the
alarm:
Function. The possible
selections differ with
each controller range.
These are listed in the
relevant Configuration
Suite Software
manual.
As this example
shows a predefined
function, these
parameters are
greyed out as they
are not applicable
Finally. We have a program that now checks for an audible alarm and starts a timer that runs for 30
seconds (so long as the audible alarm remains active).
When the timer expires, Alarm Mute (Function 1) is triggered silencing the alarm. If another alarm
occurs, the audible alarm restarts, starting our 30 second timer again.
Remember to click (Save) to save a copy of the configuration file. The PLC program is contained
within the configuration file.
Also remember to click (Write to module) to upload the configuration file to the connected controller.
27
Description
Active (True)
Test PLC flag 1 (normally open)
28
Inactive (False)
29
30