smbDeleteDrive

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SimMechanics
Introduced first in SolidGeometry 3.1, Creation date: 2016-11-24, Last change: 2025-09-14

SimMechanics removes the drive block of a joint



See Also: smbDeleteUnconnectedLines

Example Illustration

 missing image of smbDeleteDrive (Joint)

Syntax

smbDeleteDrive(Joint)

Input Parameter

Joint: Name of joint; default is gcb




Copyright 2016-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

The function smbDeleteDrive is designed to remove the drive block associated with a joint in a SimMechanics model. Below is a detailed explanation of the algorithm and its parameters.

Input Parameters

Algorithm Steps

  1. Check if the Joint parameter is provided. If not, set Joint to the current block (gcb).
  2. Remove the system name from the joint name to get a simplified joint name (SJoint).
  3. Construct the full joint path (LJoint) by combining the current system name (gcs) with the simplified joint name.
  4. Attempt to retrieve the MotionActuationMode parameter of the joint using get_param.
  5. If successful, set the joint's MotionActuationMode to ComputedMotion and TorqueActuationMode to NoTorque using set_param.
  6. If an error occurs (e.g., the block is not a joint or drive), print an error message and exit the function.
  7. Delete the drive block associated with the joint by appending _DRIVE to the joint path and using delete_block.
  8. Set the joint's MotionActuationMode to ComputedMotion and TorqueActuationMode to NoTorque again to ensure the settings are applied.
  9. Call smbDeleteUnconnectedLines to remove any unconnected lines in the model.
Algorithm explaination created using ChatGPT on 2025-08-18 22:58. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21