Video Tutorial

(See below for full transcript)

This video tutorial is a quick introduction to using our free RCbenchmark software. This is part 2, where we cover the automatic scripting features. Click here for part 1.

Video transcript

Hi I’m Dominic from rcbenchmark.com. In part 1 linked below, we covered all the software features except the automatic control. If you want to automate your experiments and get repeatable, consistent results and save time testing the same things over and over, this video is for you!

Let’s start by connecting the dynamometer. Next we go to the automatic control tab. We see a warning reminding us of safety measures. To activate scripting mode, just go to the setup tab, check the scripting mode option, answer yes, and go back to the automatic control tab. You will only need to do this the first time.

Ok, let’s hide the plots for now to have more space. We are greeted with a super simple starting script. This script has two lines of code. The first one will print something on the console and the second will stop the script. Let’s run this script by pressing the “run” button. To start the script, just press the “start” button. We see the script’s output in the console. This simple script runs fine, but it doesn’t do anything useful. Let’s go back to the script editor by pressing ‘return”, and let’s instead pick one of the stock scripts available. I am choosing the “sweep discrete” script, which is the one you will likely use the most. The software preloaded this script for us and any code in green is a comment. If you read the comments, you will understand what this script does. But now, let’s just run the script and see what it does. So I press the start button, and… let’s watch.

Cool huh! The software automatically controlled the throttle in a number of discrete steps for you. We also see that a file was generated automatically by the script. If you look inside the file, you see that the script increased the throttle in four steps, then decreased the throttle back in four other steps. At each step, a data sample was recorded. Awesome! But let’s say I wanted to do more steps or change other test parameters. Well it is easy and you don’t need to understand the code.

Go back to the script editor, and click the “Clone” button to make your own copy. If you look at the beginning of the code, there is a section called “User Defined Variables”. Remember how the script made four steps? This is defined here. So let’s change it to 10. And let’s assume we just want the steps to go up and the script to stop right after. We just change the stepsGoDown variable to false. And now you can run the modified script.

Let’s go back and save this modified script, so you can reuse it later. Just type in a filename here such as “My script” and press enter. Just like that you have your own script saved in your working directory. Scripts are just javascript files and can be edited externally using any text editor. Now that your script is saved, it now appears in the list of available scripts. You can edit the script again and your changes are automatically saved back into the file. To delete your custom script, just delete the file and it should disappear from the list.

Now you have all the tools you need to run some tests automatically. We will add more scripts in the future, and you can automate most of your tasks without learning any code. If you want to get started with your own custom scripts, you can first get familiar with the code in the available scripts, and you can read the API documentation. To see the documentation, just click on the RCB link here. This opens a website with our documentation. For example, here I can see how to use the console print function we saw before. To help you understand, we added many example codes throughout the documentation. You can then copy/paste these examples in your empty script editor to see them in action. Here I am copying an animation example that illustrates how powerful console print functions are. Once pasted, you can run this example script. Analysing and modifying example codes is a great way to learn and get started with custom scripts. Plus, you will learn standard javascript code.

Thank you for your interest in our product, we hope you will find the automatic control features very useful. Please don’t forget to visit the Tutorials section on our website for more videos. Thank you for watching.

results matching ""

    No results matching ""