23
node. If a normal response is given by the DHC,
continue with the initialization sequence.
PACS
®
Command (CD#D8,3450) 82 00 D8 0D 7A
This sets the PACS
®
Command Input value for a
desired position. In this case, the desired position
is 34.50% open ($0D7A). If a normal response is
returned, continue initialization sequence,
otherwise continue with the next node and restart
the initialization sequence with the next ADU
addressed to this node/DHC controller.
PACS
®
Command (CS#EE,20) 62 00 EE 14
This sets the PACS
®
Timeout Setting for 10
seconds, which is derived by the value of $14 (20
decimal) times 0.5 seconds. If a normal response is
returned, continue with the next node and start
normal control sequence with the next ADU
addressed to this node/DHC controller. Otherwise
continue with the next node and restart the
initialization sequence with the next ADU
addressed to this node/DHC controller.
While some error responses may not be the result
of a power loss in the DHC controller, software in the
master device can be simplified by automatically
initializing the DHC whenever a normal response is not
returned. Redundant writing of the "power monitor" bit and
the timeout value has no effect on the DHC's operation.
Once initialized, the PACS
®
Command Input
value can be updated as part of a normal scanning sequence
of the nodes on the bus. In the example, the timeout value
is set to 10 seconds, so the command input value could be
comfortably updated every second to avoid a loss of
command detection by the DHC controller. To monitor for
power drop outs, the "power monitor" bit might be read
every 5 seconds. So an example of a series of commands
addressed to a particular DHC could be as follows, where
each step is 1 second apart:
1. PACS
®
Command (CD#D8,3450) 82 00 D8 0D 7A
2. PACS
®
Command (CD#D8,3460) 82 00 D8 0D 84
3. PACS
®
Command (CD#D8,3470) 82 00 D8 0D 8E
4. PACS
®
Command (CD#D8,3480) 82 00 D8 0D 98
5. PACS
®
Command (CD#D8,3490) 82 00 D8 0D A2
PACS
®
Command (RS#ED) 50 00 ED
Returned Data 80
6. PACS
®
Command (CD#D8,3500) 82 00 D8 0D AC
In the previous example, the command input value
is being increased 0.10% (increments of 10) every second.
In step 5, the PACS
®
Control Register parameter (00ED
SING) is read. Since the returned value has bit 7 set to "1"
($80), indicating no power loss, normal control can
continue with step 6. Had bit 7 been "0", step 6 would have
started an initialization sequence instead.
In applications that have many nodes on the bus,
the time required to scan all the nodes can be considerable,
especially at lower baud rates. In these cases, a long
PACS
®
Timeout Setting may be required. If a short
timeout setting is desired, a broadcast command could be
used to reset the timers in all the nodes at one time, thus
allowing more time for normal communications.
Consider an application using 50 DHC controllers,
where it is desired to have the DHC controllers default to
their loss of command position two seconds after the bus is
lost. This would only allow 40msec (2 seconds divided by
50 nodes) to communicate to each node. By sending a
broadcast command after accessing each node would
extend the time allowed per node to 2 seconds. This
technique is illustrated in the following example sequence
of ADU's, where the first byte of each line represents the
node address, and the second byte ($41) is the PACS
®
Function code followed by the PACS
®
Command. The
CRC/LRC bytes are not shown.
Step Requesting ADU Responding ADU
1 01 41 82 00 D8 0D 7A 01 41
01 41 50 00 ED 01 41 80
2 00 41 1C none
3 02 41 82 00 D8 0C 12 02 41
02 41 50 00 ED 02 41 80
4 00 41 1C none
In step 1, the bus master accesses node 01 by first
setting the PACS
®
Command Input value to
34.50% ($0D7A). The second line shows the
master requesting to read the PACS
®
Control
Register parameter.
Step 2 shows the PACS
®
LEVEL command ($1C)
being "broadcast" (node 00) on the bus. All 50
DHC controllers will accept the LEVEL command
and reset their PACS
®
timers, thus allowing a fresh
2 seconds for step 3. The LEVEL command is
used because it does not affect any other function
in the DHC. While other PACS
®
commands could
be used, note that the DHC Series controllers do
not reset their PACS
®
timers with any of the NOP
(no operation) commands.