Creating Smart Components

You can create a smart component, and use it in an xMechatronics assembly. The smart component includes 3D geometry, connection points, and data that define its attributes and behavior.

Smart components are components that include electronic and programming information.

The created smart component can be used in autowiring that automatically connects pins and ports on the component to other related components. You can add a smart component feature inside the 3D shape of any component.

See Also
Inserting Smart Components from Part Supply
  1. Create or import a model in the app.
  2. Add connection points to the model.

    For more information about connection points, see Creating Connection Points. You can also use a custom component, see Creating Custom Smart Components.

    You need at least one connection point to create a smart component.



  3. From the Mechatronics section of the action bar, click Authoring.
  4. In the Authoring dialog box, fill in the following details.
    TabDescription
    General
    • Type a name for the component.
    • A list shows the number of connection points in the model.
    • Select a 2D circuit view. You can also create a custom 2D view by uploading an SVG, which may not be a direct preview of the model.
    • A preview of the model is displayed.
    • By default, the 3D bounding box is captured for the image and is used to determine the picture length and width in the view.
    Connection points
    • Select the connection point to modify.
    • Enter a description for connection points.
    • If required, change the position of connection points. You can change the values of X and Y positions. You can preview the changes in the model. You can also change the position of connection points using a mouse pointer in the preview.
    • Select a specification for connection points.


    Connections This section shows related components and connections between components.
    • Under Connections, select related components.

      The dialog box shows all related components available in the Mechatronics Components of Part Supply catalog.

    • Click Add to add from and to information for any connection point based on the selected related components. Data cards are displayed for the from and to pin to show how the components are connected.
    Properties This section shows categories and properties for the smart component.
    • Select a category for the smart component. By default, Undefined is selected.
    • Select the controller type. It lists whether the component is a micro-controller or not. By default, Controller is selected.
    • Enter a description for the component.
    • Enter parameters associated with the component. In the first column, enter the parameter name and units in brackets. In the second column, enter parameter values. Click Add. You can insert or delete rows if required.
    Code
    • Libraries -Includes libraries required for the program. You can enter syntactically correct ā€˜C’ code for header files which contain the definition for libraries.
    • Global Variables -Automatic generated entries.
    • Additional global variables- Editable text area where you can define additional variables for later use in setup or loop.
    • void setup - Setup for components that use a library (like servo.h). You can enter a set-up code.
    • void loop- You can add lines of code that are inserted into the loop section of the program.
    • Additional functions - You can add functions that can be used within the loop section.
  5. Click to save changes and close the dialog box.
    The smart component is created. You can create only one smart component inside a 3D shape.

    You can edit the created smart component by either clicking Create Smart Component in the action bar again or using Edit in the shortcut menu in the tree.

  6. Insert the smart component that you created by using the Insert command from the Assembly section of the action bar.
  7. From the Mechatronics section of the action bar, click 2D Circuit View .
  8. From the action bar, select Mechatronics > 2D Autowire or from the shortcut menu, select Auto wire.
    2D wiring is created between the created smart component in the assembly and the inserted smart components.
  9. From the Mechatronics section of the action bar, click 3D View .
    3D wires get are created based on 2D wiring.