Minolta light-measuring devices See http://www.konicaminolta.com/instruments
psychopy.hardware.minolta.
LS100
(port, maxAttempts=1)¶A class to define a Minolta LS100 (or LS110?) photometer
You need to connect a LS100 to the serial (RS232) port and when you turn it on press the F key on the device. This will put it into the correct mode to communicate with the serial port.
usage:
from psychopy.hardware import minolta
phot = minolta.LS100(port)
if phot.OK: # then we successfully made a connection
print(phot.getLum())
Parameters: | port: string
|
---|---|
Troubleshooting: | |
Various messages are printed to the log regarding the function of this device, but to see them you need to set the printing of the log to the correct level: from psychopy import logging
logging.console.setLevel(logging.ERROR) # error messages only
logging.console.setLevel(logging.INFO) # more info
logging.console.setLevel(logging.DEBUG) # log all communications
If you’re using a keyspan adapter (at least on OS X) be aware that it needs a driver installed. Otherwise no ports wil be found. Error messages:
|
checkOK
(msg)¶Check that the message from the photometer is OK. If there’s an error show it (printed).
Then return True (OK) or False.
clearMemory
()¶Clear the memory of the device from previous measurements
getLum
()¶Makes a measurement and returns the luminance value
measure
()¶Measure the current luminance and set .lastLum to this value
sendMessage
(message, timeout=5.0)¶Send a command to the photometer and wait an alloted timeout for a response.
setMaxAttempts
(maxAttempts)¶Changes the number of attempts to send a message and read the output. Typically this should be low initially, if you aren’t sure that the device is setup correctly but then, after the first successful reading, set it higher.
setMode
(mode='04')¶Set the mode for measurements. Returns True (success) or False
‘04’ means absolute measurements. ‘08’ = peak ‘09’ = cont
See user manual for other modes