Use the stt subroutine status word – Rockwell Automation 1770,D17706.5.21 SMART TRANSMITTER TOOLKI User Manual
Page 23

Chapter 3
Using The Smart Tranmsitter Toolkit
3-4
The STT subroutine status word handshakes with your PLC ladder logic.
The STT subroutine status word:
tells you when the STT subroutine is entered and exited
tells you when the STT subroutine is enabled and done
lets you trigger the STT subroutine
tells you when the STT subroutine errors
The STT status word is integer word 30 of the integer file that is passed in
with your JSR instruction. This table shows the bits that are used in the
STT subroutine status word.
STT Subroutine Status Word 30
Bit 0
STT Enter/Exit Bit
Use bit 0 to debug your program. When called, the STT subroutine sets bit 0 to 1. When
the STT subroutine exits, the subroutine sets bit 0 to 0. This lets you know when the STT
subroutine is entered and exited.
Bit 1
Bit 2
STT Enable Bit
STT Done Bit
Bit 1 indicates that the STT subroutine is in the middle of processing a HART command.
Bit 2 indicates that the STT subroutine is done processing a command.
When you make an unconditional call to the STT subroutine, if the subroutine is not
already enabled, it sets bit 1 to 1 and bit 2 to 0. When the STT subroutine is done
processing a Hart command (successful or not), it sets bit 2 to 1 and bit 1 to 0. When bit
2 is set to 1, you can process the output data that is returned by the STT subroutine.
Bit 3
STT Trigger Bit
Bit 3 is the STT subroutine trigger bit. Use bit 3 to tell the STT subroutine to process the
requested command. Even though you call the STT subroutine with an unconditional
JSR, it does not process the HART command unless bit 3 is set to 1. When the STT
subroutine sees bit 3 set to 1, it processes the request. When the request is first
detected, the STT subroutine is enabled and it sets bit 3 to 0.
Bit 4
STT Error Bit
Bit 4 is the STT subroutine error bit. This bit is set if either the BTW or the BTR has
failed. Any data, except words 30 and 31, in the output area is invalid if this bit is set.
Bits 5Ć7
Reserved
Reserved for future use.
Bit 8
STT BTW Retry Bit Bit 8 indicates that the BTW has returned an error and is being retried by the STT
subroutine.
Bit 9
STT BTR Retry Bit Bit 9 indicates that the BTR has returned an error and is being retried by the STT
subroutine.
Bits 10Ć15
Reserved
Reserved for future use.
Example
In this example, the STT trigger bit is set to 1 if the STT enable bit is set to 0.
L
N10:60
03
N10:60
01
3. Use The STT Subroutine
Status Word