Giter Site home page Giter Site logo

gotmc / prologix Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 78 KB

Go package for the Prologix GPIB controllers

License: MIT License

Go 88.75% Makefile 3.02% Just 8.23%
gpib-ethernet gpib-controllers prologix-controller gpib-device prologix-web test-equipment test-automation gpib usbtmc scpi-commands

prologix's Introduction

prologix

Go package to communicate with either a Prologix GPIB-ETHERNET (GPIB-LAN) controller or a GPIB-USB (HPIB-USB) controller.

GoDoc Go Report Card License Badge

Overview

Prologix offers two GPIB controllers that enable a computer to communicate over GPIB using either an Ethernet or USB interface. Both the GPIB-ETHERNET controller and the GPIB-USB controller can operate either in controller mode or device mode. In controller mode, the GPIB-ETHERNET or GPIB-USB is the Controller-In-Charge (CIC) on the GPIB bus. In device mode, the GPIB-ETHERNET or GPIB-USB acts a GPIB device that is either a talker or a listener.

For more information, please see the User Manual and FAQ for either the GPIB-ETHERNET controller or the GPIB-USB controller.

Status

  • GPIB-USB Direct Driver: Not implemented
  • GPIB Controller Mode: Implemented. Provide an io.ReadWriter from a serial port to use the Prologix GPIB-USB Controller as a Virtual COM Port (VCP) or provide an io.ReadWriter from a network connection to use the Proglogix GPIB-ETHERNET Controller.
  • GPIB Device Mode: Not implemented

IVI Support

The prologix package can be used in conjunction with the ivi package, which is a Go-based implementation of the Interchangeable Virtual Instrument (IVI) standard. The IVI Specifications developed by the IVI Foundation provide standardized APIs for programming test instruments.

The main advantage of using the ivi package is not having to learn the SCPI commands for each individual piece of test equipment. For instance, both the Agilent 33220A function generator and the Stanford Research Systems DS345 function generator can be programmed using one standard API with IVI.

Methods for Communication

The Prologix GPIB controller strips all unescaped LF (\n, ASCII 10), CR (\r, ASCII 13), ESC (ASCII 27), and + (ASCII 43) characters. Therefore, to send binary data including one of those characters, they must be escaped.

  • Read(p []byte) (n int, err error) — Use for reading binary or text data from the instrument or Prologix controller.
  • Write(p []byte) (n int, err error) — Use to send binary data to the instrument. The CR, LF, ESC, and + characters will be automatically escaped.
  • WriteString(s string) (n int, err error — Use to send ASCII data to the instrument or commands to the Prologix controller.
  • Command(format string, a ...interface{}) error — Use to send a SCPI command to the instrument that has no response. A newline character will automatically be appended to the SCPI command sent to the instrument.
  • Query(cmd string) (string, error) — Use to send a SCPI query command to the instrument and receive a string response. A newline character will automatically be appended to the SCPI command sent to the instrument. If the Prologix controller is not in auto read-after-write mode, then a ++read eos will also be sent before reading.

GPIB-USB

The GPIB-USB controller communicates with a computer either directly using the D2XX driver or as a Virtual COM Port (VCP) using the FTDI FT245R driver.

GPIB-USB VCP Driver Installation

The appropriate VCP driver for your operating system can be downloaded from the FTDI VCP Drivers webpage. Alternatively, on macOS you can use Homebrew to install the VCP driver as follows:

$ brew cask install ftdi-vcp-driver

GPIB-USB D2XX Direct Driver Installation

The appropriate D2XX Direct Driver for your operating system can be downloaded from the FTDI D2XX Direct Drivers webpage. Alternatively, on macOS you can use Homebrew to install the D2XX direct driver as follows:

$ brew install libftdi

Contributing

To contribute, please fork the repository, create a feature branch, and then submit a pull request.

License

prologix is released under the MIT license. Please see the LICENSE.txt file for more information.

prologix's People

Contributors

matthewrankin avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.