Here is a small snip of code:
if (ntZ001[0] == 3) then
strDefrost_status[1] = "Pump Down";
elseif (ntZ001[0] == 4) then
strDefrost_status[1] = "Preheat";
elseif (ntZ001[0] == 5) then
strDefrost_status[1] = "Fan Stop";
elseif (ntZ001[0] == 6) then
strDefrost_status[1] = "Water On";
elseif (ntZ001[0] == 7) then
strDefrost_status[1] = "Drip";
elseif (ntZ001[0] == 8) then
strDefrost_status[1] = "Restart";
else
strDefrost_status[1] = "";
endif
I want to do this check several times without re-doing the code over and over. The only things that change are “ntZ001[0]” and “strDefrost_status[1]”
ntZ001[0]
would change to ntZ002[0]
, ntZ003[0]
, etc.
and
strDefrost_status[1]
would change to strDefrost_status[2]
, strDefrost_status[3]
, etc.
There are about a dozen zones I want to roll through and then start over. How would I go about doing that?
Any help is appreciated. Thank you!