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.

Further information

The MC_CamObject is the central object for handling cam plates. This includes, among other things, methods for setting, reading, and modifying data points. To use this wrapper, you must first obtain a reference to a curve table using one of the following options:

  1. Linking to an existing curve table at configuration time; see Create a cam plate:
    • Link the “McToPlc.Oid” input of the Cam object in the PLC to the “McToPlc.Oid” output of an existing curve table in the MC3 Motion project.
    • Call the Connect() method in the PLC to initialize the linking. Once the link has been successfully created, it cannot be changed. Calling “Connect()” again will result in an error.
  2. Creating a new curve table at runtime in the PLC: Call Create() to internally request the instantiation of a new curve table object and store a reference to this newly created object. Optionally, a name can be specified as a function block input. After that, an MC_CamObject is ready for use. Calling “Create()” again will result in an error.
  3. The cam plate is calculated based on the given data points using the WriteData() method.

Version information

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

Required License

TC3 MC3 Camming