MC_CamObject

Wrapper that holds a reference to a cam table object and provides methods for setting, accessing and modifying its data.
To use this wrapper, the cam table must be mapped and the method Connect() must be called.
Once a reference is successfully stored, it cannot be modified. Subsequent calls to Connect() or Create() will return an error.

Do not call the main FB directly. Only use the available methods.

MC_CamObject 1: Methods

Name

Description

Connect

Stores a reference to an existing cam table object. The cam table must have been previously linked to McToPlc, or the object ID must be passed as parameter.

Create

Creates a new cam table object and stores a reference to it.

WriteData

Calculates the entire cam table from a new set of data points.

ReadData

Reads data points from index StartIndex to StartIndex + NumberOfPoints - 1. The first valid index is 1.

OverwriteData

Overwrites data points from index StartIndex to StartIndex + NumberOfPoints - 1 and recalculates the modified cam table segments. The first valid index is 1.

ReadSlaveDynamics

Evaluates slave position, velocity and acceleration at a specific master position within the cam table profile.

ComputeMasterPositions

Finds the master position(s) for a given slave position.

ReadMasterRange

Returns leftmost and rightmost master position of the cam table profile.

ComputeCharacteristics

Computes cam table characteristics such as extreme slave dynamics for a given nominal master velocity.

ClearData

Removes all stored data. The existing reference remains intact.

CopyFrom

Copies data points and cam table segments from another valid MC_CamObject.

Weiterführende Informationen

Das MC_CamObject ist das zentrale Objekt zur Handhabung von Kurvenscheiben. Dies umfasst u. a. Methoden zum Setzen, Auslesen und Modifizieren von Datenpunkten. Um diesen Wrapper zu verwenden, muss zunächst eine Referenz auf eine Kurventabelle über eine der folgenden Optionen abgerufen werden:

  1. Verknüpfung mit einer vorhandenen Kurventabelle zur Konfigurationszeit, siehe Kurvenscheibe erstellen:
    • Verknüpfen Sie den Eingang „McToPlc.Oid“ des Cam-Objekts in der PLC mit dem Ausgang „McToPlc.Oid“ einer vorhandenen Kurventabelle im MC3-Motion-Projekt.
    • Rufen Sie in der PLC die Methode Connect() auf, um die Verknüpfung zu initialisieren. Nach der erfolgreichen Verknüpfung kann diese nicht mehr verändert werden. Ein erneutes „Connect()“ führt zu einem Fehler.
  2. Erstellen einer neuen Kurventabelle zur Laufzeit in der PLC: Rufen Sie Create() auf, um die Instanziierung eines neuen Kurventabellenobjekts intern anzufordern und eine Referenz auf dieses neu erstellte Objekt zu speichern. Optional kann ein Name als FB-Eingang angegeben werden. Danach ist ein MC_CamObject bereit für die Verwendung. Ein erneutes „Create()“ führt zu einem Fehler.
  3. Die Berechnung der Kurvenscheibe anhand gegebener Datenpunkte wird mit der Methode WriteData() ausgeführt.

Versionsinformation

  • TwinCAT Standard >= v3.1.4026.23.1
  • TF5550 MC3 Camming >= v4.0.6 (inkludiert TF5500 MC3 Base >= v4.0.6)

Required License

TC3 MC3 Camming