Nov-29-2021, 06:20 PM
I communicate with device and receive data with this function:
sometimes I can get broken data and I get "ValueError: could not convert string to float". How can I exclude and discard the given value and get another value?
1 2 3 |
def get_dcv( self ): self .connector.send( 'DCV?' ) return float ( self .connector.receive()) |