OAsat / visa_elixir

Use VISA(Virtual Instrument Software Architecture) in Elixir.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ExVisa

This library provides a small set of Elixir functions to communicate with lab instruments via VISA.

Documentation is available here.

Requirements

NI-VISA, Python 3.10 and Poetry are required.

Installation

Add ex_visa to your list of dependencies in mix.exs:

def deps do
  [
    {:ex_visa, "~> 0.2.1"}
  ]
end

Usage

iex(1)> ExVisa.list_resources()
["ASRL1::INSTR", "ASRL3::INSTR", "GPIB0::27::INSTR", "GPIB1::8::INSTR"]
iex(2)> ExVisa.idn("GPIB1::8::INSTR")
"KEITHLEY INSTRUMENTS INC.,MODEL 6221,4559777,D04  /700x \n"
iex(3)> ExVisa.write("GPIB1::8::INSTR", "SOUR:DELT:ARM")
{}
iex(4)> ExVisa.write("GPIB1::8::INSTR", "INIT:IMM")
{}
iex(5)> ExVisa.query("GPIB1::8::INSTR", "SENS:DATA?")
"+9.9E37,+5.248E+01\n"

Internals

Communication to VISA is implemented using Erlport and pyvisa.

About

Use VISA(Virtual Instrument Software Architecture) in Elixir.

License:Apache License 2.0


Languages

Language:Elixir 82.4%Language:Rust 12.1%Language:Python 5.5%