List Info

Thread: Does magic_bit_alias affect all points in that module?




Does magic_bit_alias affect all points in that module?
user name
2006-11-03 05:24:05
Hello,

Mario:
> > point           L       "light"       
Chaser 4
> > point_alias     L1      "light 1"      L
0
> > point_alias     L2      "light 2"      L
1
> > point_alias     L3      "light 3"      L
2
> > point_alias     L4      "light 4"      L
3

takeshi ikeya:
> Is L0 magic_bit?

No; it's a manually-declared alias.

> If so, don't we need period ? ..like L.0

Any name can be used for the manually-declared aliases; it
doesn't even need 
to contain the "L".

The magic_bit_aliases setting simply creates automagic
aliases for all points.

> Can I  write codes like ..handle =
plc_point_by_name(L); ?

Don't forget the quotes around the names:
plc_point_by_name("L");

> Also..handle00 = plc_point_by_name(L.0);?
> handle01 = plc_point_by_name(L1);?
> Is handle00 == handle 01 ?

Yes, they are handles to the same bit of the same point.

(As it happens, the handles are also completely equal to
each other.)

> Is below right ?
> handle = plc_point_by_name(L);
> handle0 = plc_point_by_name(L.0);
> handle1 = plc_point_by_name(L.1);
> handle2 = plc_point_by_name(L.2);
> handle3 = plc_point_by_name(L.3);
> plc_get(handle) = plc_get(handle0) + 2 *
plc_get(handle1) + 4 *
> plc_get(handle2) + 8 * plc_get(handle3);

Yes,
  plc_get(handle)
returns exactly the same value as:
  plc_get(handle0) + 2 * plc_get(handle1) + 4 *
plc_get(handle2) + 
    8 * plc_get(handle3);

Jiri
-- 
Jiri Baum <jiribaum.com.au>                   http://www.baum.com.au/~
jiri

------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
MAT-devel mailing list
MAT-devellists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mat-devel

Does magic_bit_alias affect all points in that module?
user name
2006-11-03 12:15:25
> > point ; &nbsp; &nbsp; &nbsp; &nbsp;  L &nbsp; &nbsp; &nbsp; "light"&nbsp; &nbsp; &nbsp; &nbsp; Chaser 4
> > point_alias &nbsp; &nbsp; L1 &nbsp; &nbsp;  ";light 1"&nbsp; &nbsp; &nbsp; L 0
> > point_alias &nbsp; &nbsp; L2 &nbsp; &nbsp;  ";light 2"&nbsp; &nbsp; &nbsp; L 1
> > point_alias &nbsp; &nbsp; L3 &nbsp; &nbsp;  ";light 3"&nbsp; &nbsp; &nbsp; L 2
> > point_alias &nbsp; &nbsp; L4 &nbsp; &nbsp;  ";light 4"&nbsp; &nbsp; &nbsp; L 3

takeshi ikeya:
>; Is L0 magic_bit?

No; it's a manually-declared alias.
Any relations between L (4bit,&nbsp; I think "Chaser 4" means it) and L0, L1..?

&nbsp; &nbsp; ikeya
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )