Go package for ABB Robot Web Service API
- 616-1 PC Interface
go get github.com/atmassey/abb-lib-rws
There are a few full examples in the examples directory that can be referenced.
package main
import "github.com/atmassey/abb-lib-rws"
func main() {
//create a new client
client := abb.NewClient("localhost", "Default User", "robotics")
//create a new backup on the robot controller
err := client.CreateBackup("$TEMP/my_test_directory")
if err != nil {
panic(err)
}
}
package main
import (
"fmt"
"github.com/atmassey/abb-lib-rws"
)
func main() {
//create a new client
client := abb.NewClient("localhost", "Default User", "robotics")
actions, err := client.GetControllerActions()
if err != nil {
panic(err)
}
//list all actions that can be performed on the controller
for _, action := range actions.Actions {
fmt.Printf("Action: %s\n", action)
}
}
package main
import (
"fmt"
"github.com/atmassey/abb-lib-rws"
)
func main() {
client := abb.NewClient("localhost", "Default User", "robotics")
signals, err := client.GetIOSignals()
if err != nil {
panic(err)
}
for i, name := range signals.SignalName {
fmt.Printf("Name: %s, Type: %s, Value: %s\n", name, signals_struct.SignalType[i], signals_struct.SignalValue[i])
}
}