Importing 3D Assemblies - E.g. SolidWorks

From Flowcode Help
Jump to navigationJump to search

Flowcode is primarily a software package for the design of microcontroller systems that offers a flowchart based method of programming. For those new to programming, this is ideal as the visual implementation of flowcharts can be easier to understand. For those with programming experience, Flowcode offers the distinct advantage of speed, reducing the rapid prototyping stage of development. It is also used for the complete development cycle in many applications. With advances in technology and in particular the electronics industry, engineers of all disciplines are now expected to understand microcontrollers to some basic level. In Flowcode, engineers can create complex systems in minutes. Alongside this flowchart method of programming, Flowcode offers a powerful 3D simulator package. This allows users to verify their program before downloading code to hardware. The 3D environment is ideal for electromechanical systems where motors, servos, actuators can all be visually represented. Users can characterise and program 3D electromechanical systems with ease. Alongside these electromechanical components, users can import and characterise 3D systems, such as windmills, car steering racks, electric fans and many more. In fact, Flowcode allows users to simulate almost any electromechanical system. If we haven’t already got a 3D system that suits your needs, you can design your own in a dedicated 3D package and import it into Flowcode.

Flowcode supports the importing of 3D model assemblies in the industry standard formats of STEP, IGES and OBJ. This allows users to create their 3D models in dedicated drawing packages such as Solidworks, Autodesk Inventor or DesignSpark Mechanical and import them into Flowcode. One imported, users can ‘link’ objects to motors, servos and actuators to create their own 3D systems.

Creating your own 3D electromechanical system can be achieved in as little as 4 steps;

1. Create/ obtain the 3D model that you want to simulate in Flowcode
2. Import the model into Flowcode 
3. Characterise your model 
 a. Group any common objects
 b. Assign links to objects to allow movement
4. Create your flowchart

In this guide we will walk through the 4 steps required to import and characterise your own 3D model in Flowcode. We will assume you have created a simple fan, and want to simulate the rotation of the object with a DC motor.

Create/ obtain the 3D model that you want to simulate in Flowcode

First users must either create their own 3D system, or obtain a model from elsewhere. We will assume you are creating your own 3D model. There are a few things to remember;

Flowcode offers a 3D simulation environment, however, it is not a dedicated 3D drawing package. You will be simulating high-level electromechanical systems. When creating your own models for simulation, keep them as simple as possible, this will improve the simulation performance within Flowcode. For example, there’s no need to import a 3D model which includes multiple screws, all with a fine thread pitch and detailed screw head! Either simplify your model resolution, or remove unnecessary elements.Flowcode supports STEP, IGES, OBJ and STL file formats, however, STL files do not work as assemblies. Save your model in any of the appropriate file formats and remember the saved location.

SolidWorks1.png


Note: For STEP files, the STEP 214 file format works best with Flowcode.

SolidWorks2.png

With your 3D model saved, you can now import it into Flowcode. 3D models are imported by navigating to File->Import 3D Model… (note; you must have an opened flowchart for the import 3D model menu to appear).

The import model dialogue will appear as seen below, where users can import the following file types;

  1. .MESH
  2. .OBJ
  3. .STEP
  4. .IGES
  5. .STL

If you import an .OBJ, .STL, .STEP or .IGES file, Flowcode will need to convert that file to its native file format. If you import a .MESH file, it will already be in the appropriate file format. When converting a file, you will be presented with the dialogue box below;

SolidWorks3.png


When importing models into Flowcode, it is advised again to do so at the lowest/ most coarse resolution. If this works fine, you may wish to increase the resolution to improve the visual look. From the image below it can be seen that the fan assembly has imported as one assembly, containing 2 parts, which we will rename ‘Case’ and ‘Fan’. The original name will be file name_1 & file name_2

SolidWorks4.png

Each part is renamed via the Handle property.

The Properties window can be opened by selecting View ribbon and selecting Component Properties or select the fan on the 3D panel, right-click, and selecting properties.

Either select the part to be renamed from the 3D panel or by the dropdown arrow on top of the properties window. Select the text next to the Handle entry and enter the desired name.

Characterise you model

With your 3D model now in Flowcode you must characterise it. This is the key step in allowing you to simulate electromechanical systems. Here you will learn how to group objects together and assign links between Flowcode components, such as motors, to the 3D model you imported.

Assigning links to objects to allow movement

Since we want to create a fan based on a DC motor, we first add a motor to our simulation panel. We will add the Motor – (Full Bridge) Select the Components Ribbon>Search enter motor. Within Motor Template, you will need DC Motor [3D]. It should be placed in the centre of the fan, as the pivot point will be the centre of the motor component. If you don't want the two red rotational arrows, just change Show Actuator from Yes to No within the simulation Settings properties

SolidWorks5.png

We have customised two of the properties here, the speed, and the target object. We set the motor speed to -500, although we could have chosen any negative value, if too high then the fan would either appear stationary or spin in the wrong direction. The target object would be ‘Fan’. This will then cause the fan object to rotate whenever the motor rotates.

Grouping common objects

If you import a more complex assembly into Flowcode, you may need to rotate or move multiple objects within Flowcode, all at the same time. To achieve this, users must group objects together, and then link the motor to the object in the same way as the previous step, however, they should link to the name of the group rather than a specific object. Although the fan and the case are already grouped by default and here we have shown how to group objects, combining both the fan and case into one object. Drag a box around the objects you want to group together, Right-click and select Selection > Group and it will combine the objects into a group. You can then change the name of this group in the panel properties

If you get stuck creating the project then the rotating fan example and the step file can be downloaded.

FC6 Icon.png Fan rotation Example

File:Fan Cooler Assembly.STEP