Select Import Library from the Home tab and open the. Start RobotStudio and load an Empty Station. rslib file will be automatically generated in the projects directory. Logger.AddMessage(new LogMessage('Someone just pressed MySignal!')) īuild the SmartComponent with the 'Build' command from Visual Studio.Īn.
SmartComponent component, IOSignal changedSignal) Open the 'CodeBehind.cs' file and write the following method in the 'OnIOSignalValueChanged' method: public override void OnIOSignalValueChanged( Of your project, and change the name of the digital signal to 'MySignal' as shown below: Open the 'SmartComponent.xml' file, where 'SmartComponent' is the name
Write the desired name for the project and press Next. and select the RobotStudio SmartComponent template. File NameĬontains the template code behind C# source.Ĭontains the template Library XML source.Ĭontains the template Library Resource XML source.Ĭreating a SmartComponent from Visual Studio The new project contains the following source code files. The required references, build events, and template files will be created. RobotStudio adds a Smart Component project template to Visual Studio.Ĭreating a project based on this template is the easiest way to get started authoring your Smart Component with code-behind. This section provides information on creating a Smart Component with code-behind using Microsoft Visual Studio.