#instrument #usb #usbtmc

bin+lib rust-usbtmc

USBTMC driver for controlling instruments over USB

1 unstable release

0.1.2 Apr 30, 2021
0.1.1 Apr 30, 2021

#5 in #usbtmc

MIT/Apache

12KB
257 lines

Rust USBTMC

Exemplo de uso

use rust_usbtmc::instrument::Instrument;

const VID: u16 = 0x0699; // Vendor
const PID: u16 = 0x0368; // Product

fn main() {
    let mut instr = Instrument::new(VID, PID);

    // Command Osciloscope
    instr.write("SELECT:CH1 1").unwrap();
    println!("Ask: {}", instr.ask("*IDN?").unwrap());
}

Dependencies

~1.5MB
~33K SLoC