Configuration of the cam controller

The TwinCAT Digital Cam Server is installed as an option with the TwinCAT system. Subsequently a configuration group for the cam controller is available in the TwinCAT System Manager. A new cam controller can be inserted by right-clicking on this group.

Configuration of the cam controller 1:

The newly inserted cam controller contains two tasks: a fast task for cams output on the I/O bus, and a slower task for calculating the cam switching points. It also includes a logical encoder that monitors the position of the cam controller.

Configuration of the cam controller 2:

The cycle time is set via the Task tab. The cycle time can be set down to the base time of the TwinCAT system (see System configuration).

The cycle time of the fast cam output task (Cam Group 1 in the image) should be chosen such that at maximum rotational speed a maximum permitted angular error is not exceeded.

Example: At 30 rpm (180 °/s) the maximum permitted angular error for the cam output is 0.2 degrees

CycleTime = PositionError / Velocity

Cycle Time = 0.2° / 180°/s = 0.00111 s

A cam controller cycle time of 1 ms is adequate in this case.

A shorter cycle time may cause significant additional CPU load.

The cycle time of the calculation task (CAM Calc Task in the image) has no effect on output precision. Since this task handles complex calculations, the cycle time should be significantly longer (default: 10 ms).

For cycle times below 1 millisecond two configurations are possible. On the one hand the base time of the TwinCAT system (see real-time configuration) can be reduced to below 1 millisecond. Since the cam controller task can be set down to the base time, this cycle time can also be reduced. Optionally a separate timer can be configured for the cam controller task, in order to reduce the CPU load of the overall system. The Fast Clock option is described in the next section.

Further cam controller parameters

Configuration of the cam controller 3:

On the Global tab cam independent operating parameters of the cam controller are specified.

Cam Output Groups: Initially the required number of cam groups is specified. A cam group contains 32 digital outputs. The cam controller can be extended to 10 groups, i.e. up to 320 digital outputs (cam tracks).

Fast Clock Handler

The cam controller can be operated with a significantly faster cycle time than other system task (NC, PLC, etc.). The required cam controller cycle time may even be below the base time of the system (typically 1 ms). In this case it may be advisable to provide a dedicated clock generator for the cam controller.

Once the Fast Clock Handler was activated, the cam controller operates outside the TwinCAT task scheduler and is therefore independent of the system base time. The base time of the TwinCAT system is then set to 1 ms, and the cycle time of the cam controller can now be set in the real-time configuration via the Fast Tick interval.

Configuration of the cam controller 4:
Configuration of the cam controller 5:

The Fast Clock option is not limited to Lightbus I/O cards (FC2000, C1220, C1200). If a (now rarely used) C1200 ISA card is used, the associated option in the configuration dialog must be selected, since this card is managed directly by the cam controller. The card also requires the Fast Clock option.

Firmware version V4.18 or higher is required for a C1220 card.

Safety functions

The safety functions are used to monitor the machine or encoder function. Monitoring is activated as soon as the Coupled signal in the process image is activated by the PLC. If the Coupled signal is not active, the control system assumes that the encoder is mechanical decoupled and therefore also switches off the monitoring.