applications guide - homestead · the new generation of trane controllers (uc xxx controllers and...

184
February 5, 2010 BAS-APG008-EN Tracer Graphical Programming (TGP2) Applications Guide

Upload: others

Post on 14-May-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

February 5, 2010 BAS-APG008-EN

Tracer Graphical Programming (TGP2)

Applications Guide

Page 2: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

Copyright

© 2010 Trane All rights reserved

This document and the information in it are the property of Trane and may not be used or reproduced in whole or in part, without the written permission of Trane. Trane reserves the right to revise this publication at any time and to make changes to its content without obligation to notify any person of such revision or change.

Trademarks

Trane and its logo are trademarks of Trane in the United States and other countries. All trademarks referenced in this document are the trademarks of their respective owners.

Warnings, Cautions, and Notices

Warnings, cautions, and notices are provided in appropriate places throughout this document:

�WARNING: Indicates a potentially hazardous situation which, if not avoided, could result in death or serious injury.

�CAUTION: Indicates a potentially hazardous situation which, if not avoided, could result in minor or moderate injury. It could also be used to alert against unsafe practices.

NOTICE: Indicates a situation that could result in equipment or property-damage-only accidents.

Page 3: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

Table of Contents

BAS-APG008-EN, 02/05/2010 3

Chapter 1: Using the TGP2 Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

About This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

The TGP2 Editor and the Tracer TU Service Tool . . . . . . . . . . . . . . . . . . . . . . . 7

New Features in TGP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Opening the TGP2 Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

The TGP2 Editor Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Toolbox Pane . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Using Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Chapter 2: Writing the Exhaust Fan Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

What You Will Learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Reviewing the Sequence of Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Opening a New Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Configuring Inputs and Outputs (Points) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Editing Program Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Adding a Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Editing Block Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Using an Analog Constant Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Adding a Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Arranging Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Selecting and Moving Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Aligning Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Adding a Compare Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Adding a Binary Output Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Connecting Blocks Using Wired Connections . . . . . . . . . . . . . . . . . . . . . . . . . 29

Saving a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Validating and Compiling a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Closing a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Summary Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Chapter 3: Modifying the Exhaust Fan Program . . . . . . . . . . . . . . . . . . . . . . . . . . 33

What You Will Learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Opening an Existing Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Reviewing the Sequence of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Configuring Value Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Deleting a Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Adding a Deadband Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Page 4: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

4 BAS-APG008-EN, 02/05/2010

Adding a Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

Adding an Alarm Indication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

Using a Switch block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Adding a Switch Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Connecting the Switch Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Completing the Switch Block Connections . . . . . . . . . . . . . . . . . . . . . . . . 46

Simplifying the Program With an Or Block . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Simulating a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Printing a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

Downloading the Configured Points and the Program . . . . . . . . . . . . . . . . . 48

Viewing a Program in Real Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

Uploading a Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

Summary Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Chapter 4: Cooling Tower With Two-Speed Fan Example . . . . . . . . . . . . . . . . . . 51

What You Will Learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Reviewing the Sequence of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Determining a Programming Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Setting the Program Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

Writing the Alarms Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Adding the Input Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Adding the Output Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Monitoring the Sump Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56Indicating an Alarm for Any Temperature Sensor Failure . . . . . . . . . . . . 58Implementing the Alarm Reset Function . . . . . . . . . . . . . . . . . . . . . . . . . . 60Using an Override with Control Priority to Reset an Alarm . . . . . . . . . . . 63

Writing the Sump Heater Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Adding the Input and Output Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Controlling the Sump Heater Under Normal Conditions . . . . . . . . . . . . . 68Comparing the Outdoor Air Temperature With the Freezing Point . . . . 68Controlling the Sump Heater On or Off . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

Writing the Cooling Tower Fan Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Adding the Input Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Adding the Output Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Starting the Fan at Low Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71Transitioning the Fan to High Speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Summary Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

Chapter 5: Cooling Tower with Variable-Speed Fan Example . . . . . . . . . . . . . . 77

What You Will Learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

Reviewing the Sequence of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

Configuring the Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

Page 5: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 5

Determining a Programming Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

Editing the Program Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

Modifying the Alarms Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

Writing the Calculations Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Calculating Change in Water Temperature Across the Cooling Tower . 81Calculating the Ambient Wet-bulb Temperature . . . . . . . . . . . . . . . . . . . 82Calculating the Approach Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . 83

Writing the Cooling Tower Fan Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Starting and Stopping the Fan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Imposing Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Implementing PID control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

Writing the Condenser Water Pump Module . . . . . . . . . . . . . . . . . . . . . . . . . . 89Adding the Input Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Adding the Output Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90Determining When to Start and Stop the Pump . . . . . . . . . . . . . . . . . . . . 90

Summary Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

Chapter 6: VAV AHU Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

What You Will Learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

Reviewing the Sequence of Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Modes and Setpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

Configuring Points for the VAV AHU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Creating Special XM References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Points Listed by Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

Determining a Programming Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

Writing the Fan Control Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Controlling the Supply Fan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Controlling the Duct Static Pressure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108Controlling the Exhaust Fan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

Writing the Discharge Air Control Program . . . . . . . . . . . . . . . . . . . . . . . . . . 112Controlling the Mixed Air and Outdoor Air Damper . . . . . . . . . . . . . . . 112Controlling the Cooling Valve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114Controlling the Heating Valve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

Writing the Alarms Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Indicating Manual Reset Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120Indicating Auto-Reset Alarms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121Controlling Alarm Indication and Reset . . . . . . . . . . . . . . . . . . . . . . . . . 121

Writing the Mode and Setpoints Program . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Calculating the Effective Space Setpoint . . . . . . . . . . . . . . . . . . . . . . . . . 124Validating the Discharge Air Setpoints . . . . . . . . . . . . . . . . . . . . . . . . . . 127Determining the Heat/Cool Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

Page 6: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

6 BAS-APG008-EN, 02/05/2010

Viewing Program Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Summary Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

Chapter 7: Using Macro and Formula Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

What You Will Learn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

The Macro Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134Macro Ports and Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134Macro Creation Rules and Considerations . . . . . . . . . . . . . . . . . . . . . . . 135Example 1: Creating a “One-Shot” Macro for Use in the Alarm

Reset Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135Example 2: Using a Macro to Arbitrate Between a Local Source

and a System Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140Example 3: Two Coil Motor Protection Macro . . . . . . . . . . . . . . . . . . . . 142

The Formula Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148Parts of a Formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148Parts of an Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148Time Conversion Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149Advanced Example: Resistance to Temperature Conversion with SI

or IP Unit Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

Summary Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

Chapter 8: Programming Best Practices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

Chapter 9: Summary Question-Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

Chapter 2: Writing the Exhaust Fan Program . . . . . . . . . . . . . . . . . . . . . . . . 165

Chapter 3: Modifying the Exhaust Fan Program . . . . . . . . . . . . . . . . . . . . . . 165

Chapter 4: Cooling Tower with Two-Speed Fan Example . . . . . . . . . . . . . . 166

Chapter 5: Cooling Tower with Value-Speed Fan Example . . . . . . . . . . . . . 166

Chapter 6: VAV AHU Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

Chapter 7: Using Macro and Formula Blocks . . . . . . . . . . . . . . . . . . . . . . . . . 169

Appendix A: What Type of Variable Should I Use? . . . . . . . . . . . . . . . . . . . . . . . 171

Variable Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

Capabilities of Variable Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

Appendix B: Control Priority Levels in TGP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

Sixteen Levels of Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

Priority Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

Methods You Can Use to Set Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

Problem: Unreleased Referencer Priority Levels . . . . . . . . . . . . . . . . . . . . . . 175Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

Page 7: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 7

Chapter 1: Using the TGP2 Editor

Use the Tracer Graphical Programming (TGP2) Editor to create custom programs for the Tracer™ UC programmable controllers and the Tracer™ SC system controller (Tracer SC).

About This Book

This book is a tutorial with instructions and examples you can use to learn how to write programs in the TGP2 Editor. To get the most from this book, have a controller available to which you can download your programs. As you read through the chapters, follow the instructions. At the end of each chapter, you will have configured and programmed the controller to the level shown in that chapter.

For each chapter, complete the following steps:

1. Read and analyze the sequence of operations.

2. Configure the inputs, outputs, and values using the Point Configuration dialog boxes accessed either from the Point Configuration menu on the TGP2 Editor toolbar or from the Controller Settings tab screens in the Tracer TU service tool.

3. Follow the instructions and build the programs as you go through the tutorial.

4. Validate, compile and simulate the programs.

5. Download the programs to the controller.

6. Review the programs and answer the summary questions at the end of each chapter.

Important:

• Many of the chapters in this book build on previous chapters, so be sure to complete the chapters in the order presented.

• The focus of this tutorial is on learning to use the TGP2 Editor and the TGP2 blocks to create graphical programs. Therefore, the program examples and exercises presented here are restricted to local control of devices. BACnet network programming and setup involves additional procedures and concepts beyond the scope and purpose of this guide. Therefore, you are strongly encouraged to refer to the Tracer™ UC400 with Tracer™ SC System Controller Best Practices Programming Guide (BAS-SVP06x) to learn about the best practice procedures used to program and set up multiple UC400s in a network coordinated by a Tracer SC. (For more detailed information about programming concepts, network programming, and UC400 setup, see “Increase your knowledge by using available resources,” p. 163 for a list of related publications.)

The TGP2 Editor and the Tracer TU Service Tool

The TGP2 Editor is component software launched from the Tracer TU service tool, which supports the new generation of Trane controllers (UCxxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service tool, PCM Edit for the PCM, and UPCM Edit for the UPCM. For more information about the Tracer TU service tool, see the Tracer TU Service Tool Getting Started Guide (TTU-SVN0xx-EN). Tracer TU and the TGP2 Editor also contain extensive Online Help to assist you as you access and change controller settings, configure points and devices, and write programs.

Page 8: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

8 BAS-APG008-EN, 02/05/2010

Chapter 1: Using the TGP2 Editor

New Features in TGP2

If you have worked with the TGP Editor, you can use this guide to familiarize yourself with the new TGP2 Editor features and enhancements. The following list includes those features and enhancements you will encounter in this guide. For a fuller summary of TGP2 features and enhancements, see “What’s New?” in the Tracer Graphical Programming (TGP2) Editor Help.

• Inclusion of point configuration in the TGP2 Editor for improved workflow

You can now configure points in the TGP2 Editor in either online or offline mode using the new Point Configuration dialog boxes. You can then continue using the TGP2 Editor to assign the configured points to the blocks as you create them in your programs.

In addition, you can save configured points as an xml file to your PC hard drive and then reuse the points with programs on other devices.

Configuring points within the TGP2 Editor and apart from a controller allows for a more dynamic method of mapping points to terminals on different types of controllers. (See “Integration of Point Configuration Into the TGP2 Editor” in the Tracer Graphical Programming (TGP2) Editor Help.)

• Addition of a Macro block used to create common, reusable routines or processes that can be stored in a library of solutions

Use the Macro block to create your own routines, which may consist of other data blocks, control blocks, Formula blocks (see discussion that follows), and nested Macro blocks. The goal is to create code blocks that are universal and portable, which allow reuse with a variety of programs. Code reuse promotes efficiency and enhances job performance.

A Macro block contains its own set of input, output, and variable blocks. You can create input and output ports on a Macro block. You can use these ports to keep the Macro block template (a saved Macro block) highly universal and reusable by allowing the host program to define inputs, outputs, variables, or constants passed into macro through input ports and with the results of macro processing passed out of the macro through its output ports.

You can store your macros in a custom library, which is a special section or category on the Toolbox pane. You can also copy macro templates to the Favorites category in the Toolbox pane for quick access. (See “Chapter 7: Using Macro and Formula Blocks,” p. 133 for more information and examples.)

• Addition of a Formula block

Use the Formula block to create your own algorithms if standard blocks do not meet your needs. You can store your formulas in a custom library for future reuse. You can also copy Formula blocks to the Favorites category in the Toolbox pane for quick access. See “Chapter 7: Using Macro and Formula Blocks,” p. 133 for more information and examples.)

• Differentiation of input, output, and value blocks by type for improved processing efficiency

Input, output, and value blocks are now differentiated by type: analog, binary, and multistate. (For example, there are now specific Analog Output and Binary Output blocks.) This separation of analog and binary block functionality decreases processing overhead by reducing the amount of extraneous code in each block.

• Addition of several calculation blocks

Degree Days, Demand, Runtime/Starts, Sunrise/Sunset, and Totalization blocks have been added to the library. These blocks perform special calculations you can include in your programs.

• Addition of selectable input and output ports to blocks

Several types of input and output ports have been added to blocks to increase programming options and flexibility. New input ports include Priority Level, Release, and Reset Run Time while output ports include Fail/Fault, which replaces the Fail block, Minimum Level, Maximum Level, Not in Service, Low Limit, High Limit, Run Time, and Change of State Count.

Page 9: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 9

Chapter 1: Using the TGP2 Editor

Opening the TGP2 Editor

Open the TGP2 Editor through the Tracer TU service tool.

Note: You can create programs offline. You do not have to be connected to the controller to create, validate, compile, and simulate programs. Later you will connect to the controller to download your TGP2 programs and their corresponding points files. See the Tracer TU for Programmable Controllers Help or the Tracer TU Getting Started Guide (TTU-SVN0xx-EN) for more information about connection procedures and options.

To open the TGP2 editor:

1. Open the Tracer TU service tool software.

2. Close the Connect dialog box.

3. Select File > New Configuration > UC400 Configuration to enter offline mode.

A row of icons in the upper left-hand corner of the Tracer TU window becomes active.

4. Click the TGP2 Editor icon. (See Figure 1).

The TGP2 Editor appears with a blank program in the Program Design Space. (Figure 2 shows the Program Design Space with a sample program).

Figure 1. The TGP2 editor icon

Figure 2. TGP2 Editor launched from the Tracer TU service tool

Program Design Space

Output Window

Toolbox Pane

Page 10: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

10 BAS-APG008-EN, 02/05/2010

Chapter 1: Using the TGP2 Editor

The TGP2 Editor Window

The TGP2 Editor window includes the Program Design Space, Output Window, blocks, menu bar, toolbars, and shortcut menus.

Program Design Space

The Program Design Space is the area in which you can create graphical programs. (To extend the Program Design Space (add vertical space), click and drag in the space.)

Output Window

The Output Window is the area that displays the results of building a graphical program or any programming errors. Also, during program simulation this window is used to display program inputs. (See “Simulating a Program,” p. 47.)

To show or hide the Output Window

Select Output Window from the View menu.

Note: If you still cannot see the Output Window, the splitter bar may be too low. To move it up, click under the Program Design Space. Move the splitter bar up.

Blocks

Graphical programming blocks are the fundamental objects used to write a program in the TGP2 Editor. Each block serves a specific purpose. Connecting these blocks in a given arrangement determines how the program behaves. A program consists of a combination of graphical programming blocks connected to perform a logical task.

Figure 3 illustrates the basic structure of a graphical programming block. The connection points on the left side of the block are called input ports. Input ports pass data into the block. Connections on the right side of the block are called output ports. Output ports pass data out of the block.

Note: For further information on specific graphical programming blocks, see the TGP2 Block Reference in the Tracer™ Graphical Programming (TGP2) Help or select the Block Reference option on the Help menu.

Menu bar

The menu bar at the top of the TGP2 Editor contains drop-down menus for working with TGP2 programs (Figure 4)..

The menu options are as follows:

• File menu—Open new and existing program files, save programs, and set program properties.

• Edit menu—Undo and redo the last actions made in the editor. This menu also includes options for cutting, copying, pasting, selecting, and deleting program elements.

Figure 3. Block structure

Figure 4. TGP2 Editor menu bar

Input portsOutput port

Page 11: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 11

Chapter 1: Using the TGP2 Editor

• View menu—Show or hide portions of the Editor window.

• Alignment menu—Align blocks in the Program Design Space.

• Macro/Formula menu—Use the options on this new menu to create two types of custom blocks: Macro blocks and Formula blocks. Macro and Formula blocks contain reusable logic or formulas that you design to meet your specific requirements. You can store, modify, and reuse these custom blocks. See “Chapter 7: Using Macro and Formula Blocks,” p. 133 for more information.)

• Program menu—View the status of all programs residing on the programmable controller to which you are connected. Upload, download, or delete programs, view the status of a PID loop, or view the real-time status of a program.

• Point Configuration menu—Use the Points Summary option on this new menu to list, create, edit, and delete points used in your programs. (Points are stored in xml files that are separate from your program.)

• Tools menu—Select TGP2 Editor display options and compile and run simulations of your programs.

• Help menu—Access the Online Help and view release information about the TGP2 Editor.

Toolbars

The TGP2 Editor includes toolbars that provide buttons you can click to complete common tasks. You can arrange or hide these toolbars to suit your work preferences.

Standard toolbar

Use the Standard toolbar buttons (Figure 5) to open a new or existing program file or to save a file. Click one of the edit buttons to cut, copy, paste, or delete a block or group of blocks. You can undo or redo the last actions completed in the editor, add a wired or wireless connection, or print the program.

Alignment toolbar

Select the blocks in the Program Design Space you want to align and click an alignment button (Figure 6) to align the blocks. The last block selected controls the alignment.

Figure 5. Standard toolbar

Figure 6. Alignment toolbar

New

Open

Save

Print

Print Prev.

Cut

Copy Undo Redo

Delete

Block Properties

SizePaste

Left Alignment

Right Alignment

Bottom Alignment

Top Alignment

Page 12: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

12 BAS-APG008-EN, 02/05/2010

Chapter 1: Using the TGP2 Editor

Simulation toolbar

Use the Simulation toolbar to validate, compile, and simulate (test) your program. After you successfully validate and compile your program (see Figure 44 and Figure 45 on page 45), you can click the Start Simulation icon. The Program Design Space turns gray and a Program Inputs pane appears. You can change the input values listed in the Program Inputs pane and then run the program to see the results. (See “Simulating a Program,” p. 47 for more detail.)

Figure 7. Simulation toolbar and resulting simulation environment

Start SimulationValidate/Compile

Exit SimulationRun

Simulation Options

Page 13: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 13

Chapter 1: Using the TGP2 Editor

Toolbox Pane

Use the Toolbox pane (the left pane) to add various blocks to your TGP2 program. For more information about each block, see the TGP2 Block Reference in the Tracer Graphical Programming (TGP2) Help. The blocks are grouped under several category headings in the toolbox tree structure, such as Alarms, Calculation, Compare, Conversion, Function, and I-O: Points..

Copying blocks to the Favorites section of the toolbox

You can place a copy of any frequently used block from the Toolbox in a "Favorites" section right at the top of the Toolbox pane for quick access.

To copy a block to the Favorites section of the Toolbox

1. Right-click the block you want to copy.

2. Select Add to Favorites on the right-click menu.

A copy of the block appears in the Favorites section.

Expanding and collapsing headings

You can expand or collapse the contents under each heading in the Toolbox pane.

To expand or collapse the contents under a heading

1. Select the Toolbox option on the View menu.

The Toolbox pane appears on the left side of the TGP2 Editor window.

2. Select the heading containing the item you want to work with and click the plus (+) sign to expanding the heading.

Showing or hiding toolbars

You can show or hide each toolbar in the TGP2 Editor window. You can also move each toolbar in the window by clicking on the title bar of the toolbar and dragging it to a new position.

To show or hide a toolbar

1. Select Toolbars from the View menu.

2. Select the toolbar you want to view or hide to toggle it on or off.

If a check mark is next to the toolbar name, that toolbar is displayed in the window.

Page 14: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

14 BAS-APG008-EN, 02/05/2010

Chapter 1: Using the TGP2 Editor

Shortcut menus

Shortcut menus contain common commands you can use on the item you clicked. For example, right-click an Analog Input block in the Design Space and select Properties from the shortcut menu to edit the properties of the block.

To view a shortcut menu Right-click or double-click any block in the Program Design Space.

Keyboard shortcuts

Use keyboard shortcuts (Table 1) in the TGP editor to work with program files and blocks.

Figure 8. Shortcut menu

Table 1. Keyboard Shortcuts

Category Function Key stroke

File

New Ctrl+N

Open Ctrl+O

Save Ctrl+S

Print Ctrl+P

Edit

Undo Ctrl+Z

Redo Ctrl+Y

Cut Ctrl+X

Copy Ctrl+C

Paste Ctrl+V

Delete Delete

Program Validate/Compile F7

Tools

Start Simulation F11

Run F5

Exit Simulation Shift+F11

Page 15: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 15

Chapter 1: Using the TGP2 Editor

Using Online Help

The TGP2 Editor (started from within the Tracer TU service tool) includes Online Help for each screen and dialog box. The Online Help content does not appear in this guide. To access Help for a dialog box, click the Help button. For information about a specific block, do one of the following:

• Right-click a block and select Help from the shortcut menu.

• Double-click a block to display the Properties dialog box, then click the Help button.

• From the Help menu, choose Block Reference and choose the block about which you want more information from the list.

Page 16: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

16 BAS-APG008-EN, 02/05/2010

Chapter 1: Using the TGP2 Editor

Page 17: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 17

Chapter 2: Writing the Exhaust Fan Program

This chapter introduces the basics of Tracer Graphical Programming (TGP2) by stepping you through the process of constructing a simple program. Graphical programming consists of drawing a picture that represents data and logic. In this chapter, you will construct a program to control an equipment room exhaust fan.

Note: Many of the chapters in this book build on previous chapters, so be sure to complete the chapters in the order presented. See “About This Book,” p. 7 for additional instructions.

What You Will Learn

In this chapter, you will learn a variety of skills, concepts, and definitions.

Skills

You will learn how to:

• Configure inputs and outputs (points)

• Start a new program

• Edit program properties

• Add a block to a program

• Edit block properties

• Move a block

• Align blocks

• Connect blocks

• Add a comment

• Save a program

• Validate and compile a program

• Close the TGP2 Editor

Concepts and definitions

You will understand the following concepts and definitions:

• Wire

• Input and Output blocks

• Compare blocks

Blocks

You will learn how to use the following blocks:

• Analog Input

• Analog Constant

• Binary Output

• Greater-than

• Comment

Note: Refer to the “TGP2 Block Reference” in the Tracer Graphical Programming (TGP2) Editor Help for additional information about these blocks.

Page 18: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

18 BAS-APG008-EN, 02/05/2010

Chapter 2: Writing the Exhaust Fan Program

Reviewing the Sequence of Operations

To begin, review the sequence of operations to determine the necessary data definitions, such as the inputs, outputs, and values. Then draw a wiring diagram.

In this scenario an equipment room contains machinery that generates a significant amount of heat. As a result, the temperature in the room rises. When the temperature exceeds 85°F, turn on the exhaust fan to draw outside air through the equipment room. When the temperature falls below 85°F, turn off the exhaust fan. Table 2 summarizes this sequence of operations.

Analyze the scenario and its sequence of operations to determine the necessary inputs, outputs, and values. Analyzing this scenario might result in Figure 9.

A temperature sensor in the room supplies the space temperature as an analog value, so you need an analog input to read the temperature. Because the exhaust fan is either on or off, use a binary output to control the fan. The resulting data definition is presented in Table 3, p. 19.

Opening a New Program

To begin, open the TGP2 Editor using the TGP2 icon on the Tracer TU service tool window. (See Chapter 1 to review this procedure.) When the editor opens, a new, blank program appears. If a program is already open, or you want to open a new program, choose New from the File menu or press Cntrl+N. A blank program appears in the Program Design Space (Figure 2 on page 9).

Note: Only one program can be open in the TGP2 Editor at a time.

Table 2. Exhaust Fan Program Operations

Action Result Condition

Turn fan on Cools room temp When temp > 85°F

Turn fan off Room temp rises When temp < 85°F

Figure 9. Equipment room exhaust fan data

Page 19: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 19

Chapter 2: Writing the Exhaust Fan Program

Configuring Inputs and Outputs (Points)

Before you can assign properties to the blocks in the program, you must configure the input and output points listed in Table 3.

You can configure these points in the TGP2 Editor or in the Tracer TU service tool. (These point definitions are stored separately on your hard drive and on the controller. They persist outside of an individual TGP2 program or session.) As you work through the examples in this guide, you will create a separate configuration file (xml) for each device for which you create programs.

To configure the input point

1. Click Point Configuration on the menu bar.

2. Select Point Summary from the Point Configuration menu to access the Point Summary dialog box.

3. Select Create New from the Actions drop-down menu and click Go.

The Anlog Input Properties dialog box shown in Figure 10 opens with the Point Configuration tab selected by default. (Analog Input is the default selection on the Point Types list.)

4. Type Equip Rm Space Temp in the Name box.

5. Select AI1 (an analog input terminal) from the Reference Selection tree on the Reference dialog box, and then select the analogValue item in the Available Items list on the right.

Table 3. Equipment Room Exhaust Fan Data Definition

Data Type Name Notes

Input Analog Equip Rm Space Temp Analog input configured as thermistor

Output Binary Equip Rm Fan On/Off Set minimum on/off times to 2 minutes.

Figure 10. Point Configuration - Analog Input Properties dialog box

Page 20: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

20 BAS-APG008-EN, 02/05/2010

Chapter 2: Writing the Exhaust Fan Program

Note: For more information about controller inputs and outputs, see the installation, Operations, and Maintenance Guide for the particular controller for which you are writing programs).

6. Select Thermistor in the Type drop-down list box.

(Thermistor should be automatically selected when you specify analogValue in step 5.)

7. Select 00:01:00 on the Update Interval spin box.

The Update Interval setting indicates how often the input value is updated.

8. Select Temperature on the Dimensionality drop-down list box.

(Temperature should also be automatically selected.)

9. Click OK.

The analog input point appears in the list on the Points Summary dialog box.

To configure the output point

1. Click Binary Output on the menu Point Types drop-down list.

2. Select Create New on the Actions drop-down list and click Go.

The Binary Output Properties dialog box shown in Figure 11 opens with the Point Configuration tab selected by default.

3. Type Equip Rm Fan On Off in the Name box.

Figure 11. Binary Output Dialog Box

Page 21: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 21

Chapter 2: Writing the Exhaust Fan Program

4. Select a binary output terminal (B01(Relay) (or B02) from the Reference Selection tree on the Reference dialog box, and then select the binaryValue item in the Available Items list on the right.

Note: For more information about controller inputs and outputs, see the programming guide for the particular controller for which you are writing programs).

5. Leave the Inactive and Active Text boxes set to their defaults (Off and On).

6. Enter 2 minutes (00:02:00) for both the Minimum Off and Minimum On Times.

7. Click Save to File to save the points to a configuration (xml) file.

A Save As dialog box appears with Save in set to the default folder: \MyDocuments\TracerTU\Backup\UC400. (You can choose an alternate location.)

8. Close the Points Summary dialog box.

Editing Program Properties

Now that you have defined the input and output points used by the program, you can start working on the program itself. First, give the program a name and define some of its basic properties. The properties of a program define how the program behaves. For example, Run Frequency is a property that defines how often the program executes.

Note: It is a good practice to set the program properties before you begin to write a new program, but you can edit the properties at any time by opening the Program Properties dialog box.

To edit program properties

1. Place your cursor in any blank area of the Program Design Space and right-click, or select File > Program Properties.

The Program Properties dialog box appears.

Figure 12. Program Properties dialog box

Page 22: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

22 BAS-APG008-EN, 02/05/2010

Chapter 2: Writing the Exhaust Fan Program

2. In the Project entry box, type:

Acme Middle School Ex Fan

3. Type the project name, your name, and your phone number in the appropriate fields.

4. Click the Run Frequency option to run the program at regular intervals.

5. In the Minutes section (hh:mm:ss), type:

00:01:00

The program runs once per minute.

6. In the Program Description field, type:

This program controls the equipment room exhaust fan. The fan turns on when the equipment room temperature is above 85°F. This program uses the same units as the controller (IP units).

Note: To include the degree (°) symbol, press and hold the Alt key while pressing 0, 1, 7, 6 on the keypad. Then release the Alt key, and the symbol appears.

7. Select I-P (Inch-Pound) in the Unit Capability group box.

Note: It is best to select either I-P or SI, depending on which system you are comfortable with. The units selected for a program have no effect on controller/system units.

8. Click Save.

Tip: To select the appropriate method of program execution (Run Frequency, Event Trigger, or Start-up), ask yourself the following questions:

• Is the program required to run at regular time intervals? If so, click the Run Frequency option. Then specify the time interval in hours, minutes, and seconds.

• If the program is required to run “on demand” only, select the Event Trigger option. Reference the program name in the configuration of the point(s) that you want to use to trigger the program. It is possible to trigger a program from multiple points. It is also possible to trigger a scheduled program from one or more points. A binary point can trigger the selected program based on how the value changes (the trigger direction): false to true, true to false, or both. A multistate point triggers the selected program whenever the value changes. An analog point triggers the selected program placed on alarm conditions.

• Is the program required to run only when the controller powers on? In this case, click the Start-up option.

Adding a Block

Next, you can add your first block. Start with an Analog Input block to access the space temperature hardware input.

To add a block

1. Go to the I/O: Points section on the Toolbox pane.

2. Select Analog Input and, with the left mouse button depressed, drag the cursor into the Program Design Space.

3. Release within the Program Design Space to place the block.

The block appears at the cursor location (Figure 13).

Tip: Place input blocks on the left and output blocks on the right so that your program reads from left to right.

Page 23: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 23

Chapter 2: Writing the Exhaust Fan Program

Editing Block Properties

Edit the block properties using the Properties dialog boxes. Use the Name property on the Analog Input Properties dialog box to specify the Equip Rm Space Temp input you created previously. Now the new Analog Input block represents Equip Rm Space Temp and will make the space temperature value available to the program at run time.

Tip: Set the properties of each block as you place it in the program.

To edit block properties

1. Double-click the outlined block to display the Properties dialog box.

Note: Alternatively, you can highlight the block and select Edit > Block Properties.

The Analog Input Properties dialog box appears as shown in Figure 14.

2. Select Equip Rm Space Temp from the Analog Input Name drop-down list.

3. Click Save.

The block displays the name of the associated input point and a Value port (Figure 15).

Figure 13. Analog Input Block

Figure 14. Analog Input Properties dialog box

Page 24: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

24 BAS-APG008-EN, 02/05/2010

Chapter 2: Writing the Exhaust Fan Program

Using an Analog Constant Block

You want to check if the space temperature is above or below the setpoint of 85°F. Because you know the setpoint and do not want it to change, use an Analog Constant block to represent it.

Programming concept: constants and variables

When is it appropriate to use a constant or a variable? The primary distinction between constants and variables is that constants remain unchanged; whereas, variables change.

You can use constants in programs as static values. They may be analog, binary, or time/date values. However, they cannot be known outside of the program in which they reside. In other words, a constant cannot be seen or changed unless you edit the program itself.

On the other hand, you can change variables using a variety of methods. Variables can be communicated from the Tracer SC and changed using the Tracer TU service tool. Variables can also be calculated in a program, or they can be made adjustable through the service tool. Ask the following questions when you are considering using a constant or a variable:

• Does the value change during program execution?

• Must the value be displayed on the BAS system interface or service tool?

• Must the value be adjustable by the operator through the Tracer SC or the service tool?

• Must the value be communicated (to Tracer SC, Tracer TU, or another network device)?

If you answered no to all of the above questions, then it is appropriate to use a constant. If you answered yes to any of the questions, then use a variable.

For more information about variable types available in the Tracer Graphical Programming environment, see “Appendix A: What Type of Variable Should I Use?,” p. 171.

To use a Constant block

1. Go to the I/O: Program section on the Toolbox pane and select Analog Constant.

2. While pressing your left mouse button, drag the Analog Constant icon into the Program Design Space to place the Analog Constant block. (See Figure 16.)

3. Double-click the Analog Constant block to open the Analog Constant Properties dialog box (Figure 17).

Figure 15. Equip Rm Space Temp Input Block

Figure 16. Analog Constant block in the Design space

Constant block

Page 25: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 25

Chapter 2: Writing the Exhaust Fan Program

4. Enter 85.0 in the Analog Value field

5. Leave the number of digits to the right of the decimal at the default in the Decimal Places field:1

6. Click Save.

The block value is changed to 85.0 as shown in Figure 18.

Figure 17. Analog Constant Properties dialog box

Figure 18. Constant block set to 85.0

Page 26: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

26 BAS-APG008-EN, 02/05/2010

Chapter 2: Writing the Exhaust Fan Program

Adding a Comment

Use comments to make notes in your program, to annotate blocks, or to describe logic. Place a comment under the 85.0 constant block indicating that it is being used as the equipment room temperature setpoint and that it is in degrees Fahrenheit.

To add a comment

1. Go to the Misc section on the Toolbox pane

(Click the plus sign to open the list if it is collapsed.)

2. Click Comment and drag it into the design space to place the Comment block.

3. Double-click the Comment block to display the Comment Properties dialog box.

4. Type:

Equip Rm Temp Setpoint (°F)

5. Click Save. The comment appears in the design space (Figure 19).

Arranging Blocks

As the saying goes, “A picture is worth a thousand words.” In graphical programming, the way the picture looks becomes very important, because the picture tells a story. Move blocks and use the alignment options to arrange your blocks and design your programs.

Tip: When possible, leave vertical spaces or open columns between sets of blocks that can serve as wiring channels in your program. This practice aids in readability and reduces any rewriting time.

Selecting and Moving Blocks

Practice selecting and moving blocks in the Program Design Space.

To select and move blocks

1. Press and hold the left mouse button on a block and then move the cursor (click and drag) to move the block to a new position in the design space.

2. To select two or more blocks, press the Ctrl key while clicking to select blocks. The selected blocks are outlined in yellow.

Note: You can also use a rubber-band selection to select more than one block. Click in the Program Design Space and drag the cursor so that the broken line surrounds the blocks you want to select.

3. Click and drag the selected blocks to a new position in the Program Design Space.

Figure 19. Comment added to describe the Constant block

Comment block

Page 27: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 27

Chapter 2: Writing the Exhaust Fan Program

Aligning Blocks

Align the Equip Rm Space Temp block, the 85.0 constant block, and the Equip Rm Temp Setpoint (°F) comment blocks.

To align blocks

1. Select the Equip Rm Space Temp block, the 85.0 constant block, and the Equip Rm Temp Setpoint (°F) comment block.

The last block selected is the reference block, so all of the selected blocks align according to the position of the last block selected. The selected blocks are outlined in yellow.

2. Choose Left from the Alignment menu. The blocks align left (Figure 20).

Adding a Compare Block

Compare blocks compare two analog values and output a binary true or false value, providing an analog to binary conversion. In this case, you want to add a Greater-than block to the program.

Use the Greater-than block to compare the space temperature with the setpoint. If the space temperature is greater than the setpoint, the output of the Greater-than block is true. Otherwise, if the space temperature is less than or equal to the setpoint, the output of the Greater-than block is false.

Block Characteristics: Inputs to Compare blocks

For some Compare blocks, the input port you choose for a value is important. For example, the Greater-than block compares the top input-port value to determine whether it is greater than the bottom input port value. Remember this relationship when working with the Greater-than, Greater-than-or-equal-to, Less-than, and Less-than-or-equal-to blocks.

To add a Compare block

1. Go to the Compare section from the Toolbox pane.

2. Select the > Greater-than from the Compare section and drag it into the Program Design Space.

3. Click in the Program Design Space to place the Greater-than block. (See Figure 21 on page 28.)

Figure 20. Blocks aligned left

Page 28: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

28 BAS-APG008-EN, 02/05/2010

Chapter 2: Writing the Exhaust Fan Program

Adding a Binary Output Block

Output blocks pass data out of the program, writing the value to their reference. In this case, the reference is a relay output. To apply the output of the Greater-than block to actually control the fan, add a Binary Output block to the program to pass data to the Equip Rm Fan On/Off binary output.

To add an Output block

1. Go to the I /O: Points section on the Toolbox pane, select Binary Output, and drag it into the Program Design Space.

2. Release to place the Binary Output block (Figure 22).

3. Select Equip Rm Fan On Off from the Name drop-down list. The result is shown in Figure 23.

4. Click Save.

Figure 21. Greater-than block in program

Greater Than block

Figure 22. Output Binary block in the Program Design Space

Figure 23. Equip Rm Fan On/Off output block

Binary Output (Hardware)

Page 29: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 29

Chapter 2: Writing the Exhaust Fan Program

Connecting Blocks Using Wired Connections

Finally it is time to connect the blocks.

1. Hold the cursor over the output port of the Equip Rm Space Temp input block.

The cursor changes to a cross-hair with a square (Figure 24). This change in the cursor indicates that a connection can be made.

Note: You can start wires on any block’s input or output port. You can end a wire on another wire of the correct type. However, you cannot start a wire at a port that is already wired.

2. Click the output port of the Equip Rm Space Temp input block.

A solid line appears between the connection point and the cursor. A solid wire between blocks represents analog data being passed. A dotted wire between blocks represents binary data being passed.

3. Move the cursor to the input port of the Equip Rm Fan On/Off binary-output block. The cursor changes to indicate an invalid connection because you are trying to connect an analog wire to a binary-output input port (Figure 25).

Note: An analog output port cannot be connected to a binary input port, and a binary output port cannot be connected to an analog input port.

4. Move the cursor and click the upper input port of the Greater-than block. The wired connection is complete (Figure 26).

5. Click the output port of the 85.0 Constant block. Move the cursor and click again to create a bend in the wire. Click again to create another bend in the wire.

Figure 24. Cursor in Wire Mode Over a Valid Connection

Figure 25. Cursor in Wire Mode on an Invalid Connection

Figure 26. Analog Wired Connection

Page 30: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

30 BAS-APG008-EN, 02/05/2010

Chapter 2: Writing the Exhaust Fan Program

6. Click the lower input port of the Greater-than block.

7. Click the output port of the Greater-than block and connect it to the input port of the Equip Rm Fan On/Off binary-output block. The program is complete (Figure 27).

Note: While drawing a wire, press the right mouse button (right-click) to cancel the wire.

Saving a Program

Now that the program is complete, save it.

To save a program

1. From the File menu, select Save.

The Save As dialog box appears. The Save As location defaults to C:\Documents and Settings\userName\My Documents\Tracer TU\TGP2\Custom (where userName is the user-id that identifies you to the Windows operating system). Of course, you can specify an alternate storage location for your programs.

2. In the File name field, type the program name with an underscore between the words:Exhaust_Fan

3. Click Save.

The graphical program file is saved as Exhaust_Fan.tgp2. The saved file name is used as the program name. All files are saved with a file extension of *.tgp2, which denotes the file as a Tracer graphical program.

Validating and Compiling a Program

When you compile a program, the TGP2 Editor checks the program for errors and prepares it for download.

To validate and compile a program:

1. Select Validate / Compile from the Tools menu.

The system builds and compiles the program. The output display includes the results, including any applicable errors (see Figure 28 on the following page).

Tip: Always save programs after making changes and compiling. Be sure to use meaningful file names.

Figure 27. Completed Equip Room Exhaust Fan Program

Binary wire

Page 31: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 31

Chapter 2: Writing the Exhaust Fan Program

Closing a Program

Now that your program is saved, close the program and exit the TGP2 Editor.

To close a program

1. Select Exit from the File menu.

The Exhaust_Fan.tgp2 program and the TGP2 Editor closes.

Figure 28. Compilation Results in Output Display

Page 32: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

32 BAS-APG008-EN, 02/05/2010

Chapter 2: Writing the Exhaust Fan Program

Summary Questions

Answer the following questions to review the skills, concepts, definitions, and blocks you learned in this chapter. You can find the answers to these questions on p. 165.

1. When connecting two blocks, the connection points, or ports, must represent the same type of data. What are the two data types?

2. Do all blocks have an associated properties dialog box?

3. At what points may you start a wire? End a wire?

Page 33: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 33

Chapter 3: Modifying the Exhaust Fan Program

This chapter introduces the remaining basic tasks and principles of Tracer Graphical Programming (TGP2) by stepping you through the process of building upon and modifying your first program.

Note: Many of the chapters in this book build on previous chapters, so be sure to complete the chapters in the order presented. See “About This Book” on page 7 for additional instructions.

What You Will Learn

In this chapter, you will learn a variety of skills, concepts, and definitions.

Skills

You will learn how to:

• Open an existing program

• Configure values (points)

• Delete blocks and wires

• View compilation errors

• Print a program

• Download a program

• Observe program operation while it is running

• Upload a program

Concepts and definitions

You will understand the following concepts and definitions:

• Function blocks

• Test blocks

• Logic blocks

Blocks

You will learn how to use the following blocks:

• Value

• Deadband

• Switch

• Or

Note: Refer to the Tracer Graphical Programming (TGP2) Editor Help for additional information about these blocks.

Opening an Existing Program

Begin by opening your equipment room exhaust fan program (Exhaust_Fan.tgp2). You can have only one program open in the TGP2 Editor at a time. If you try to open another program, the first program is closed.

To open an existing program

1. Select Open from the File menu.

The Open dialog box appears.

2. Select Exhaust_Fan.tgp2.

3. Click Open.

Page 34: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

34 BAS-APG008-EN, 02/05/2010

Chapter 3: Modifying the Exhaust Fan Program

The graphical program opens in the Program Design Space (Figure 29).

Reviewing the Sequence of Operation

In this scenario the equipment room remains as described in , “Chapter 2: Writing the Exhaust Fan Program.” The room contains machinery that generates a significant amount of heat. As a result, the temperature in the room rises. The following criteria apply to control of the equipment room exhaust fan.

• When the temperature exceeds 85°F, turn the exhaust fan on to draw outside air through the equipment room.

• When the temperature falls below 80°F, turn the exhaust fan off.

• An operator must be able to adjust the limiting setpoint using the service tool.

• If the temperature sensor fails, turn the fan on and indicate an alarm condition.

There are three important differences from the original sequence of operation:

• The sequence incorporates a deadband into control of the fan.

• The temperature setpoint at which the fan turns on is adjustable by the operator from Tracer SC or the service tool.

• The sequence calls for an alarm indication when the temperature sensor input fails.

Analyzing this scenario might result in Figure 30. The corresponding data definition is presented in Table 4 on page 35.

Figure 29. Equipment room exhaust fan program

Figure 30. Modified Equipment Room Exhaust Fan Data

Page 35: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 35

Chapter 3: Modifying the Exhaust Fan Program

Note: The point names used in the exercises in this book are for teaching purposes only. They do not completely conform to the most current “best practice” point naming conventions you should use in actual jobs. (See “Increase your knowledge by using available resources,” p. 163 for additional information.)

Configuring Value Points

Value points are used to receive data from a source such as a Tracer SC, a graphical program, or a third-party BACnet device. (See “Appendix A: What Type of Variable Should I Use?,” p. 171 for more information about value objects.)

In Chapter 2, you configured the analog input and the binary output listed in Table 4. Now use the Point Configuration menu dialog boxes to configure the new analog and binary values included in the data definitions in Table 4.

To configure the analog value

1. Click Point Configuration on the menu bar.

2. Select Point Summary from the Point Configuration menu to access the Point Summary dialog box.

3. Select Analog Value from the Point Types drop-down box.

4. Select Create New from the Actions drop-down menu and click Go.

The Analog Value Properties dialog box shown in Figure 31 opens with the Point Configuration tab selected by default.

Table 4. Modified Equipment Room Exhaust Fan Data Definition

Data Type Name Notes

Input Analog Equip Rm Space Temp Input configured as thermistor

Output Binary Equip Rm Fan On/Off Set minimum on/off times to 2 minutes.

ValuesAnalog Equip Rm Temp Setpoint Analog value

Binary Equip Rm Alarm Binary value

Page 36: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

36 BAS-APG008-EN, 02/05/2010

Chapter 3: Modifying the Exhaust Fan Program

5. Type Equip Rm Temp Setpoint in the Name box.

6. Select Temperature from the Dimensionality drop-down list box.

The ºF designator appears alongside the Value entry boxes on the right.

7. Enter 85 (°F) in the Relinquish Default/Startup Value entry box.

8. Click OK.

To configure the binary value

1. Select Binary Value from the Point Types drop-down box.

2. Select Create New from the Actions drop-down menu and click Go.

The Binary Value Properties dialog box shown in Figure 32 opens with the Point Configuration tab selected by default.

Figure 31. Analog Value Properties Dialog Box

Page 37: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 37

Chapter 3: Modifying the Exhaust Fan Program

3. Type Equip Rm Alarm in the Name box.

4. Enter Normal in the Inactive Text entry box and Alarm in the Active Test entry box.

5. Select Normal as the Startup Value.

6. Click the Alarm Configuration tab at the top of the dialog box.

7. Select In Alarm in the Notifications box.

8. Select HVAC-Critical in the Notification Class drop-down list.

9. Click OK.

10. Click Save to File to save these points to the configuration file.

11. Close the Points Summary dialog box.

Figure 32. Binary Value Properties Dialog Box

Page 38: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

38 BAS-APG008-EN, 02/05/2010

Chapter 3: Modifying the Exhaust Fan Program

Deleting a Block

Now that you have configured the analog and binary values, you can return to the equipment room exhaust fan program. Previously, you used the Greater-than block to compare the space temperature and the temperature setpoint. Now you do not want to just compare the space temperature to the setpoint; you want to incorporate a deadband. A 5 °F deadband will keep the fan from cycling on and off as the space temperature fluctuates around 85ºF. The fan should stay on until the space temperature falls below 80ºF. Replace the Greater-than block with a Deadband block.

To delete a block

1. Right-click the Greater-than block.

The right-click menu appears.

2. Select Delete from the menu.

The block and any wires connected to the block are removed from the Program Design Space.

Note: To delete a block, you can also select the block and then press the Delete key.

Adding a Deadband Block

Add a Deadband block to the program. The deadband concept is very useful in HVAC control applications. Its primary purpose is to minimize equipment cycling. For the purposes of graphical programming, consider three possible deadband configurations.

• Greater than (assume cooling)

• Less than (assume heating)

• Centered (assume cooling)

Greater than (assume cooling)

In the greater than (assume cooling) mode, the output of the deadband function turns on when the measured value exceeds the setpoint. The output remains on until the measured value falls below the setpoint point minus the deadband (Figure 33).

Figure 33. Deadband function with greater than (assume cooling) relationship

Page 39: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 39

Chapter 3: Modifying the Exhaust Fan Program

Less than (assume heating)

In the less than (assume heating) mode, the output of the deadband function turns on when the measured value falls below the setpoint. The output remains on until the measured value rises above the setpoint plus the deadband (Figure 34).

Centered (assume cooling)

In the centered mode, the output of the deadband function turns on when the measured value exceeds the setpoint plus one half of the deadband. The output remains on until the measured value falls below the setpoint minus one half of the deadband (Figure 35).

To add a deadband

1. Navigate to the Function section from the Toolbox pane.

2. Click the Deadband block, so it is highlighted.

3. Drag it onto the Program Design Space.

4. Release your mouse button in the Program Design Space to place the Deadband block.

Figure 34. Deadband function with less than (assume heating) relationship

Figure 35. Deadband function with centered (assume cooling) relationship

Page 40: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

40 BAS-APG008-EN, 02/05/2010

Chapter 3: Modifying the Exhaust Fan Program

5. Move the Deadband block to the former location of the Greater-than block.

6. Set the Deadband block as greater than (assume cooling), because we want the fan to stay on until the temperature falls below the setpoint minus the deadband (Figure 33 on page 38).

7. Add a comment below the Deadband block indicating its mode for documentation purposes (Figure 36).

Adding a Value

In the first version of the equipment room exhaust fan program, you used a constant value as the temperature setpoint. In this scenario, the operator must be able to adjust the setpoint using the service tool or from within Tracer SC. Use an Analog Value to add this capability. For more information on using constants and values, see “Programming concept: constants and variables” on page 24.

Programming Concept: Reading from and writing to a value

Read and write privileges depend on the selected value and the priority level of the point or application writing to it. (See “Appendix B: Control Priority Levels in TGP2” on page 173 for more information about priority levels.) Read refers to the ability of a program to know the value of the value. On the other hand, write refers to the ability of a program to change a value.

To add a value

1. Move the 85.0 Constant block and the Equip Rm Temp Setpoint comment down to make space for a value block.

2. Navigate to the I/O: Points section of the Toolbox pane and click Analog Value so it is highlighted.

3. Drag the Analog Value block into the Program Design Space and place the it between the Equip Rm Space Temp Analog Input block and the 85.0 Constant block.

4. Right-click the Analog Value block to set its properties.

Figure 36. Program with Deadband block

Page 41: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 41

Chapter 3: Modifying the Exhaust Fan Program

The Analog Value Properties dialog box appears.

5. Select Equip Rm Temp Setpoint in the Name drop-down list box.

6. Click the Read option in the Read / Write group box.

7. Click Save.

The value block is assigned to the Equip Rm Temp Setpoint value (Figure 38).

Figure 37. Analog Value Properties dialog box

Figure 38. Equip Rm Temp Setpoint value block

Value block

Page 42: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

42 BAS-APG008-EN, 02/05/2010

Chapter 3: Modifying the Exhaust Fan Program

Using a Constant block for a deadband value

Because we added an Analog Value block to serve as the setpoint, we do not need the Constant block for this purpose. However, the sequence of operation does call for a 5.0°F deadband. Use the Constant block for the 5.0 value.

To use a Constant block for a deadband value

1. Change the 85.0 Constant block value to 5.0.

2. Modify the associated comment to read “(°F).”

Connecting blocks to a Deadband block

You can now use wires to connect your blocks.

To connect your blocks

1. Connect the Equip Rm Space Temp Analog Input block to the input port of the Deadband block.

2. Connect the Equip Rm Temp Setpoint Analog Value block to the setpoint port of the Deadband block.

3. Connect the 5.0 Constant block to the deadband port of the Deadband block.

4. Connect the output port of the Deadband block to the Equip Rm Fan On/Off Binary Output block (Figure 39).

Adding an Alarm Indication

The program meets all specifications of the sequence of operation with one exception: If the Equip Rm Space Temp input fails, turn the fan on and indicate an alarm condition.

Adding an alarm value

The configured binary value Equip Rm Alarm serves as the alarm indicator. An alarm indicator is used when you want to pass the binary value to other programs or devices so that some action is triggered or a notification is sent out.

To add an alarm value

1. Add a Binary Value block to the Program Design Space above the Equip Rm Fan On/Off output block.

2. Set the binary value to be Equip Rm Alarm. (This value originates in the program.)

3. Set the block to write the Equip Rm Alarm binary value (Figure 40).

Figure 39. Program with deadband

Page 43: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 43

Chapter 3: Modifying the Exhaust Fan Program

Implementing a test for sensor failure

Use a Fail/Fault port on the Analog Input block to check the Equip Rm Space Temp input and send information to the Equip Rm Alarm value. When the temperature input fails, the output of the Fail/Fault port is true, and the binary value, Equip Rm Alarm, indicates the failure by turning on.

To implement a test for sensor failure

1. Right-click the Analog Input block (Equip Rm Space Temp).

The Analog Input Properites dialog box appears.

2. Select the Fail/Fault check box.

A Fail/Fault port appears to the right of the Analog Input block.

3. Connect the wire leaving the Fail/Fault port on the Equip Rm Space Temp Analog Input block to the input port of the Equip Rm Alarm block (Figure 41).

Figure 40. Equip Rm Alarm binary value in the design space

Figure 41. Program with Fail/Fault port

Page 44: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

44 BAS-APG008-EN, 02/05/2010

Chapter 3: Modifying the Exhaust Fan Program

Using a Switch block

The sequence requires that the fan be on when the input is failed. The mechanism, known as the Switch block, provides the ability to choose between two data paths based on a controlling binary value. See the Block Reference in the Tracer Graphical Programming (TGP2) Editor Help for more information about the Switch block.

Adding a Switch Block

To add a switch block

1. Move the Equip Rm Temp Setpoint value, the 5.0 Constant block, and the Deadband block down and then move the Equip Rm Alarm Binary Value block and Equip Rm Fan On/Off Binary Output block to the right to make room for the Switch block.

2. Delete the connection between the Deadband block and the Equip Rm Fan On/Off Binary Output block by clicking the wire so it is highlighted and then pressing the Delete key.

3. Navigate to the Function section in the Toolbox pane.

4. Click Binary Switch so it is highlighted.

5. Drag it onto the Program Design Space and release your mouse button to place the Binary Switch block (Figure 42).

Connecting the Switch Block

The Binary Switch block requires three inputs. The top input, relay control, controls the switch mechanism. When this input is on (true), the switch passes the normally open (NO) input to the output. When the relay control input is off (false), the switch passes the normally closed (NC) input to the output.

In this case, the Fail/Fault port of the Analog Input block controls the switch. When the Fail/Fault port output is false, the fan is controlled using the deadband logic. When the Fail/Fault port output is true, the fan is on.

To connect the Switch block

1. Connect the Fail/Fault port of the Equip Rm Space Temp Analog Input block to the Relay Control port of the Switch block. Start the wire at the Relay Control input port and end it at the Fail/Fault wire. (See Figure 43 on page 45.)

2. Connect the output port of the Deadband block to the NC (normally closed) port of the Switch block.

3. Connect the output port of the Switch block to the Equip Rm Fan On/Off Binary Output block (Figure 43).

Figure 42. Program with Switch block

Page 45: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 45

Chapter 3: Modifying the Exhaust Fan Program

4. Validate the program. The validation results appear in the Output Window (Figure 44) and an error is shown in the Program Design Space (Figure 45).

When you validate a program containing any errors, the errors are called out in the output display. Click the error message in the Output Window to highlight the error in the program. In this case, the error message indicates that a block input is not connected.

Figure 43. Program with Switch block connected

Figure 44. Program compilation results in the Output Window

Figure 45. Program with error indication (NO port and Switch block highlighted in red)

Error Message

Page 46: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

46 BAS-APG008-EN, 02/05/2010

Chapter 3: Modifying the Exhaust Fan Program

Completing the Switch Block Connections

What value does the Switch block use when the relay control input is true? The sequence of operation specifies that the fan must be on in the event that a Equip Rm Space Temp input failure exists. Use another Constant block to pass the value true (on).

To complete the Switch block connections

1. Add a Binary Constant block to the Program Design Space between the Fail/Fault port and the Deadband block.

2. Set the value to On.

3. Connect the On Constant block to the NO (normally open) port of the Switch block (Figure 46).

4. Validate the program. No errors should appear.

5. From the File menu, choose Save As to save the program under a new name.

The program illustrated in Figure 46 completely fulfills the sequence of operation. The Deadband block compares the Equip Rm Space Temp and the Equip Rm Temp Setpoint and turns the fan on and off as required. If the Equip Rm Space Temp input fails, the Equip Rm Alarm indicates the failure and the fan remains on.

Simplifying the Program With an Or Block

Logic blocks perform basic logic operations. You can use the Or block as a simpler alternative to the Switch block in the Exhaust_Fan program. (For information about the Or block and the Binary Switch block, see the TGP2 Block Reference in the Tracer Graphical Programming (TGP2) Editor Help.) Use the Or block to check the logic of the Fail/Fault port and the Deadband block. If either the Fail/Fault port is true or the Deadband block is true, the Equip Rm Fan On/Off output is true (on).

Tip: Keep programs as simple as possible.

To simplify the program with an Or block:

1. Delete the Switch block.

2. Delete the On Constant block.

3. Open the Logical section on the Toolbox pane and select the Or block.

4. Click inside the Program Design Space to place the Or block where the Switch block used to be.

5. Connect the wire leaving the Fail/Fault port on the Equip Rm Space Temp Analog Input block to the upper input port of the Or block.

6. Connect the output port of the Deadband block to the lower input port of the Or block.

7. Connect the output port of the Or block to the Equip Rm Fan On/Off Binary Output block (Figure 47).

Figure 46. Program with Switch block connected correctly

Page 47: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 47

Chapter 3: Modifying the Exhaust Fan Program

8. Validate the program.

9. Save the program under a new name.

This program meets the requirements of the same sequence of operation as the program pictured in Figure 46 on page 46 but in a simpler manner and with fewer blocks. So there is more than one way to solve the same problem.

Simulating a Program

To simulate a program:

1. Open the program so it is displayed in the Program Design Space.

2. Validate and compile the program.

3. Click Start Simulation on the Tools menu (or F11).

The Program Design Space turns gray and the default input values appear alongside each input block. A Program Inputs window appears at the bottom of the TGP2 Editor screen.

4. (Optional) Click Simulation Options to display the Simulation Options window.

You can specify the number of program cycles and change the Date-Time settings if those are significant to your program testing.

5. Change specific analog and binary input values by either using the drop-down lists on the Program Inputs window or clicking the corresponding value displayed by the block in the program.

The value changes to the new setting you selected on the Program Inputs window. (For example, a binary input could change from true to false.)

6. Click Run on the Tools menu for as many program cycles as you desire.

The affected blocks display the resulting values. (For example, a Function block and the output block could display the appropriate analog or binary value as shown in Figure 48. (The Equip Rm Space Temp and Equipment Rm Temp Setpoint values are 0.0, because there is currently no actual connection to a reference.)

7. Use these values to determine if your program logic is correct.

8. Click Exit Simulation (or Shift+F11) to leave Simulation mode.

Figure 47. Program with Or block

Page 48: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

48 BAS-APG008-EN, 02/05/2010

Chapter 3: Modifying the Exhaust Fan Program

Printing a Program

If you want a hard copy version of your program, just print it.

To print a program:

1. Click Print on the File menu.

The Print dialog box appears.

2. Select the printer and set the print range and the number of copies.

3. Click Properties to select the paper size and orientation.

4. Click OK.

The graphical program is printed.

Downloading the Configured Points and the Program

Now that you have created a graphical program and the points it references, apply them to a blank controller. Remember to validate and compile your program before downloading it to the controller.

To save the points to a blank controller

1. Connect to a controller if you have been working offline.

See the Tracer TU for Programmable Controllers Help or the Tracer TU Getting Started Guide (TTU-SVN0xx-EN) for more information about connection procedures and options.

2. Select Point Configuration > Points Summary to display the Points Summary dialog box.

3. Click Save to save the points to the controller.

Note: If a configuration has previously been installed on your controller, the existing configuration must first be cleared off the controller. See “Replacing an Existing Configuration with a New One” (under “Configuring and Managing Points”) in the Tracer Graphical Programming (TGP2) Editor Help.

To download your program to the controller

1. Connect to a controller if you have been working offline.

2. Select Download on the Program menu.

A progress meter appears at the bottom of the TGP2 Editor window. When the download operation is complete, the TGP2 Editor issues a confirmation message stating that the program has been successfully downloaded to the controller.

Figure 48. TGP program in simulation mode

Page 49: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 49

Chapter 3: Modifying the Exhaust Fan Program

Viewing a Program in Real Time

After you download a program to the controller, you can examine its operations in real time. The actual run-time values of inputs, variables, functions, calculations, value objects, constants, and outputs are displayed on the screen.

To view a program in real time

1. Select Program > View Real Time.

The Select a Program to open for real time view dialog box appears.

2. Highlight the program on the list that you want to view and click OK.

The program and its values are displayed in the Program Design Space. You can examine any part of the program.

Note: It may take a minute or two for the values to load.

To exit the Real Time view

Select Program > Exit Real Time.

It may take a minute or two for the TGP2 Editor to disconnect from the controller.

Uploading a Program

To upload a program from the controller

1. Select Upload on the Program menu.

The Select a Program to open for editing dialog box appears.

2. Highlight the program on the list that you want to upload and click OK.

Note: A message may appear asking you to save changes to the current program, if you already had one open.

The program is displayed in the Program Design Space. You can now edit its contents.

When you have finished your edits, follow the procedure in “Downloading the Configured Points and the Program,” p. 48 to return the edited program to the controller.

Page 50: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

50 BAS-APG008-EN, 02/05/2010

Chapter 3: Modifying the Exhaust Fan Program

Summary Questions

Answer the following questions to review the skills, concepts, definitions, and blocks you learned in this chapter. The answers to these questions are on p. 165.

1. Can a single Value block read and write the value of an analog or binary value?

2. When the relay control input to the Switch block is true, which input value passes to the output of the block?

3. Which input port on the Switch block is always binary, regardless of the Switch block type?

4. What property must be set in the input configuration for the Fail/Fault port to work properly?

5. What minor modification to the program pictured in Figure 46 on page 46 would allow you to remove the ON constant block yet still provide an input to the Switch block)?

Page 51: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 51

Chapter 4: Cooling Tower With Two-Speed Fan Example

This chapter and the chapters that follow build upon your fundamental skills and knowledge of Tracer Graphical Programming (TGP2) by stepping you through the writing of graphical programs of increasing complexity. In this chapter, you will create a program to control a cooling tower with a two-speed fan.

Note: Many of the chapters in this book build on previous chapters, so be sure to complete the chapters in the order presented. See “About This Book” on page 7 for additional instructions.

What You Will Learn

In this chapter, you will learn a variety of skills, concepts, and definitions.

Skills

You will learn how to better interpret a sequence of operation and transfer it to a working graphical program.

Concepts and definitions

You will understand the following concepts and definitions:

• Time Delay blocks

• Expandable blocks

• Math blocks

Blocks

You will learn how to use the following blocks:

• Delay on Start

• Add

• Less-than-or-equal-to

• Latch

Reviewing the Sequence of Operation

In this scenario a cooling tower with a two-speed fan delivers condenser water to a small chiller plant. The following specifications apply to control of the cooling tower.

Condenser water pump

When condenser water is requested by the chiller plant, command the condenser water pump to start. If condenser water flow fails to be confirmed within 30 seconds, command the pump to stop, indicate a pump failure in the service tool or an interface available to the operator, and turn on the alarm output. A user must be able to reset the alarm.

Note: The instructions for writing the condenser water pump module are not included in this chapter. If you are working through the book chapter by chapter, you will write this module in Chapter 5. Otherwise, see “Writing the Condenser Water Pump Module” on page 89.

Cooling tower fan

If condenser water flow is established and if the condenser water temperature rises 2.5°F above the setpoint, start the fan at low speed. Switch the fan to high speed if the condenser water temperature rises to 5.0°F above the setpoint. Turn off the fan when the condenser supply water temperature falls below the setpoint minus 2.5°F. A minimum 30-second delay is required between starting the fan at low speed and switching to high speed.

Page 52: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

52 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

Sump heater

Turn on the sump heater if the sump temperature falls below 40°F. (This value is adjustable.) If the outdoor air temperature falls below 32°F, turn on the sump heater continuously. If the sump temperature remains below 36°F (adjustable) for 15 minutes, or if the sump temperature falls below 32°F, indicate an alarm and turn on the alarm output.

Alarms

In addition to the alarm requirements mentioned in the previous sequence of operation components, turn on the alarm output when any temperature sensor fails. The user must be able to reset the alarms using the service tool or a software interface.

Analysis of this scenario results in Figure 49. The corresponding data definition is presented in Table 5 on page 53.

Figure 49. Cooling tower with two-speed fan drive data

Page 53: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 53

Chapter 4: Cooling Tower With Two-Speed Fan Example

Before you write the program, configure these inputs, outputs, and values using the Point Configuration dialog boxes in the TGP2 Editor or in the Tracer TU service tool. Then, save the points to a new configuration file by clicking Save to File and specifying a new file name.

Note: The point names used in the exercises in this book are for teaching purposes only. They do not completely conform to the most current “best practice” point naming conventions you should use in actual jobs. (See “Increase your knowledge by using available resources,” p. 163 for additional information.)

Determining a Programming Approach

Dividing the sequence of operation into logical program modules makes programming easier. In a single program, you can write several program modules. This sequence can be subdivided into the following four modules:

• Alarms

• Sump heater

• Cooling tower fan

• Condenser water pump (Assume for this chapter that the chiller does this.)

Tip: When possible, subdivide graphical programs in whatever way makes most sense:

• The sequence of operation

• Logical or functional groups

• Frequency of operation (for example, most frequent to least frequent)

Doing so makes the program easier to read and understand.

Table 5. Cooling tower with two-speed fan drive data definition

Data Type Name Notes

Inputs

Analog

Supply Temp Analog input configured to measure temperature

Return Temp Analog input configured to measure temperature

Sump Temp Analog input configured to measure temperature

Outdoor Air Temp Analog input configured to measure temperature

BinaryFlow Status

Condenser Water Request

Outputs Binary

Fan Start Stop LowApply sufficient minimum on/off timers to prevent excessive fan cycling.

Fan HighApply sufficient minimum on/off timers to prevent excessive fan cycling.

Sump HeaterApply sufficient minimum on/off timers to prevent excessive heater cycling.

Pump Start StopApply sufficient minimum on/off timers to prevent excessive pump cycling.

Alarm

Values

Analog

Supply Temp Setpoint 85ºF default value

Sump Heater Setpoint 40ºF default value

Sump Alarm Setpoint 36ºF default value

BinaryPump Fail

Alarm Reset

Page 54: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

54 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

Setting the Program Properties

Set the program properties as shown in Figure 50. Set the program run frequency to 30 seconds, which is appropriate for this cooling tower application.

Note: Remember, you can select either I-P or SI, depending on which system you are comfortable with. The units selected for a program have no effect on controller/system units.

Tip: Program descriptions should be as brief as possible. Avoid cutting and pasting sequence of operations text into the Program Description box as it uses controller memory needed for points and programs.

Writing the Alarms Module

Start by compiling the alarms requirements from the various parts of the sequence of operation, including the following:

• If the condenser water pump fails, indicate a general alarm. A user must be able to reset the alarm in the Tracer TU service tool.

• If the sump temperature remains below 36°F (this value is adjustable) for 15 minutes, or if the sump temperature falls below 32°F, indicate an alarm and turn on the Alarm output.

• Indicate an alarm when any temperature sensor fails. These temperatures include Sump Temp, Supply Temp, and the Outdoor Air Temp inputs.

• Alarms must be resettable.

Figure 50. Cooling tower with two-speed fan drive program properties

Page 55: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 55

Chapter 4: Cooling Tower With Two-Speed Fan Example

Note the following important points and questions about the alarm control requirements:

• The pump failure is determined by another part of the program. The alarms module merely uses the result.

• Alarms related to monitoring the sump temperature require time-based control. How is time-based control implemented in graphical programming?

• All temperature sensors must be monitored for failure.

• How is an alarm-reset function incorporated in a program?

Adding the Input Blocks

Begin by adding blocks to represent the inputs to this part of the program.

To add the input blocks

1. Place four Analog Input blocks in the Program Design Space and assign the following analog inputs points to them:

• Sump Temp

• Supply Temp

• Return Temp

• Outdoor Air Temp

2. Place one Analog Value block and two Binary Value blocks in the Program Design Space and assign the following value points to them (Figure 51):

• Sump Alarm Setpoint (analog)

• Pump Fail (binary)

• Alarm Reset (binary)

Figure 51. Input blocks for the alarms module

Page 56: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

56 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

Adding the Output Block

Place an Binary Output block in the Program Design Space and assign the binary output Alarm to it (Figure 52).

Monitoring the Sump Temperature

First, focus on the requirement dealing with monitoring the sump temperature. Be sure to pay attention to the key words shown in italics. They help indicate which blocks to use.

Comparing the sump temperature with the sump alarm setpoint and the

freezing point

Apply a Less-than block to determine if the Sump Temperature is less than the Sump Alarm Setpoint. Apply a Less-than-or-equal-to block to compare the Sump Temperature to the freezing point, 32°F. Use a Constant block to represent the freezing point.

To compare the sump temperature with the sump alarm setpoint and the freezing point

1. Add an Analog Constant block to the Program Design Space and assign the value 32.0 to it to represent the freezing point.

2. Add a Less-than block and a Less-than-or-equal-to block to the Program Design Space.

3. Connect the Sump Temp Analog Input block and the 32.0 Constant block to the Less Than or Equal block.

4. Connect the Sump Temp Analog Input block and the Sump Alarm Setpoint Analog Value block to the Less-than block (Figure 53, p. 57).

Figure 52. Alarms module output

Functional Description:

If the sump temperature remains below 36°F (this value is adjustable) for 15 minutes, or if the sump temperature falls below 32°F, indicate an alarm and turn on the alarm output.

Page 57: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 57

Chapter 4: Cooling Tower With Two-Speed Fan Example

Timing the sump temperature alarm

From the sequence of operation, you know that the sump temperature must be less than the Sump Alarm Setpoint for 15 minutes before indicating an alarm. For applications involving time-based control, take advantage of the Time Delay blocks.

With TGP2, Time Delay blocks can measure elapsed time or count program cycles. Neither method requires a program run frequency to operate correctly. For further definitions of the time delay blocks behavior, see the Tracer Graphical Programming (TGP2) Editor Help.

For example, you could use the Delay on Start block to delay a binary On signal for a specified amount of time based on a binary input On signal. The delay timer starts when a change in state (from Off to On) occurs in the controlling binary input signal. After the delay time passes, the output signal follows the input signal. In the Delay on Start block properties dialog box, set the delay time units as seconds, minutes, or hours and use another Constant or value block to represent the amount of time. Figure 54 illustrates how the Delay on Start block works. The letter “t” represents the delay time.

Add a Delay on Start block and connect its On/Off Control port to the output of the Less-than block. Use a Constant block to supply the time interval value. Remember to use the Delay on Start block properties dialog box to set the delay time interval units to minutes.

In this application, when the output of the Less-than block is true, the delay timer begins counting down. If the output of the Less-than block remains true throughout the delay time, when the delay timer expires, the output of the Delay on Start block becomes true as well.

To time the sump temperature alarm

1. Go to the Time Delay section of the Toolbox pane.

2. Click Delay on Start and drag it into the Program Design Space.

3. Right-click the block and select Block Properties to display the Delay on Start Properties dialog box.

4. Select System Time on the Timer Mode drop-down list box

5. Select Minutes on the Delay Time Units drop-down list box and click Save.

Figure 53. Comparing the sump temperature to the alarm setpoint and the freezing point

Figure 54. Delay on start timing diagram

Page 58: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

58 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

6. Add a Constant block to the Program Design Space and assign the value 15.0 to it to represent the delay time.

7. Connect the Less-than block to the On/Off Control port of the Delay on Start block.

8. Connect the 15.0 Constant block to the Delay port of the Delay on Start block (Figure 55).

Controlling the sump temperature alarm

The requirement calls for the program to turn on the alarm output when the sump temperature remains below 36°F (this value is adjustable) for 15 minutes, or if the sump temperature falls below 32°F. Use an Or block to complete the picture, connecting the Delay on Start and the Less-than-or-equal-to blocks to the Or block. Then connect the Or block to the Alarm output block. The result is pictured in Figure 56.

To control the sump temperature alarm

1. Place an Or block in the Program Design Space.

2. Connect the Delay on Start block and the Less-than-or-equal-to block to the Or block.

3. Connect the Or block to the Alarm Binary Output block (Figure 56).

Indicating an Alarm for Any Temperature Sensor Failure

You want to indicate an alarm when any temperature sensor fails. These sensor input temperatures include Sump Temp, Supply Temp, Return Temp, and Outdoor Air Temp. Add a Fail/Fault port to each Analog Input block to monitor temperature sensors for failure and make the appropriate connections.

To indicate an alarm for any temperature sensor failure

1. Right-click each Analog Input block and select the Fail/Fault checkbox in the Analog Input Properties dialog box.

2. Right-click the Or block, select Block Properties on the menu, and specify 7 in the Number of Inputs box.

Figure 55. Implementing the Delay on Start block

Figure 56. Sump temperature alarm logic

Page 59: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 59

Chapter 4: Cooling Tower With Two-Speed Fan Example

Note: Several blocks expand to accommodate a number of inputs. Each of the properties dialog boxes for these blocks allows you to specify the number of inputs. The minimum number of inputs depends on the block. All expandable blocks expand to a maximum of eight input ports.

Figure 57 shows the results at this point.

3. Connect the Fail/Fault ports of the Sump Temp, Supply Temp, Return Temp, and Outdoor Air Temp input blocks to the Or block.

4. Connect the Pump Fail value block to the Or block (Figure 58)..

Figure 57. Fail port added to test temperature sensors

Figure 58. Test for temperature sensor failure complete

Page 60: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

60 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

Implementing the Alarm Reset Function

The alarm reset function requires the introduction of a new block known as the Latch block. The Latch block, a member of the Time Delay blocks group, maintains a binary-output on signal for a specified amount of time or until it is cancelled. It may be configured as timed (Figure 59) or manual (Figure 60).

.

For example, the Latch block in timed mode is often used to implement a timed override to create a “one-shot” function. You could use the Latch block in timed mode to control a binary signal for a specified amount of time. A trigger causes the countdown clock to begin and the signal to change. The trigger is a change in state (from Off to On) of the controlling binary input signal.

Using the Properties dialog box for the Latch block, select the units of time as seconds, minutes, or hours. In the timed configuration, the latch function can be resettable or non-resettable (Figure 63 on page 62). If the Latch block is set as resettable, it resets its countdown clock every time the input signal changes state (from Off to On). If it is set as non-resettable, the Latch block maintains its countdown clock despite repeated input signal changes in state.

You can also use the Latch block in manual mode to output a binary signal indefinitely based on a change in state (from Off to On) of a controlling binary input signal. In either mode, the Cancel input turns the output of the Latch block off. See Figure 61 and Figure 62 for sample timing diagrams using the Latch block. The letter “t” represents the time interval.

Figure 59. Latch block in timed mode

Figure 60. Latch block in manual mode

Figure 61. Latch block timing diagram, relationship between trigger and output

Page 61: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 61

Chapter 4: Cooling Tower With Two-Speed Fan Example

.

Adding a Latch block to control the alarm

In this program, the Alarm output is to be turned on if any of the alarm conditions are true. And it is to be turned off by the user using the binary value, Alarm Reset. The Latch block in manual mode provides this capability. Placing it between the Or block and the Alarm output block results in the following logic: Whenever the output of the Or block is true, the Latch will turn on and subsequently turn on the alarm output. Then when Alarm Reset is turned on, the Latch will turn off and subsequently turn off the Alarm output.

To add a Latch block to reset the alarm

1. Delete the connection between the Or block and the Alarm block.

2. Place a Latch block in the Program Design Space.

3. Double-click the Latch block.

The Latch Properties dialog box appears (Figure 63).

4. Under Mode, click the Manual option.

5. Click Save.

The Latch block changes to include only Trigger and Cancel ports.

6. Connect the Or block to the Trigger port of the Latch block.

7. Connect the Alarm Reset block to the Cancel port of the Latch block.

8. Connect the Latch block to the Alarm block. (See Figure 64.)

Figure 62. Latch block timing diagram, relationship between trigger, cancel, and output

Page 62: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

62 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

Tip: At this point in the program, you may be running out of Program Design Space. However, the Program Design Space adds more space to your program automatically as you add blocks.

Figure 63. Latch Properties dialog box

Figure 64. Alarm reset implemented

Page 63: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 63

Chapter 4: Cooling Tower With Two-Speed Fan Example

Using an Override with Control Priority to Reset an Alarm

To reset an alarm condition, the operator can override the Alarm Reset value point to True for a specified duration. You can set the override using the Override Request dialog box on the Status Utility Binary screen in the Tracer TU service tool.

The override control priority must be set higher than the program priority (level 9) so that it can take effect. (See “Appendix B: Control Priority Levels in TGP2”for information about control priority.) Note that the Requested Value is set to On, the Priority is set to 08: Manual Operator, and the Duration Limit is 00:01:00 (one minute - assuming that several program cycles run in a minute).

Note: Remember that the Duration Limit you specify must be longer than the run time (execution time) of the program itself. You can determine an installed program’s run time by checking the Duration column value for the program in the Program box on the Controller Status screen of the Tracer TU service tool.

The alarm reset can remain active for multiple program cycles when this override technique is used during which no repeat alarms can be issued. To learn about an improved reset method using a “one shot” macro that guarantees that the reset will be true for only one program cycle, see “Chapter 7: Using Macro and Formula Blocks”.

Figure 65. Alarm Reset Point Override

Page 64: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

64 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

Writing the Sump Heater Module

Take another look at the part of the sequence of operation dealing with control of the sump heater.

The programming elements required to accomplish this task, include the following:

• Use a deadband to cycle the sump heater under normal operating conditions. A deadband prevents excessive heater cycling.

• Use a comparison to keep the sump heater on continuously when the outdoor air temperature is below the freezing point.

Adding the Input and Output Blocks

Begin by adding blocks to represent the inputs to this part of the program. You will add Wireless Write Analog blocks to the alarms module that you just completed and then add corresponding Wireless Read Analog blocks to the new sump heater module you are creating.

Adding wireless write connections to the alarms module

You used Sump Temp and Outdoor Air Temp in the alarms module. Instead of adding these blocks again or trying to connect to them from another module, use wireless connections.

Tip: Use wireless connections to pass data from block to block when wired connections are impractical. In general, it is good programming practice to use an input in a program only once. By doing so, you will have an easier time debugging your program. By using the wireless connection, you can also prevent long and overlapping wired connections that are difficult to follow.

First create a wireless connection for the Sump Temp input.

To add a wireless connection

1. Go to the Misc section of the Toolbox pane.

2. Click Analog Wireless Write and drag it into the Program Design Space.

3. Double-click the block.

The Analog Wireless Write Properties dialog box appears (Figure 66).

Functional Description:

Cycle the sump heater if the sump temperature falls below 40°F. (This value is adjustable from the service tool.) If the outdoor air temperature falls below 32°F, turn on the sump heater continuously.

Figure 66. Creating Wireless connection block

Page 65: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 65

Chapter 4: Cooling Tower With Two-Speed Fan Example

4. Enter the following name in the Name field:

SumpTemp

(A name may be up to 16 characters in length. Spaces are not allowed.)

5. Click Save.

6. Connect the Analog Wireless Write block with a wired connection to the wire connecting the value port on the Sump Temp Analog Input block to the Less-than-or-equal-to block (Figure 67).

7. Return to the Misc section of the Toolbox pane, click the Analog Wireless Write block, and drag it into the Program Design Space.

8. Double-click the block to display the Analog Wireless Write Properties dialog box. (See Figure 66, p. 64.)

9. Enter the following name in the Name field:

SupplyTemp

10. Click Save.

11. Right-click the SupplyTemp Analog Input block in the alarm module and select the properties dialog box.

12. Select the Value check box.

13. Click Save.

14. Connect the Analog Wireless Write block with a wired connection to the Supply Temp Analog Input block (Figure 68).

.

15. Return to the Misc section of the Toolbox pane again and create one more Wireless Write Analog block with the name OutdoorAirTemp.

16. Use the same steps you performed to create the SumpTemp and SupplyTemp blocks.

Figure 67. Wireless write connection (SumpTemp)

Figure 68. Wireless write connection (SupplyTemp)

Page 66: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

66 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

17. Connect the Outdoor Air Temp Wireless Write Analog block to the OutdoorAirTemp Analog Input block.

The updated alarms module is shown in Figure 69.

Adding wireless read connections to the sump heater module

To create the corresponding Analog Wireless Read blocks for the sump heater module

1. Return to the Misc section of the Toolbox pane, click Analog Wireless Read, and drag it into the Program Design Space.

2. Double-click the block to display the Analog Wireless Read Properties dialog box shown in Figure 70.

3. Enter SumpTemp in the Name list.

4. Click Save.

Figure 69. Updated alarms module

Figure 70. Using Wireless connection block

Page 67: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 67

Chapter 4: Cooling Tower With Two-Speed Fan Example

The Wireless Read block appears in the Program Design Space (Figure 71).

Adding the other input blocks

Add the remaining input blocks needed for the sump heater module.

To add the input blocks

1. Place an Analog Value block in the Program Design Space and assign the analog value Sump Heater Setpoint to it.

2. Place another Wireless Read block in the Program Design Space and assign Outdoor Air Temp to it. (The Outdoor Air Temp value is available from the corresponding Wireless Write block you created previously.)

3. Place two Constant blocks in the Program Design Space and assign the value 2.0 to one to represent a 2.0°F deadband and assign the value 32.0 to the other to represent the freezing point (Figure 72).

Adding an output block

Place a Binary Output block in the Program Design Space and assign the point, Sump Heater, to it as shown in Figure 73.

Figure 71. Wireless read

Figure 72. Input blocks for sump heater module

Figure 73. Output block for sump heater module

Page 68: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

68 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

Controlling the Sump Heater Under Normal Conditions

Use the Deadband block to control the sump heater under normal conditions.

To control the sump heater under normal conditions

1. Place a Deadband block in the Program Design Space and set it to assume heating.

Choose assume heating because you want the heater to come on if the Sump Temp falls below the Sump Heater Setpoint (40°F). You want the heater to stay on until the Sump Temp rises to the Sump Heater Setpoint plus the deadband constant (2.0°F).

2. Connect the SumpTemp Wireless Read Analog block to the input port of the Deadband block.

3. Connect the Sump Heater Setpoint Analog Value block to the setpoint port of the Deadband block.

4. Connect the 2.0 Constant block to the deadband port of the Deadband block (Figure 74).

Figure 74. Deadband incorporated in sump heater module

Comparing the Outdoor Air Temperature With the Freezing Point

Use a Less-than-or-equal-to block to maintain the sump heater on continuously when the outdoor air temperature is less than or equal to the freezing point.

To compare the outdoor air temperature with the freezing point

1. Place a Less-than-or-equal-to block in the Program Design Space.

2. Connect the OutdoorAirTemp Analog Wireless Read block and the 32.0 Constant block to the Less-than-or-equal-to block (Figure 75).

Figure 75. Less-than-or-equal-to comparison in sump heater module

Controlling the Sump Heater On or Off

Add an Or block to combine the two paths so that if the sump temperature falls below 40°F or the outdoor air temperature is less than or equal to the freezing point, the sump heater is controlled on.

To control the sump heater on or off

1. Place an Or block in the Program Design Space and connect the Deadband block and the Less-than-or-equal-to block to the Or block.

2. Connect the Or block to the Sump Heater output block (Figure 76 on page 69).

3. Compile and save your program to check for errors and to preserve your work.

Page 69: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 69

Chapter 4: Cooling Tower With Two-Speed Fan Example

Note: The compiler issues a warning message. This message is issued because the Supply Temp Wireless Write block you created in the Alarms module still lacks a corresponding Wireless Read block. You will supply this Wireless Read block in the cooling tower fan module.

Figure 76. Sump heater module completed

Writing the Cooling Tower Fan Module

Review the portion of the sequence of operation concerning the cooling tower fan.

The following important points may be drawn from the above sequence.

• Condenser water flow is a prerequisite to starting the fan.

• This part of the sequence involves a concept known as staging. Multiple deadbands may be used to control the fan stages.

• The fan must remain at low speed for 30 seconds prior to transitioning to high speed. You need to incorporate time-based control.

Figure 77 illustrates the staging operation.

Figure 77. Staging for Fan Operation

Functional Description:

If condenser water flow is established and if the condenser water temperature rises 2.5°F above the setpoint, start the fan at low speed. Switch the fan to high speed if the condenser water temperature rises to 5.0°F above the setpoint. Turn off the fan when the condenser supply water temperature falls below the setpoint minus 2.5°F. A minimum 30-second delay is required between starting the fan at low speed and switching to high speed.

Page 70: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

70 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

The black arrows denote the low-to-high progression. The fan remains at low speed until the temperature rises to 90°F, but low speed must be maintained for a minimum of 30 seconds. The red arrows denote the high-to-low progression. Conversely, the fan remains at high speed until the temperature drops to 87.5 °F, but high speed must be maintained for a minimum of 30 seconds. If the temperature drops to 82.5 °F, the fan stops. (See Figure 81, p. 72 for an equivalent deadband line graph.)

Note: A safety requirement exists for dual coil motors when the transition from high speed to low speed occurs during the high-to-low progression. The motors must be cut off for a safety period when the transition occurs. , “Chapter 7: Using Macro and Formula Blocks” includes information about a macro you can use to handle this requirement.

Adding the Input Blocks

Two inputs (hardware) and one value are required for control of the cooling tower fan.

• Flow Status

• Supply Temp

• Supply Temp Setpoint

To add the input blocks

1. Place a Binary Input block in the Program Design Space and assign the point, Flow Status to it.

2. Place the SupplyTemp Analog Wireless Read block in the Program Design Space.

3. Place an Analog Value block in the Program Design Space and assign the Analog Value point, Supply Temp Setpoint, to it (Figure 78).

Note: If you need more vertical space, click and drag your cursor down to extend the Program Design Space.

Figure 78. Input blocks for the cooling tower fan module

Adding the Output Blocks

The cooling tower fan module requires two outputs.

To add the output blocks

Place two Binary Output blocks in the Program Design Space and assign the following binary outputs to them (Figure 79):

• Fan Start Stop Low

• Fan High

Page 71: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 71

Chapter 4: Cooling Tower With Two-Speed Fan Example

Figure 79. Output blocks for the cooling tower fan module

Starting the Fan at Low Speed

Dissecting the sequence of operation into ever smaller sections, you find that starting the fan at low speed depends on two criteria:

• Condenser water flow is established.

• The condenser supply temperature is 2.5°F above the setpoint.

Use a Deadband block to start and stop the fan. Apply a centered deadband (assume cooling) with a deadband value of 5.0°F. According to the sequence, the upper limit, or setpoint, for the Deadband block is equal to the condenser water setpoint plus 2.5°F.

Use an And block to account for both conditions necessary to start the fan at low speed.

To start the fan at low speed

1. Place a Deadband block in the Program Design Space and set it as Centered.

2. Place an Analog Constant block in the Program Design Space and assign the value 5.0 to it.

3. Connect the SupplyTemp Analog Wireless Read block to the input port of the Deadband block.

4. Connect the Supply Temp Setpoint Analog Value block to the setpoint port of the Deadband block.

5. Connect the 5.0 Constant block to the deadband port of the Deadband block.

6. Place an And block in the Program Design Space.

7. Connect the Flow Status Binary Input block and the Deadband block to the And block.

8. Connect the And block to the Fan Start Stop Low Binary Output block (Figure 80).

Figure 80. Start the fan at low speed

Page 72: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

72 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

Transitioning the Fan to High Speed

The transitioning the fan to high speed depends on two additional criteria.

• The condenser supply temperature is 5.0°F above the setpoint.

• The fan is on at low speed, and it has been on at low speed for at least 30 seconds.

Transitioning the fan based on supply temperature

Apply a second deadband to activate the fan at high speed based on a combined deadband and offset from the setpoint of 5.0°F. See Figure 81 for more information about how the deadbands work together.

Figure 81. Deadbands used to control fan speed

Use a Math block to incorporate this functionality. Math blocks perform standard math operations and functions. Specifically, use an Add block to adjust the setpoint value by adding 5.0°F. The result of the addition serves as the setpoint input to the Deadband block.

To transition the fan based on supply temp

1. Place a Deadband block in the Program Design Space and set it as Greater Than.

2. Go to the Math section on the Toolbox pane.

3. Select the Add block, drag it into the Program Design Space, and click to place it.

4. Place a Analog Constant block in the Program Design Space and assign the value 5.0 to it.

5. Connect the SupplyTemp Analog Wireless Read block to the input port of the Deadband block.

6. Connect the Supply Temp Setpoint Analog Value block and the 5.0 Constant block to the Add block.

7. Connect the Add block to the setpoint port of the Deadband block.

8. Place a Constant block in the Program Design Space and assign the value 2.5 to it.

9. Connect the 2.5 Constant block to the deadband port of the Deadband block (Figure 82).

Page 73: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 73

Chapter 4: Cooling Tower With Two-Speed Fan Example

Figure 82. Adding the fan at high speed

Transitioning the fan based on time

To implement the time delay, use the Delay on Start block. The on/off control input of the Delay on Start block comes from the output of the And block. The delay countdown begins when the fan starts at low speed. Use another And block to ensure that both of the previously mentioned criteria apply to control of the binary output, Fan High.

To transition the fan based on time

1. Place a Delay on Start block in the Program Design Space and assign its units to seconds.

2. Place a Constant Analog block in the Program Design Space and assign the value 30.0 to it.

3. Place another And block in the Program Design Space.

4. Connect the first And block to the On/Off Control port of the Delay on Start block.

5. Connect the 30.0 Constant Analog block to the Delay port of the Delay on Start block.

6. Connect the Delay on Start block and the second Deadband block to the second And block.

7. Connect the second And block to the Fan High output block.

8. Arrange your blocks with comments in the Program Design Space as shown in Figure 83.

Tip: Even in graphical programming, comments are especially helpful in describing the logic used in the program. Place specific comments near the blocks they are describing. Otherwise, place general program notes in one location as in Figure 83.

9. Compile and save your program to check for errors and to preserve your work.

Page 74: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

74 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

Figure 83. Cooling tower fan module complete

Figure 84 is the cooling tower with two-speed fan program. See “Chapter 5: Cooling Tower with Variable-Speed Fan Example” on page 77 to add the condenser water pump module and to modify your program.

Figure 84. Completed cooling tower with two-speed fan program (three modules)

Page 75: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 75

Chapter 4: Cooling Tower With Two-Speed Fan Example

Page 76: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

76 BAS-APG008-EN, 02/05/2010

Chapter 4: Cooling Tower With Two-Speed Fan Example

Summary Questions

Answer the following questions to review the skills, concepts, definitions, and blocks you learned in this chapter. The answers to these questions are on p. 165.

1. Which Time Delay block optionally applies a timer based on its configuration?

2. How would you change the cooling tower fan module of the program shown above in Figure 84 if the fan motor controller accounts for the delay between low and high speeds?

Page 77: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 77

Chapter 5: Cooling Tower with Variable-Speed Fan

Example

In this chapter, you will build upon the cooling tower program that you constructed in “Chapter 4: Cooling Tower With Two-Speed Fan Example,” p. 51. Some changes to the cooling tower that you must accommodate in your program include a variable-speed fan (instead of a two-speed fan) and calculation of some critical performance parameters for the cooling tower.

Note: Many of the chapters in this book build on previous chapters, so be sure to complete the chapters in the order presented. See “About this book” on page 1 for additional instructions.

What You Will Learn

In this chapter, you will learn a variety of skills, concepts, and definitions.

Skills

You will learn how to interpret increasingly complex sequences of operation.

Concepts and definitions

You will understand Calculation blocks.

Blocks

You will learn how to use the following blocks:

• Output Status

• Subtract

• Wet-Bulb

• Min

• Max

• Limit

• PID

• Feedback Alarm

• Not

Reviewing the Sequence of Operation

In this scenario a cooling tower with a variable-speed fan delivers condenser water to a small chiller plant. The following specifications apply to control of the cooling tower.

Condenser water pump

When condenser water is requested by the chiller plant, command the condenser water pump to start. If condenser water flow fails to be confirmed within 30 seconds, command the pump to stop and indicate a pump failure and turn on the alarm output. An operator or technician must be able to reset the alarm from the service tool.

Cooling tower fan

Upon successful confirmation of condenser water flow, and when the cooling tower supply water temperature exceeds the setpoint by 2.5°F, turn on the fan. Modulate the fan to maintain the condenser water supply temperature according to setpoint. When the cooling tower supply water temperature is 2.5°F below the setpoint, turn off the fan. Note that the setpoint is adjustable and that it is limited to a minimum of 65°F and a maximum of 95°F.

Page 78: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

78 BAS-APG008-EN, 02/05/2010

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Sump heater

Cycle the sump heater if the sump temperature falls below 40°F (this value is adjustable from the service tool). If the outdoor air temperature falls below 32°F, turn on the sump heater continuously. If the sump temperature remains below 36°F (this value is adjustable) for 15 minutes, or if the sump temperature falls below 32°F, indicate an alarm and turn on the alarm output.

Alarms

In addition to the alarm requirements mentioned above, indicate an alarm and turn on the alarm output when any sensor, including temperature and humidity, fails. Alarms must be resettable from the service tool.

Calculations

Calculate and display the change in water temperature across the cooling tower, the ambient wet-bulb temperature, and the approach temperature. (The approach temperature is defined as the difference between the ambient wet-bulb temperature and the condenser water supply temperature.)

The specifications for the pump and the fan have changed. The alarms have changed a little bit with the addition of the humidity sensor failure. The calculations section is completely new.

Analysis of this scenario results in Figure 85. The corresponding data definition is presented in Table 6, p. 79.

Figure 85. Cooling tower with value-speed fan drive data

Page 79: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 79

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Configuring the Points

Before you start writing the program, configure the points listed in Table 6 by using the Point Configuration dialog boxes, which you can access from either the

• TGP2 Editor

Points Summary dialog box (Point Configuration menu > Points Summary)

• Tracer TU service tool

The Analog, Binary, or Multistate screens in the Controller Settings Utility

Table 6. Cooling tower with variable-speed fan drive data definition

Save these points to the same configuration file you created in Chapter 4 by clicking Save to File.

Note: The point names used in the exercises in this book are for teaching purposes only. They do not completely conform to the most current “best practice” point naming conventions you should use in actual jobs. (See “Increase your knowledge by using available resources,” p. 163 for additional information.)

Data Type Name Notes

Inputs

Analog

Supply Temp Analog input configured as thermistor

Return Temp Analog input configured as thermistor

Sump Temp Analog input configured as thermistor

Outdoor Air Temp Analog input configured as thermistor

Outdoor Air Humidity Universal input (Dimensionality = None)

Binary

Flow Status

Condenser Water Request

Outputs

Analog Fan Speed Analog output configured as voltage, 2–10 V

Binary

Fan Start/StopApply sufficient minimum on/off timers to prevent excessive fan cycling. (Relay)

Sump HeaterApply sufficient minimum on/off timers to prevent excessive heater cycling. (Relay)

Pump Start/StopApply sufficient minimum on/off timers to prevent excessive pump cycling. (Relay)

Alarm (Triac)

Values

Analog

Supply Temp Setpoint

85ºF default

Sump Heater Setpoint

85ºF default

Sump Alarm Setpoint

40ºF default

Delta Temp 36ºF default

Wet-Bulb Temp 0ºF default

Approach Temp 0ºF default

BinaryPump Fail Off default

Alarm Reset Off default

Page 80: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

80 BAS-APG008-EN, 02/05/2010

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Determining a Programming Approach

Review the sequence of operation to determine the changes that are required to the cooling tower program in the module that controls the cooling tower fan. The new sequence of operation calls for modulating control of the fan. Also, a new module is required to calculate critical performance parameters for the cooling tower and to control the condenser water pump. For the purposes of this tutorial, work on the modules in the following order:

1. Alarms

2. Calculations

3. Cooling tower fan

4. Condenser water pump

Like the cooling tower with two-speed fan program, these modules are all contained in a single TGP2 program file, because values are passed between modules using Wireless Write and Wireless Read blocks.

Editing the Program Properties

Set the program properties, including the units and run frequency, after you save the existing cooling tower with two-speed fan program under a new name.

To edit the program properties

1. Open the cooling tower with two-speed fan program.

2. Save the program under a new name.

3. Open the Program Properties dialog box and set the properties as follows

• Set the units to I-P.

• Set the run frequency to 30 seconds.

• Update the description of the program.

4. Click OK.

Modifying the Alarms Module

Using the Alarms module that you created in “Chapter 4: Cooling Tower With Two-Speed Fan Example,” p. 51, expand the Or block to include the new, outdoor air relative humidity input in the possible failures.

To modify the alarms module

1. Add an Analog Input block to the Program Design Space and assign the analog input, Outdoor Air Humidity, to it.

2. Select the Fail/Fault check box

The Analog Input block now has a Fail/Fault port.

3. Expand the Or block by adding one more input port.

4. Connect the Outdoor Air Humidity Fail/Fault port to the Or block.

5. Create an Analog Wireless Write block, name it ReturnTemp, and connect it to the Value port of the Return Temp input block.

6. Create another Analog Wireless Write block, name it OAHumidity, and connect it to the Outdoor Air Humidity input block.

7. Create a Binary Wireless Read block, name it Supply Temp Fail, and connect it to the wire coming from the Supply Temp Analog Input block’s Fail/Fault port.

Figure 86 shows the results.

Page 81: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 81

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Figure 86. Alarms module completed

Writing the Calculations Module

According to the sequence of operation, the program must perform three calculations:

• Change in water temperature across the cooling tower

• Ambient wet-bulb temperature

• Approach temperature

Calculating Change in Water Temperature Across the Cooling Tower

Start with the simplest of the three calculations and assemble the blocks needed to calculate the change in water temperature across the cooling tower.

To calculate the change in water temperature across the cooling tower

1. Place ReturnTemp and SupplyTemp Wireless Read Analog blocks in the Program Design Space.

2. Place a Subtract block in the Program Design Space and connect it so that the Supply Temp is subtracted from the Return Temp

Tip: For some Math blocks, the input port you choose for a value is important. For example, the Subtract block subtracts the bottom input-port value from the top input-port value. Remember this relationship when working with the Subtract and Divide blocks.

3. Place an Analog Value block in the Program Design Space and assign the analog value, Delta Temp, to it. (Make sure to set the block so that you can write to the value.)

Page 82: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

82 BAS-APG008-EN, 02/05/2010

Chapter 5: Cooling Tower with Variable-Speed Fan Example

4. Connect the Subtract block to the Delta Temp value block (Figure 87).

Figure 87. Change in temperature calculation

Calculating the Ambient Wet-bulb Temperature

The second calculation requirement calls for calculation of the ambient wet-bulb temperature. Use the Wet-Bulb block, a member of the Calculation blocks. Calculation blocks perform calculations unique to HVAC control applications. Use these blocks to determine air-flow rate, enthalpy, dewpoint temperature, or wet-bulb temperature.

The wet-bulb temperature of (moist) air is a function of the dry-bulb temperature and the relative humidity.

To calculate the ambient wet-bulb temperature

1. Place OutdoorAirTemp and OAHumidity Analog Wireless Read blocks in the Program Design Space. (You created the corresponding Wireless Write blocks in the Alarms module.)

2. Go to the Calculation section of the ToolBox pane, select the Wet-Bulb block, and place it in the Program Design Space.

Note: The Wet-Bulb block is set to °F by default, based on the selection of I-P units in Program Properties, so you do not have to set it.

3. Connect the OutdoorAirTemp Analog Wireless Read block to the Dry-bulb Temp port of the Wet-Bulb block.

4. Connect the OAHumidity Analog Wireless Read block to the Rel Humidity port of the Wet-Bulb block.

5. Place an Analog Value block in the Program Design Space and assign the analog value, Wet-Bulb Temp, to it.

6. Connect the Wet-bulb block to the Wet-Bulb Temp Analog Value block so that the calculated value is written to the value (Figure 88).

Figure 88. Wet-bulb temperature calculation

Page 83: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 83

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Calculating the Approach Temperature

Finally, calculate the approach temperature, or the difference between the ambient wet-bulb temperature and the condenser water supply temperature. This calculation is very similar to the calculation used to determine the change in water temperature across the cooling tower. The inputs to this calculation may be obtained from existing blocks.

To calculate the approach temperature

1. Place a Subtract block in the Program Design Space and connect it so that the Wet-Bulb Temp is subtracted from the Supply Temp.

2. Place a Analog Value block in the Program Design Space and assign the analog value, Approach Temp, to it.

3. Connect the Subtract block to the Approach Temp value block so that the calculated value is written to the value (Figure 89).

Figure 89. Calculations module complete

Page 84: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

84 BAS-APG008-EN, 02/05/2010

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Writing the Cooling Tower Fan Module

The new sequence of operation calls for modulation of the fan speed to maintain the condenser water supply temperature..

Starting and Stopping the Fan

As in “Chapter 4: Cooling Tower With Two-Speed Fan Example,” p. 51, a deadband is required to start and stop the fan. Use a centered deadband to start the fan when the water temperature is 2.5°F above the setpoint and to stop the fan when the water temperature is 2.5°F below setpoint. Remember that flow must be confirmed in order for the fan to start.

To start and stop the fan

1. Return to the cooling tower fan module of your program (Figure 90).

Figure 90. Previous cooling tower fan module

2. Delete all the blocks implementing the transition of the fan to high speed (Figure 91).

Figure 91. Using a deadband to start and stop the fan

Functional Description:

Upon successful confirmation of condenser water flow, and when the cooling tower water supply temperature exceeds the setpoint by 2.5°F, turn on the fan. Modulate the fan to maintain the condenser water supply temperature according to the setpoint. When the cooling tower supply water temperature is 2.5°F below the setpoint, turn off the fan. Note that the setpoint is adjustable and is limited to a minimum of 65°F and a maximum of 95°F.

Page 85: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 85

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Imposing Limits

The program must check the setpoint against the setpoint limits per the sequence of operation. You have two options as to which blocks to use. The limit may be applied using a combination of the Min and Max blocks, the Limit block, or a Formula block. Figure 92 shows an example of how you could use the Min and Max blocks.

Figure 92. Checking a setpoint against limits using the Min and Max blocks

Implement the simpler module using the Limit block in your program. The Limit block compares a value with high and/or low limit values, depending on how you set the properties for the block. If the value is higher than the high limit, the high-limit value is passed out of the block. If the value is lower than the low limit, the low-limit value is passed. If the value is within the limits, the input value itself is passed.

To impose limits

1. Delete the connection between the Supply Temp Setpoint Analog Value block and the Deadband block.

2. Go to the Function section on the Toolbox pane, select the Limit block, and click inside the Program Design Space to place the block.

3. Place two Constant blocks in the Program Design Space and assign 95.0 to one for the high limit and 65.0 to the other for the low limit.

4. Connect the Limit block so that it compares the Supply Temp Setpoint to the low and high limit and passes the correct value to the Deadband block (Figure 93).

Figure 93. Checking a setpoint against limits using the Limit block

Page 86: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

86 BAS-APG008-EN, 02/05/2010

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Implementing PID control

Modulation of fan speed to maintain the condenser water setpoint calls for proportional, integral, derivative (PID) control. Implement PID control in graphical programming using the PID block.

Note: For an explanation of the PID block, see the Tracer Graphical Programming (TGP2) Editor Help. For an in-depth explanation of PID control, see PID Control in Tracer Controllers (CNT-APG002-EN).

Setting up the PID block properties

1. Go to the Calculation section of the Toolbox pane, select the PID block, and drag it into the Program Design Space.

2. Double-click the PID block.

The PID Properties dialog box appears (Figure 94).

Figure 94. PID Properties dialog box

3. In the PID name field, type:

Fan Speed

4. Under PID Action, click Direct.

The action of a PID loop determines how it reacts to a change in the measured value, or the process value. A controller using direct action increases the output when the measured value increases. A controller using reverse action decreases the output when the measured value increases. In this program, the fan speed increases when the cooling tower supply water temperature increases.

Page 87: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 87

Chapter 5: Cooling Tower with Variable-Speed Fan Example

5. In the PID Frequency entry box, type:

30

Note: You can run a PID loop at the same rate as its parent program or at a slower rate.

6. In the Error Deadband field, type:

0.5

Error deadband prevents the PID from changing when the measured value is within plus or minus this value of the setpoint.

7. Confirm that the Proportional Only check box is NOT checked.

8. In the Maximum field, type:

100

This field sets the maximum output of the PID loop to 100%.

9. In the Minimum field, type:

25

This field sets the minimum output of the PID loop to 25%.

10. In the Disable Position field, type:

0

When the Output Enable/Disable port of the PID block receives a value of false, the PID loop outputs the disable-position value. Otherwise, the PID loop outputs its calculated value.

11. In the Fail Safe Position field, type:

0

When the Fail/Fault port of the PID block receives a value of true, the PID loop outputs the fail-safe-position value. Otherwise, the PID loop passes its calculated value.

12. Click OK.

Adding the PID block

Add the necessary intermediate blocks and then make the PID block connections.

To add the PID block

1. Add an Analog Wireless Read block to correspond with the Supply Temp Fail Wireless Write block you created in the Alarms module (see Figure 86 on page 81).

2. Now connect the Supply Temp Fail Wireless Read block to the Fail input port on the PID block, so the supply temperature (measured value) is checked for failure.

When the PID block receives a false value here, it outputs its calculated result. When the PID block receives a true value here, it outputs its fail-safe-position value.

3. Place three Constant blocks to serve as the proportional, integral, and derivative gains for the PID block.

4. Set the constant values to 4.0, 1.0, and 0.0, respectively.

These values are place holders for the proportional, integral, and derivative gains. When you are writing a program for a specific job, determine the best values for that job. (You could also use Analog Value blocks here so that you can tune the PID loop at the service tool.)

5. Create a Binary Wireless Write block, name it Fan Start, and connect it to the wire proceeding from the output port of the And block.

Remember that Wireless blocks can be used to pass any type of analog or binary data. Use a Wireless block to pass a hardware input value or to pass the result of some arbitration.

Page 88: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

88 BAS-APG008-EN, 02/05/2010

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Note: You will add the Flow Status Binary Wireless Write block included in Figure 95 when you create the next module. It is pictured here for reference. For convenience, you can add it now if you wish. However, the program will not compile without a warning until you add the corresponding Flow Status Binary Wireles Read block in the condenser water pump module.

6. Place a FanStart Binary Wireless Read block in the Program Design Space and connect it to the output Enable port of the PID block.

When the PID block receives a true value here, it issues its calculated result. When the PID block receives a false value here, it issues its disable-position value.

7. Add an Analog Wireless Read block corresponding to the Supply Temp Wireless Write block you created in the Alarms module (see Figure 86 on page 81). Connect it to the Measured Var port of the PID block.

8. Connect the Limit block to the setpoint port of the PID block.

9. Connect the Constant blocks to the appropriate ports of the PID block.

10. Connect the PID block to the Fan Speed Analog Output block.

11. Place comments in the Program Design Space to explain the logic of the module (Figure 95).

12. Compile and save your program to check for errors and to preserve your work.

Figure 95. Cooling tower fan module complete

Page 89: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 89

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Writing the Condenser Water Pump Module

The remaining portion of the sequence of operation concerns the condenser water pump.

First, note the following observations about the sequence.

• Control of the pump is dependent on flow status; however, flow status is also dependent on the pump control.

• The actual alarm is handled by the alarms module of the program. This module simply determines whether or not to indicate a pump failure.

Adding the Input Blocks

Start with the inputs to this portion of the program.

To add the input blocks

1. Place a Binary Input block in the Program Design Space and assign the Condenser Water Request binary input to it.

2. Place an Output Status block in the Program Design Space and assign the Pump Start Stop binary output to it. Use a Binary Output Status block to read the current commanded status of the binary output into the program.

Tip: Use the Output Status block to read the commanded value of an output point into a program. This block is referenced to the value of a point. It is not aware of Hands Off Auto (HOA) based overrides.

3. Add a Binary Wireless Write block, name it FlowStatus, and connect it to the Flow Status input block in the cooling tower fan module that you just completed (see Figure 95, p. 88), unless you chose to add it when you first created the cooling fan tower module.

4. Add a corresponding Binary Wireless Read block to this water pump module and name it FlowStatus.

5. Add a Binary Value block referenced to the Alarm Reset binary value point.

6. Arrange your blocks with comments in the Program Design Space as shown in Figure 96.

Figure 96. Input blocks for the condenser water pump module

Functional Description:

When condenser water is requested by the chiller plant, command the condenser water pump to start. If condenser water flow fails to be confirmed within 30 seconds, command the pump to stop and indicate a pump failure and turn on the alarm output. A user must be able to reset the alarm.

Page 90: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

90 BAS-APG008-EN, 02/05/2010

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Adding the Output Blocks

Place the output blocks of the program on the right side of the Program Design Space.

To add the output blocks

1. Place an Binary Output block in the Program Design Space and assign the binary output, Pump Start Stop, to it.

2. Place a Binary Value block in the Program Design Space and assign the binary value, Pump Fail to it (Figure 97).

Figure 97. Output blocks for the condenser water pump module

Determining When to Start and Stop the Pump

To simply start the pump based on the request, you could connect the Condenser Water Request directly to the Pump Start Stop output. However, control of the pump is also dependent on the flow status. If flow is not confirmed in 30 seconds following the request for flow, the pump must be controlled to off. Furthermore, an alarm indication is required. A block exists specifically for this purpose—the Feedback Alarm block.

Adding a Feedback Alarm block

The Feedback Alarm block compares the status of a binary input, output, value, or other binary value to a requested state. The binary output of the Feedback Alarm block is determined by the selected relationship between the status and the request. Using the properties dialog box for the Feedback Alarm, configure the block with one of the following three relationships:

• Request XOR Status

• Request AND NOT(Status)

• NOT(Request) AND Status

Table 7 explains how the delay timer acts based on the selected feedback alarm relationship.

Table 7. Feedback alarm relationships

Relationship Delay timer

Request XOR StatusThe delay timer starts when the request and status are not the same.

Request AND NOT(Status)The delay timer starts when the request is true and the status is false.

NOT(Request) AND StatusThe delay timer starts when the request is false and the status is true.

Page 91: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 91

Chapter 5: Cooling Tower with Variable-Speed Fan Example

When the delay timer is zero, the output of the Feedback Alarm block changes to true (on). Then when the reset input to the Feedback Alarm block changes from off to on, the block output resets to false (off).

Add a Feedback Alarm block to the program to compare the condenser water request to the flow status. Set the Feedback Alarm block to the Request XOR Status relationship. Also, set the units for the delay time interval to seconds.

Next, add a Constant block and set it to an analog value of 30. The constant provides the delay time interval. Make the appropriate connections to the Feedback Alarm block.

To add a Feedback Alarm block

1. Go to the Alarms section of the Toolbox pane, select Feedback Alarm, and drag it into the Program Design Space.

2. Double-click the Feedback Alarm block.

The Feedback Alarm Properties dialog box appears (Figure 98).

Figure 98. Feedback Alarm Properties dialog box

3. Under Request/Status Relationship, click the Request XOR Status option.

4. In the Delay Time Units list, click Seconds.

5. Click Save.

6. Place a Constant block in the Program Design Space and assign the value 30.0 to it.

7. Connect the Pump Start Stop output status block to the Request port of the Feedback Alarm block.

8. Connect the FlowStatus wireless read block to the Status port of the Feedback Alarm block.

9. Connect the AlarmReset value block to the Reset port of the Feedback Alarm block.

10. Connect the 30.0 Constant block to the Delay port of the Feedback Alarm block (Figure 99).

Page 92: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

92 BAS-APG008-EN, 02/05/2010

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Figure 99. Feedback Alarm block

Checking conditions to start and stop the pump

Because control of the pump is dependent on two conditions, both the condenser water request and the flow status, add an And block just before the Pump Start Stop output block.

To check conditions to start and stop the pump:

1. Place an And block in the Program Design Space and connect it so that it checks the state of both the Condenser Water Request Binary Input block and the Feedback Alarm block.

2. Connect the And block to the Pump Start Stop output block.

3. Connect the Feedback Alarm block to the Pump Fail Binary Value block (Figure 100).

Figure 100. Condenser water pump module

4. Examine Table 8, p. 93 for an analysis of this logic. (See letter callouts in Figure 100.)

a

b

c

d

e

Page 93: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 93

Chapter 5: Cooling Tower with Variable-Speed Fan Example

What is wrong with the sequence presented in Table 8? The pump did not start until the Feedback Alarm delay expired. Thus, flow is never confirmed during the delay period of 30 seconds. But the sequence of operation calls for the pump to start, allowing 30 seconds for flow confirmation. If after the 30-second delay period, flow status is not confirmed, a pump failure results.

Only one block is required to fix this problem, but which one? The answer is the Not block. The Not block changes the logic of the data to the opposite state. For example, if the Feedback Alarm block sends a true message, the Not block changes the message to false.

5. Delete the connection between the Feedback Alarm block and the And block.

6. Go to the Logic section of the Toolbox pane, select Not, drag it into the Program Design Space, and click to place the block.

7. Connect the Feedback Alarm block to the Not block.

8. Connect the Not block to the And block (Figure 101).

Figure 101. Adjusted pump start/stop module

Table 8. Pump start/stop module state table

Run a b c d e Comments

1 F F F F F Initially, Request is off, and Status is off.

2 T F F F FThe chiller plant calls for condenser water, so Request is on. Flow is not confirmed yet. The Feedback Alarm delay countdown begins.

3 T F F T TThe Feedback Alarm delay expires and its output transitions to on, controlling the pump on and indicating a pump failure.

4 T T T T TFlow status is confirmed. The Feedback Alarm remains on because it has not been reset.

a

b

c

d

e

Page 94: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

94 BAS-APG008-EN, 02/05/2010

Chapter 5: Cooling Tower with Variable-Speed Fan Example

9. See Table 9 and Table 10 to analyze the resulting logic for both a successful start and a failure to confirm flow.

10. Compile and save your program to check for errors and to preserve your work (Figure 102).

Figure 102. Condenser water pump module completed

Table 9.Pump start/stop module with successful start

Run a b c d e Comments

1 F F F F F Initially, the Request is off, and the Status is off.

2 T F F F TThe chiller plant calls for condenser water, Request is on. The pump starts, but flow is not confirmed yet. The Feedback Alarm delay counter begins its countdown.

3 T T T F TFlow status is confirmed. The Feedback Alarm delay countdown ceases and the pump remains on.

Table 10.Pump start/stop module with failure to confirm flow

Run a b c d e Comments

1 F F F F F Initially, the Request is off, and the Status is off.

2 T F F F TThe chiller plant calls for condenser water, Request is on. The pump starts, but flow is not confirmed yet. The Feedback Alarm delay counter begins its countdown.

3 T T F T FFlow status is not confirmed. The Feedback Alarm delay expired, and its output changes to true, resulting in a pump failure. The pump is controlled off.

Page 95: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 95

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Figure 103 is the cooling tower with variable-speed fan program.

Figure 103. Complete cooling tower with variable-speed fan program

Page 96: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

96 BAS-APG008-EN, 02/05/2010

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Page 97: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 97

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Summary Questions

Answer the following questions to review the skills, concepts, definitions, and blocks you learned in this chapter. The answers to these questions are on p. 165.

1. The logic contained in the Feedback Alarm block is a combination of several other blocks. Can you replicate this logic without using the block itself? Focus on one Feedback Alarm relationship, XOR. First construct a sequence of operation. Then write a graphical program.

2. You wish to ensure that a valve position is changed only when there is a request to change the position by 3% or more from the last valve position. How is this segment programmed? Hint: Use the Output Status block as part of the segment.

Page 98: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

98 BAS-APG008-EN, 02/05/2010

Chapter 5: Cooling Tower with Variable-Speed Fan Example

Page 99: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 99

Chapter 6: VAV AHU Example

In this chapter, you will expand your programming skills. You will now use what you have learned in the previous chapters to program a variable-air-volume (VAV) air handler. Because you are more familiar with graphical programming, this chapter proceeds at a faster pace. Instead of presenting the programs block-by-block, they are presented in a more modular form. Use the sequence of operation to guide you as you create modules that fit into larger programs.

Note: Many of the chapters in this book build on previous chapters, so be sure to complete the chapters in the order presented. See “About this book” on page 1 for additional instructions.

What You Will Learn

In this chapter, you will learn a variety of skills, concepts, and definitions.

Skills

You will learn how to:

• Interpret increasingly complex sequences of operation, with a focus on VAV air handler applications

• Use logic blocks (And, Or, Xor, Not) in combination with each other

Concepts and definitions

You will understand how to apply graphical programming language to an air-handling unit.

Blocks

You will learn how to use the following blocks:

• Occupancy

• De-Enumerator

Reviewing the Sequence of Operations

In this scenario a VAV air handler provides comfort heating and cooling to a space. The air handler contains a variable-speed fan, both cooling and heating coils, and an outdoor air damper. The air handler is a stand-alone unit (Figure 104).

Figure 104. VAV air handler

Page 100: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

100 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Modes and Setpoints

The following parameters for the sequence of operation are presented according to the occupancy mode, the heat/cool mode, or the setpoint.

Occupied mode

The occupied mode is initiated by the controller’s local schedule or by a unit override. When the air handler is in occupied mode, operate the supply fan continuously. Keep the outside air damper at minimum position, unless the air handler is economizing. Modulate the cooling valve, heating valve, and outside air damper to maintain the discharge air temperature.

Unoccupied mode

The unoccupied mode is initiated by the controller’s local schedule or by a unit override. When the air handler is in unoccupied mode, turn the supply fan off and fully close the outside air damper and the cooling and heating valves. Open the heating valve completely if the outdoor air temperature falls below the freeze avoidance setpoint, 35°F (adjustable).

Space setpoints

For occupied, occupied standby, and occupied bypass modes, calculate effective cooling and heating setpoints based on a single space temperature setpoint and the configured, default occupied, and occupied standby setpoints.

Discharge air setpoints

For discharge air control, use the configured, default discharge air temperature cooling and heating setpoints.

Heat/Cool arbitration

Determine the heat/cool decision of the air handler based on the effective occupied cooling and heating setpoints. Transition the air handler to cooling if the space temperature exceeds the cooling setpoint plus 1°F. Transition the air handler to heating if the space temperature falls below the heating setpoint minus 1°F.

Control

The following parameters for the sequence of operation are presented according to the equipment that must be controlled.

Supply fan

Operate the supply fan whenever the air handler is in occupied mode and modulate the fan speed to maintain the duct static pressure setpoint, 1.5 in. wg (adjustable). Turn the supply fan off whenever one of the following occurs:

• The air handler is unoccupied.

• The run/stop interlock is open.

• The mixed air temperature is too cold and the Low Temperature Detection input is closed.

• The supply fan status indicates a fan failure after a 1-minute delay.

If the duct static pressure exceeds 4 in. wg, shut down the air handler immediately.

Page 101: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 101

Chapter 6: VAV AHU Example

Outdoor air damper

When the economizer function is enabled and the outdoor air temperature is less than the economizer changeover setpoint, modulate the outdoor air damper between the adjustable minimum position and fully open to maintain the discharge air cooling setpoint. Modulate the outdoor air damper closed, overriding the minimum position, to maintain the mixed air temperature at or above the mixed air setpoint.

If the economizer function is disabled, or the air handler is in the heat mode, control the outdoor air damper to its minimum position. If the outdoor air temperature falls below a low outdoor air temperature limit, control the outdoor air damper to its closed position. In unoccupied mode, control the outdoor air damper to its closed position. Also, if the supply fan is off or the status of the mixed air temperature sensor is failed, control the outdoor air damper to its closed position.

Exhaust fan

Coordinate exhaust fan operation with the unit supply fan and outdoor air damper position. Turn on the exhaust fan whenever the supply fan is on and the outdoor air damper is open beyond 30%. The exhaust fan remains on until the outdoor air damper closes to below 20% open or the supply fan is turned off.

Cooling valve

Modulate the cooling valve to maintain the discharge air temperature at the discharge air cooling setpoint. If the economizer function is enabled and the outdoor air damper is not open at least 90%, control the cooling valve to its closed position. Also, close the cooling valve if the air handler is in heat mode, the supply fan is off, or the discharge air temperature sensor is failed.

Heating valve

Modulate the heating valve to maintain the discharge air temperature at the discharge air heating setpoint. Close the heating valve if the air handler is in cool mode, the supply fan is off, or the discharge air temperature sensor is failed. Open the heating valve if the supply fan is off and the outdoor air temperature falls below the adjustable freeze avoidance setpoint.

Alarms

In addition to the alarm requirements mentioned above, indicate an alarm and turn on the alarm output when any sensor fails. Alarms must be resettable. Diagnostic conditions include the following:

• Dirty filter

• Duct static pressure high limit

• Exhaust fan failure

• Low outdoor air temperature

• Low (mixed air) temperature detection

• Sensor failure (including discharge air temperature, mixed air temperature, outdoor air temperature, space temperature, and duct static pressure)

• Supply fan failure

The following failures shut down the air handler and require a manual reset:

• Discharge air or mixed air temperature sensor failure

• Fan failure

• High duct static pressure

• Low mixed air temperature

Page 102: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

102 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Configuring Points for the VAV AHU

Before you write the program, configure the inputs, outputs, and values in a new configuration file using the Point Configuration dialog boxes accessed from the Controller Settings screens in the Tracer TU service tool.

Creating Special XM References

The points list includes one analog input, two analog outputs, and two binary inputs that use XM references. Perform the following steps to set up these references.

To create XM references

1. Click the Controller Settings Utility tab on the right side of the Tracer TU window and then select the horizontal Controller Settings tab.

2. Open the Expansion Modules group box and select the Module 01 and Module 02 check boxes.

3. Click Discover Modules.

4. Save your work to a new configuration file (because we are creating points for a new device) by clicking Save to File and specifying a new file name.

Points Listed by Type

Table 11 includes all the points used in this program grouped by type.

Note: The point names used in the exercises in this book are for teaching purposes only. They do not completely conform to the most current “best practice” point naming conventions you should use in actual jobs. (See “Increase your knowledge by using available resources,” p. 163 for additional information.)

.

Table 11. Point List for VAV AHU Programs

Type Instance Name Reference Notes Analog input 1 Discharge Air Temperature AI4 Thermistor

2 Duct Static Pressure Local P1

3 Mixed Air Temperature AI3 Thermistor

4 Outdoor Air Humidity Local XM.1.UI03 Current

5 Outdoor Air Temperature AI5 Thermistor

6 Outdoor Air Temperature Setpoint

XM.1.UI04 Default value = 60

7 Space Temperature Local AI1 Hardwired space temperature sensor (thermistor)

8 Space Temperature Setpoint Local

AI2 Hardwired space temperature setpoint (thumbwheel)

9 Supply Temperature Setpoint Local

XM.2.UI04 Default value = 60

Analog output 1 Chilled Water Valve XM.1.UIO1 Voltage = 2 - 10 Vdc

2 Face and Bypass Damper N/A Not used in this program, but often used in air handler programs.

3 Hot Water Valve XM.1.UIO2 Voltage = 2 - 10 Vdc

4 Outdoor Air Damper AO2 Voltage = 2 - 10 Vdc

5 SupplyFan Speed AO1 Voltage = 2 - 10 Vdc

Page 103: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 103

Chapter 6: VAV AHU Example

Analog value 1 Discharge Air Cooling Setpoint Active

Default value = 0

2 Discharge Air Cooling Setpoint Local

Discharge air cooling setpoint supplied from the service tool.

3 Discharge Air Heating Setpoint Active

Default value = 0

4 Discharge Air Heating Setpoint Local

Discharge air heating setpoint supplied from the service tool.

5 Duct Static Pressure Setpoint Local

Default value = 1.5

6 Economizer Minimum Position Setpoint Local

Outdoor air damper minimum position

7 Local Setpoint High Limit Default value = 85

8 Local Setpoint Low Limit Default value = 60

9 Low Outdoor Air Temperature Setpoint

Minimum outdoor air temperature setpoint supplied from service tool.

10 Mixed Air Low Limit Setpoint Default value = 45

11 Occupied Cooling Setpoint Active

Result of setpoint arbitration and calculation. Used to control the chilled water valve.

12 Occupied Heating Setpoint Active

Result of setpoint arbitration and calculation. Used to hot water valve.

13 Occupied Offset Space temperature occupied offset supplied from the service tool.

14 Space Temp Setpoint Default

Space temperature setpoint default

15 Space Temperature Setpoint Active

End result of the space setpoint calculation.

16 Space Temperature Setpoint BAS

Space temperature setpoint supplied from Tracer SC.

17 Standby Offset Space temperature standby offset supplied from the service tool.

18 Unoccupied Cooling Setpoint

Unoccupied space temperature cooling setpoint supplied from service tool.

19 Unoccupied Heating Setpoint

Unoccupied space temperature heating setpoint supplied from service tool.

Binary input 1 Exhaust Fan Status XM.2.UIO1 Update interval = 30 seconds

2 Filter Status B.l3 Update interval = every 5 minutes

3 Mixed Air Low Temperature Alarm

XM.2.UIO2 Update interval = 30 seconds

4 Occupancy Input BI1 Update interval = 5 seconds

5 Run Stop Interlock BI2 Update interval = 5 seconds

6 Supply Fan Filter Alarm XM.2.UIO3 Update interval = 30 seconds

7 Supply Fan Status BI3 Update interval = 30 seconds

Binary output 1 Alarm Output BO4

2 Exhaust Fan Start Stop BO2

3 Supply Fan Start Stop BO1

Table 11. Point List for VAV AHU Programs

Type Instance Name Reference Notes

Page 104: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

104 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Save all these points to the new configuration file. Then make sure that the TGP2 Editor is open and ready to go.

Binary value

1 Alarm Reset Resets all but fan alarms.

2 Auto Reset Alarm

3 Duct Static High Limit Alarm Duct Static pressure exceeds a safe value.

4 Economizer Enable Allow unit to economize. Request from service tool.

5 Exhaust Fan Failure

6 Fan Failure Reset Reset for exhaust and supply fan failures

7 Heat Cool Mode Heat = false/Cool = true

8 Informational Alarm

9 Low Outdoor Air Temperature Alarm

Outdoor air temperature less than a safe value.

10 Maintenance Required Alarm

11 Maintenance Timer Reset

12 Manual Reset Alarm

13 Night Heat Cool

14 Parking Lot Lights

15 Sensor Failure A general alarm value triggered by a sensor failure.

16 Supply Fan Failure

Multistate value 1 Heat Cool Mode Status Enumerations 1 = Auto, 2 = Heat 3 = Morning Warm-up 4 = Cool

2 Occupancy Status Enumerations 1, 3, and 4

Table 11. Point List for VAV AHU Programs

Type Instance Name Reference Notes

Page 105: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 105

Chapter 6: VAV AHU Example

Determining a Programming Approach

As mentioned previously, programming instructions in this chapter are in a modular form. Also, remember that this sequence of operation could result in a large number of variations in program content and programming technique.

From the sequence of operation, determine the basic control functions required. In this case, the following control functions must be addressed.

• Effective space setpoint calculation

• Discharge air setpoint validation

• Mode determination

• Supply fan control

• Duct static pressure control

• Exhaust fan control

• Mixed air/outdoor air damper control

• Cooling valve control

• Heating valve control

• Alarm management

Not every control function fits into one program. Determine the number of programs required by grouping control functions together that require the same information, and/or the same run frequency as shown in Table 12.

Table 12. Control functions within each program

Program name Control functions

FanControl

Supply fan control

Duct static pressure control

Exhaust fan control

DischargeAirControl Mixed air/outdoor air damper control

Valve controlCooling valve control

Heating valve control

Alarms Alarm management

ModeAndSetpoints

Effective space setpoint calculation

Discharge air setpoint validation

Mode determination

Page 106: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

106 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Writing the Fan Control Program

Create a new program and setting its properties as shown in Figure 105.Figure 105. Fan control program properties

When complete, this program performs the following tasks:

• Supply fan control

• Duct static pressure control

• Exhaust fan control

Controlling the Supply Fan

Control the supply fan on and off according to the sequence of operation. Turn the supply fan on when the unit is occupied. Turn the supply fan off when any of the following is true:

• The unit is unoccupied.

• The run/stop interlock is open.

• The mixed air low temperature detection is closed.

• The supply fan status indicates a fan failure after a 1-minute delay.

• The duct static pressure exceeds 4 in. wg.

Starting and stopping the supply fan follows a pattern similar to starting and stopping the condenser water pump on the cooling tower. Use the module shown in Figure 106 on page 107 to control the supply fan.

Page 107: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 107

Chapter 6: VAV AHU Example

• Use the Occupancy and the De-Enumerator blocks to interpret the occupancy mode of the controller.

Using the Occupancy blockUse the Occupancy block to provide a program with the occupancy state of the controller. The output of the Occupancy block is the result of arbitration among various schedule-related inputs and results in the appropriate enumerated value for the current occupancy state. Enumerations of the Occupancy block output are as follows:

1= Occupied

2= Unoccupied

3= Occupied bypass

4= Occupied standby

For more information about the Occupancy block, see the Tracer Graphical Programming (TGP2) Editor Help.

Using the De-Enumerator blockUse the De-Enumerator block to translate an analog enumeration to one of several possible binary output values (1 = occupied, 3 = bypass, and 4 = standby). If the analog value input is equal to one of the enumerations for which the block tests, the appropriate binary output is set to true. All other binary outputs are set to false. Use the properties dialog box to select the configuration and specify the required outputs.

• Use the binary value, Manual Reset Alarm, to carry the alarm status associated with manual reset alarm conditions, including low mixed air temperature and high duct static pressure. If this alarm is active, it prevents the fan from starting.

• Use the Feedback Alarm block to start the fan and confirm fan status. A fan failure occurs if status cannot be confirmed after a 1-minute delay.

• Connect the actual Output Status block to the Feedback Alarm block. Use the output status to allow overrides of the fan without indicating a fan failure.

Figure 106. Supply fan control

Page 108: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

108 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Controlling the Duct Static Pressure

After starting the supply fan, modulate the supply fan speed to maintain the duct static pressure setpoint, 1.5 in. wg (adjustable). Use a PID loop, as shown in Figure 108 on page 109.

1. Use an Analog Value block to access the Duct Static Pressure Setpoint.

2. In the duct static pressure control programming, set the PID loop properties as shown in Figure 107.

Note: You can leave the Frequency set to zero (0). The PID calculation runs whenever the program runs.

Figure 107. Supply fan PID properties

Page 109: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 109

Chapter 6: VAV AHU Example

Figure 108. Duct static pressure control

Controlling the Exhaust Fan

This program also controls the exhaust fan. From the sequence of operation, you know to:

• Turn the exhaust fan on when the supply fan is on and the outdoor air damper is open beyond 30%.

• Turn the exhaust fan off when the outdoor air damper closes to below 20% open or the supply fan is turned off.

Start and stop the fan with a deadband as shown in Figure 109.

• Use a Deadband block to respond to the position of the outdoor air damper.

• Use the Feedback Alarm block to start the fan and confirm fan status. Implement a fan failure if status cannot be confirmed after a 1-minute delay.

• Connect the actual Output Status block to the Feedback Alarm block. Use the output status to allow overrides of the fan without indicating a fan failure.

Note: To reset the binary value, Fan Failure Reset, you would set a limited duration override of the point in the Tracer TU service tool. (See “Using an Override with Control Priority to Reset an Alarm” on page 63.)

Page 110: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

110 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Figure 109. Exhaust fan control

Compile and download the fan control program (Figure 110) to the controller.

Figure 110. Complete fan control program

Supply fan control

Page 111: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 111

Chapter 6: VAV AHU Example

Duct static pressure control

Exhaust fan control

Page 112: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

112 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Writing the Discharge Air Control Program

Write a program to control the discharge air temperature that performs the following tasks:

• Mixed air and outdoor air damper control

• Cooling valve control

• Heating valve control

Create a new program and set its properties as shown in Figure 111.

Figure 111. Discharge air control program properties

Controlling the Mixed Air and Outdoor Air Damper

Operation of the outdoor air damper and subsequent mixed air temperature control must satisfy a number of scenarios according to the sequence of operation.

Modulate the outdoor air damper between the adjustable minimum position and fully open to maintain the discharge air cooling setpoint when all of the following are true:

• The economizer is enabled.

• The outdoor air temperature is less than the economizer changeover (or outdoor air temperature) setpoint.

• The air handler is in cooling mode.

Modulate the outdoor air damper closed, overriding the minimum position, to maintain the mixed air temperature at or above the mixed air setpoint.

Control the outdoor air damper to its minimum position when either of the following is true:

• The economizer function is disabled.

• The air handler is in heating mode.

Page 113: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 113

Chapter 6: VAV AHU Example

Close the outdoor air damper completely when any of the following is true:

• The unit is in unoccupied mode.

• The outdoor air temperature falls below the low setpoint for the outdoor air temperature.

• The supply fan is off.

• The sensor for the mixed air temperature is failed.

Determining whether to economize

Because the control of the outdoor air damper is potentially complex, you may simplify the program by separating the decision to economize from the actual control of the damper.

Complete the first part of this program, as shown in Figure 112, to determine some factors important to control of the outside air damper.

• Use a Deadband block to check the outside air temperature against the Low Outside Air Temperature Setpoint. You will use this information later in the program.

• Use a second Deadband block to check the outside air temperature against the economizer changeover, or Outside Air Temperature Setpoint. Combine the economizer enable setting and the heat/cool mode with the result of this deadband to determine whether conditions warrant economizer operation.

• Use an Analog Input block to access the Outdoor Air Temperature setpoint.

Figure 112. Determining whether to economize

Determining the outdoor air damper position

The next piece of the puzzle involves determining the required position of the outdoor air damper. Use the TGP2 module in Figure 113.

• Use a Delay on Start block to implement a 1-minute delay prior to allowing the outdoor air damper to modulate.

• Use a PID loop to control the outdoor air damper to maintain the Discharge Air Cooling Setpoint Local when economizing is permitted.

• Add a second PID loop as backup protection to monitor the mixed air temperature. It determines the necessary outdoor air damper positions to maintain the mixed air temperature at the Mixed Air Low Limit Setpoint.

• Use an Analog Value block to access the Mixed Air Low Limit Setpoint.

Page 114: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

114 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

• Compare the calculated positions from the PID loops. And allow mixed air control to overrule discharge air control when necessary to prevent freezing of the heating or cooling coils.

Figure 113. Controlling outdoor air damper position

Controlling the Cooling Valve

Take a closer look at the sequence of operation with regard to the cooling valve.

Modulate the cooling valve to maintain the discharge air temperature at the discharge air cooling setpoint when all of the following are true:

• The supply fan is on.

• The air handler is in cooling mode.

• The economizer function is not enabled.

Or when all of the following are true:

• The supply fan is on.

• The air handler is in cooling mode.

• The economizer function is enabled.

• The outdoor air damper is open at least 90%.

Close the cooling valve when any of the following is true:

• The air handler is in heating mode.

• The supply fan is off.

• The discharge air temperature sensor is failed.

Page 115: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 115

Chapter 6: VAV AHU Example

It may help to think of control of the cooling valve in two parts. First, program the decision to operate the cooling valve as shown in Figure 114.

• Use a combination of logic blocks to determine whether the cooling valve operates.

• Apply the output of the economizer decision here.

• Use a Deadband block and the position of the outdoor air damper.

Figure 114. Operate the cooling valve?

The output of this decision feeds into the actual control of the cooling valve using a PID loop (Figure 115 on page 115).

Figure 115. Controlling the cooling valve

Page 116: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

116 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Controlling the Heating Valve

Consider the following specifications from the sequence of operation when writing the module for the heating valve.

Modulate the heating valve to maintain the discharge air temperature at the discharge air heating setpoint when both of the following are true:

• The supply fan is on.

• The air handler is in heating mode.

Open the heating valve completely when both of the following are true:

• The supply fan is off.

• The outdoor air temperature falls below the adjustable freeze avoidance setpoint.

Close the heating valve when any of the following is true:

• The air handler is in cooling mode.

• The supply fan is off.

• The discharge air temperature sensor is failed.

Like the cooling valve, the control of the heating valve consists of two parts: the decision and the control. However, a third requirement calls for the heating valve to open when the outdoor air temperature falls below the adjustable, low setpoint for the outdoor air temperature.

Complete the module in Figure 116 to control the heating valve.

• Use logic blocks to implement the decision to operate the heating valve.

• Add a PID loop to control the heating valve output.

• When the outdoor air temperature falls below the adjustable, Low Outdoor Air Temperature setpoint, use a Switch block to control the output to its fully open position.

Figure 116. Controlling the heating valve

The heating valve module completes the discharge air control program as shown in Figure 117. Compile and download the program to the controller.

Page 117: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 117

Chapter 6: VAV AHU Example

Figure 117. Complete discharge air program

Determining whether to economize

Controlling outdoor air damper position

Page 118: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

118 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Controlling the cooling valve

Controlling the heating valve

Page 119: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 119

Chapter 6: VAV AHU Example

Writing the Alarms Program

The alarms program indicates diagnostic conditions to the operator and protects the equipment from potential harm when such a condition exists. According to the sequence of operation, the following diagnostic conditions require an alarm indication:

• Dirty filter

• Duct static pressure high limit

• Exhaust fan failure

• Low outdoor air temperature

• Low (mixed air) temperature detection

• Sensor failure (including discharge air temperature, mixed air temperature, outdoor air temperature, space temperature, and duct static pressure)

• Supply fan failure

The following failures shutdown the air handler and require a manual reset:

• Discharge air or mixed air temperature sensor failure

• Fan failure

• High duct static pressure

• Low mixed air temperature

First, set the program properties as shown in Figure 118.

Figure 118. Alarms program properties

Note that some alarms require the air handler to shut down, and others simply require an alarm indication. An alarm reset at the service tool resets all alarms. Taking this into consideration, create the following three modules within the alarms program:

Page 120: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

120 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

• Manual reset alarms

• Auto-reset alarms

• Alarm indication and reset

Indicating Manual Reset Alarms

Complete the first module to accommodate the diagnostic conditions that require manual reset alarms (Figure 119). Because manual reset alarms require both shutdown and manual reset, use a binary value, Manual Reset Alarm, to pass the existence of manual reset alarms to other programs. This value is used in the fan control program to control the supply fan off.

Note: Set up the High Limit value on the Alarm tab of the Analog Input Point Configuration dialog box.

Figure 119. Manual reset alarms

Page 121: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 121

Chapter 6: VAV AHU Example

Indicating Auto-Reset Alarms

The remaining diagnostic conditions require auto-reset alarms. Use the TGP2 module in Figure 120.

Figure 120. Auto-reset alarms

Controlling Alarm Indication and Reset

Based on the status of both auto-reset and manual reset alarms, the last module shown in Figure 121 manages alarm indication and reset.

• Use a Latch block to indicate the alarm status.

• Be sure that auto-reset alarms clear automatically, but manual reset alarms require a manual reset.

• You can wire the AlarmReset trigger wireless read block directly to the Latch block. To reset the alarm, the operator overrides the binary Alarm Reset point in the Tracer TU service tool (see “Using an Override with Control Priority to Reset an Alarm” on page 63).

• In addition, you can use the Macro block to create a macro (a predefined, reusable chuck of code) that guarantees the reset is true for one program cycle only. This macro is referred to as a “one shot.” (See, “Chapter 7: Using Macro and Formula Blocks”for an introduction to the Macro block and for detailed information about this one shot macro.)

Figure 121. Alarm indication and reset

Page 122: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

122 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

If the condition that triggered the alarm persists, this macro ensures that the alarm continues to be issued until the condition is addressed and the Reset Alarm point is set back to Off.

Compile and download your program (Figure 122 on page 122) to the controller.

Figure 122. Completed alarms program

Manual reset alarms

Auto-reset alarms

Page 123: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 123

Chapter 6: VAV AHU Example

Alarm indication and reset

Writing the Mode and Setpoints Program

The mode and setpoints program calculates setpoints and determines the heat/cool mode. Set the program properties as shown in Figure 123.

Figure 123.Mode and setpoints program properties

Page 124: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

124 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

When complete, this program will perform the following tasks:

• Effective space setpoint calculation

• Discharge air setpoint validation

• Heat/Cool mode determination

Calculating the Effective Space Setpoint

Study the sequence of operation to determine the logic to use to construct your program. In this case, the following logical points apply to setpoint calculation.

• Calculate the effective occupied cooling and heating setpoints.

• Because this is a VAV air-handling unit, controlling the discharge air temperature is not based on the effective occupied cooling and heating setpoints but on the cooling and heating setpoints for the discharge air. Use the effective heating and cooling setpoints to determine heat or cool mode.

To calculate the effective setpoints

1. Add the offset to the Space Temperature setpoint to determine the effective cooling setpoint.

2. Subtract the offset from the Space Temperature setpoint to determine the effective Heating setpoint.

These are the basic steps in calculating the effective setpoints. See the following sections for more details and instructions.

In unoccupied mode, no offset calculation is required. Instead, set the effective cooling and heating setpoints to the default unoccupied cooling and heating setpoints, respectively.

What does this look like in graphical programming? Use the module in Figure 124 to complete the first part of the program that calculates the offset values and uses the occupancy mode to determine which offset value to use.

• Use the Occupancy and De-Enumerator blocks to determine the mode: occupied, occupied standby, or unoccupied. In this case, the first output on the De-Enumerator block is true when the Occupancy block yields a value of unoccupied (2). The second output on the De-Enumerator block is true when the Occupancy block yields a value of occupied standby (4). (See the Tracer Graphical Programming (TGP2) Editor Help for a description the Occupancy Block and its enumeration values.)

• Use Analog Input blocks to access the default setpoints.

• Use the Switch block to switch between the occupied and occupied standby offset values.

• Use wireless connections to transfer the unoccupied status and the final offset value to other parts of the program.

Figure 124. Offset calculation in TGP2

Page 125: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 125

Chapter 6: VAV AHU Example

The effective occupied setpoints for occupied and occupied bypass are the same. As shown in Table 13, only the occupied and standby setpoints are used to control values. So, the conditions for the Switch block pass standby setpoints when that state is true, and occupied setpoints for all others.

Calculating the effective cooling and heating setpoints

Use the calculated offset and the space temperature setpoint to determine the effective occupied cooling and heating setpoints. Remember, the space temperature setpoint is the one setpoint that the building operator uses to adjust the space temperature. The setpoint origin could be any of the following:

• Tracer SC

• Local wired thumbwheel setpoint

• Default setpoints

In this case, the space temperature setpoint originates at the service tool. Obtain the effective cooling and heating setpoints using the following relationships.

CSPEffective = STS + Offset

HSPEffective = STS - Offset

where,

CSPEffective = Effective cooling setpointHSPEffective = Effective heating setpointSTS = Space temperature setpoint

Increasing or decreasing the space temperature setpoint affects the effective occupied setpoints. Remember the following about the setpoints calculation:

• For unoccupied mode, the default and effective setpoints are the same. (The unoccupied setpoints are actually limits.)

• Changes to the space temperature setpoint increase or decrease effective occupied and occupied standby setpoints in a coordinated manner.

Table 13. Setpoints used to control offset value

ModeEffectiveSetpoints

PID controlsetpoints Comments

StandbyStandby heatStandby cool

Standby heatStandby cool

BypassOccupied heatOccupied cool

Occupied heatOccupied cool

UnoccupiedLimit heatLimit cool

Occupied heatOccupied cool

Night heat/cool state

OccupiedOccupied heatOccupied cool

Occupied heatOccupied cool

Page 126: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

126 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Effective setpoint calculation examples

The following tables show an example of effective setpoint calculation. In this example, the setpoints have been assigned the values in Table 14.

Then use these offset values to calculate the heating and cooling effective occupied and occupied standby setpoints.

CSPEffectiveOcc = 72.0 + 1.5 = 73.5 ºF

HSPEffectiveOcc = 72.0 + 1.5 = 70.5 ºF

CSPEffectiveOccStby = 72.0 + 5.0 = 77.0 ºF

HSPEffectiveOccStby = 72.0 - 5.0 = 67.0 ºF

Table 15 displays the effective setpoint values when the space temperature setpoint is set to 72.0°F

Use the module in Figure 125 on page 127 to complete the second part of the program that calculates the effective setpoint values.

• Use the Add block to add the offset to the Space Temperature setpoint to obtain the effective cooling setpoint.

• Use the Subtract block to subtract the offset from the Space Temperature setpoint to obtain the effective heating setpoint.

• Use two Switch blocks to determine the effective setpoints based on the occupancy mode. In unoccupied mode, set the effective setpoints to the default unoccupied setpoints. Otherwise, calculate the effective setpoints based on the effective offset and the space temperature setpoint.

• Use Analog Input blocks to access the unoccupied default setpoints.

• Use wireless connections to transfer the effective setpoints to other parts of the program.

Table 14. Default and adjustable setpoint values

Setpoints

Space temperature setpoint 72.0°F

Def

ault

s Unoccupied cooling 85.0°F

Occupied standby 5.0°F (offset)

Occupied 1.5°F (offset)

Unoccupied heating 60.0°F

Table 15. Effective setpoint values

Setpoints Effective Setpoints

Space temperature setpoint 72.0°F

Def

ault s

etpoin

ts

Unoccupied cooling 85.0°F

Occupied standby cooling 77.5°F

Occupied cooling 73.5°F

Occupied heating 70.5°F

Occupied standby heating 66.5°F

Unoccupied heating 60.0°F

Page 127: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 127

Chapter 6: VAV AHU Example

Figure 125. Active setpoint calculation in TGP2

Validating the Discharge Air Setpoints

The effective setpoints provide a basis for the heat/cool mode decision, but they do not provide a basis for discharge air control. Create Discharge Air Cooling and Heating setpoints in the form of two analog values: Discharge Air Cooling Setpoint Local, and Discharge Air Heating Setpoint Local, respectively. Use the TGP2 module in Figure 126 to validate the discharge air setpoints.

Figure 126. Validating discharge air setpoints

The Limit block applies constants as high and low limits to the discharge air cooling and heating setpoints. Use values to store the resultant effective setpoints for use in another program. The input values are held between the high and low limits. The Limit block performs the same function as the Maximum and Minimum blocks in Figure 127, p. 128.

Page 128: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

128 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Figure 127. Limit block function equivalence to Max/Min

Determining the Heat/Cool Mode

Now that you have all the setpoints you need, start to use them. What do you know from the sequence of operation about determining the active mode, heating or cooling?

• In any occupancy mode, the heat/cool decision is based on the effective occupied or occupied standby cooling and heating setpoints.

• The air handler changes to cooling if the space temperature exceeds the effective cooling setpoint plus 1°F.

• The air handler changes to heating if the space temperature falls below the effective heating setpoint minus 1°F.

Use the TGP2 module in Figure 128 to make the heat/cool decision. Use a Deadband block to switch between heating and cooling modes and wireless connections to provide the Effective Cooling and Heating setpoints calculated in another part of the program. Store the Heat/Cool Mode in a binary value for use in another program.

Figure 128. Heat/Cool mode decision

Page 129: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 129

Chapter 6: VAV AHU Example

Figure 129, p. 129 provides a visual summary of the heat/cool decision based on a deadband. If the zone temperature exceeds the setpoint plus the offset by a degree or more the unit switches to the cooling mode. If the zone temperature falls below the setpoint minus the offset by a degree or more, the unit switches to the heating mode.

Figure 129. Heat/Cool mode activation using a deadband

The mode and setpoints program completes the VAV air-handling unit. Compile and download this final program (Figure 131, p. 131) to the controller.

Figure 130. Completed modes and setpoints program

Offset calculation

Page 130: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

130 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Active setpoint calculation

Validating discharge air setpoints

Heat/Cool mode decision

Page 131: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 131

Chapter 6: VAV AHU Example

Viewing Program Status

You can view the status of each program downloaded to the controller in two locations:

• The Program box in the Tracer TU Status Utility Controller Status screen

• The Points Summary dialog box in TGP2 Editor shown in Figure 131

The program status includes the

• Program Name—File name

• Status—Idle or Running

• Type—Triggered or Run Frequency

• Interval—The amount of time between program starts, which should be longer than the Latency value

• Error—Indicates either normal completion, an active state, or an error condition

• Latency—The time the program takes to run from first instruction through the last instruction

The Resource Consumed value indicates the remaining memory available for programs.

To view program status

From the Tools menu, choose Program Status.

The Device Program Status dialog box appears.

Figure 131. Device Program Status dialog box

Page 132: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

132 BAS-APG008-EN, 02/05/2010

Chapter 6: VAV AHU Example

Summary Questions

Answer the following questions to review the skills, concepts, and definitions you learned in this chapter. The answers to these questions are on p. 165.

1. How would you use the outdoor air enthalpy to determine whether to economize?

2. Use the Run Time value of a Binary Input block as part of a fan maintenance timer program module. Every 4,000 hours, turn on a binary value to indicate that fan maintenance is required. Also, use another binary value to reset the maintenance timer. (Hint: The Binary Input Run Time value is given in seconds.)

3. Implement an analog input and analog value to enable the operator to switch between a space temperature setpoint source of Tracer SC (BAS) or a local, wired zone sensor with a thumbwheel setpoint adjustment knob. Also, include a second analog value referenced to a default setpoint. Use Switch blocks to arbitrate between these setpoints. Finally, be sure to apply limits to the resulting setpoint. Modify the modes and setpoints program to accommodate this new feature.

4. What modifications are necessary to the Mode and Setpoints program to allow the operator to adjust the discharge air cooling and heating setpoints?

Page 133: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 133

Chapter 7: Using Macro and Formula Blocks

Use the Macro and Formula blocks to construct custom programming logic contained in a single block. Your completed Macro or Formula block can then serve as a reusable routine or formula that you can include in a variety of programs, fulfilling the best practice rule, “Write once, use multiple times.”

In this chapter, you will create macros that you can substitute for existing portions of previously written programs, so they run more efficiently.

Note: Many of the chapters in this book build on previous chapters, so be sure to complete the chapters in the order presented. See “About This Book” on page 7 for additional instructions.

What You Will Learn

In this chapter, you will learn a variety of skills, concepts, and definitions.

Skills

You will learn how to create custom blocks (macros and formulas) that you can reuse in several programs.

Concepts and definitions

You will understand the following concepts and definitions:

• Macro

• Macro instance

• Macro properties

• Macro Design Space

• Custom library

• Macro ports and variables

• One-shot

• Internal and external views

• Formula

• Formula expression

• Operators and Functions

Blocks

• Macro block

• Macro Variable blocks

• Macro Port blocks

• Formula block

Page 134: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

134 BAS-APG008-EN, 02/05/2010

Chapter 7: Using Macro and Formula Blocks

The Macro Block

The Macro block contains and hides programming logic, which may consist of other data blocks, control blocks, Formula blocks and “nested” Macro blocks (Macro blocks within Macro blocks). The Macro block allows you, the programmer, to create a custom block that combines several simple blocks and connections to form a complex process. When it is correctly constructed, a Macro block does not affect the way the host program is compiled or executed.

Macro blocks have the following added capabilities that provide a high level of flexibility. You can

• Name and save a Macro block to a custom library (a special section of the Toolbox pane) for reuse.

• Import and export Macro blocks to allow sharing and distribution.

• Use an existing Macro block as a template, which you can modify to meet varying requirements.

For more information about the Macro block, see the Tracer Graphical Programming (TGP2) Editor Help.

Macro Ports and Variables

The Macro block uses a related set of blocks that serve as input ports, output ports, and variables within a macro. You can give these blocks meaningful names. Input and output port blocks will appear as port names on the external view of the macro block. (See Figure 142, p. 142 for an example.)

Figure 132. Ports and variables used within a macro

The following blocks can be used only inside of a macro.

• Analog Input Port

Use this block to create an analog input port on a Macro block. It acts as an input port, which usually appears on the left side of the closed view of the Macro block. You can use it to pass values in the host program into the macro for processing.

• Analog Macro Variable

Use this block to specify an analog variable for use in a Macro block. A Macro Variable holds or “remembers” information across program cycles within a Macro block. Its scope is limited to a particular Macro block and its value cannot be transferred between Macro blocks.

• Analog Output Port

Use this block to create an output port on a Macro block. It acts as an output port, which usually appears on the right side of the closed view of the Macro block. You can use it to pass a value out of the macro into the host program.

• Binary Input Port

Use this block to create a binary input port on a Macro block. It acts as an input port, which usually appears on the left side of the closed view of the Macro block. You can use it to pass a value from the host program into the macro for processing.

Page 135: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 135

Chapter 7: Using Macro and Formula Blocks

• Binary Macro Variable

Use this block to specify a binary variable for use in a Macro block. A Macro Variable holds or “remembers” information across program cycles within a Macro block. Its scope is limited to a particular Macro block and its value cannot be transferred between Macro blocks.

• Binary Output Port

Use this block to create a binary output port on a Macro block. It acts as an output port, which usually appears on the right side of the closed view of the Macro block. You can use it to pass a value out of the macro into the host program.

For detailed information about the Macro block and its related input, output, and variable blocks, refer to the Tracer Graphical Programming (TGP2) Editor Help.

Macro Creation Rules and Considerations

Keep the following rules and considerations in mind as you create macros.

Disallowed blocks

You cannot use the following blocks in a macro.

• Analog, Binary and Multistate Input and Output blocks

• Output Status block

• Occupancy block

Blocks requiring careful use

• Analog, Binary, and Multistate Value blocks

Use these blocks carefully as they can pass properties to a macro without the use of an input port. They can also result in unintended interactions between macro blocks. It some cases, you may want to replace these blocks with input or output port blocks or macro variables.

• Wireless blocks

Using a Wireless Write block connected to a Macro Output Port block and its associated Wireless Read block connected to one of that Macro’s input ports will most likely cause an error during program validation. If that is the case, you have created a situation where an algorithm result is based on the result itself.

Example 1: Creating a “One-Shot” Macro for Use in the Alarm Reset Routine

Several programs in this guide use this simple alarm reset routine, first presented in Chapter 4. (See “Implementing the Alarm Reset Function” on page 60.)

The operator resets the alarm by initiating an override of the Alarm Reset point in the Tracer TU service tool. (See “Using an Override with Control Priority to Reset an Alarm” on page 63.) However, this method can cause the alarm reset to remain true (on) for several program cycles.

Figure 133. Original alarm reset routine presented in Chapter 4

Page 136: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

136 BAS-APG008-EN, 02/05/2010

Chapter 7: Using Macro and Formula Blocks

The one-shot concept

A “one-shot” is a routine that produces an output that remains true for one program cycle only. The output is triggered by an input that changes state. The one-shot function you will create uses the Xor block to determine if the current value of an input is different than the last value. If it is, the output goes from false to true for one program cycle.

In Figure 134, the top Macro Var stores (writes) the current value of the trigger input. The lower Macro Var then reads that value for use in the next program cycle. The macro acts as shown in the following table, which illustrates six program cycles. (See the descriptions of the Xor and And blocks in the “TGP2 Block Reference” section of the Tracer Graphical Programming (TGP2) Editor Help for information about Xor and And block logic.)

Table 16. One-Shot Macro Processing

To reset the alarm, the operator initiates a limited duration override of the binary Alarm Reset point. The Binary Input port passes in the True value resulting from the override (cycle 3). Then during cycle 4, the output returns to False. The override expires returning the trigger value to False.

Creating a Macro Block instance

You can construct the one shot macro by first creating a Macro block instance.

1. Open the TGP2 Editor and move your cursor to the Toolbox pane.

2. Highlight Macro block under the Macro Blocks section of the Toolbox pane.

3. Drag and drop the Macro block instance on the Program Design Space.

4. Double-click the Macro block instance and select Block Properties from the menu.

The Macro Properties dialog box appears.

Figure 134. One-shot macro

Program Cycle

(a) Trigger Value Written to Upper Macro Var

(b) Value of trigger (n-1) Read From Previous Cycle Output of Xor Block

Output of And Block (Macro)

1 False False False (F + F = F) False (F + F = F)

2 False False False (F + F = F) False (F + F = F)

3 True False True (T + F = T) True (T + T= T)

4 True True False (T + T = F) False (T + F = F)

5 False True False (F + T= T) False (T + F = F)

6 False False False (F + F = F) False (F + F = F)

a

b

Page 137: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 137

Chapter 7: Using Macro and Formula Blocks

5. Enter one shot in the Macro Name entry box and the following description in the Macro Description entry box.

When the reset point is overridden, causes alarm reset output to turn true for one program cycle.

6. Click Save to save and close the Macro Properties dialog box.

You are now ready to construct the one shot macro.

Constructing the one-shot macro

1. With the Macro block highlighted, select Macro/Formula > Open Macro.

Another program area appears with a new tab alongside the parent program tab at the top of the Program Design Space. (In the following image, alarms is the parent program tab and one shot is the macro tab.) This macro program area is called the Macro Design Space. It is a programming environment within a programming environment.

Figure 135. The Macro Properties Dialog Box

Figure 136. Program and Macro Tabs

Page 138: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

138 BAS-APG008-EN, 02/05/2010

Chapter 7: Using Macro and Formula Blocks

2. Go to the Macro Blocks section of the Toolbox pane and highlight, drag, and drop a Binary Input Port block into the Macro Design Space.

3. Double-click the block to display the Binary Input Port Properties dialog box.

4. Type trigger in the Port Name entry box and click Save.

5. Return to the Macro Blocks section of the Toolbox pane and highlight, drag, and drop two binary Marco Var blocks and an output BinaryPort block into the Macro Design Space.

6. Return to the Toolbox pane one more time and locate the Xor block and the And block in the Logical section. Drag them into the Macro Design Space.

7. Arrange the blocks as shown in Figure 134, p. 136.

8. Double-click the upper Macro Var block to display the Macro Variable Properties dialog box.

9. Change the port on the upper Macro Var block to write and enter trigger (n-1) as the name of the Macro Variable (write) block in the Name box.

10. Double-click the lower Macro Var block to display the Macro Variable Properties dialog box.

11. Leave this Macro Var as a read block and select the same name in the Name box.

12. Connect the blocks with wires as shown in Figure 134, p. 136.

13. Click Macro/Formula > Save Macro to save the macro in a new library named zzTempLib.

14. Right-click the one-shot macro tab, and click Close Macro to return to the main alarms program.

To save the macro for reuse

1. Right-click the Macro block and select Macro > Save Macro to open a Save As dialog box.

2. Enter a new library name, such as zzMacros. (The “zz” prefix ensures that the library is placed near the bottom of the toolbox. However, this practice is optional.)

3. Click Save. A copy of your new formula is stored under a toolbox category with your specified title.

You can also save a macro to an existing custom library by performing step 1 in the previous procedure. Instead of selecting Macro > Save Macro, select Macro > Add Macro and then select the existing library on the Select a Custom Library dialog box. (See “Saving a Custom Block for Reuse” in the Tracer Graphical Programming (TGP2) Editor Help.)

Integrating the one-shot macro into the alarm reset routine

The one shot macro now appears as a single block with one input port and one output port.

Figure 138, p. 139 shows the original alarm reset routine integrated into the Alarms program created in Chapter 4. The macro will cover the circled portion of the routine.

Figure 137. Exterior view of the one-shot macro

Page 139: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 139

Chapter 7: Using Macro and Formula Blocks

Our new one-shot macro can now be placed between the Alarm Reset binary input and the Cancel port of the Latch block as follows. (The Trigger port takes the value passed from the Or block as shown in Figure 138.)

Figure 138. Alarms module from Chapter 4

Figure 139. One-shot macro placed within alarm reset module

Page 140: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

140 BAS-APG008-EN, 02/05/2010

Chapter 7: Using Macro and Formula Blocks

Example 2: Using a Macro to Arbitrate Between a Local Source and a System Source

This example introduces a communicated value----a value that is pushed from Tracer SC to a corresponding point on the unit controller as shown in Figure 140.

Figure 140. A communicated value (Tracer SC to UC400) used in a macro

If you were to use this macro for space temperature arbitration, the analog input port BAS_Source shown in Figure 141 would receive the value of the Space Temperature Setpoint BAS point used in the host program, which intercepts the value communicated from Tracer SC. (The BAS portion of the block name identifies it as a value communicated from the Tracer SC.)

Note: Communicated values, such as the Space Temperature Setpoint BAS Analog Value block are made functional when they are discovered by the Tracer SC and then mapped to the corresponding “key” on the Tracer SC. Tracer SC keys are predefined data objects recognized by Tracer SC. Tracer SC uses the keys to correlate data from BACnet controllers with data objects that it understands. (See the Tracer™ UC400 to Tracer™ SC System Controller Best Practices Programming Guide (BAS-SVP06A-EN) for more information about keys and mapping UC400 points to Tracer SC keys.)

Space Temperature Setpoint BAS

Space Temperature Setpoint BAS

Tracer SC

UC400

Host Program

(Analog Output)

(Analog Value)

Source ArbitrationMacro

BAS_Source(Analog Input port)

Space Temperature Setpoint BAS

Space Temperature Setpoint BAS

Tracer SC

UC400

Host Program

(Analog Output)

(Analog Value)

Source ArbitrationMacro

BAS_Source(Analog Input port)

Page 141: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 141

Chapter 7: Using Macro and Formula Blocks

Arbitration macro inputs, outputs, and processing

The following macro determines whether to use the value of a point communicated from Tracer SC or the local source value as the active value (for example, the active zone temperature). As with LON controllers, communicated values always take precedence over local values. If both communicated and wired temperatures have failed or are out of service, a disable indicator is generated and a default value is used for the active value.

Note: The input and output port names in this macro are deliberately generic. Macros are made for reuse. Therefore, you can apply the sequence in this macro to a variety of purposes.

Applying the macro to zone temperature arbitration

You can use the same procedure to create this macro that you used to create the one shot macro.

1. Create a new Macro block instance as you did previously. (See “Creating a Macro Block instance,” p. 136.)

2. Enter the name Zone Temp Arbitration in the Name box on the Macro Properties dialog.

3. Enter a description in the Description entry box (a “best practice”).

4. Click Open Macro at the top of the dialog box.

The new Macro Design Space appears with a new tab alongside the parent program tab at the top of the Program Design Space.

5. Drag and drop the required blocks into the Macro Design Space.

Note: The High Limit and Low Limit ports values on the Analog Input block are set using the High Limit and Low Limit entry boxes on the Alarm Configuration tab of the Analog Input Point Configuration dialog box.

6. Construct the macro using the wire tool.

7. Save the macro.

The external view of the macro is shown in Figure , p. 142.

Figure 141. Contents of the generic source arbitration macro

Page 142: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

142 BAS-APG008-EN, 02/05/2010

Chapter 7: Using Macro and Formula Blocks

Figure 142. External view of the zone temp arbitration macro

You can now link the input ports of this macro to inputs and values in a host program. The Zone Temp Arbitration macro could be used in the following way:

Figure 143. External view of the zone temp arbitration macro

Example 3: Two Coil Motor Protection Macro

This macro is used to protect the low speed motor coils from seeing large amounts of “Back BMF” (back voltage) when a transition from high speed to low speed is requested.

Whenever a high speed to low speed transition is requested, both high and low speed coils must be turned off for a short period of time. Once this safety period has expired, the low speed coil can be turned back on.

Notice:

Possible Equipment Damage!

This example is for instructional purposes ONLY. This program and the macro created from it are NOT intended for use on any specific equipment. The use of this program in its present form or in a modified form may not be suitable for some motors and could result in equipment damage. You assume full responsibility and liability for any use of this program/macro or a modified version of it. Trane disclaims any and all liability in connection with such use.

Page 143: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 143

Chapter 7: Using Macro and Formula Blocks

Macro requirements

The two coil motor protection macro requires the following inputs and outputs.

• Inputs

Inputs pull values into the macro or program from external sources or devices. This macro requires two types of values:

– Low speed request

– High speed request

You can use two binary inputs or one multistate input for this purpose. (The motor safety program is not required to make the decision regarding how many motor coils are needed.)

In addition, you can use two binary inputs to communicate coil motor speed status.

– Low speed coil status

– High speed coil status

However, only the high speed coil status may be needed for correct operation.

• Outputs

Outputs pass values that trigger some other action. In this case, the outputs signal a change in motor speed, which can result in a brief shutdown when low speed is commanded.

– Low speed output commands

– High speed output commands

Macro operation

Allow both coils to operate normally when transitioning from

• Off to Low speed,

• Low speed to High speed

• Low speed to Off.

Whenever a High speed to Low speed transition is requested, turn all output commands off for a specified period. You can determine the off time, which should range from 0 to 120 seconds. The default is 20 seconds.

Constructing the source program for the macro

You can create a macro using a new Macro block as we did in the first two examples, or by capturing and inserting an existing program or a portion of the program into a macro. This capture method is known as “rubberbanding.” In this example, we will use the rubberband method to create the macro. This approach will make it slightly easier to test the solution before converting it to a macro.

First create the points referenced in the source program.

Points for the program

Create the following set of points used by the program that you will change into a macro.

Table 17. Points Used in the Two Coil Motor Macro

Type Name Function

Analog input Transition off time second High speed to Low speed off time

Binary input Request high speed External request for high speed

Binary input Request low speed External request for low speed

Binary output Command high speedCommand high speed on after ensuring safe coil transition

Binary output Command low speedCommand low speed on after ensuring safe coil transition

Page 144: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

144 BAS-APG008-EN, 02/05/2010

Chapter 7: Using Macro and Formula Blocks

The program has two main parts that each contribute a binary true or false that determines the output.

The first part of the program

The first part of the program includes the main input and output blocks.

1. Assign the Request high speed and Request low speed binary inputs to two Binary Input blocks and wire them to two Binary Output blocks with intervening And blocks as shown in Figure 144.

2. Assign the Command high/low speed points to the output blocks.

The basic sequence states that both motor coils should be commanded off during a transition from high speed to low speed. Other transitions should not affect the relationship between the request and the output command.

The second part of the program

According to the sequence, the commands are set to off for a specified period of time. Of the three time oriented blocks (Delay on Start, Delay on Stop and Latch) the Latch block is the closest match to the sequence. The inputs used to trigger the Latch block are the high speed coil last commanded state and the request for low and high speed. You can use the “command high speed” output status block to pull in the last commanded high speed state. The Latch block does not have to be cancelled.

1. Add an And, Not, Latch, Binary Wireless, Analog Input and Binary Output Status as shown in Figure 145.

The Latch block should use system time and units of seconds. The Binary Output Status block should be set as “command high speed”. Whenever the Latch is true, we need to turn both coil commands off. So a Not block is placed between the Latch output and And inputs.

2. Run a wire from the Not block to the lower port of each And block on the first part of the program. Figure 146 shows the finished program that you will now change to a macro.

Figure 144. Two coil motor protection program - part 1

Figure 145. Two coil motor protection program - part 2

Page 145: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 145

Chapter 7: Using Macro and Formula Blocks

Converting the program to a macro

You can now place a portion of this program in a Macro block. However, the input and output blocks remain outside of the external view of the macro.

To change the program to a macro

1. Click Edit > Select All.

All of the blocks and wires should be highlighted.

2. Click Macro/Formula > Create Macro.

After making some small adjustments to the blocks and wires, the macro with input and output blocks looks like this:

Figure 146. Complete two coil motor protection program

Figure 147. Coil motor protection program with macro

Page 146: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

146 BAS-APG008-EN, 02/05/2010

Chapter 7: Using Macro and Formula Blocks

3. Double-click the Macro block to display the Macro Properties dialog box.

4. Enter a name and description as shown in Figure 148, p. 146

5. Click Open Macro.

Figure 149 shows the internal view of the macro displayed in the Macro Design Space. Note the ports that have been created for the external inputs and outputs.

Figure 148. Macro Properties dialog box settings

Page 147: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 147

Chapter 7: Using Macro and Formula Blocks

Figure 149. Internal view of the two coil motor protection macro

Page 148: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

148 BAS-APG008-EN, 02/05/2010

Chapter 7: Using Macro and Formula Blocks

The Formula Block

The Formula block is another custom block that can be defined by you, the programmer. You can create formulas that go beyond the capabilities of the existing TGP2 blocks. A formula block may have many inputs but only one output. (It is similar to the equation writer in most spreadsheets.) You can bring values into a formula as either a constant or through a port.

Note: The formula block only works with integers and real (floating point) values. You cannot use binary (Boolean, digital) values in a formula.

Parts of a Formula

Define the formula using the Formula Properties dialog box. The formula definition includes the following parts:

• A name

This can be any meaningful name, for example Airflow.

• A description

It is a best practice to document your formula, so others can interpret it.

• The formula expression

The expression can include up to 8 inputs and 1 output. The input ports are created as you define the expression. The output port is added automatically and should not be included in the formula. You can specify a variety of functions and operators selected from drop-down lists.

Parts of an Expression

Expressions include the following parts:

• Arguments that accept the result of a function, the result of an operation, or a port value.

A value can be brought into a formula through a port. In that case an argument is given a name which starts with "$". An example would be $zoneTemperature. The corresponding port will be named "zoneTemperature" and the value at that port is used in the formula.

• Standard operators

These are the standard arithmetic operators +, -, *, /, and ^ (exponentiation).

• Functions

The Formula block possesses a wide range of functions including

– Trigonometric (sine, cosine, tangent)

– Transcendental (logarithms, exponentiation, square root)

– Informative (modulus, floor, cell)

– Sorting (min, max)

– Random number generation

Refer to the Formula block discussion in the Tracer Graphical Programming (TGP2) Editor Help for a complete list of functions with descriptions.

Page 149: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 149

Chapter 7: Using Macro and Formula Blocks

Time Conversion Examples

These simple time conversion examples are meant to convey the concept of a formula and how you can use formulas in your programs. A more complex example is provided later in this subsection.

Certain TGP2 blocks output time in seconds. These include Time, Constant (time of day), Sunrise/Sunset (Sunrise and/or Sunset), Binary Input (Run Time), Binary Output Status (Run Time) and Binary Value (Run Time). On occasion, the output in seconds needs to be converted to minutes or hours.

Example 1: Converting seconds to hours in fan status program

Let’s start by converting Fan Status from seconds to hours. Your goal here is to generate a service alarm based on supply fan run hours. If the supply fan run time has exceeded 4000 hours, an alarm is generated. The binary value, Fan Service Alarm, can be configured to transfer the service alarm to a building BAS.

To create the fan status conversion formula block

1. Highlight and drag the Formula block (Calculation section) into the Program Design Space.

2. Double-click the block to display the Formula Properties dialog box.

3. Enter the following information in the Formula Properties dialog box.

Note the dollar sign ($) that begins the argument $t_sec that takes the value of Fan Status in seconds. This value is divided by 3600. Also note the required space before and after the division symbol ( / ).

4. Click Save.

Figure 150. Defining time conversion formula in the Formula Properties dialog box

Page 150: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

150 BAS-APG008-EN, 02/05/2010

Chapter 7: Using Macro and Formula Blocks

To save the formula for reuse

1. Right-click the Formula block and select Formula > Save Formula to open a Save As dialog box.

2. Enter a new library name, such as zzFormulas. (The “zz” prefix ensures that the library is placed near the bottom of the toolbox. However, this practice is optional.)

3. Click Save. A copy of your new formula is stored under a toolbox category with your specified title.

Now you can create a simple program module that (1) accumulates the time that the fan is running, (2) compares it with the 4000 hour limit, and (3) passes a service alarm to a building BAS.

To create the fan service alarm module

1. Configure two points: a binary input named supply fan status and a binary value named fan service alarm.

2. Create the Binary Input block, supply fan status and use a Run Time port. Connect this block to your Formula block input port.

3. Set an Analog Constant to 4000 and then connect it to the bottom port of a Greater-than block.

4. Place a wire from the output port of the Formula block to the upper port of the Greater-than block.

5. Create the fan service alarm Binary Value block (write).

6. Place a wire from the output port of the Greater-than block to the input port of the binary value.

Figure 151 shows the resulting program.

Table 18 lists several simple time conversion formulas you can use in your own programs.

Figure 151. Fan service alarm program with seconds-to-hours conversion

Table 18. Simple time conversion formulas

Block Formula Description

convert: sec -> min t_sec / 60 Conversion of time in seconds to time in minutes.

convert: min -> sec t_min * 60 Conversion of time in minutes to time in seconds.

convert: sec -> hour t_sec / 3600 Conversion of time in seconds to time in hours.

convert: hour-> sec t_hrs * 3600 Conversion of time in hours to time in seconds.

convert: sec -> day t_sec / 86400 Conversion of time in seconds to time in days.

convert: day -> sec t_day * 86400 Conversion of time in days to time in seconds.

convert: min -> day t_min / 1440 Conversion of time in minutes to time in days.

convert: day -> min t_day * 1440 Conversion of time in days to time in minutes.

Page 151: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 151

Chapter 7: Using Macro and Formula Blocks

Example 2: Adding a ten-minute offset to the outputs of the Sunrise/Sunset

block

To ensure that the parking lot lights will be on slightly after the sun rises and before the sun sets, an offset can be applied to the outputs of the Sunrise/Sunset block. (For a description of the Sunrise/Sunset block, see “Sunrise/Sunset Calculation block” in the Tracer Graphical Programming (TGP2) Editor Help. As part of this offset program module, you will create another simple Formula block that converts the offset time from minutes to seconds.

To create the minutes-to-seconds formula block

1. Create a new block and enter the following information in the Formula Properties dialog box.

• Name: Convert: min -> sec

• Description: conversion: time(minutes) to time (seconds)

• Formula Expression: $t_min * 60

2. Click Save.

Now you can create a program module that adds 10 minutes to the Sunrise output and subtracts 10 minutes from the Sunset output of the Sunrise/Sunset block.

Note: The Sunrise/Sunset block actually allows you to specify an offset based on the minutes and seconds of variance from the particular longitude and latitude you enter. However, you are now creating your own offset in this program module.

To create the offset program module

1. Configure the Sunrise/Sunset block (located under the Calculation section) using 45º Latitude and 93º Longitude. (Leave the minutes and seconds boxes at zero.) Select the Sunrise and Sunset outputs port check boxes.

2. Assign a value of 10 to an Analog Constant block and connect it to the input port of your Formula block.

Note: While a constant block is used to state the offset, it’s possible to use an analog value as well to make the offset adjustable.

3. Add an Add block and a Subtract block to the program.

4. Connect the output of the Formula block to the upper input port of the Add block and the lower input port of the Subtract block.

5. Connect the Sunrise port of the Sunrise/Sunset block to the Add block so that it will be added to the output of the Formula block.

6. Connect the Sunset port of the Sunrise/Sunset block to the Subtract block so that the output of the Formula block is subtracted from the value of the Sunset output port.

7. Add a Time block, a Between block, and a Not block.

8. Select Include Limit for both High and Low ports on the Between Properties dialog box and click Save.

9. Connect the Time block to the input port of the Between block.

10. Connect the output port of the Subtract block to the High input port of the Between block and the output port of the Add block to the Low port of the Between block.

11. Connect the output port of the Between block to the Not block.

Figure 152 shows the resulting program.

Page 152: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

152 BAS-APG008-EN, 02/05/2010

Chapter 7: Using Macro and Formula Blocks

To test this program, use the Simulation Options dialog box to change the current time.

Advanced Example: Resistance to Temperature Conversion with SI or IP Unit Selection

In this example, you will create a formula that converts a measure of resistance in ohms passed into a program from a spaceTemperature analog input point to a temperature in either ºF (IP) or ºC (SI).

Note: On occasion, it is necessary to use a non-Trane temperature sensor. Tools such as a manufacturer’s spreadsheet can be used to determine the relationship between the resistance and temperature.

Analysis

First, let’s look at formulas yielding separate ºF (IP) and ºC (SI) outputs. We will then combine them into a switchable formula that can yield either an ºF or a ºC output.

Formula 1: IP formula

(-199.0634 + 0.36554217 * $resistance + -0.000037266771 * $resistance^2 + -69736.244/$resistance + 10474893/$resistance^2)

Formula 2: SI formula

(-377.0346 + 0.36719262 * $resistance + -0.000060519379 * $resistance^2 + 125336.62/$resistance + -33954384/$resistance^2)

In both of these formulas, the range is 674 to 1487 ohms resistance, which converts to temperature ranges of (IP) -50º to 220º Fahrenheit or (SI) -46º to 104º Centigrade.

These two formulas can be combined into the following switchable formula that can yield a result in either ºF or ºC, depending on which is selected in the program. The switching parts of the formula are bolded and enlarged.

(1 - $ip_si)*(-199.0634 + 0.36554217 * $resistance + -0.000037266771 * $resistance^2 + -69736.244/$resistance + 10474893/$resistance^2) + ($ip_si)*(-377.0346 + 0.36719262 * $resistance + -0.000060519379 * $resistance^2 + 125336.62/$resistance + -33954384/$resistance^2)

Figure 152. Sunrise/Sunset offset program with minutes to-seconds conversion

Page 153: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 153

Chapter 7: Using Macro and Formula Blocks

The Formula block allows only analog input. However, you can switch between two options within a Formula block by selectively multiplying by 1 and 0 as follows:

To create the resistence to temperature conversion formula block

1. Create a new block and enter the following information in the Formula Properties dialog box.

• Name: RestoTempIPSI

• Description: Enter comments such as the following:

WARNING: DIVIDE BY ZERO ERROR IF RESISTANCE AT ZERO. LIMIT 674 TO 1487 OHMS

INPUTS:

resistance: units = ohms, range = 674 to 1487

ip_si: selection of output units, range = 1 or 0, 1 selects SI.

OUTPUT:

range: ip (-50 to 220°F), si (-46 to 104°C)

• Formula Expression: (Use the switchable formula shown previously.)

2. Click Save.

Now you can create a program module that uses your Formula block to convert the resistance value to a temperature with IP output selected. In addition, the program uses a Limit block to avoid a divide by zero. The limits are set using the minimum and maximum value of the analog input itself. A constant block is used to select the output units as °F.

To create the resistance to temperature conversion program

Configure an analog input point, spaceTemperature with the settings shown in Table 19 and in Figure 154, p. 154 and then assign it to the Analog Input block.

Figure 153.Switching between two options in a Formula block

Table 19. Analog Input Properties dialog box entries

Name Space Temperature Local

Reference A1x.analog Value

Type Resistive

Update Interval 30 seconds (default)

Dimensionality Electrical Resistence

Minimum/Maximum Values

600/2000

Filter Weight 1

Calibration Offset 0

Sensor Value 600/2000

Sensor Output 600/2000

Page 154: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

154 BAS-APG008-EN, 02/05/2010

Chapter 7: Using Macro and Formula Blocks

Construct the program shown in Figure 155.

Figure 154.Analog input configuration settings

Figure 155. Switchable (IP or SI) resistence-to-temperature program

Page 155: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 155

Chapter 7: Using Macro and Formula Blocks

Summary Questions

Answer the following questions to review the skills, concepts, and definitions you learned in this chapter. The answers to these questions are on p. 165.

1. Create a Formula block to convert temperature units from ºC to ºF. Also, create a second Formula block to convert ºF to ºC.

2. Create a macro that acts as a four input selector (a type of “MUX block”). Use one Analog Input port to accept an analog enumeration value, which is then converted to a binary value for use with a set of Switch blocks that determine which of four additional analog inputs is passed to an analog output port. You can use a constant for the NC value on each Switch block.

3. For the macro you created in Question 2, add a Formula block that uses the trunc( ) function to truncate the incoming enumeration value rounding to the nearest whole number to ensure it is an integer.

4. Enhance the solution to Question 1 by combining the two formulas into one switchable formula.

Page 156: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

156 BAS-APG008-EN, 02/05/2010

Chapter 7: Using Macro and Formula Blocks

Page 157: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 157

Chapter 8: Programming Best Practices

During the past few years of Tracer Graphical Programming (TGP) and TGP2 Editor development, we have created programs to control a variety of equipment, including pumps, cooling towers, and air handlers. In the process of creating these programs, we came to understand that there were a number of guidelines that, if followed consistently, benefited us in the following ways:

• We became better and more efficient programmers.

• Our programs were easier to troubleshoot.

• Other people found the programs easier to understand.

We have shared these guidelines and refer to them as “TGP2 Best Practices.” Keep these best practices nearby to help you as you start to construct your first graphical programs. They will help you become a better programmer.

Be sure the correct units are selected on the UC400 before creating and saving

points

Be sure the controller units of measure are set to correctly (I-P or SI) before creating points. After a point is created, the units of measure cannot be changed. You can specify the controller units of measure using the Controller Settings tab screen on the Tracer TU Controller Settings Utility tab. This step is especially important if the UC400 will communicate with a Tracer SC on a BACnet link. (Refer to the Tracer™ UC400 with Tracer™ SC System Controller Best Practices Programming Guide (BAS-SVP06x) for more information.)

Configure inputs, outputs, and values prior to programming.

For any Tracer programmable controller, use the Point Configuration dialog boxes on the Point Configuration menu of the TGP2 Editor or from the Controller Settings tab screen of the Tracer TU service tool to configure the known inputs, outputs, and values before writing any programs. You can then download the points to the controller.

Set the program properties before you begin to write a new program.

Setting the program properties when starting a new program prevents some common mistakes, such as downloading a program with the wrong run frequency. In the TGP2 Editor, choose Program Properties from the File menu (or right-click in the Program Design Space and select Properties) to access the Program Properties dialog box (Figure 156).

Note: Program frequency affects the operation of the following blocks:

• PID

• Latch

• Delay on Start

• Delay on Stop

• Feedback Alarm

Page 158: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

158 BAS-APG008-EN, 02/05/2010

Chapter 8: Programming Best Practices

Figure 156. Program properties

Keep programs as simple as possible.

Some of the best practices are common sense in disguise. A critical step in programming is to thoroughly define the job before beginning to write programs. When the job is defined, do not make the programs any more complicated than they need to be to get the job done. Keep them as simple as possible.

Place input blocks on the left and output blocks on the right so that your

program reads from left to right.

Place inputs to the program on the left side of the Program Design Space and outputs of the program on the right side to make a consistent program format (Figure 157). When other people open your program, they will know what to expect. The programs will be easier to read because they will all be organized in the same way.

Note: In this context, inputs and outputs of the program also include Value blocks.

Page 159: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 159

Chapter 8: Programming Best Practices

Figure 157. Inputs on the left, outputs on the right

Set the properties of each block as you place it in the program.

Many blocks have properties that you can edit to further define the block. To be a more efficient programmer, set the properties for each block as you place it in the program. The Properties dialog box for each block varies considerably depending on the options and ports available for that block. A few blocks have no editable properties.

Consider input failures when writing programs.

Consider failure scenarios in your programs. For example, what should hap pen if the mixed air temperature sensor fails on an air-handling unit? Checking for failures is easy using the Fail/Fault port on input blocks.

Note: The Fail/Fault port can check either hardware inputs for failure or communicated (network value) inputs for invalid values. Refer back to Figure 157 to see how the Fail/Fault port is used on input blocks.

In addition, you can use the Not in Service port to detect if a input or value point has been taken out of service.

Write to values only once in a program.

Prevent potential conflicts by writing to analog, binary, and multistate values only once in a program. Also, be careful when writing to the same value from multiple programs. You must consider which program will determine the final value for the value.

Control outputs only once in a program.

You can prevent potential problems by writing to an output only once per program. Also, be careful when controlling a single output from multiple programs. If you are watching a binary output turn off, then on, then off again, and so on, but you know that it should remain on, take a look at the status of the output in the Tracer TU service tool. If you see that the priority level is alternately being released from one level to another between two different programs, the problem is that the output is controlled in two programs. (See “Appendix B: Control Priority Levels in TGP2,” p. 173.)

Page 160: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

160 BAS-APG008-EN, 02/05/2010

Chapter 8: Programming Best Practices

Read input values, including values and the status of outputs, only once in any

program.

There are two reasons to read input values only once in a program:

• The program runs more efficiently. Every time a program reads the value of an input, output, or value, the program must access the internal database of the controller. This process consumes time.

• When you simulate your programs, you can run the program offline and enter values for each input. The fewer inputs, outputs, and values that you read, the fewer values that you will be required to supply in simulation mode.

The wireless connection is a tool that makes this practice easy to follow. Use wireless connections to propagate values of inputs throughout the program, as shown in Figure 158 for the space temperature input.

Figure 158. Using wireless connections

Notice how the Wireless Write blocks, SensorFail2 and AutoResetAlarm are carried down to corresponding Wireless Read blocks shown in Figure 121, p. 121.

Use comments to document your programs.

Comments can provide helpful information, and although they may not seem important to the author of the program, they are especially useful for those who open an unfamiliar program. In Figure 158, comments provide more detail about the heat/cool decision.

Page 161: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 161

Chapter 8: Programming Best Practices

Figure 159. Heat/Cool mode decision

When possible, subdivide graphical programs according to the sequence of

operation.

Subdividing a program into logical modules makes the program easier to read and understand. For example, a program for a cooling tower that controls a fan, a sump heater, and a pump, would consist of three corresponding modules.

Determine the number of programs required for an application by grouping

control functions that require the same information and/or the same run

frequency.

For example, a constant-volume air-handling unit requires the following control tasks:

• Effective space setpoint calculation

• Mode determination (heat/cool)

• Supply fan control

• Exhaust fan control

• Mixed air/outdoor air damper control

• Discharge air setpoint calculation

• Cooling valve control, including dehumidification

• Heating valve control, including dehumidification

• Humidification

• Alarm management

Not every control function will fit into one program. Identify tasks that require the same information, and/or the same run frequency, and group those tasks together to form programs. Table 20 presents a recommended grouping for a constant-volume air handler.

Page 162: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

162 BAS-APG008-EN, 02/05/2010

Chapter 8: Programming Best Practices

Construct your own TGP2 library and reuse programs.

As you program jobs, keep the program files (*.tgp) and the accompanying point configuration (*.xml) files for the jobs. When you program another job that is similar, you can reuse both the points files and the programs from your library. You may need to modify the programs to accommodate differences in the sequences of operation, but reusing programs is much more efficient than writing them from scratch.

Note: You can use the Tracer TU Backup Utility to fully back up a UC400. The backup file includes the configuration (points .xml) file and all program files.

Use TGP2 Programming Library applications and Pre-packaged Solutions

whenever possible.

You are using this Applications Guide to gain the knowledge and skills you need to evaluate and modify existing TGP2 programs and to write your own programs or custom blocks when necessary. However, you should take full advantage of the following programming resources available to Trane technicians.

The TGP2 Programming LibraryTo save time and effort, a TGP2 Programming Library and configuration files are available on theTracer TU download page. You can use these programs and configurations as a starting point for your programming. Consider whether they are applicable or adaptable to the sequence that you need.

To access the TGP2 Programming Library

1. Access the iTrane homepage (or the equivalent page on the new IR portal).

2. Click Americas Service and Contracting and then click the Service Technicians link (on lower left of the Americas Services and Contracting page next to the picture of the service van.)

3. Click the Tracer TU link under the Tools and Downloads column heading.

4. On the Tracer TU downloads page, scroll down to the Literature section and and click TGP2 Programming Library.

5. Click Programming Guide --- Best Practices to download the Tracer™UC400 with Tracer™SC System Controller Best Practices Programming Guide (BAS-SVP06A-EN).

The Programming Guide provides procedural information about preparing and programming a UC400 and then installing it (as a template) on the parent Tracer SC.

Table 20. Grouping programming tasks into programs

Program name Control functions

ModeAndSetpointsEffective space setpoint calculation

Mode determination

FanControlSupply fan control

Exhaust fan control

MixedAirControl Mixed air/outdoor air damper control

DischargeAirControl

Discharge air setpoint calculation

Cooling valve control

Heating valve control

Dehumidification

Humidification

Alarms Alarm management

Page 163: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 163

Chapter 8: Programming Best Practices

Pre-Packaged SolutionsPre-Packaged Solutions is a set of pre-designed subsystem solutions designed to meet customer requirements, improve productivity, and take full advantage of Trane system expertise. The standardized configurations and programs included in each Pre-Packaged Solution will save many hours of custom programming time and ensure customer satisfaction.

To access Pre-Packaged Solutions and supporting information

Click the Pre-packaged Solutions link on the iTrane Homepage (or the equivalent page on the new IR portal).

Increase your knowledge by using available resources

For more information about wiring, configuring, and programming the Tracer UC 400 controller, see the following documents:

• Tracer™ UC400 Programmable BACnet Controller Installation Operation Maintenance (VAV-SVX07x)

• Tracer™ UC400 Programmable Controller Installation, Operation, and Maintenance (BAS-SVX20x)

• Tracer™UC400 with Tracer™SC System Controller Best Practices Programming Guide (BAS-SVP06A-EN)

• Tracer TU Help for Programmable Controllers (Service Tool Online Help)

• Tracer Graphical Programming (TGP2) Editor Help

• PID Control in Tracer Controllers Applications Guide (CNT-APG002-EN)

Page 164: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

164 BAS-APG008-EN, 02/05/2010

Chapter 8: Programming Best Practices

Page 165: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 165

Chapter 9: Summary Question-Answers

The following sections include the answers to the summary questions for each chapter.

Chapter 2: Writing the Exhaust Fan Program

These are the answers to the summary questions on p. 32.

1. Analog (solid wire) and binary (dashed wire)

2. No. Some blocks do not have a properties dialog box. These blocks have only preset properties that cannot be changed.

3. Start wires on the unwired input or output port of a given block. End wires on an unwired input or output port. You can also end a wire on another wire of the correct type.

Chapter 3: Modifying the Exhaust Fan Program

These are the answers to the summary questions on p. 50.

1. No. The abilities of a single Value block to read and write to an analog or binary value are mutually exclusive. It can either read or write, but not both.

2. The normally open (NO) input value passes to the output of the Switch block when the relay control input is true.

3. The Relay Control input port is always binary, regardless of the Switch block type (analog or binary).

4. No property has to be set.

5. Delete the ON constant block. Connect the output of the Fail/Fault port to both the Relay Control and Normally Open ports of the Switch block (Figure 160).

Figure 160. Equip Room Exhaust Fan program with a modification

Page 166: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

166 BAS-APG008-EN, 02/05/2010

Chapter 9: Summary Question-Answers

Chapter 4: Cooling Tower with Two-Speed Fan Example

These are the answers to the summary questions on p. 76.

1. The Latch block may be configured in timed or manual mode. In manual mode, it does not provide for a time-interval input.

2. Omit the Delay on Start block and its associated Constant block.

Chapter 5: Cooling Tower with Value-Speed Fan Example

These are the answers to the summary questions on p. 97.

1. The Feedback Alarm block is a combination of the XOR, Delay on Start, and Latch blocks. The sequence of operation might read as follows: Compare Request to Status. If Request does not equal Status for a period of 30 seconds, initiate an alarm. The alarm must be resettable. Figure 161 shows the possible substitution.

Figure 161. Feedback Alarm block substitution

2. The following program seqment uses the current value read from the Output Status block until the requestedValue meets the change conditions (> 3% change). The Absolute Value block is used to ensure that the valve position is allowed to change regardless of the polarity of the difference between the requested value and the previous value.

Figure 162. Use of Output Status

Page 167: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 167

Chapter 9: Summary Question-Answers

Chapter 6: VAV AHU Example

These are the answers to the summary questions on p. 132.

1. In the program, Discharge Air Control, use the Enthalpy block to calculate the outside air enthalpy. Note that the relative humidity in this solution is obtained with an Analog Value block and that the Deadband block remains an integral part of the economizer decision. Compare Figure 163 with Figure 112, p. 113, where the outdoor air temperature is used.

Figure 163. Using outdoor air enthalpy

2. Use a Binary Input (Supply Fan Status) with its Run Time output port to measure operation time, as shown in (Figure 164). Then construct a small program module within the Alarms program to turn on the value, FanMaintenanceReq, when the calculated hours exceeds 4,000 hours. Be sure to include a provision to reset the binary value, Supply Fan Runtime Reset by linking FanMaintenanceReq to a new binary value added to the Manual Reset Alarms module (see Figure 119, p. 120).

Figure 164. Maintenance timer indication and reset

Using the Enthalpy block

Use the Enthalpy block to calculate the enthalpy of moist air based on dry-bulb temperature (°F or °C) and relative humidity (%). (The input and output units are based on those selected in the Program Properties dialog box.)

Enthalpy block

Page 168: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

168 BAS-APG008-EN, 02/05/2010

Chapter 9: Summary Question-Answers

3. The following module enables setpoint selection with the BAS setpoint having priority over the thumbwheel (hand controlled device) setpoint. The user can select the thumbwheel by placing the Space Temperature Setpoint BAS point out of service from Tracer TU. The default value (Space Temperature Setpoint Default) is used if neither of the other two setpoints are valid or selected. The Limit block applies appropriate limits to the setpoint. The Space Temperature Setpoint Active block passes the resulting active space temperature setpoint to the analog input of the Heat Cool mode decision module of the modes and setpoints program (see Figure 128, p. 128).

Figure 165. Adding a setpoint source option

4. No change is required. The operator can simply overrride the Analog Inputs Discharge Air Cooling Setpoint Local and Discharge Air Heating Setpoint Local.

Page 169: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 169

Chapter 9: Summary Question-Answers

Chapter 7: Using Macro and Formula Blocks

These are the answers to the summary questions on p. 155.

1. The conversion formulas are as follows:

ºC to ºF: 9.0 * Tc / 5.0 + 32.0 or 1.8 * Tc + 32

ºF to ºC: (Tf - 32.0) * 5/9 or 0.5556 *(Tf - 32)

where: Tc = ºC and Tf = ºF

2. The four input selector macro is as follows:

Figure 166. Four input selector macro

3. Use the trunc( ) function as follows:

Figure 167. Formula expression with trunc() function

The selector portion of the macro with the Formula block added:

Figure 168. Selector portion of macro with Formula block added

Page 170: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

170 BAS-APG008-EN, 02/05/2010

Chapter 9: Summary Question-Answers

4. The combined, switchable formula is as follows:

Figure 169. Combined switchable conversion formula

Page 171: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 171

Appendix A: What Type of Variable Should I Use?

Variables play an important role in programming for HVAC systems. They receive, store, and pass values to inputs, value objects, and outputs from sources inside and outside programs. Variables provide the flexbility required to coordinate the operation of multiple devices that make up HVAC systems.

Variable Types

The TGP2 Editor provides different types of variables that serve different purposes.

• Value objectsValue objects receive values pushed from another point or program. For example, an analog output on a Tracer SC can push a value to an analog value in a program on a UC400. Binary and Multistate Value blocks can also receive values from an output of the same type. (See the topics under the “I/O: Points” heading in the Block Reference section of the Tracer Graphical Programming (TGP2) Editor Help for more information.)

• Global variablesGlobal variables are available to all programs on a single device. That is why they are referred to as “global” variables. They exist outside of the resident programs in volatile memory. You can use global variables to hold values used by more than one program on a single device and that are not communicated as BACnet points. They offer the advantage of lower memory use when compared with value objects. You can define up to 127 global variables that persist as long as the system is up and running. You can use global variables to hold values that result from program routines or calculations. The value held in each global variable is lost if power is interruped. However, the values are regenerated when power is restored and device programs start running again. (The new values are those generated by the program routines, since nothing is saved or remembered across power cycles.) (See the topics under the “I/O: Global” heading in the Block Reference section of the Tracer Graphical Programming (TGP2) Editor Help for more information.)

• Macro variablesMacro variables (Macro Var blocks) act as variables within a Macro block. Their scope is limited to a particular Macro block and values do not cross over between Macro blocks. There are analog and binary versions of Macro variables. They are used to remember information across program cycles. (See the topics under the “Macro Blocks” heading in the Block Reference section of the Tracer Graphical Programming (TGP2) Editor Help for more information.)

• Wireless Write and Read blocksAn Analog or Binary Wireless Write block can receive a value from an input, output, or value block and then pass that value to one or more corresponding Analog or Binary Wireless Read blocks in the same program. However, they cannot be used to persist (maintain) values across program cycles. (See the topics under the “Misc” heading in the Block Reference section of the Tracer Graphical Programming (TGP2) Editor Help for more information.)

Capabilities of Variable Types

These variable types have different capabilities that will also influence which one is appropriate for a given purpose.

• ScopeIn what context can the variable container operate? Within a device, a program, or part of a program?

• Network exposureWill a value be transmitted over a network (from a Tracer SC), or is it restricted to a device or program?

Page 172: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

172 BAS-APG008-EN, 02/05/2010

Appendix A: What Type of Variable Should I Use?

• Persistence across a reset or power cycleWhat happens to the current value held in the variable in the event of a power loss or shut down?

• Persistence across program cyclesDoes the variable continue to hold the latest value in the intervening period between program executions?

• The number of variables allowedHow many variables of a given type can be defined and used in or by a program?

The following table summarizes the capabilities of each variable type.

Table 21. Capabilities of Variable Types

Type ScopeNetwork Exposure

Persistence Across Reset

or Power Cycle

Persistence Across

Program Cycles

Number Allowed

Value objects device Yes Yes Yes Limited by device

Global variables device No No Yes 127 per device

Macro variables macro No No Yes 127 per macro

Wireless blocks program or macro No No No (Unknown)

Page 173: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 173

Appendix B: Control Priority Levels in TGP2

In certain circumstances, you may want a specific routine in a program or a triggered program to start or take control (for example, when smoke is detected or a high alarm setting is exceeded for a specific duration). The ability to set priority levels for output and value points provides a way to enable your programs to respond to varying conditions by selecting one source value over another.

Control priority provides a means of arbitrating or deciding which source’s value is used by another writable point. A source can be another program, a manual override, minimum on/off, or an automatic process attempting to write a value to either an output or a value point. Output and value points are considered writable.

Note: Priority does not apply to input points.

Sixteen Levels of Priority

There are sixteen levels of priority assignable to analog, binary, and multistate output and value points, 1 being the highest and 16 the lowest. (Priority level 9 is the default priority for TGP2 programs.) Priority levels 1 through 5 are not accessible through TGP2. Priority levels 1, 8, 11, and 13 are available for manual overrides.

Table 22. Control Priority Levels

Priority Rules

Control priority uses the following rules:

Priority Levels Priority Level Name Assigned Applications

1 Life Safety - Manual Emergency overrides for users

2 Life Safety - Auto Emergency override for system applications

3 Miscellaneous ---

4 Miscellaneous ---

5 Critical Equipment Factory Safety TGP2

6 Minimum On/Off Minimum On/Off

7 Miscellaneous ---

8 Manual Override High User High

9 Programming High TGP2 High (Default field programming level)

10 Application High VAS

11 Manual Override Medium User Medium

12 Application Medium Area (TOV)

13 Manual Override Low User Low

14 Programming Low Programming Low

15 Application Low Scheduling

16 Miscellaneous ---

Table 23. Control Priority Rules

1 Output points write to a value object or another output at the level that was specified using the Update Priority list box (shown here) in the Analog, Binary, or Multistate Output Point Configuration dialog box.

2 Value points can only be written. They do not write to other points, as they do not have a reference property.

Page 174: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

174 BAS-APG008-EN, 02/05/2010

Appendix B: Control Priority Levels in TGP2

Methods You Can Use to Set Priority

There are two ways to set the priority for both output and value points:

• Respond to operational situations by creating a manual override using the Tracer TU service tool.

• Use a Priority Level input port on the block when you are constructing or modifying programs in the TGP2 Editor. The priority level assigned to the Priority Level port determines if a priority level coming from a source that is writing to the output or value point is acceptable. Figure 170 shows a priority level specified by a Constant block.

Figure 170. Using a constant as input to a Priority Level port

Note: For equipment safety reasons, the Priority Level port value is limited to a range of 6 through 16. An attempt to write at priority 1 through 5 is treated as an attempt to write at priority 6. An attempt to write at a priority of 17 or greater is treated as an attempt to write at 16. If all control priorities have been released, the output is set at the relinquished default value .

In addition, you can specify the priority of output points (as sources writing to other points) using the Update Priority list box on the Analog, Binary, and Multistate Output Point Configuration dialog boxes as mentioned previously in Priority Rules.

Examples

Example 1

The three priority level sources are all attempting to control the active setpoint (output or value) of a piece of equipment at the same time.

Active setpoint = 70.5 °F.

If released at priority 5, the next highest priority attempting control takes over. In this case the active setpoint will become 71.0 °F

3 TGP2 writes to output and value points at either • The program level (priority level 9) • The value that you set using the Priority Level port on the output or value point blocks (See Methods You

Can Use to Set Priority, which follows in this appendix.)

4 The last value to be written prevails if there are two or more sources that have the same priority level, AND they have the highest priority.

Table 23. Control Priority Rules (continued)

Priority level source and [value] Priority level

TGP2 – factory [70.5 °F] 5

Manual Override High [71.0 °F] 8

TGP2 High [72.0 °F] 9

Page 175: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 175

Appendix B: Control Priority Levels in TGP2

Example 2

This example shows three control sources (analog output points) on the Tracer SC that push their values to an analog value point on the UC400.

Important: The control priority level at which an output point writes its value to its target is determined by the Update Priority value set in the Point Configuration dialog box.

Source 1 has an Update Priority level of 7 and writes a value of 60 to the target value point. Source 1“wins” over Source 2 and Source 3, which both have lower Update Priority values. The priority of 7 takes precedence over 9 and 12.

Figure 171. Data value passed from an output to a value of equal priority

Problem: Unreleased Referencer Priority Levels

Be aware of unreleased point referencer priority levels when you replace or make changes to programs. Changing the priority of an Output or Value block in a program by changing the value of its Priority Level port may not affect the active priority level of its referencer.

Example

A program has a Binary Output block (Fan Output) with a priority level of 6. You decide to change the priority level of the block in the program to 9 using the Priority Level port on the block.

Note: You could also simply remove the Priority Level port so the block would revert to the default priority of 9.)

You then recompile the program and download it. However, when you check the program in real time, the point is still at priority level 6 rather than priority level 9 as shown in . Figure 172, p. 176.

Tracer SC UC400

Source 1:(Analog Output) SupplyFanSpeedUpdate Priority = 7 Value = 60

(Analog Value) Supply Fan SpeedValue = 60

Source 2:(Analog Output) SupplyFanSpeedUpdate Priority = 9 Value = 50

Source 3:(Analog Output) SupplyFanSpeedUpdate Priority = 12 Value = 40

Tracer SC UC400

Source 1:(Analog Output) SupplyFanSpeedUpdate Priority = 7 Value = 60

(Analog Value) Supply Fan SpeedValue = 60

Source 2:(Analog Output) SupplyFanSpeedUpdate Priority = 9 Value = 50

Source 3:(Analog Output) SupplyFanSpeedUpdate Priority = 12 Value = 40

Page 176: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

176 BAS-APG008-EN, 02/05/2010

Appendix B: Control Priority Levels in TGP2

Figure 172. Fan Output point remains at priority 6 despite change in the program

In this case, you must remember that the Binary Output point Fan Output referenced by the output block is still set at priority level 6 and must first be released at that same priority level (6) to transition to control at priority level 9.

Solution

Use the Override Request dialog box to release the current priority level of the point.

To release at priority level 6

1. Click the Status Utility tab on the right side of the Tracer TU window.

A horizontal row of member tabs appears across the top of the viewing area.

2. Click the Analog, Binary, or Multistate tab and locate the point for which you want to release the current priority level.

3. Click the corresponding Override icon of the overridden point.

The Override Request dialog box appears.

4. Select the Release radio button as shown in Figure 173, p. 177

Edited TGP2 programEdited TGP2 program

Page 177: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 177

Appendix B: Control Priority Levels in TGP2

Figure 173. Releasing the Fan Output point at priority level 6

5. Click Save to release at priority level 6 and transition to priority level 9, which is the next available priority.

Figure 174.Fan Output transitioned to priority level 9

The program will now execute using your intended priority level.

Page 178: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

178 BAS-APG008-EN, 02/05/2010

Appendix B: Control Priority Levels in TGP2

Page 179: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 179

AAdd block 72–73, 126adding

alarm indications 42blocks 22comments 26deadbands 38, 40degree symbol 22program space 62values 40wireless connections 64–67

alarm indications 42aligning blocks 27alignment toolbar 11ambient wet-bulb temperature 82Analog Input block 22Analog Input Properties dialog box

(image) 19Analog Value Properties dialog box

(image) 36And block 71approach temperature 83arranging blocks 26auto-reset alarms 121

BBinary Output block 28Binary Output dialog box (image) 20Binary Value Properties dialog box

(image) 37block properties, editing 23blocks

adding 22aligning 27connecting 29deleting 38moving 26overview 10selecting 26

building programs 30

Ccalculating

ambient wet-bulb temperature 82

approach temperature 83change in water temperature 81effective space setpoints 124–

127enthalpy 167wet-bulb temperature 82

calculation blocks 82Centered (assume cooling) 39closing programs 31Comment block 26comparing values 27compiling

errors 45programs 30

condenser water pump 89–94connecting

blocks 29Deadband blocks 42PID blocks 87Switch blocks 44Wireless blocks 65

Constant block 25Analog 24compared with variable 24inserting in program 24Properties dialog box 25using with Deadband block 42

controllingcondenser water pump 89–94cooling tower fan 69–74, 84–88cooling valve 114–115duct static pressure 108equipment 28exhaust fan 109–110heating valve 116outdoor air damper 112–114sump heater 64–69, ??–69supply fan 106–108two-speed fan 51variable-speed fan 77

cooling tower fan 69–74, 84–88cooling valve 114–115

Ddashed wire 29Deadband block 38–40, 68, 71, 84,

109, 113, 115, 128Centered (assume cooling) 39connecting blocks to 40, 42Greater than (assume

cooling) 38in cooling tower fan module 71in sump heater module 68Less than (assume heating) 39

De-Enumerator block 124degree symbol 22Delay on Start block 73, 113

timing diagram 57use in sump temperature

alarm 57deleting blocks 38direct action, PID 86discharge air setpoints 127downloading a program 48duct static pressure 108

Eeconomize 113editing

block properties 23program properties 21

Enthalpy block 167error deadband 87event trigger (program execution

method) 22exhaust fan 109–110exiting TGP editor 31

Ffail safe position, PID 87Fail/Fault port 43, 58fans

see cooling tower fan, supply fanFeedback Alarm block 90–94, 107,

109, 166Formula block

adding offsets to Sunrise/Sunset block 151

description of 148Formula Properties dialog

box 149parts of 148parts of an expression 148resistance to temperature

conversion 152time conversion examples 149

GGreater than (assume cooling) 38Greater-Than block 27

Hheat/cool mode 128heating valve 116help 11, 15

Index

Page 180: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

180 BAS-APG008-EN, 02/05/2010

Index

Iindicating an alarm 58inputs

configuring (equip rm ex fan) 19

invalid connection 29

Kkeyboard shortcuts 14

LLatch block

alarm indication 121timed and manual modes 60timing diagrams 60units 60

Less than (assume heating) 39Less Than block 56Less Than or Equal block 56, 68Limit block 85, 127logic blocks 46

MMacro block

creating a Macro block instance 136

description of 134one-shot example 135ports and variables 134two coil motor protection

example 142zone temperature arbitration

example 140manual reset alarms 120math blocks 72Max block 85measured variable, PID 86menu bar 10Min block 85mixed air temperature

see outdoor air dampermodes

heat/cool 128modules 53moving blocks 26

NNetwork Configuration Input

block 113Not block 93–94NOT(Request) AND Status 90

OOccupancy block 124one-shot macro for alarm reset 135online Help 11, 15opening

existing programs 33new programs 18

Or block 46–47, 58, 68outdoor air damper 112–114Output block

adding 28description of 28

output display 10Output Status block 107, 109outputs

configuring (equip rm ex fan) 19

override, timed 60

PPID block 86–88, 108, 113, 115, 116points

configuring (equip rm ex fan) 19

cooling tower w two-speed fan (table) 53

cooling tower w variable speed fan (table) 79

VAV AHU (table) 102printing programs 48priority levels

examples 174function of 173list of sixteen 173methods used to set 174rules 173unreleased referencer

problem 175process variable, PID 86Program Design Space

adding space automatically 62description of 10

Program Properties dialog box 21, 54

programsclosing 31compilation errors 45compiling 30description 22downloading 48execution methods 22extending space for 62

modules 53naming 22opening 33pages 21printing 48properties 21run frequency 21saving 30simulating 47uploading 49viewing status 131

propertiesprogram 54

Rreal time

viewing program in 49relay control 44removing blocks 38replacing blocks 38Request AND NOT(Status) 90Request XOR Status 90reverse action, PID 86run frequency 21

Ssaving programs 30selecting blocks 26sensor failure 43sequence of operations

cooling tower w two-speed fan 51

cooling tower w variable speed fan 77

equipment room exhaust fan 18modified exhaust fan data 34VAV AHU 99

setpoints, calculating effective 124–127

shortcutskeyboard 14menu 14

simulating a program 47Simulation Options window 47solid wire 29staging 69standard toolbar 11status, programs 131Subtract block 83, 126sump heater 64–69, ??–69sump heater

module<$endtrange 69

Page 181: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

BAS-APG008-EN, 02/05/2010 181

Index

supply fan 106–108Switch block 44–46, 116, 124, 126

Ttesting inputs 43TGP2 Editor

keyboard shortcuts 14menu bar 10online Help 15output display 10Program Design Space 10shortcut menu 14toolbars 13

time delay blocks 57, 60timed override 60timing alarm 57toolbars

alignment 11showing and hiding 13standard 11

Tracer TU service tool 7two coil motor protection macro

(example) 142two-speed fan 51

Uuploading a program 49

Vvalidation

affected blocks highlighted 45procedure 30results shown in output

window 45value

adding 40reading from and writing to 40

Value block 40–41variable-speed fan 77viewing program status 131

WWet-Bulb block 82wired connections 29–30wireless connections 64–67, 124,

126

Zzone temperature arbitration

example 140

Page 182: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

Notes

Page 183: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

Notes

Page 184: Applications Guide - Homestead · the new generation of Trane controllers (UC xxx controllers and the Tracer SC). You use Tracer TU to perform functions similar to the Rover service

www.trane.com

For more information, contact your local Trane office or e-mail us at [email protected]

Literature Order Number BAS-APG008-EN, 02/05/2010

Date February 2010

Supersedes New

Trane has a policy of continuous product and product data improvement and reserves the right to change design and specifications without notice.