×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 109747716, Entry date: 10/23/2017
(1)
Rate

How do you disable and enable the hardware limit switches of a Motion Control TO of an S7-1500 via the user program?

  • Entry
  • Associated product(s)
Change the parameters in the technology data block with the extended instruction "WRIT_DBL" to limit the positioning range of the positioning axis.

Description
To enable and disable the hardware end positions you have to set the tag "<TO>.PositionLimits_HW.Active" to FALSE or TRUE. This tag enables or disables both (negative and positive) hardware limit switches.

Start value
Use the extended instruction "WRIT_DBL" to change the start values. With this instruction you transfer the contents of a DB area in the main memory into a DB area in the load memory (MMC). This means that the changes in the technology data block are retained even after a power off of the CPU or a restart.

Fig. 1 shows an example of how with the DB tag "DB.activeValue" you can change the tag "PositioningAxis.PositionLimits_HW.Active" for the hardware limit switch.


Fig. 1

Notes

  • You may use the data block function "WRIT_DBL" in combination with the tags of the technology object only on individual tags and not parameterize on data structures of the technology object.
  • The changes in the technology data block are effective only after restarting the technology object. Restart the technology object with the Motion Control instruction "MC_RESET"; the new configuration data is then applied in the technology data block.
    This is how you do a restart of a technology object:
    • Set the input parameter "Restart" of the "MC_RESET" instruction to True to define the reinitialization of the technology object.
    • Start the reinitialization of the start values with a positive edge at the input parameter "Execute".
    • When the restart is completed, the value at the output parameter "Done" changes from False to True.
    • If the restart at the output parameter "Done" is not confirmed with True, the output parameter "Error" receives the value True and an error code is displayed at the parameter "ErrorID". Information about the error ID is available in the manual.

Further Information
More information is available in the manual "SIMATIC S7-1500 S7-1500T Motion Control in the TIA Portal", under

Creation Environment
The screens in this FAQ response were created with STEP 7 (TIA Portal) V14 SP1.

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.