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.
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.
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.
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.
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.