Siemens S120 Acyclic Communication Block

When working with Siemens Sinamics S120 drives, it’s common to have to home/reference the drives at a known location. The drive should be referenced during commissioning, after replacing the motor, or after any event that would cause the position of the encoder to differ from the actual position of the machine axis.

Referencing the drive is not a very difficult task to do through STARTER, but to avoid the need for maintenance staff to use a laptop to reference the drives, we created a function block that allows the user to home the drive from the HMI. As an extra bonus, this block is also capable of changing the jog speeds and overtravel position limits from the same HMI screen.

Siemens S120 Acyclic Block

Click to expand

To use the block, we set up logic to tell the block the Control Unit’s diagnostic address from the hardware config, as well as the Axis’ drive object number as shown in the STARTER project, the io address of the axis, and the DB used to pass in to Siemens’ S120 Toolbox block (FB283). When the block gets a trigger for either homing, setting overtravel limits, or changing the jog speed, it validates the associated data for the operation and begins sending the drive parameter changes acyclically. While the block is communicating with the drive, it outputs an “In Sequence” bit. When the operation is complete, it outputs a “Complete” bit. It also outputs an error bit and provides an error code to indicate the reason for failure.

Since this block was originally used in a project that followed the Ford Fast framework, the block also outputs a bit which is used to enable or disable the Ford Fast Servo Control block. While this block is operating on the drive, we disable the Fast block from also operating on the drive.

Inside the block, to set the home position, for example, there is a simple step sequence which performs the following steps:

  1. First, parameter 2599 (reference position value) is written to. We then read the value back to make sure it has been written correctly.
  2. Then, we write to parameter 2507 to initiate the encoder value adjustment. We monitor this value until it changes to a value of 3, which indicates the encoder value has been adjusted.
  3. Finally, we write a value of 1 to parameters 971 of the drive and 977 of the control unit to command them to copy ram to rom (saving the changes).

Internals of the S120 Acyclic Block

Note for images: direct db references without specifying the db, for example dbx14.2, are referring to the Drive Interface DB specified on the outside of the FB (in this example, it is DB1140).

Click images below to expand and view

Siemens S120 Acyclic Block - 1

Part 1

Siemens S120 Acyclic Block - 2

Part 2

Siemens S120 Acyclic Block - 3

Part 3

Siemens S120 Acyclic Block - 4

Part 4

Brave Controls Solutions is a Certified Siemens Solution Partner specializing in Automation Drives.

Contact our team today and check out some of our past  Siemens solutions for a better idea of how we can help.

2019-03-01T09:35:12+00:00