Anzeige von Technologiedaten

ab TwinCAT V2.10 Build 1303

Anzeige von Technologiedaten 1:

Die aktuell wirkenden Technologiedaten wie G-Funktionen, Nullpunktverschiebungen und Rotation können via ADS ausgelesen werden.

Aktivierung zum Auslesen der Technologiedaten

Um die oben genannten Parameter auszulesen, ist zuvor eine Aktivierung via ADS erforderlich.

Die Funktion muss spätestens vor dem Start des NC-Programms aktiviert werden. Sie bleibt solange aktiv, bis entweder ein TwinCAT Restart durchgeführt oder die Funktion explizit zurückgesetzt wird.

Funktion

ADS-Write

Port

500 (dez)

Index Group

0x2000 + Kanal ID

Index Offset

0x0053

Daten

DWORD
0: disable (default)
1: enable

Auslesen der aktuell wirkenden Nullpunktverschiebung

Mit diesem Befehl wird die wirkende Nullpunktverschiebung (NPV) des aktuell in der Satzausführung (SAF) verfahrenen Segments ausgelesen. Wenn keine NPV aktiv ist (G53) so enthält die Struktur für die einzelnen Komponenten einen Null-Vektor. Diese Daten können z.B. für eine Umschaltung der Anzeige zwischen Maschinen-Koordinaten und Programmierten-Koordinaten verwendet werden.

Die Daten, die z.B. mit dem Funktionsbaustein 'ItpReadZeroShift' ausgelesen werden, können sich von diesen Werten unterscheiden, da mit dem FB die Interpreter-Daten ausgelesen werden und dieser ggf. schon neue Verschiebungen berücksichtigt.

Funktion

ADS-Read

Port

500 (dez)

Index Group

0x2100 + Kanal ID

Index Offset

0x0014

Daten

{

 

UINT32

Satzzähler

UINT32

dummy

LREAL[3]

Nullpunktverschiebung G54..G57

LREAL[3]

Nullpunktverschiebung G58

LREAL[3]

Nullpunktverschiebung G59

}

 

Auslesen der aktuell wirkenden Rotation

Mit diesem Befehl wird die wirkende Rotation des aktuell in der SAF verfahrenen Segments ausgelesen.

Funktion

ADS-Read

Port

500 (dez)

Index Group

0x2100 + Kanal ID

Index Offset

0x0015

Daten

{

 

UINT32

Satzzähler

UINT32

dummy

LREAL[3]

Rotation in Grad von X, Y & Z

}

 

Auslesen des aktuell wirkenden G-Codes

Der G-Code ist in Gruppen unterteilt. So bilden z.B. die modal wirkenden Geometrietypen (G01, G02...) und die Ebenenanwahl (G17..G19) eigene Gruppen. Mit dem Auslesen der G-Code Information wird der Enumerator für die Gruppen ausgelesen. Diese können dann applikationsspezifisch zur Anzeige gebracht werden.

Da mit dem Read-Befehl eine zu lesende Größe mitgegeben wird, müssen nicht alle Gruppen ausgelesen werden. Es wird immer von Gruppe 1 der mitgelieferte Speicher gefüllt. Werden z.B. 3x8 Byte als Speichergröße übertragen, so werden die Daten des Satzzählers, Gruppe 1 und 2 zurückgeliefert.

Funktion

ADS-Read

Port

500 (dez)

Index Group

0x2100 + Kanal ID

Index Offset

0x0013

Daten

{

 

UINT32

Satzzähler

UINT32

Gruppe 1: ModalGeoTypes

UINT32

Gruppe 2: BlockwiseGeoTypes

UINT32

Gruppe 3: ModalPlaneSelection

UINT32

Gruppe 4: ModalToolCompensation

UINT32

Gruppe 5: ModalToolFeedDirection

UINT32

Gruppe 6: ModalZeroShift

UINT32

Gruppe 7: ModalAccurateStop

UINT32

Gruppe 8: BlockwiseAccurateStop

UINT32

Gruppe 9: ModalDesignationAbsInc

UINT32

Gruppe 10: ModalDesignationInchMetric

UINT32

Gruppe 11: ModalFeedRateInCurve

UINT32

Gruppe 12: ModalCenterpointCorr

UINT32

Gruppe 13: ModalCircleCpAbsInc

UINT32

Gruppe 14: ModalCollisionDetection

UINT32

Gruppe 15: ModalRotation

UINT32

Gruppe 16: ModalCalcExRot

UINT32

Gruppe 17: ModalDiam

UINT32

Gruppe 18: ModalFeedrateIpol

UINT32

Gruppe 19: ModalMirror

}

 

#define GCodeOffset 0x1000
#define CommonIdentOffset 0x2000 // used for non-g-code commands, like rot, cfc...

Gruppe 1: ModalGeoTypes

enum GCodeGroup_ModalGeoTypes
{
ModalGeoTypeUndefined = 0,
ModalGeoTypeG0 = 0 + GCodeOffset, // line - rapid traverse
ModalGeoTypeG01 = 1 + GCodeOffset, // straight line
ModalGeoTypeG02 = 2 + GCodeOffset, // circle clockwise
ModalGeoTypeG03 = 3 + GCodeOffset // circle anticlockwise
};

Gruppe 2: BlockwiseGeoTypes

enum GCodeGroup_BlockwiseGeoTypes
{
BlockwiseGeoTypeNone = 0,
BlockwiseGeoTypeG04 = 4 + GCodeOffset, // dwell time
BlockwiseGeoTypeG74 = 74 + GCodeOffset, // homing
BlockwiseGeoTypeCip = 1 + CommonIdentOffset // circle parametrized with 3 points
};

Gruppe 3: ModalPlaneSelection

enum GCodeGroup_ModalPlaneSelection
{
ModalPlaneSelectUndefined = 0,
ModalPlaneSelectG17 = 17 + GCodeOffset, // xy-plane
ModalPlaneSelectG18 = 18 + GCodeOffset, // zx-plane
ModalPlaneSelectG19 = 19 + GCodeOffset // yz-plane
};

Gruppe 4: ModalToolCompensation

enum GCodeGroup_ModalToolCompensation
{
ModalToolCompUndefined = 0,
ModalToolCompG40 = 40 + GCodeOffset, // tool compensation off
ModalToolCompG41 = 41 + GCodeOffset, // tool compensation left
ModalToolCompG42 = 42 + GCodeOffset // tool compensation right
};

Gruppe 5: ModalToolFeedDirection

enum GCodeGroup_ModalToolFeedDirection
{
ModalToolFeedDirUndefined = 0,
ModalToolFeedDirPos = 2 + CommonIdentOffset, // tool feed direction positive
ModalToolFeedDirNeg = 3 + CommonIdentOffset // tool feed direction negative
};

Gruppe 6: ModalZeroShift

enum GCodeGroup_ModalZeroShift
{
ModalZeroShiftUndefined = 0,
ModalZeroShiftG53 = 53 + GCodeOffset, // zero shift off
ModalZeroShiftG54G58G59 = 54 + GCodeOffset, // zero shift G54 + G58+ G59
ModalZeroShiftG55G58G59 = 55 + GCodeOffset, // zero shift G55 + G58+ G59
ModalZeroShiftG56G58G59 = 56 + GCodeOffset, // zero shift G56 + G58+ G59
ModalZeroShiftG57G58G59 = 57 + GCodeOffset // zero shift G57 + G58+ G59
};

Gruppe 7: ModalAccurateStop

enum GCodeGroup_ModalAccurateStop
{
ModalAccurateStopNone = 0,
ModalAccurateStopG60 = 60 + GCodeOffset // modal accurate stop
};

Gruppe 8: BlockwiseAccurateStop

enum GCodeGroup_BlockwiseAccurateStop
{
BlockwiseAccurateStopNone = 0,
BlockwiseAccurateStopG09 = 9 + GCodeOffset, // common accurate stop
BlockwiseAccurateStopTpm = 4 + CommonIdentOffset // target position monitoring
};

Gruppe 9: ModalDesignationAbsInc

enum GCodeGroup_ModalDesignationAbsInc
{
ModalDesignAbsIncUndefined = 0,
ModalDesignAbsIncG90 = 90 + GCodeOffset, // absolute designation
ModalDesignAbsIncG91 = 91 + GCodeOffset // incremental designation
};

Gruppe 10: ModalDesignationInchMetric

enum
GCodeGroup_ModalDesignationInchMetric
{
ModalDesignInchMetricUndefined = 0,
ModalDesignInchMetricG70 = 70 + GCodeOffset, // designation inch
ModalDesignInchMetricG71 = 71 + GCodeOffset, // designation metric
ModalDesignInchMetricG700 = 700 + GCodeOffset, // designation inch & feedrate recalculated
ModalDesignInchMetricG710 = 710 + GCodeOffset // designation metric & feedrate recalculated
};

Gruppe 11: ModalFeedRateInCurve

enum GCodeGroup_ModalFeedRateInCurve
{
ModalFeedRateInCurveUndefined = 0,
ModalFeedRateInCurveCfc = 5 + CommonIdentOffset, // constant feed contour
ModalFeedRateInCurveCfin = 6 + CommonIdentOffset, // constant feed inner contour
ModalFeedRateInCurveCftcp = 7 + CommonIdentOffset // constant feed tool center point
};

Gruppe 12: ModalCenterpointCorr

enum GCodeGroup_ModalCenterpointCorr
{
ModalCenterpointCorrUndefined = 0,
ModalCenterpointCorrOn = 8 + CommonIdentOffset, // circle centerpoint correction on
ModalCenterpointCorrOff = 9 + CommonIdentOffset // circle centerpoint correction off
};

Gruppe 13: ModalCircleCpAbsInc

enum GCodeGroup_ModalCircleCpAbsInc
{
ModalCircleCpUndefined = 0,
ModalCircleCpIncremental = 10 + CommonIdentOffset, // circle centerpoint incremental to start point
ModalCircleCpAbsolute = 11 + CommonIdentOffset // circle centerpoint absolute
};

Gruppe 14: ModalCollisionDetection

enum GCodeGroup_ModalCollisionDetection
{
ModalCollisionDetectionUndefined = 0,
ModalCollisionDetectionOn = 12 + CommonIdentOffset, //collision detection on
ModalCollisionDetectionOff = 13 + CommonIdentOffset //collision detection off
};

Gruppe 15: ModalRotation

enum GCodeGroup_ModalRotation
{
ModalRotationUndefined = 0,
ModalRotationOn = 14 + CommonIdentOffset, // rotation is turned on
ModalRotationOff = 15 + CommonIdentOffset // rotation is turned off
};

Gruppe 16: ModalCalcExRot

enum GCodeGroup_ModalCalcExRot
{
ModalCalcExRotUndefined = 0,
ModalCalcExRotOn = 16 + CommonIdentOffset, // extended calculation for rotation turned on
ModalCalcExRotOff = 17 + CommonIdentOffset // extended calculation for rotation turned off
};

Gruppe 17: ModalDiam

enum GCodeGroup_ModalDiam
{
ModalDiamUndefined = 0,
ModalDiamOn = 18 + CommonIdentOffset, // diameter programming on
ModalDiamOff = 19 + CommonIdentOffset // diameter programming off
};

Group 18: ModalFeedrateIpol

enum GCodeGroup_ModalFeedrateIpol
{
ModalFeedrateIpolUndefined = 0,
ModalFeedrateIpolConst = 20 + CommonIdentOffset, // federate interpolation constant (default)
ModalFeedrateIpolLinear = 21 + CommonIdentOffset // federate interpoaltion linear to remaining path
};

Group 19: ModalMirror

enum GCodeGroup_ModalMirror
{
// value - (32+CommonIdentOffset) shows the bitmask for mirrored axes
// that's why the sequence seems to be strange...
//
ModalMirrorUndefined = 0,
ModalMirrorOff = 32 + CommonIdentOffset,
ModalMirrorX = 33 + CommonIdentOffset,
ModalMirrorY = 34 + CommonIdentOffset,
ModalMirrorXY = 35 + CommonIdentOffset,
ModalMirrorZ = 36 + CommonIdentOffset,
ModalMirrorZX = 37 + CommonIdentOffset,
ModalMirrorYZ = 38 + CommonIdentOffset,
ModalMirrorXYZ = 39 + CommonIdentOffset
};