1/8/2015 2:13 PM | |
Posts: 87 Rating:
|
Hi There are a lot of mode for do this. You can find for more detailshere But follow below a very simple example. INTERFACE //------------- import --------------------------------------------------------- USEPACKAGE CAM; //CAM_EXT; //PATH; //USES ; VAR_GLOBAL boFirstCicle : bool := true; boCheck : bool := false; _toAxisX : FollowingAxis; _toCamX : CamType; END_VAR PROGRAM pExample; END_INTERFACE IMPLEMENTATION PROGRAM pExample IF boFirstCicle THEN boFirstCicle := false; _toAxisX := ANYOBJECT_TO_OBJECT(AxisX); _toCamX := ANYOBJECT_TO_OBJECT(CamX); end_if; if _toAxisX = AxisX then boCheck := true; else boCheck := false; end_if; end_program END_IMPLEMENTATION OBS: AxisX is it your Real Axis or Virtual Axis. Hope this help you. Regards. |
This contribution was helpful to
1 thankful Users |
1/8/2015 2:46 PM | |
Joined: 1/8/2015 Last visit: 10/9/2019 Posts: 291 Rating:
|
yes !my project just use the function like you side to handle the error! thank you very much! |
3/7/2015 1:37 AM | |
Joined: 1/8/2015 Last visit: 10/9/2019 Posts: 291 Rating:
|
execse me ! myFollowingAxis<>TO#NIL what's this mean ? |
Follow us on