×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 11736675, Entry date: 04/22/2004
(0)
Rate

Easy Motion Control V2.0 and CPU314C

  • Entry
  • Associated product(s)

QUESTION:
How does Easy Motion Control V2.0 use the "ON-Board" I/O of a CPU 314C?

ANSWER:
There are two new driver blocks available in version V2.0 of Easy Motion Control:

  • The input driver EncoderCPU314C (FB28)
  • The output driver OutputCPU314C (FB34).

Both blocks are designed specifically for using the "ON-Board" I/O of the CPU 314C. They can be used with CPUs 314C with the following releases and higher:

  • CPU 314C-2 PtP: 6ES7314-6BF01-0AB0, 
    E release: 01, Firmware version: V2.0.0
  • CPU 314C-2 DP:  6ES7314-6CF01-0AB0, 
    E release: 01, Firmware version: V2.0.0

These permit you to use the 4 counters and the 2 analog outputs of the CPU 314C together with Easy Motion Control.

By using two external analog outputs with the relevant drivers you can also use counters 2 and 3 and position up to 4 axes with Easy Motion Control.

Please note:

  • CPU STOP / HALT
    The input driver only uses the technological function "Counter" of the CPU 314C for capturing the encoder values. The CPU is reset to the CPU operating statuses STOP (e.g. by switch) and HALT (e.g. by reaching a halt point in test mode). After the transition to RUN the counter function has to be activated again and begins counting again from the value 0.
    This means that from the point of view of Easy Motion Control after each transition from HALT/STOP to RUN the blocks must be initialized and subsequentlythe axes have to be referenced.

  • Maximum speed
    The maximum speed of your axes that can be captured is a result of the resolution of the encoder and the maximum frequency that can be captured by the inputs of the CPU 314C used. It is calculated from the following equation:

    umax 
    =
    60000 * fmax / Inc

    f
    max : maximum frequency of the counter in kHz

    Inc
    : number of increments of the encoder per revolution

    umax
    : maximum speed that can be captured in rpm

    60000: conversion factor


    Example:

    In the case of an encoder connected directly on the motor with 2500 increments per input, 2500 pulses per revolution are to be captured. According to the formula given above with an input limit frequency of 60 kHz you get a maximum speed that can be captured of 24 rps or 1440 rpm.

    Take the necessary measures to ensure that this speed is not exceeded, otherwise there might be pulse loss and problems with the closed-loop position control.

    The maximum counter frequency of the inputs depends on the CPU. More information on the technological functions of the Compact CPUs is available in the manual "S7-300 Automation System CPU 31xC Technological Functions" in Entry ID: 12429336.

What to watch out for when choosing your hardware:

  • Encoder:
    24V incremental encoders with two tracks phase offset by 90° (rotary position transducers) are used for capturing actual position values (no zero mark).
  • Drive:
    You can connect a drive with an input interface of "-/+ 10V".
  • Wiring:
    The following description of the parameters and the sample program is based on a encoder connected via counter 0 and a drive connected to analog output 0 of the CPU.
    For information on how to wire the encoder and the drive to the CPU please refer to the documentation of the encoder and the CPU314C: "S7-300 Automation System, CPU data, CPUs 312C to 314C-2DP/PtP" and/or "CPU 31xC Technological Functions".

Procedure:

Hardware Configuration
Configure the CPU 314C in the Hardware Configuration. Fig. 1 shows the dialog window for assigning the parameters of the CPU and its I/Os.

Fig. 1: Hardware Configuration ( 155 KB )  

Enable the parameters of the counter by opening its Properties dialog with a double-click on Count (slot 2.4).
Select "Channel 0" and change the operating mode from "Not configured" to "Count continuously" (Fig. 2).


Fig. 2: Properties dialog

An additional "Count" tab is displayed. This is for assigning the parameters of the count function (Fig. 3).
Set the "Input - Signal evaluation" according to your encoder (e.g. "Rotary encoder quadruple"), otherwise just accept the default values.


Fig. 3: Assigning the parameters of the count function

Save your inputs with "OK" and you return to the parameter assignment of the CPU with Hardware Configuration (see above).

To assign the parameters of the analog output (Fig. 4) you double-click on AI5/AO2 (slot 2.3).
Enable analog output 0 and parameterize it by selecting:

- Output type "V voltage" and
- Output range "+/- 10 V" 


Fig. 4: Assigning the parameters of the analog output

Press "OK" and you return to the CPU parameter assignment.

Save and compile the Hardware Configuration. Then load the Hardware Configuration into the CPU.

User program:
The database for Easy Motion Control is the axis data block that you create for each axis using the parameterization software of Easy Motion Control and fill in ("DB_Axis"). All Easy Motion Control blocks that you use for positioning an axis are interconnected exactly with that axis block via the "Axis" parameter.

The closed-loop position controller of Easy Motion Control is based on a fixed closed-loop position control cycle and requires that the input data (actual position value) is read in as exactly as possible in the rhythm of this cycle. The user program for motion control is called on the CPU 314C in the time interrupt OB 35, the call time of which gives the closed-loop position control cycle (recommended value >= 10 ms).

More details on the program structure are available in the Easy Motion Control documentation in Entry ID: 8253632.

Motion control:
The blocks of Easy Motion Control for positioning the axis are called, as described in the documentation, "between" input and output driver (see also sample program). 

Program extension:
If another axis has to be positioned, you have to enable the appropriate hardware resources (e.g. Counter 1 and Analog output 1), assign their parameters and wire them. Accordingly you call another input and output driver each in OB35. Using the parameter assignment tool of Easy Motion Control you create and parameterize another axis data block.

The input drivers of both axes should be called at the beginning of the time interrupt block (closed-loop position control cycle) and the output drivers at the end of the OB.

Sample program:
The I/O addresses of the following program match the hardware configuration described above and refer to Counter 0 and Analog output channel 0 of CPU 314C.

In the block calls, only those parameters that are also enabled are listed. You can interconnect all the other parameters to suit your requirements.

 Sample program ( 12 KB )  

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.