Applications Guide Tracer Graphical Programming - Trane

Applications Guide Tracer Graphical Programming - Trane Applications Guide Tracer Graphical Programming - Trane

28.09.2014 Views

® Programming best practices Figure 187: Checking the space temperature input for failure Consider input failures when writing programs. As in the programmable control module (PCM) and the universal PCM (UPCM), consider failure scenarios in your programs. For example, what should happen if the mixed air temperature sensor fails on an air-handling unit? Checking for failures is easy using the Fail block (Figure 187). Note: The Fail block can check either hardware inputs for failure or communicated (network variable) inputs for invalid values. Write to variables only once in a program. Prevent potential conflicts by writing to variables only once in a program. Also, be careful when writing to the same variable from multiple programs. You must consider which program will determine the final value for the variable. 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 Rover service tool. If you see that the control source is alternating between two different programs, the problem is that the output is controlled in two programs. 230 CNT-APG001-EN

® Programming best practices Figure 188: Using wireless connections Read input values, including variables 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 variable, the program must access the internal database of the Tracer MP580/581 controller. This process consumes time. • Inthefuture,youwillbeabletosimulategraphicalprograms.This will look a lot like debug mode; however, you will be able to run the program offline and enter values for each input. The fewer inputs, outputs, and variables 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 188 for the space temperature input. Analog input Wireless write connection Wireless read connection CNT-APG001-EN 231

®<br />

<strong>Programming</strong> best practices<br />

Figure 188: Using wireless connections<br />

Read input values, including variables and the status of<br />

outputs, only once in any program.<br />

There are two reasons to read input values only once in a program:<br />

• The program runs more efficiently. Every time a program reads the<br />

value of an input, output, or variable, the program must access the<br />

internal database of the <strong>Tracer</strong> MP580/581 controller. This process<br />

consumes time.<br />

• Inthefuture,youwillbeabletosimulategraphicalprograms.This<br />

will look a lot like debug mode; however, you will be able to run the<br />

program offline and enter values for each input. The fewer inputs,<br />

outputs, and variables that you read, the fewer values that you will be<br />

required to supply in simulation mode.<br />

The wireless connection is a tool that makes this practice easy to follow.<br />

Use wireless connections to propagate values of inputs throughout the<br />

program, as shown in Figure 188 for the space temperature input.<br />

Analog input<br />

Wireless write connection<br />

Wireless read<br />

connection<br />

CNT-APG001-EN 231

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!