PROLOGIX_VER
 
 Query the Prologix USB-to-GPIB firmware version. Requires an OPEN_SERIAL block.  Params:    connection : Serial  The open serial connection with the instrument.     Returns:    out : String  The Prologix controller available commands.    
   Python Code
import traceback
from typing import Optional, cast
import serial
from flojoy import DataContainer, SerialConnection, String, flojoy
@flojoy(deps={"pyserial": "3.5"}, inject_connection=True)
def PROLOGIX_VER(
    connection: SerialConnection,
    default: Optional[DataContainer] = None,
) -> String:
    """Query the Prologix USB-to-GPIB firmware version.
    Requires an OPEN_SERIAL block.
    Parameters
    ----------
    connection: Serial
        The open serial connection with the instrument.
    Returns
    -------
    String
        The Prologix controller available commands.
    """
    try:
        # Start serial communication with the instrument
        set = cast(serial.Serial, connection.get_handle())
        if set is None:
            raise ValueError("Serial communication is not open")
        set.write(b"++ver\n")
        s = set.read(1000).decode()
    except Exception:
        s = traceback.format_exc()
    return String(s)
Videos
Control Agilent 34410A multimeter with Flojoy
Example
Having problems with this example app? Join our Discord community and we will help you out!