[Flexpendant SKD5.14] write rapiddata string
markdyk
✭
Hi all,
I have a little problem with writing rapiddata to the robotcontroller. I have the following code:
[code]
Private Sub WriteRapidString(ByVal Task As String, ByVal ModuleName As String, ByVal VariableName As String, ByVal Value As String)
Dim AController As Controller
AController = New Controller
Dim RapidString As ABB.Robotics.Controllers.RapidDomain.String
Dim RD As ABB.Robotics.Controllers.RapidDomain.RapidData = AController.Rapid.GetRapidData(Task, ModuleName, VariableName)
If TypeOf RD.Value Is RapidDomain.String Then
RapidString = DirectCast(RD.Value, RapidDomain.String)
RapidString.FillFromString(Value)
RD.Value = RapidString
End If
AController.Dispose()
RD.Dispose()
End Sub
[/code]
When I do exactly the same for a RapidBool then the code is working well. The variable on the controller is modified when the code is executed. When I try the code above (changed the rapidbool vars to rapidstring vars) then the code is executed, but it seems that the line "RD.Value=Rapidstring" is doing nothing.
Does anyone know how to solve this?
I have a little problem with writing rapiddata to the robotcontroller. I have the following code:
[code]
Private Sub WriteRapidString(ByVal Task As String, ByVal ModuleName As String, ByVal VariableName As String, ByVal Value As String)
Dim AController As Controller
AController = New Controller
Dim RapidString As ABB.Robotics.Controllers.RapidDomain.String
Dim RD As ABB.Robotics.Controllers.RapidDomain.RapidData = AController.Rapid.GetRapidData(Task, ModuleName, VariableName)
If TypeOf RD.Value Is RapidDomain.String Then
RapidString = DirectCast(RD.Value, RapidDomain.String)
RapidString.FillFromString(Value)
RD.Value = RapidString
End If
AController.Dispose()
RD.Dispose()
End Sub
[/code]
When I do exactly the same for a RapidBool then the code is working well. The variable on the controller is modified when the code is executed. When I try the code above (changed the rapidbool vars to rapidstring vars) then the code is executed, but it seems that the line "RD.Value=Rapidstring" is doing nothing.
Does anyone know how to solve this?
0
Comments
-
Ok, I think I'm getting close
when I replace
[code]RapidString.FillFromString(Value)
[/code]
by
[code]RapidString.FillFromString("Testing123")
[/code]
Then the rapidstring is modified with "Testing123". Why isn't it working with a string variable?
0
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)
- 799 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings