Expression

Hi All

If i have ACT block with four line for expression inside it,how can ignore or pending  one of them from execution but without delete it  

  • Hi .. you can use single inverted commas (') at the beginning & end of the expression. This will comment the expression and no need to delete it.
  • In reply to Pradeep Jadhav:

    Could you please share with me example
  • Hi Hassan,
    You just have to enter "REM" in beginning of the line which needs to be ignored. For example:-
    OUT1 := IN1.CV This line needs to be ignored so you enter
    REM OUT1 := IN1.CV

    Note:- However this will only ignore that particular line number. If you want to ignore a whole set of expression, then

    OUT1 := IN1.CV ;

    OUT2 := IN2.CV ; To ignore this expression you can do this

    (* OUT1 := IN1.CV ;

    OUT2 := IN2.CV ;  *)

  • In reply to Muzammil Shaikh:

    I did as below
    (*
    '//ANALOG_1/HI_HI_ALM.OPSUP := 1
    *)

    but error was appear (a blank expression was supplied ) when do parse
  • In reply to Hassan.hameed:

    This is indeed a blank expression. You've placed the line in side comment delimiters. If there is nothing else in the expression, there is nothing to parse.

    Andre Dicaire

  • In reply to Hassan.hameed:

    I think you will get a warning or error message if their is no expression. Since you commented out the expression, this means there is no longer an expression in your block.

    I normally set a dummy command such as:
    Temp := TRUE;
    (*
    '//ANALOG_1/HI_HI_ALM.OPSUP := 1
    *)

    This way the function block / sfc has an expression, but it has no effect.

    BTW, don't forget to add an ";" after the ….OPSUP := 1.
  • In reply to Andre Dicaire:

    When everything in an expression is commented out like that (usually for testing) I'll put in a line

    temp := false;

    just to get rid of the blank expression error. That just writes a false to a local to the expression variable.