MasterScan  Lab_Matlab_control Master Branch
List of all members | Private Properties | Methods
opticalSerial Class Reference
Inheritance diagram for opticalSerial:
Inheritance graph
[legend]

Private Properties

Property serialObject = []
 optiCAL handle class for communicating with the optiCAL photometer using the MATLAB "serial" command. More...
 
Property portName = []
 the serial port name
 
Property defaultName = 'tty.USA'
 the default name base
 
Property ack = uint8(6)
 Acknowledge byte.
 
Property baudRate = 9600
 Baud rate for serial.
 
Property dataBits = 8
 Data bits for serial.
 
Property stopBits = 1
 Stop bits for serial.
 
Property timeout = 5
 Timeout for serial queries, in ms.
 
Property productType = 0
 Product type Not used.
 
Property opticalSN = 0
 Optical Serial Number Not used.
 
Property firmwareVersion = 0
 Firmware version Not used.
 
Property vRef = 0
 Reference Voltage (V_ref) in uV Used to compute Luminance/Voltage.
 
Property zCount = 0
 Zero error in ADC counts Used to compute Luminance/Voltage.
 
Property rFeed = 0
 Feedback resistor in ohms Used to compute Luminance/Voltage.
 
Property rGain = 0
 Votage gain resistor in ohms Used to compute Luminance/Voltage.
 
Property probeSN = ''
 Probe Serial Number ASCII 16 characters Not used.
 
Property kCal = 0
 Probe calibration in fA/cd/m^2 Used to compute Luminance/Voltage.
 
Property mode = ''
 mode = 'current' or 'voltage'
 
Property lcDenom
 useful variables for luminance calculation
 
Property values = []
 most recent values
 

Methods

OP opticalSerial (portName)
 Get the optiCAL object open and initialize.
 
 setMode (self, mode)
 set to current or voltage mode
 
 getLuminance (self, numSamples, pauseBetweenSamples)
 get luminance reading
 
 close (self)
 close the serial port
 

Properties and Events

◆ serialObject

Property serialObject = []
private

optiCAL handle class for communicating with the optiCAL photometer using the MATLAB "serial" command.

Assumes the optiCAL device is connected to the computer using a USB-serial converter; e.g., KEYSPAN USA-19HS OptiCAL communicates via a standard RS-232 serial port, using the protocol: 9600 baud rate, no parity, and 1 stop bit If you get an error because the port is still open, try: a = instrfind; fclose(a(**)); % ** is the index of the port you want to close /dev/tty.USA19H62P1.1 the serial port object


The documentation for this class was generated from the following file: