Hello Everyone,
Im having some trouble trying to use the STATUS parameter of the I/O cards. What I want to be able to do is check the status of my I/O cards and return as output a integer value depending on the diferent STATUS values.
I try using the SELSTR command but it didnt work, it is returning always a zero. Here is the code I put in my CALC block:
'OUT1.CV' := SELSTR('//330-PC-101/IO1/C01/STATUS.CV',"Good","No Card","","","");
Thank you for your time and help
If seems like you have inverted the functionality of SELSTR. SELSTR returns the string corresponding to the parameter. For example:
is this something that you might wanted to do?
IF '//CTLR-1/IO1/C01/STATUS.CV' = "Good" THEN OUT1 := 1;ELSE IF '//CTLR-1/IO1/C01/STATUS.CV' = "No Card" THEN OUT1 := 2; ENDIF;ENDIF;
In reply to Lun.Raznik:
In reply to vmvmhatre: