Basic tutorial 1 : Electric Circuits

Content

Basic electric component

The system includes a table with a small electric box, DC power supply, a set of buttons, and three different lamps.

Select one of the components, i.e. the green button called ‘S01’ inside the ‘station’ assembly.

You can now see the component’s public variables and their values in the right panel and under them the component’s ports.

If you click on the (i) icon of the variables, the description of the component will appear in a new window.

If you click on the (i) icon of the ports instead, the symbol of the component will appear with a dot representing each port. If you place your mouse over a port it will display its name.

You can explore all different components and their ports now.

Build a basic circuit

The first basic circuit you are going to build is the one represented in the diagram below. The power supply ‘PS01’ will be directly connected to the red light ‘H01’. ‘PS01’ has two electric output ports called ‘dc_p’ and ‘dc_n’, and you will connect them directly to ‘H01’ input ports, ‘x1’ and ‘x2’ respectively.

Component movement

Select the ‘Move’ mode in the toolbar and using the movement axes bring the electric box (‘BOX’) to the center of the table and place the ‘H01’ light on top of it like in the screenshot below. You may need to adjust the vertical position of ‘H01’ to place it properly on the box.

Port connections

Component’s ports can be connected following the same principles as in the electric diagram above. There are different types of ports, such as electric, pneumatic, mechanical, etc. Only ports of the same type can be connected. Furthermore, an output port can be connected to several input ports, but not the other way around. Input and output ports can be distinguished by their symbols.

Port connections are set assigning input ports to output ports. This is done by telling each input port which is the output port that sets the value on it. This is why several input ports can be connected to the same output port but not the other way around.

That said, to assign the connections on the input ports of the light, select the ‘H01’ component and click on the port selection tool to the right of the ‘x1’ port. The port selection tool will display all compatible ports in the system, and because connections can be made between components in different assemblies, first you need to select the ‘station’ assembly, where all our components are grouped. Then search for the ‘PS01’ component, the power supply, and finally, you will see both output ports on it, ‘dc_p’, and ‘dc_n’. Now you can connect ‘x1’ input to ‘station > PS01 > dc_p’.

Once the selection is done, the connection address will be shown in the selection box. Do the corresponding connections between ‘x2’ and ‘dc_n’ ports follow the previous electrical diagram? Once complete, you should have the same port configuration as below.

Connections made to an output port can be inspected. If you select the ‘PS01’ component now, each output port will show how many connections have been made with it. Furthermore, if you click on the port selection tool, you can see its connection and even remove it by clicking on the remove (x) icon. By selecting the ‘dc_p’ port you will see that it is connected to the input port ‘x1’ of the ‘H01’ component inside the same assembly, as expected.

Start emulation

The basic circuit is now ready to be tested. We expect that the lamp will switch on immediately after the emulation has started.

To start the emulation, click on the ‘Start’ button in the toolbar. The clock will start counting the emulation time and the interaction mode will be enabled. You can pause and restart the emulation at any time.

If the connections were made correctly, the lamp will change color to bright red as soon as the emulation starts.

You can even inspect the ‘PS01’ and ‘H01’ port values to see that the values are transferred between them. To do that, you just need to click on the inspection view on the right of each port.

If you reset the emulation, the system will be reset and the lamp will change back to its inactive color.

Modify the circuit

Now we are going to add the ‘S01’ push-button to the circuit, between the ‘PS01’ and ‘H01’ components so we can manually switch on the light when we press the push-button.

First, grab the button component (S01) and place it on the box, close to the light.

Next, click on the button (S01) and connect the ‘dc_p’ output port of the power-supply (PS01) to the ‘x1’ input port.

Finally, click on the lamp (H01) and connect the ‘x2’ output port of the button (S01) to the ‘x1’ input port.

If you start the emulation again, the light won’t switch on until you activate the button component by clicking on it in the scene (using the left mouse button). When you release the button the light will switch off as expected.