Remote Programming
84
CTC100 Programmable Temperature Controller
The condition can contain numeric values, queries that do not require any arguments, and
causes a macro to wait until
temperature In1 is between 39 and 41 degrees:
while (In1 < 39 || In1 > 40) { pause 1 s }
The pause instruction is not necessary, but it helps to reduce the load on the CPU.
Conditional statements must be followed by curly brackets, otherwise the statement has no
to affect the order in which parts of the statement are evaluated.
When the name of a channel is used within a conditional term, it is sometimes unclear whether
or as a character string. In these cases, the
channel name (or any other conditional term) can be preceded by a dollar ($) sign to ensure that it
is treated as a string, or by a pound (#) sign to ensure that it is treated as a query. For example:
if (Out1.PID.Input==$In1) { Out1.PID.Input = In2 }
In this example, the dollar sign ensures that the PID input channel is compared with the string
In1
, not the numeric value of channel In1. Dollar signs can only be used in this way within
if
or
while
conditions.
Conversely, a channel name (or any other conditional term) can be preceded with a hash (#) to
force the CTC100 to treat it as a query. Since conditional terms are treated as queries by default,
the pound sign is only required
contain any letters. For example, if
while (#2<50) { pause 1 s }
pauses the macro unti
or equal to 50.
#
variable
0.0
The hash character defines a variable and assigns it a floating-point value. The value can then be
queried with
#
variable
?
and can also be used as an argument for any instruction that takes a
numeric argument.
The
#
variable
instruction consists of a hash (#) immediately followed by a variable name.
The variable name can be any string up to 32 characters long, but spaces are not allowed within
the variable name or between the pound sign and the variable name. Variable names are not case-
sensitive. For example:
#x=10.2 #x?
optional.
Variables can be used by the macro in which they are defined; by any macros called by that
macro; and by the macro that called it. A macro cannot access variables defined by other,
concurrently-running macros. In addition, once a macro finishes, all variables defined by the
macro are deleted. The value of an undefined variable is zero.
When macros are sent over a serial port (as opposed to being loaded from a text file on a USB
storage device), the macro can have at most one line, and therefore all variables must be defined
and used on a single line. Therefore, if the command
#x=10.2
is sent over the serial port, and at a later time the command
Summary of Contents for CTC100
Page 1: ...Version 2 1 May 14 2019 User Manual CTC100 Cryogenic Temperature Controller...
Page 6: ......
Page 8: ......
Page 12: ......
Page 25: ...Operation 13 CTC100 Programmable Temperature Controller...
Page 85: ...Operation 73 CTC100 Programmable Temperature Controller To disable cascade cont select it...
Page 128: ......
Page 129: ...Remote Programming 117 CTC100 Programmable Temperature Controller...
Page 130: ......
Page 142: ......
Page 150: ......
Page 176: ......