m702

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: BSD-3-Clause Imports: 5 Imported by: 5

Documentation

Overview

Package m702 provides r/w access to registers of M702 unidrive motors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Motor

type Motor struct {
	Addr    string
	Timeout time.Duration
}

Motor represents a M702 unidrive motor.

func New

func New(addr string) Motor

New returns a new M702 motor.

func (*Motor) ReadParam

func (m *Motor) ReadParam(p *Parameter) error

ReadParam reads parameter p's value from the motor.

func (*Motor) WriteParam

func (m *Motor) WriteParam(p Parameter) error

WriteParam writes parameter p's value to the motor.

type Parameter

type Parameter struct {
	Index  [3]int
	Title  string
	DefVal string
	RW     bool
	Data   [4]byte
}

Parameter is a menu parameter in the M702 unidrive manual.

func NewParameter

func NewParameter(menu string) (Parameter, error)

NewParameter creates a parameter from a [slot.]menu.index string.

func (*Parameter) MBReg

func (p *Parameter) MBReg() uint16

MBReg returns the (32b) modbus register value corresponding to this parameter.

func (Parameter) String

func (p Parameter) String() string

Jump to

Keyboard shortcuts

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