beautypg.com

Example 1 (continued) – Rockwell Automation 1770,D17706.5.21 SMART TRANSMITTER TOOLKI User Manual

Page 27

background image

Chapter 3

Using The Smart Tranmsitter Toolkit

3-8

Example 1 (continued)

Rung 2:0

STT 1.00 Programming Example 1.

This example reads the primary variable from 1 HART field device wired to 1

1770-HT1.

When the STT subroutine is not enabled, set the STT subroutine trigger bit.

| STT enable STT trigger |

| N10:30 N10:30 |

+––––]/[–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––(L)–––––+

| 1 3 |

Rung 2:1

Call the STT subroutine unconditionally.

| STT |

| Subroutine |

| +JSR–––––––––––––––+ |

+–––––––––––––––––––––––––––––––––––––––––––––––––––––––––+JUMP TO SUBROUTINE+–+

| |Prog file number 5| |

| |Input par 10| |

| |Return par | |

| +––––––––––––––––––+ |

Rung 2:2

Only process when the STT subroutine is done. If the Hart command is 0, copy

the Hart address to the input area and request Hart command 1. If the device

does not respond (error 33), try getting a new Hart address for the device by

requesting Hart command 0.

| Hart Hart |

| STT Done Command # Address |

| N10:30 +EQU–––––––––––––––+ +COP–––––––––––––––+ |

+––––] [––––––––––––––––––––––––––++EQUAL +++COPY FILE +++–+

| 2 ||Source A N10:5|||Source #N10:40||| |

| || 1|||Dest #N10:6||| |

| ||Source B 0|||Length 3||| |

| || ||+––––––––––––––––––+|| |

| |+––––––––––––––––––+| Hart || |

| | | Command # || |

| | |+MOV–––––––––––––––+|| |

| | ++MOVE ++| |

| | |Source 1| | |

| | | | | |

| | |Dest N10:5| | |

| | | 1| | |

| | +––––––––––––––––––+ | |

| | Device Not Hart | |

| | Responding Command # | |

| |+EQU–––––––––––––––+ +MOV–––––––––––––––+| |

| ++EQUAL +––+MOVE ++ |

| |Source A N10:33| |Source 0| |

| | 0| | | |

| |Source B 33| |Dest N10:5| |

| | | | 1| |

| +––––––––––––––––––+ +––––––––––––––––––+ |

Rung 2:3

| |

+––––––––––––––––––––––––––––––––[END OF FILE]–––––––––––––––––––––––––––––––––+

| |