8 1 Mode 60 – Discrete Filtered

Mode 60 –
Discrete Filtered
Inputs
In This Chapter. . . .
18
Ċ Wiring the Discrete Filtered Inputs
Ċ Configuring the Discrete Filtered Parameters
Ċ Writing the Control Program
Ċ Verification of Proper Operation
Ċ Troubleshooting
8–2
Discrete Filtered Inputs
Using the Discrete Filtered Inputs, Mode 60
It is recommended that you read Chapter 1, Getting Started, which introduces the six
different modes of operation of the D2–CTRINT module, before selecting a mode.
Even though several features can be mixed from several modes, you must select
one of the modes as your primary mode. Discrete Filtered Inputs, Mode 60 will be the
only mode covered in this chapter.
It is also important to read Chapter 2, concerning the general guidelines for field
wiring your device to the module. You may want to refer to Chapter 2 as you learn to
make use of the D2-CTRINT’s pulse catch inputs. A good place to begin is to learn
what each channel of the module represents when it is being used for Discrete
Filtered Inputs.
Default Settings for Discrete Filtered Inputs,-Mode 60
D2–CTRINT Terminals
CW
CCW
D2
DL230, DL240, DL250–1 or DL260
00
Discrete Filtered Input
01
Installation and
Safety Guidelines
Mode 60
Discrete/Filtered Inputs
02
03
Discrete Filtered Input
Discrete Filtered Input
Discrete Filtered Input
04
Not Used
Note: Refer to pages 2–4 and 2–5 when wiring
your particular device.
Shown in the above diagram and illustration are points 00 through 03 which default
to discrete filtered inputs when the module is set for Mode 60.
All of the I/O points do not have to be used as Discrete Filtered Inputs; there are other
options which can be used.
DL205 High Speed Counter
Interface Manual, 2nd Ed, Rev. A
8–3
Discrete Filtered Inputs
Discrete Filtered
Inputs
Some applications have inputs from field devices which have high noise levels.
Adjustable input filtering will help eliminate these nuisance signals caused by switch
bounce or other sources.
When an input signal is first detected at any one of the four channels, a
programmable filter is activated which begins a timed countdown. The ON status of
the signal is temporarily prevented from being read by the input update of the CPU.
The ON signal must stay present long enough for the filter to “time out”.
Once the signal has remained ON for the programmed time, it is latched and allowed
to be accepted by the CPU during the normal input update of the PLC scan cycle.
The signal is latched for the remaining duration of the ON signal plus an amount of
time equal to the filter time. The filter time can be programmed from 0 to 99ms in 1ms
increments.
X0 (point 00)
(External status)
ÉÉÉÉÉÉÉÉÉÉÉ
ÉÉÉÉÉÉÉÉÉÉÉ
Latched Time
(Internal status)
Filter Time
(0 – 99ms)
Filter Time
(0 – 99ms)
Note: If a zero (0) is stored to V–memory as the filter time, the CPU will treat the
configuration as having no filter. The filter time range is 0 – 99ms.
Mode 60
Discrete/Filtered Inputs
The signal is now allowed to be
accepted by the normal input
update of the PLC Scan Cycle.
Installation and
Safety Guidelines
DL205 High Speed Counter
Interface Manual, 2nd Ed, Rev. A
8–4
Discrete Filtered Inputs
Understanding V-Memory
Setup Locations
Installation and
Safety Guidelines
Mode 60
Discrete/Filtered Inputs
The Discrete Filtered Input, Mode 60, associated with the D2-CTRINT requires
V-memory configuration in order to be used.
V-memory location V7633 is the most important of all the reserved memory areas
because it stores the value which lets the CPU know which mode has been selected.
The following diagram shows the 16–bit word and the various information it stores,
including the values used for the Counter Interface Module. The example shown
here is for the Discrete Filtered Input, Mode 60. The lower bits are set to 60 and the
upper bits are set to 10 so the backup battery is enabled. Together they form the
hexadecimal number 1060.
Bits
15
14
13
Memory Location V7633
12 11 10 9
8
7
6
5
0
0
0
1
0
1
0
0
0
0
0
Miscellaneous Setup
Binary Coded Decimal:
00 = Not Used (default)
10 = Battery Enabled (DL230/240/250–1/260)
20 = Power Up in Run (DL230 only)
30 = Selects both Battery Enable
and Power Up in Run (DL230 only)
40 = Mode Change Enable in K–sequence (DL240 only)
50 = Battery Enable and Mode Change Enable
in K–sequence (DL240 only)
1
1
6
4
3
2
1
0
0
0
0
0
0
0
D2-CTRINT Mode Setup
Binary Coded Decimal:
00 = Not Used
10 = UP Counting Mode
20 = UP/DOWN Counting Mode
30 = Pulse Output Train
40 = High Speed Interrupts
50 = Pulse Catching
60 = Discrete Filtered Inputs
NOTE: It is important to look at the entire 16 bits in V7633. If the RLL program only
sets the bits in the lower byte when entering the mode value, the upper bits will be
overwritten with zeros (0’s). Always enter a 4-digit BCD value in the V-memory. This
way, the proper value will be written into the upper bits.
There are also other V-memory locations which contain Counter Interface setup
information for each I/O point. The CPU will automatically configure them with
default values for each Counter Interface mode selected.
DL205 High Speed Counter
Interface Manual, 2nd Ed, Rev. A
8–5
Discrete Filtered Inputs
Default Settings
When xx60 is written to V7633, the CPU places the following default codes in
V-memory:
Configuration
Point 00/V7634 Point 01/V7635 Point 02/V7636 Point 03/V7637 Point 04
DL230
Hexadecimal
Value
Discrete Input
1006
Discrete Input
1006
Discrete Input
1006
Discrete Input
1006
Not Used
DL240/250–1/26
0
Hexadecimal
Value
Discrete Input
1006
Discrete Input
1006
Discrete Input
1006
Discrete Input
1006
Not Used
Default Settings for Interrupt Input Mode 60
D2–CTRINT Terminals
CW
CCW
DL230
D2
DL240/250–1/260
00
00
Dis. Input
01
Dis. Input
03
04
Dis. Input
Dis. Input
Not Used
02
03
04
Dis. Input
Dis. Input
Dis. Input
Not Used
Note: Refer to pages 2–4 and 2–5 when
wiring your particular device.
Mode 60
Discrete/Filtered Inputs
02
Dis. Input
01
Installation and
Safety Guidelines
DL205 High Speed Counter
Interface Manual, 2nd Ed, Rev. A
8–6
Discrete Filtered Inputs
Custom Configuration
Up to this point, only Mode 60 default settings have been discussed. The default
settings will be suitable for many applications and will not require a custom
configuration. However, for those applications needing the defaults changed so the
D2–CTRINT will work for the applications, use the following table which contains the
options available.
Mode 60 Options
Point Number
V-Memory
Location
Possibility (One per
point)
Hex Value
point 00
V7634
Discrete Filtered Input
xx06 (xx=filter time) (default)
High Speed Interrupt (Internal)
0004
High Speed Interrupt (timed)
ttt4 (ttt=1 to 999ms timer setting)
Pulse Catcher
0005
Discrete Filtered Input
xx06 (xx=filter time) (default)
High Speed Interrupt
(DL240/250–1/260)
0004
Pulse Catcher
(DL240/250–1/260)
0005 (DL240/250–1/260)
Discrete Filtered Input
xx06 (xx=filter time) (default)
High Speed Interrupt
(DL240/250–1/260)
0004
Pulse Catcher
(DL240/250–1/260)
0005 (DL240/250–1/260)
Discrete Filtered Input
xx06 (xx=filter time) (default)
High Speed Interrupt
(DL240/250–1/260 only)
0004
Pulse Catcher
(DL240/250–1/260)
0005 (DL240/250–1/260)
Not available in Mode 60
--------------
Installation and
Safety Guidelines
Mode 60
Discrete/Filtered Inputs
point 01
point 02
point 03
point 04
V7635
V7636
V7637
--------
DL205 High Speed Counter
Interface Manual, 2nd Ed, Rev. A
8–7
Discrete Filtered Inputs
Setting Up the CPU for Discrete Filtered Inputs
Configuring the
V–Memory
Step 1:
Enter the Mode
The CPU checks the V-memory to see if there is a High Speed Counter Interface
Module present. There will be the number 10, 20, 30, 40, 50, or 60 in V7633 if a
module has been properly configured. If the CPU finds that a Counter Interface
module is present, it checks other V-memory locations to see how they have been
configured for each channel of the module.
The values can be entered into memory by using either a handheld programmer or
by editing them into a control program using DirectSOFT32. The following
examples will show how to use DirectSOFT32 to configure the Filtered/Discrete
Inputs.
If Mode 60, Discrete Filtered Inputs, has been chosen as the primary function, then
the value 60 must be placed in V7633. The following DirectSOFT32 diagram shows
the setup procedures for communicating with a DL230, DL240, DL250–1 or DL260
CPU. Refer to the DirectSOFT32 Programmers User Manual for more details.
Mode 60
Discrete/Filtered Inputs
Setting the
V-Memory
using RLL
Installation and
Safety Guidelines
Setting the
V-Memory
using the
Memory
Editor
Editing the D2–CTRINT setup at the beginning of the user program is the most
efficient method for setting up the counter mode. Should there be a need to change
any of the counter setup values after the PLC has been put in the RUN Mode, use the
Memory Editor to change the values. These values will only be temporary. They
should be put into the program if they are to be used permanently.
DL205 High Speed Counter
Interface Manual, 2nd Ed, Rev. A
8–8
Discrete Filtered Inputs
The following RLL example shows how to set V–memory location V7633 to Mode
60, Discrete Filtered Input,. This is the location for all mode values for this module.
Only one mode (6 possible) can be entered, i.e. 10,20,30,40,50 or 60.
DirectSOFT32 Display
SP0
LD
K60
Load Mode 60 in Accumulator
OUT
V7633
Installation and
Safety Guidelines
Mode 60
Discrete/Filtered Inputs
Transfer Contents of
Accumulator to V7633
Two commands are needed to put the values into V-memory. The value must first be
loaded into the accumulator of the CPU, then the CPU must transfer the value to the
memory location. In this case, 60 is to be placed in V7633. This value is loaded into
the accumulator, LD K60. The CPU then writes this data to the memory location,
V7633, once it reads the OUT instruction, OUT V7633. Notice that an SP0 contact is
used in this rung. This relay is on for the first scan only. This will load the values into
memory initially, thereby keeping the scan time to a minimum.
Step 2:
How many
Channels
Step 3:
Configure the
V-Memory.
Up to four (4) Discrete Filtered Inputs can be used with the DL230/240/250–1/260
CPUs. The following steps will discuss the programming for each channel.
The table below gives a description for each of the V–memory locations which must
be configured for each I/O point which are selected to be filtered inputs.
V–Memory
Description
V7633
Primary Mode (Discrete Filter=60)
V7634
Point 00
V7635
Point 01
V7636
Point 02
V7637
Point 03
DL205 High Speed Counter
Interface Manual, 2nd Ed, Rev. A
8–9
Discrete Filtered Inputs
In the below example, Channels 1 and 2 are configured as Pulse Catch Inputs,
Channel 3 is to be a Discrete Filtered Input, and Channel 4 to be an Interrupt Input.
Channel 3 is set to be a 20ms filter and Channel 4 is set to be a 10ms filter.
DirectSOFT32 Display
SP0
LD
K5
OUT
V7634
Pulse Catching at Point 00
LD
K5
OUT
V7635
LD
K2006
OUT
V7636
Pulse Catching at Point 01
Discrete Input w/20 ms filter;
at Point 02
LD
K1006
OUT
V7637
Discrete Input w/10 ms filter;
at Point 03
Mode 60
Discrete/Filtered Inputs
The hex number 5 stored in points 00 and 01 is the value for the Pulse Catching
feature. Notice that the upper two digits of each hex value stored in V-memory for
points 02 and 03 are the timing constants for filtering. The last two digits, 06, is the
value for Discrete Filtered Inputs.
Installation and
Safety Guidelines
DL205 High Speed Counter
Interface Manual, 2nd Ed, Rev. A
8–10
Discrete Filtered Inputs
Troubleshooting
Installation and
Safety Guidelines
Mode 60
Discrete/Filtered Inputs
The following information may provide some assistance in dealing with problems
which may be encountered when setting up the D2–CTRINT module, should they
occur. Experience has shown that most problems occur because of improper
configuration. Always re-check configuration before anything else.
For verifying types of inputs (or outputs) which do not relate to external High Speed
Interrupts, see the Chapters in this manual covering the specific function. Listed
below are some things that could possibly go wrong with the high speed interrupt
inputs:
1. No filtering appears to be taking place.
2. The status indicator LED is not lighting for the input point where the
Discrete Filtered Input are connected.
Defective Field Device - If a field device is suspected to be faulty, verify its proper
operation first. Examine the characteristics of the pulses being received with an
oscilloscope, test equipment type digital counter or an inexpensive logic probe.
Touch probe to counter
input points.
Field device must be
wired so that pulses
are being sent.
Typical Low Cost Logic Probe
(Not available from AutomationDirect)
High Signal Indicator
Low Signal Indicator
Pulse Train Indicator
Normal/Pulse Train Switch
TTL/CMOS Switch
Connect power leads to your recommended
power supply––not PLC power supply.
Check the specifications for the field device. Make certain that the output signal
matches the specifications of the D2–CTRINT module.
Pulse Width – The pulse width may be too narrow. The positive transition must
remain HIGH for at least 0.1 ms in order for the module to detect its presence. Select
another field device which has a pulse longer than 0.1ms.
Wiring - Simple as this might seem, quite often poor wiring is the cause of many
problems. Be sure there is a complete electrical loop between the device and the
input module. Along with visual inspection, use a voltmeter to check the wiring.
Input Voltage - If the input device is sending a signal which is less than 12 volts,
most likely the counter will not function or function improperly. Replace the field
device with one which has the proper output level if necessary.
DL205 High Speed Counter
Interface Manual, 2nd Ed, Rev. A
8–11
Discrete Filtered Inputs
Improper Configuration - Verify that proper values have been used in the
configuration. The value for a filtered input follows the format xx06, where xx is the
filtering time in milliseconds.
Status Indicators – Make sure the PWR or BAT LEDs are not lit on the CPU. Be
sure that the status indicators are lit as the pulse signals are received at the proper
input point on the D2–CTRINT module. If an LED is not functioning, check the point
with a voltmeter to be sure that the I/O point is being energized.
Mode 60
Discrete/Filtered Inputs
Installation and
Safety Guidelines
DL205 High Speed Counter
Interface Manual, 2nd Ed, Rev. A