Hello,
For checking gamma calibration, I'd like to display stimuli in PTB and
then read back the measurements of a photometer (Minolta LS-100).
Matlab's serial command only works in Java Virtual Machine mode, and of
course for PTB you need the -nojvm switch. I've searched the message
boards, and found that there is a function psychserial, which I assume
is designed to get round this. However, I'm not sure how to use it, and
I gather there is/was some problem with it on Windows.
Typing "psychserial", I get the following advice
just provided information about the data from the photometer
nonsense or an empty string; it did not contain the photometer reading.
If anyone is using psychserial successfully under Windows, I'd be
grateful if you could show me how it's done!
Thanks in advance,
Jenny
(using revision 363, beta version 1.0.6 on Windows XP).
--
Jenny Read Office: +44 191 222 7559
Royal Society University Research Fellow Mobile: +44 794 401 5796
Henry Wellcome Building for Neuroecology, Fax: +44 191 222 5622
University of Newcastle, Framlington Place mailto:J.C.A.Read@...
Newcastle upon Tyne, NE2 4HH, UK. http://www.staff.ncl.ac.uk/j.c.a.read
For checking gamma calibration, I'd like to display stimuli in PTB and
then read back the measurements of a photometer (Minolta LS-100).
Matlab's serial command only works in Java Virtual Machine mode, and of
course for PTB you need the -nojvm switch. I've searched the message
boards, and found that there is a function psychserial, which I assume
is designed to get round this. However, I'm not sure how to use it, and
I gather there is/was some problem with it on Windows.
Typing "psychserial", I get the following advice
> Usage:What should I put for inputDriverName and outputDriverName? In Matlab, I
> % Open and close serial ports:
> port=SERIAL('Open',inputDriverName,outputDriverName,baudRate)
> SERIAL('Close',port)
> SERIAL('Write',port,string)
> string = SERIAL('Read',port)
just provided information about the data from the photometer
> port = serial('COM1', 'BaudRate',but I don't know what psychserial is looking for here. I tried
> 4800,'databits',7,'parity','even','stopbits',2,'terminator','CR/LF','FlowControl','hardware');
> port=psychserial('Open','COM1','',4800)and this didn't give me any errors, but unfortunately strg was either
> psychserial('Write',port,'MES'); % you have to write MES before taking
> a reading on my photometer, for some reason
> strg = psychserial('Read',port)
> psychserial('Close',port)
nonsense or an empty string; it did not contain the photometer reading.
If anyone is using psychserial successfully under Windows, I'd be
grateful if you could show me how it's done!
Thanks in advance,
Jenny
(using revision 363, beta version 1.0.6 on Windows XP).
--
Jenny Read Office: +44 191 222 7559
Royal Society University Research Fellow Mobile: +44 794 401 5796
Henry Wellcome Building for Neuroecology, Fax: +44 191 222 5622
University of Newcastle, Framlington Place mailto:J.C.A.Read@...
Newcastle upon Tyne, NE2 4HH, UK. http://www.staff.ncl.ac.uk/j.c.a.read