Get Rapid Data on own SmartComponent
DenisFR
✭✭✭
Hello,
I see that a new builtin SmartComponent was added in 6.06 that can read Rapid Data:
https://robotstudiotemp.blob.core.windows.net/installers/RobotStudio.6.06.News.RN.pdf
Is it possible to do the same in own SmartComponent with RobotStudioSDK?
I see that a new builtin SmartComponent was added in 6.06 that can read Rapid Data:
https://robotstudiotemp.blob.core.windows.net/installers/RobotStudio.6.06.News.RN.pdf
Is it possible to do the same in own SmartComponent with RobotStudioSDK?
☑️2024 - RobotStudio® User Group
0
Comments
-
It might be possible using PC SDK, but I'm not sure why you would want to.Johannes Weiman
Software Engineer
RobotStudio Team, ABB Robotics0 -
I want to make a SmartComponent to graphically represents some calculated data in RAPID.
Can we use PC SDK in SmartComponent?
☑️2024 - RobotStudio® User Group0 -
You can, but I would recommend leveraging the existing functionality.
You can embed a base component in your smart component from xml like this: <SmartComponent name="SmartComponent1" icon="SmartComponent1.png"<br> codeBehind="SmartComponent1.CodeBehind,SmartComponent1.dll"<br> canBeSimulated="false"><br> <Properties><br> <DynamicProperty name="Controller" valueType="ABB.Robotics.RobotStudio.Stations.RsIrc5Controller" /><br> <DynamicProperty name="RapidValue" valueType="System.Double"/><br> </Properties><br> <Bindings><br> <PropertyBinding source="Controller" target="rapidVariable1.Controller"/><br> <PropertyBinding source="rapidVariable1.Value" target="RapidValue"/><br> </Bindings><br> <Connections><br> <IOConnection source="GetValue" target="rapidVariable1.Get"/><br> </Connections><br> <Signals><br> <IOSignal name="GetValue" signalType="DigitalInput" autoReset="true"/><br> </Signals><br> <GraphicComponents><br><b> <EmbeddedLibrary name="rapidVariable1" source="%ABBLIBRARY%\Components\RapidVariable.rslib"></b><br><b> <PropertyValue name="DataType" value="num"/></b><br><b> <PropertyValue name="Task" value="T_ROB1"/></b><br><b> <PropertyValue name="Module" value="Module1"/></b><br><b> </EmbeddedLibrary></b><br> </GraphicComponents><br> <Assets><br> <Asset source="SmartComponent1.dll"/><br> </Assets><br> </SmartComponent><br>
As you see you can also initialize property values and set up connections and bindings to the embedded component.
If you need you can also access the embedded component from code behind: public override void OnPropertyValueChanged(SmartComponent component, DynamicProperty changedProperty, Object oldValue)<br> {<br> SmartComponent rapidVariable = component.GraphicComponents["rapidVariable1"] as SmartComponent;<br> rapidVariable.Properties["..."].Value = ...<br> }<br>
Johannes
Johannes Weiman
Software Engineer
RobotStudio Team, ABB Robotics0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings