[simpits-tech] EPL syntax
Mark Doran
simpits-tech@simpits.org
Fri, 27 Jun 2003 12:41:49 -0700
“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