Skip to content

skladd/go-scpi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-scpi

MIT License

Forked from https://github.com/scizorman/go-scpi

Go library to control SCPI devices over TCP and serial interfaces.

Installation and usage

To install, run the following

go get github.com/autonomoosetech/go-scpi

To use, import as github.com/autonomoosetech/go-scpi like so

import (
	"github.com/autonomoosetech/go-scpi"
)

Example

// create a new TCP client
device, err := scpi.NewClient("tcp", "192.168.0.66:5025", time.Second)
if err != nil {
	fmt.Printf("could not create client: %v", err)
}

// query the device
response, err := device.Query("*IDN?")
if err != nil {
	fmt.Printf("failed to query device identification: %v", err)
}

// show the response
fmt.Printf("got response: %s", response)

Development

This project contains a makefile to aid in automating common tasks. You can run make help or just make to see the possible makefile targets.

Run unit tests

make test

About

Go package to control SCPI devices

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 96.1%
  • Makefile 3.9%