Skip to content

Commit

Permalink
Add .isCollisionAvoidanceActive close Beckhoff-USA-Community#74
Browse files Browse the repository at this point in the history
  • Loading branch information
netbymatt committed Nov 26, 2024
1 parent 2511d0e commit cb32fc5
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 2 deletions.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion Base Project.~u
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MattW
MATTW-NB01
27840
638682456411182792
638682478042357968
7 changes: 7 additions & 0 deletions Base Project/Main/ITFs/iMover.TcIO
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ END_VAR
]]></Declaration>
</Method>
<Property Name="IsCollisionAvoidanceActive" Id="{0751312f-b9a3-06a1-1a1f-fea82cf8f457}" FolderPath="Properties\">
<Declaration><![CDATA[{attribute 'monitoring' := 'call'}
PROPERTY IsCollisionAvoidanceActive : BOOL]]></Declaration>
<Get Name="Get" Id="{fb9a85de-7cdc-0fdb-02d9-2039ba013b8c}">
<Declaration><![CDATA[]]></Declaration>
</Get>
</Property>
<Property Name="IsTrackReady" Id="{a749704e-a727-05fa-1be8-d11fd5732682}" FolderPath="Properties\">
<Declaration><![CDATA[PROPERTY IsTrackReady : BOOL]]></Declaration>
<Get Name="Get" Id="{3d58532e-56d6-0a5a-0811-67af41cc16bc}">
Expand Down
12 changes: 12 additions & 0 deletions Base Project/Main/POUs/XTS/Mover.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,18 @@ Halt := THIS^;
]]></ST>
</Implementation>
</Method>
<Property Name="IsCollisionAvoidanceActive" Id="{44271435-f54e-01be-23aa-f70858e56360}" FolderPath="Properties\">
<Declaration><![CDATA[{attribute 'monitoring' := 'call'}
PROPERTY IsCollisionAvoidanceActive : bool]]></Declaration>
<Get Name="Get" Id="{44467e48-1af3-057a-2f30-25c270d1fac3}">
<Declaration><![CDATA[VAR
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[IsCollisionAvoidanceActive := AxisReference.NcToPlc.StateDword2.Flags.AvoidingCollision;]]></ST>
</Implementation>
</Get>
</Property>
<Property Name="IsSyncedToAxis" Id="{f2757d0f-8cc6-01d8-3ce1-c233354ecef8}" FolderPath="Properties\">
<Declaration><![CDATA[{attribute 'monitoring' := 'call'}
PROPERTY IsSyncedToAxis : BOOL]]></Declaration>
Expand Down
2 changes: 1 addition & 1 deletion Base Project/_Config/PLC/Main.xti
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ and will return to Group State Standby when the situation permits.
</DataType>
</DataTypes>
<Project GUID="{DD3A0B29-8E7C-4E32-989D-B0222C998777}" Name="Main" PrjFilePath="..\..\Main\Main.plcproj" TmcFilePath="..\..\Main\Main.tmc" ReloadTmc="true" AmsPort="851" FileArchiveSettings="#x000e" SymbolicMapping="true">
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcHash="{2A96BDC0-6223-76E2-49F7-97EB64DE5EBB}" TmcPath="Main\Main.tmc">
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcHash="{5FA81E06-1B93-41AC-342B-71D7362CA514}" TmcPath="Main\Main.tmc">
<Name>Main Instance</Name>
<CLSID ClassFactory="TcPlc30">{08500001-0000-0000-F000-000000000064}</CLSID>
<Vars VarGrpType="2" AreaNo="1">
Expand Down
11 changes: 11 additions & 0 deletions Documentation/docs/CodeReference/Objects/Mover.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,17 @@ Use the ^ operator to dereference the pointer and query track properties
currentTrackId := Mover[1].CurrentTrack^.Id
```

### .IsCollisionAvoidanceActive

*BOOL*

> Returns true if collision avoidance is affecting the desired motion profile of this mover
```javascript
IF Mover[1].IsCollisionAvoidanceActive THEN
// additional commands
END_IF;

### .IsSyncedToAxis

*BOOL*
Expand Down

0 comments on commit cb32fc5

Please sign in to comment.