C
Hello,
I have an Intouch application that on one of the operator display windows, they have a display of 40 pin temperatures. I would also like for them to display the top 5 pins as well as the temperature of the pin, the sorting being done from a QuickFunction inside of Intouch. The tagnames of the pins are I/O integer and are formatted like this for pins 1-9...BOTTOMELTEMP1OW64, BOTTOMELTEMP2OW66..etc. For pins 10-40, the format
is BOTTOMELTEMP10OW82, BOTTOMELTEMP11OW84..etc.
What I have written gives an error that shuts down InTouch with this error message:
"Unknown type in OP_COMP(): 28 w/ 79".
Here is an example of what I've done that is not working... pinXX being memory integer and nameXX being memory messages.
DIM SwapTemp AS INTEGER;
DIM SwapName AS MESSAGE;
DIM Swap AS DISCRETE;
DIM num_pin AS INTEGER;
pin01=BOTTOMELTEMP1OW64;
pin02=BOTTOMELTEMP2OW66;
{this continues on for the rest of the pins}
name01="pin01";
name02="pin02";
{this continues on for the rest of the pins}
{In the following section, loop_counter tagname has been defined as memory integer, INDPIN1 and INDPIN2 as indirect analog and INDNAME1 and INDNAME2 as indirect message}
Swap=1;
FOR loop_counter = 1 TO 39 {iterations}
IF swap==1 THEN
FOR num_pin = 1 TO 39 {number of pins -1}
INDPIN1.Name= "pin" + Text(num_pin,"00");
INDPIN2.Name= "pin" + Text(num_pin +1,"00");
INDNAME1.Name="name" +Text(num_pin,"00");
INDNAME2.Name="name" +Text(num_pin + 1,"00");
IF INDPIN2.Value>INDPIN1.Value THEN {Check if pin+1 is greater that
pin}
SwapTemp=INDPIN1.Value; {Swap values}
INDPIN1.Value=INDPIN2.Value;
INDPIN2.Value=SwapTemp;
SwapName=INDNAME1.Value; {Swap names}
INDNAME1.Value=INDNAME2.Value;
INDNAME2.Value=SwapName;
swap=1;
ELSE
swap=0;
ENDIF;
NEXT;
ELSE
EXIT FOR;
ENDIF;
NEXT;
BottomElHotTemp1=pin01;
BottomElHotTemp2=pin02;
BottomElHotTemp3=pin03;
BottomElHotTemp4=pin04;
BottomElHotTemp5=pin05;
BottomElHotPin1_String=name01;
BottomElHotPin2_String=name02;
BottomElHotPin3_String=name03;
BottomElHotPin4_String=name04;
BottomElHotPin5_String=name05;
Any help would be appreciated.
Chris Corne
I have an Intouch application that on one of the operator display windows, they have a display of 40 pin temperatures. I would also like for them to display the top 5 pins as well as the temperature of the pin, the sorting being done from a QuickFunction inside of Intouch. The tagnames of the pins are I/O integer and are formatted like this for pins 1-9...BOTTOMELTEMP1OW64, BOTTOMELTEMP2OW66..etc. For pins 10-40, the format
is BOTTOMELTEMP10OW82, BOTTOMELTEMP11OW84..etc.
What I have written gives an error that shuts down InTouch with this error message:
"Unknown type in OP_COMP(): 28 w/ 79".
Here is an example of what I've done that is not working... pinXX being memory integer and nameXX being memory messages.
DIM SwapTemp AS INTEGER;
DIM SwapName AS MESSAGE;
DIM Swap AS DISCRETE;
DIM num_pin AS INTEGER;
pin01=BOTTOMELTEMP1OW64;
pin02=BOTTOMELTEMP2OW66;
{this continues on for the rest of the pins}
name01="pin01";
name02="pin02";
{this continues on for the rest of the pins}
{In the following section, loop_counter tagname has been defined as memory integer, INDPIN1 and INDPIN2 as indirect analog and INDNAME1 and INDNAME2 as indirect message}
Swap=1;
FOR loop_counter = 1 TO 39 {iterations}
IF swap==1 THEN
FOR num_pin = 1 TO 39 {number of pins -1}
INDPIN1.Name= "pin" + Text(num_pin,"00");
INDPIN2.Name= "pin" + Text(num_pin +1,"00");
INDNAME1.Name="name" +Text(num_pin,"00");
INDNAME2.Name="name" +Text(num_pin + 1,"00");
IF INDPIN2.Value>INDPIN1.Value THEN {Check if pin+1 is greater that
pin}
SwapTemp=INDPIN1.Value; {Swap values}
INDPIN1.Value=INDPIN2.Value;
INDPIN2.Value=SwapTemp;
SwapName=INDNAME1.Value; {Swap names}
INDNAME1.Value=INDNAME2.Value;
INDNAME2.Value=SwapName;
swap=1;
ELSE
swap=0;
ENDIF;
NEXT;
ELSE
EXIT FOR;
ENDIF;
NEXT;
BottomElHotTemp1=pin01;
BottomElHotTemp2=pin02;
BottomElHotTemp3=pin03;
BottomElHotTemp4=pin04;
BottomElHotTemp5=pin05;
BottomElHotPin1_String=name01;
BottomElHotPin2_String=name02;
BottomElHotPin3_String=name03;
BottomElHotPin4_String=name04;
BottomElHotPin5_String=name05;
Any help would be appreciated.
Chris Corne