comtool

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2020 License: MIT Imports: 6 Imported by: 1

README

comtool

Set fanuc data comments via the controller KAREL ComSet tool.

Usage

package main

import (
	"fmt"

	"github.com/onerobotics/comtool"
)

func main() {
	err := comtool.Set(comtool.NUMREG, 1, "test", "127.0.0.101")
	if err != nil {
		fmt.Println(err)
	}
}

Documentation

Overview

Package comtool provides the ability to set FANUC robot comments via an HTTP request to the KAREL ComSet utility.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrForbidden    = errForbidden()
	ErrUnauthorized = errUnauthorized()
)

Functions

func Set

func Set(code FunctionCode, id int, comment string, host string, timeout time.Duration) error

Set sets the comment for an item at the provided host.

Types

type FunctionCode

type FunctionCode int

FunctionCode is a type for the constants listed below which should be provided to Set. The constants correspond to the sFc parameter required by ComSet.

const (
	INVALID FunctionCode = 0
	NUMREG  FunctionCode = 1
	// 2 -- set numreg
	POSREG FunctionCode = 3
	UALM   FunctionCode = 4
	// 5 -- set ualm_sev
	RIN  FunctionCode = 6
	ROUT FunctionCode = 7
	DIN  FunctionCode = 8
	DOUT FunctionCode = 9
	GIN  FunctionCode = 10
	GOUT FunctionCode = 11
	AIN  FunctionCode = 12
	AOUT FunctionCode = 13
	SREG FunctionCode = 14
	// 15 -- set SREG
	// 16 ??
	// 17 ??
	// 18 ??
	FLAG FunctionCode = 19
)

func (FunctionCode) String

func (f FunctionCode) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL