RETURN_ERRORS_33510B
Download Flojoy Studio to try this app
Return error messages from a supported function generator. Error retrival is first-in-first-out (FIFO). Returning errors clears them
from the instruments queue.
Requires a CONNECTION_33510B node at the start of the app to connect with
the instrument. The VISA address will then be listed under 'connection'.
This node should also work with compatible Keysight 33XXX wavefunction
generators (although they are untested). Params: connection : VisaConnection The VISA address (requires the CONNECTION_MDO3XXX node). Returns: out : DataContainer String: Returns all errors in the WFG memory.
Python Code
from flojoy import flojoy, DataContainer, String, VisaConnection
from typing import Optional
@flojoy(inject_connection=True)
def RETURN_ERRORS_33510B(
connection: VisaConnection,
default: Optional[DataContainer] = None,
) -> String:
"""Return error messages from a supported function generator.
Error retrival is first-in-first-out (FIFO). Returning errors clears them
from the instruments queue.
Requires a CONNECTION_33510B node at the start of the app to connect with
the instrument. The VISA address will then be listed under 'connection'.
This node should also work with compatible Keysight 33XXX wavefunction
generators (although they are untested).
Parameters
----------
connection: VisaConnection
The VISA address (requires the CONNECTION_MDO3XXX node).
Returns
-------
DataContainer
String: Returns all errors in the WFG memory.
"""
ks = connection.get_handle()
err_code, err_message = ks.error()
errors = f"{err_code} {err_message}"
return String(s=errors)
Example App
Having problems with this example app? Join our Discord community and we will help you out!
In this example, we return errors that the Keysight 33510B has generated.
We must first add the CONNECTION_33510B
node. This will create the connection to the instrument at the beginning of the app. To allow this we must set the VISA address
for this (and all subsequent 33510B
nodes). If the address does not appear in the parameters you may have to press REFRESH
in the HARDWARE MANAGER
tab.
We add the RETURN_ERRORS_33510B
node as well as the TEXT_VIEW
node to view the summary of the error.
In this case 0 No error
is returned, but in the case of an actual error, the specific error will appear.