get_barcode

Description

Reads barcode, runs as a sequence on the controller until a barcode is found. Cancels if no barcode is found.

Signature

get_barcode(self, wait: bool = True) -> Union[str, CmdToken]

Parameters

wait: bool, optional

If True, this command blocks until measurement is complete.

Returns

float

If wait = True, this command returns the barcode value once one has been successfully read.


CmdToken

A CmdToken object that can be used to follow up on the status of the measurement or wait for it to finish if wait=False. Use tkn.return_value[0] to recover the measurement value after the barcode has been read (i.e., tkn.is_done() == True).