User`s manual
B-22 Motion Mate™ DSM314 for Series 90™-30 PLCs User's Manual
–
January 2001 GFK-1742A
B
Verifying the Data Sent to Parameter 1
In this example, we’ll assume that the value in DSM Parameter 1 is critical because it specifies a
move distance that, if incorrect, could result in machine damage. So, the logic in the following
two rungs verifies that Parameter 1 received the correct value. If the value is not correct, contacts
(not shown) from output coil “VERIFY” in the second rung will prevent the DSM from producing
motion.
First Rung:
The MOVE WORD instruction moves hexadecimal number 1840 into %AQ00001,
the first word of the Immediate Command. The low byte value (40) of this number specifies the
Select Return Data
Immediate Command. The high byte value (18) specifies the Mode selection
for
Parameter Data.
The MOVE INT instruction moves a decimal value of 1, indicating Parameter 1, into
%AQ00002. This commands that the value in DSM Parameter 1 be written to the
User Selected
Data
double word for Axis 1, %AI00021/AI00022 in this example. Note: The actual %AI
addresses used for any DSM module are specified when the module is configured.
The TMR THOUS (thousandths) timer instruction produces a 45-millisecond time delay after the
Select Return Data
Immediate Command is sent. This is required because
User Selected Data
is
not available in the ladder until at least 3 sweeps or 20 milliseconds (which ever is greater)
elapses after the
Select Return Data
Immediate Command is sent. Since the sweep time in this
example is 14 milliseconds, this 45-millisecond delay ensures that the Parameter 1 data will be
present in the
User Selected Data
double word before the Equal instruction in the next rung
executes. Note that contact %M00200 must stay ON long enough for the TMR timer to time out
and enable the second rung.
Second Rung:
After the 45-millisecond delay in the previous rung elapses, contact %M00202
closes and enables this rung. In this rung, a double integer EQUAL instruction compares the
value in %R00208/R00209 (the source of the value sent by the COMM REQ to DSM Parameter 1)
with the value returned from Parameter 1 in %AI00021/AI00022. If the values are equal, coil
“Verify” will turn on.