Blog

Relative Gearing to an External Encoder with a Siemens 1500 PLC

Relative Gearing to an External Encoder with a Siemens 1500 PLC

DMC has often encountered a scenario where a customer wants to have a motor drive follow the position of an external encoder. However, a regular 1500 PLC does not allow you to directly gear to an external encoder; this functionality requires a 1500T PLC. The T-series processors allow much more complex motion control, but are also more overhead for simpler projects. As it turns out, with a little creativity, it is possible to gear to an external encoder using a regular 1500 PLC.

While you can't gear directly to an external encoder, you can gear to another drive that uses the external encoder as an input. There is one limitation: the following drive will only gear to the position setpoint of the leading drive, not the actual position. This can cause following issues when the leading drive is turned by hand, for example. However, when the leading drive is disabled using the MC_Power block, the position setpoint of the drive will be the same as the actual position. This way, you can gear to the disabled axis, and it will behave as if you were geared to the external encoder! Let's look at how to implement this.

Hardware configuration

For our hardware configuration, we have a 1516F PLC, an external encoder, an S120 servo controller that will control our following axis, and a G120 that will be used as our disabled drive. All our devices are connected via Profinet. The leading axis does not have to be a real drive; in this case, we are going to set the G120 as the leading axis with the external encoder as an input, and then disable the Profinet device using the D_ACT_DP block. This will cause the PLC to ignore communication with the drive, but still communicate with the external encoder. Next, we will create a positioning axis technology object, and configure it to use the virtual drive and external encoder.

The configuration of the virtual drive

The configuration of the external encoder

You can configure the external encoder to use whatever measuring system works for your system, as well as an appropriate telegram. The telegram used for the drive will make no difference. Next, create a synchronous object for the following axis, and configure its drive and encoder. Our servo has an internal encoder, so it will use that for position feedback.

The drive configuration for the servo

Finally, go to the Leading value interconnections tab, and select the virtual drive as the leading axis. Notice that the only option available under Type of coupling is Setpoint.

Configuration of the leading value interconnections

And that's it! The leading axis will be disabled by default, but you can always add an explicit call to MC_Power to make it more clear in your logic. Now anytime the following axis is geared to the leading axis with MC_GearIn, it will be following the position of the external encoder.

Comments

Patrick Smith
# Patrick Smith
Hi M,
What this means is that when we are configuring the technology object for the G120, we will set the Drive as the G120, and the Encoder as the external encoder that we want to follow. Once you have done that, you can set the encoder to use whichever telegram you need, set your mechanics (such as gear ratio), and you're all set. Let me know if you have further questions.
Best,
Patrick
M
# M
Hi Patrick!

Can you please explain what you mean by saying "we are going to set the G120 as the leading axis with the external encoder AS AN INPUT" ? Beside that images that you post, it is supposed that we have to do something else for the external encoder to be an input of the drive, i.e, we have to configure something else?

Thanks!
Patrick Smith
# Patrick Smith
Hi Denis,
The "virtual drive" is a drive that doesn't actually exist. By adding the drive to our hardware configuration and then disabling it on the Profinet network, we can then gear directly to the external encoder. The external encoder is then connected to your Profinet network and configured as shown. Let me know if you have further questions.
Best,
Patrick
Denis
# Denis
Hi Patrick,
I'm trying to understand your post because I'm really interested, but I have lost some steps.
I have this scenario:

- PLC S7-1500
- G120C as main drive (real drive)
- External encoder (not Siemens) connected via Profinet or Profibus, doesn't matter

I need to create a PositioningAxis with TO of S7-1500, but I cannot understand well your concept of "virtual drive".
Please, could you explain me better hot to connect the external encoder to the virtual drive?
Or, if you prefer, you can send me an e-mail with the example of the project.
Thanks a lot.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Related Blog Posts