Printout of self.port_properties not working

Hi.

The SweepMe Wiki mentions the option to print all accessible port properties by using

print(self.port_properties)

see here: Port manager - SweepMe! Wiki

but this returns just an empty string as of 1.5.7.6. This does not necessarity needs to be fixed but can somebody supply a complete list of all properties? Not just the “most wanted” listed in the Wiki.

Christian

1 Like

Hi Cristian,

the Wiki was not correct and is fixed now:

Using just

print(self.port_properties)

prints out the dictionary as defined in the driver. If no keys are added yet, it should be an empty dictionary as defined here

Using

print(self.port.port_properties)

results in the dictionary attached to the port object where all relavant properties are saved.

The object self.port as used in the driver to write and read commands is defined in pysweepme.Ports

https://github.com/SweepMe/pysweepme/blob/main/src/pysweepme/Ports.py

Let us know if it still does not work.

Best, Axel

1 Like

Ah, thanks Axel. I should have thought of that on my own as I already used the port.port properties before. But it still didn’t occur to me on first sight.

I’ll try it out and report back.

1 Like

Works as expected:

'type': 'GPIB'
'active': True
'open': True
'clear': True
'Name': None
'NrDevices': 0
'debug': False
'ID': 'GPIB0::24::INSTR'
'VID': None
'PID': None
'RegID': None
'Manufacturer': None
'Product': None
'Description': None
'identification': None
'query': None
'Exception': True
'EOL': '\n'
'EOLwrite': None
'EOLread': None
'timeout': 10
'delay': 0.05
'rstrip': True
'baudrate': 9600
'bytesize': 8
'parity': 'N'
'stopbits': 1
'xonxoff': False
'rtscts': False
'dsrdtr': False
'rts': True
'dtr': True
'raw_write': False
'raw_read': False
'encoding': 'latin-1'
'GPIB_EOLwrite': None
'GPIB_EOLread': None
'TCPIP_EOLwrite': None
'TCPIP_EOLread': None
'SOCKET_EOLwrite': None
'SOCKET_EOLread': None

2 Likes

Thanks, looks as expected :slight_smile: