|
楼主 |
发表于 2013-3-26 13:35:03
|
显示全部楼层
通过小车的OnLane,onLaneA ,onLaneB这几个方法或者属性可以获取小车所在的Track
2 X8 K- }# |7 k, c6 {- V; \onLaneA 1 A/ S2 H# d# ?* |6 n
Usage: <MU_path>.onLaneA;
- w# q6 ?+ }* v5 i4 O6 ?+ N<MU_path>.onLaneA[(<length>)];
: C# W+ i( p. v0 x' E8 Q# m% j( S
The method onLaneA returns if the Transporter is located on lane A of a TwoLaneTrack (true) or not (false). 8 E, w+ g4 K+ g7 l
1 z2 m u/ a% b
The optional parameter of data type length designates the position starting from the front of the Transporter. When you do not enter the parameter, Plant Simulation uses the reference point. This parameter is of importance, when the Transporter stretches across several Tracks.
0 p7 E# l3 R: P+ B" N: p2 m" h% P6 ~& m9 I! D$ ?5 ]: X/ B7 `& Q' U
The return value has the data type boolean. 8 B2 ^2 j- K, ?) y$ `( U
4 T/ t6 |/ b6 Z# ~7 Y" N$ U+ S
Example: print .MUs.Transporter:1.onLaneA; 1 k r( v( \4 E4 M: u
! @" X4 J1 G! p3 @1 _
onLaneB
6 T$ ]4 [0 I& @- [' [6 O' J2 wUsage: <MU_path>.onLaneB;
$ [; A7 J: }# y. E, Q8 N% z<MU_path>.onLaneB[(<length>)]; , Z( Z* ? T7 j
2 X3 z- J# Z5 u. J0 B2 L
The method onLaneB returns if the Transporter is located on lane B of a TwoLaneTrack (true) or not (false).
5 t* m- h$ p6 t" `, u8 l, M+ _& ?# Z3 P% v+ F; Y& n/ x
The optional parameter of data type length designates the position starting from the front of the Transporter. When you do not enter the parameter, Plant Simulation uses the reference point. This parameter is of importance, when the Transporter stretches across several Tracks. % Z! q* r5 H0 k# ]' [* D0 O
9 x4 Z3 n1 k* I7 Q+ M, qThe return value has the data type boolean.
. r3 z$ m) b/ O+ h- R
# e! c2 C& B+ @Example: print .MUs.Transporter:1.onLaneB;
. q2 `# G3 n t$ x1 p( T7 Z* C, d
/ v8 V! N4 Z* p0 r1 S |
|