Publié : 29 mai 2017
Len Gasior, Training Engineer, dSPACE Inc.
ControlDesk is a powerful front-end tool that is used to interface the host PC to your dSPACE platform. At the task level, ControlDesk is primarily used to register your platform and create projects and experiments. Among its many benefits is a ready-to-go instrument library with built-in features that can be used very quickly to create custom experiments.
Users occasionally want to add functionalities to the experiment/instrument or may want to use a third-party application to automate ControlDesk.
If these are attributes you would like to explore, look no further. The ControlDesk tool automation interface allows you to automate tasks, customize instruments, and involve third-party tools, saving you time and energy.
The ControlDesk tool automation interface, not to be confused with our AutomationDesk software intended for automating HIL tests of electronic control units, is an application programming interface (API) which is implemented as a COM object model.
The API is accessible with .NET programming languages (e.g., Visual Basic and C#) and COM/DCOM-based programming languages (e.g., Python and C++).
ControlDesk lets you access many of its functions through outside scripts, such as:
With scripts, you can automate repeating tasks and perform your complex workflows in no time, for example, creating a project and experiment with your custom settings.
You can access ControlDesk's tool automation interface using different methods:
The API also lets you implement individual functionalities to ensure that ControlDesk integrates perfectly into your existing development process.
To help you understand implementation approaches more thoroughly, we give you a high-level overview of the implementation methods from the ControlDesk point of view. Below, a simple diagram illustrates the concept:
In the direct approach, where scripts are implemented in ControlDesk’s internal interpreter, there are three methods by which Python code can be used:
With the first method, ControlDesk offers a convenient way to link Python code to control-specific events, such as registering your platform or creating an experiment. By using the template for the event handler that is accessible on the ribbon in ControlDesk, you can seamlessly add Python code to implement the desired operation for the event you want to control.
If you want to extend the functionality of an existing instrument, you can use the second method to assign Python code directly to the instrument, thereby creating a custom instrument. The script is stored with the instrument and executed automatically each time the instrument is initialized.
With the third method, you can use the ControlDesk’s Interpreter to control the software directly without an event or instrument script. You can run a Python script in ControlDesk's Interpreter to execute Python commands automatically to perform tasks such as creating a project or validating specific elements. This is the most powerful method, as you are not tied to any event or instrument.
Third-party tools or your own applications let you automate ControlDesk indirectly. If you have previously created scripts or custom front-end applications, with a little tweaking they can be implemented for automating ControlDesk, making it very helpful for reuse purposes. Therefore, based on your goals and objectives, the ControlDesk tool automation interface provides a convenient way to employ other third-party tools or your own code.
ControlDesk comes with a number of Python and C# demo scripts. In addition, helpful documentation is included to get you started. Our demo application library, installed on the hard drive of the host PC, contains examples for most of the basic procedures that are typically performed manually in ControlDesk.
This is a great place to start to learn how to implement tool automation in your ControlDesk projects. For simple implementations, end users with minimal coding skills will be able to take advantage of tool automation by observing the demo applications to learn about the inner workings of the code.
For users with advanced coding skills, the possibilities are endless. It all comes down to your creativity and effort to make it happen. The added work for implementing the code is worthwhile, you may save time and gain added functionality as well as improved tool efficiency.
The increased capability you will experience can be a major benefit in your use of ControlDesk, taking your projects to the next level.
Faire avancer l'innovation. Toujours à la pointe de l'évolution technologique.
S’abonner à nos newsletters, gérer ses abonnements ou se désabonner. La newsletter mensuelle contenant toutes les informations liées à l’aéronautique et défense.