Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
NAMESPACE AXOpen.Components.Abstractions.Drives
TYPE PUBLIC
eAxoDriveAxisType : INT
(
Error := -1,
Undefined := 0,
Linear := 1,
Rotary := 2
) := Undefined;
END_TYPE
END_NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
USING AXOpen.Core;
USING AXOpen.Components.Drives.Abstractions;
NAMESPACE AXOpen.Components.Drives
{#ix-attr:[Container(Layout.Stack)]}
{S7.extern=ReadWrite}
Expand Down
107 changes: 19 additions & 88 deletions src/components.festo.drives/components.festo.drives.sln

Large diffs are not rendered by default.

215 changes: 180 additions & 35 deletions src/components.festo.drives/ctrl/src/AxoCmmtAs/AxoCmmtAs.st

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System;
using System.Globalization;
using AXOpen.Core.Blazor;
using AXOpen.Components.Abstractions.Drives;
using AXOpen.Components.Drives;
using AXOpen.Core.Blazor;
using AXSharp.Connector.ValueTypes;
using System;
using System.Globalization;

namespace AXOpen.Components.Festo.Drives
{
Expand Down Expand Up @@ -34,9 +35,27 @@ public partial class AxoCmmtAsView : AxoComponentViewBase<AxoCmmtAs>
_ => "badge-secondary"
};

public string FormattedPosition => FormatValue(Component?.ActualPosition, "mm");
public string PositionUnit => (eAxoDriveAxisType)Component.AxisType.Cyclic switch
{
eAxoDriveAxisType.Linear => "mm",
eAxoDriveAxisType.Rotary => "deg",
eAxoDriveAxisType.Error => "!!!",
eAxoDriveAxisType.Undefined => "???",
_ => "???"
};

public string VelocityUnit => (eAxoDriveAxisType)Component.AxisType.Cyclic switch
{
eAxoDriveAxisType.Linear => "mm/s",
eAxoDriveAxisType.Rotary => "deg/s",
eAxoDriveAxisType.Error => "!!!",
eAxoDriveAxisType.Undefined => "???",
_ => "???"
};

public string FormattedPosition => FormatValue(Component?.ActualPosition, PositionUnit);

public string FormattedVelocity => FormatValue(Component?.ActualVelocity, "mm/s");
public string FormattedVelocity => FormatValue(Component?.ActualVelocity, VelocityUnit);

public string FormattedTorque => FormatValue(Component?.ActualTorque, "Nm");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
Expand Down Expand Up @@ -557,6 +557,7 @@ private void InitializeMessenger()


new KeyValuePair<ulong, AxoMessengerTextItem>(1800, new AxoMessengerTextItem("Scaling parameters not yet read out of the drive" ,"Check proper value of the Module access point Hardware ID")),
new KeyValuePair<ulong, AxoMessengerTextItem>(1801, new AxoMessengerTextItem("Invalid user units specified." ,"Possible configurations: \nUser unit position (P1.7851.0.0)\t\t:\t SI Unit METER \t\t\t(256) AND\nUser unit velocity (P1.7852.0.0)\t\t:\t SI Unit METER 1/s \t\t(259) AND\nUser unit acceleration (P1.7853.0.0)\t:\t SI Unit METER 1/s2\t\t(343) AND\nUser unit jerk (P1.7854.0.0)\t\t\t:\t SI Unit METER 1/s3\t\t(416) OR\nUser unit position (P1.7851.0.0)\t\t:\t SI Unit DEGREE \t\t(16640) AND\nUser unit velocity (P1.7852.0.0)\t\t:\t SI Unit DEGREE 1/s \t(16643) AND\nUser unit acceleration (P1.7853.0.0)\t:\t SI Unit DEGREE 1/s2\t(16727) AND\nUser unit jerk (P1.7854.0.0)\t\t\t:\t SI Unit DEGREE 1/s3\t(16800) \n")),

new KeyValuePair<ulong, AxoMessengerTextItem>(2000, new AxoMessengerTextItem("Movement in positive direction is disabled" ,"Check the safety condition")),
new KeyValuePair<ulong, AxoMessengerTextItem>(2001, new AxoMessengerTextItem("Movement in negative direction is disabled" ,"Check the safety condition")),
Expand Down
Loading
Loading