Endorphin.Core


SCPI

Namespace: Endorphin.Core

Functions for working with SCPI commands and instruments.

Nested types and modules

TypeDescription
Error

A SCPI error returned from a machine. Negative error codes are defined in the SCPI specification, while positive ones are device-dependant.

IScpiFormatable

Types which interface IScpiFormatable implement a member ToScpiString () which is analogous to obj.ToString (), but specifically for the SCPI interface, since the two strings may well be different.

IScpiInstrument

An instrument capable of receiving and acting on SCPI commands.

Identity

The identity structure returned from a SCPI instrument in response to the "*IDN?" query.

InstrumentErrorException

There were errors in the error queue after calling a SCPI.Checked function.

InvalidResponseException

The machine returned an invalid response to a query.

ModuleDescription
Checked

IO SCPI functions which check the error queue afterwards and raise an exception if any were found.

Key

Keys for use with SCPI commands.

Query

Functions for querying SCPI instruments, expecting an asynchronus response.

Set

Functions for writing "set" commands to SCPI instruments with no expected responses, e.g., "*RST".

String

Functions for building SCPI commands into ASCII byte arrays for sending to machines.

Functions and values

Function or valueDescription
datablock data
Signature: data:byte [] -> byte []

Convert a block of data into the SCPI datablock format by prepending the datablock character, the number of digits in the length and the length.

format value
Signature: value:obj -> string

Convert an object to a string using its IScpiFormatable interface if it implements it, or its System.Object.ToString () method if not.

logCheckedCommand logger command
Signature: logger:ILog -> command:Async<unit> -> Async<unit>

Helper for consistent logging of errors thrown by Scpi commands by instruments

logCheckedQuery logger query
Signature: logger:ILog -> query:Async<'T> -> Async<'T>
Type parameters: 'T

Helper for consistent logging of errors thrown by Scpi queries by instruments

Fork me on GitHub