[Flexpendant SKD5.14] write rapiddata string

Hi all,

I have a little problem with writing rapiddata to the robotcontroller. I have the following 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

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?

Ok, I think I’m getting close

when I replace


```
RapidString.FillFromString(Value)
```

by


```
RapidString.FillFromString("Testing123")
```

Then the rapidstring is modified with “Testing123”. Why isn’t it working with a string variable?