[simpits-tech] EPL syntax

Frank Riedel simpits-tech@simpits.org
Fri, 27 Jun 2003 22:23:09 +0200


Yes - I have read it..."more than once" and was a little unsure... but
thanks Mark !
Now i'm sure... and i'll continue studing...

Frank¨

----- Original Message -----
From: "Mark Doran" <mark_s_doran@hotmail.com>
To: <simpits-tech@simpits.org>
Sent: Friday, June 27, 2003 9:41 PM
Subject: RE: [simpits-tech] EPL syntax


"ifactive" is obsolete syntax now, Frank.

Taken from Ralph's USB syntax primer (that you have read by now, right??
;-):

-- begin excerpt

  The following is OBSOLETE:

  ifactive (<module,row,mask>) call|jump <label1>; else call|jump <label2>;

[snip explanation of old syntax]

  >>>>>>>>>>>>>USE<<<<<<<<<<<<<<<<<
  1. for ifactive(....)

use:

  if(deviceName.ButtonName) ..... else ......

  2. for ifactivematch(.....)

     use:

     byte scan;
     scan = scanrow(0,0);  //get current state of switches on module 0 row 0
     scan &= 0x0F;         //mask bits of interest
     if(scan == 0b00000001) jump Proc0;  //active switches (on) are 1's
     if(scan == 0b00000010) jump Proc1;
     if(scan == 0b00000100) jump Proc2;
     if(scan == 0b00001000) jump Proc3;
     if(scan == 0b00000101) jump Proc4;  //if switches 0&2 are on and 1&4
are
                                         //off

-- end excerpt

It's much faster to write code with the new syntax and it's much easier to
read back as well (MHO ;-).

Cheers,

Mark.


-----Original Message-----
From: simpits-tech-admin@simpits.org [mailto:simpits-tech-admin@simpits.org]
On Behalf Of Frank Riedel
Sent: Friday, June 27, 2003 8:28 AM
To: simpits-tech@simpits.org
Subject: [simpits-tech] EPL syntax

Hi All !

I have a quest i cant find an answer to:
EPICcenter 0.1.1.55

ifactive(<label>) jump <label>;
- EPICcenter return - Syntax error (ifactive) -- unknown token

what is the correct syntax ?


Frank
_______________________________________________
Simpits-tech mailing list
Simpits-tech@simpits.org
http://www.simpits.org/mailman/listinfo/simpits-tech
To unsubscribe, please see the instructions at the bottom of the above page.
Thanks!