Some cicode help required Please. i am by no means a cicode expert.
i have a tag "D2_WESP_TRA_Op_stat" which depending on its returned integer value is a fault code which relates to some text.
i want to display this fault code "text" on my page. another forum member suggested to use the select case function.
i have a text display on my graphics page with the function Display_TR_Alarm(iTag) in the expression. i get a complile "WARNING" from this(but no errors) when i compile.
where have i gone wrong? the following is my cicode function "Display_TR_Alarm"
STRING
FUNCTION Display_TR_Alarm(INT iD2_WESP_TRA_Op_stat)
STRING sD2_WESP_TRA_Op_stat
SELECTCASE iD2_WESP_TRA_Op_stat
CASE1! if the Value of Alarm Status word 2 is 1 then display Line Vac Abnormal
sD2_WESP_TRA_Op_stat = "Line Vac Abnormal"
CASE2! if the Value of Alarm Status word 2 is 2 then display Low Bus Voltage
sD2_WESP_TRA_Op_stat = "Low Bus Voltage"
CASE4! if the Value of Alarm Status word 2 is 4 then display Low Liquid Level
sD2_WESP_TRA_Op_stat = "Low Liquid Level"
CASE8! if the Value of Alarm Status word 2 is 8 then display Reserved
sD2_WESP_TRA_Op_stat = "Reserved"
CASE16! if the Value of Alarm Status word 2 IS 16 then display Door Open
sD2_WESP_TRA_Op_stat = "Door Is Open"
CASE32! if the Value of Alarm Status word 2 IS 32 then display Remote Mode & OFF
sD2_WESP_TRA_Op_stat = "Remote Mode & OFF"
CASE48! if the Value of Alarm Status word 2 IS 48 then display Remote Mode & ON
sD2_WESP_TRA_Op_stat = "Remote Mode & ON"
CASEELSE
sD2_WESP_TRA_Op_stat = "No Alarms"
ENDSELECT
RETURN sD2_WESP_TRA_Op_stat
END
i have a tag "D2_WESP_TRA_Op_stat" which depending on its returned integer value is a fault code which relates to some text.
i want to display this fault code "text" on my page. another forum member suggested to use the select case function.
i have a text display on my graphics page with the function Display_TR_Alarm(iTag) in the expression. i get a complile "WARNING" from this(but no errors) when i compile.
where have i gone wrong? the following is my cicode function "Display_TR_Alarm"
STRING
FUNCTION Display_TR_Alarm(INT iD2_WESP_TRA_Op_stat)
STRING sD2_WESP_TRA_Op_stat
SELECTCASE iD2_WESP_TRA_Op_stat
CASE1! if the Value of Alarm Status word 2 is 1 then display Line Vac Abnormal
sD2_WESP_TRA_Op_stat = "Line Vac Abnormal"
CASE2! if the Value of Alarm Status word 2 is 2 then display Low Bus Voltage
sD2_WESP_TRA_Op_stat = "Low Bus Voltage"
CASE4! if the Value of Alarm Status word 2 is 4 then display Low Liquid Level
sD2_WESP_TRA_Op_stat = "Low Liquid Level"
CASE8! if the Value of Alarm Status word 2 is 8 then display Reserved
sD2_WESP_TRA_Op_stat = "Reserved"
CASE16! if the Value of Alarm Status word 2 IS 16 then display Door Open
sD2_WESP_TRA_Op_stat = "Door Is Open"
CASE32! if the Value of Alarm Status word 2 IS 32 then display Remote Mode & OFF
sD2_WESP_TRA_Op_stat = "Remote Mode & OFF"
CASE48! if the Value of Alarm Status word 2 IS 48 then display Remote Mode & ON
sD2_WESP_TRA_Op_stat = "Remote Mode & ON"
CASEELSE
sD2_WESP_TRA_Op_stat = "No Alarms"
ENDSELECT
RETURN sD2_WESP_TRA_Op_stat
END
Last edited: