OS9: PsychSerial('Params')

We are working with PsychSerial to read in bytes originating from a pc and
read into a G4 through a Keyspan Pro SX serial card.

We are having problems changing the port parameters using the command:
oldparams == psychserial('Params', port, params);

Any changes made to the params structure get reverted immediately to the defaults (see
output below).

Any thoughts as to why we can't change these parameters?

-Emily

»params==PsychSerial('Params', portA)

params =
hardwareReset: []
baudRate: 9600
dataBits: 8
stopBits: 1
parity: 'none'
RTS: []
DTR: []
inDTREnable: []
outCTSEnable: []
inXEnable: []
outXEnable: []

»params.outCTSEnable==1

params =
hardwareReset: []
baudRate: 9600
dataBits: 8
stopBits: 1
parity: 'none'
RTS: []
DTR: []
inDTREnable: []
outCTSEnable: 1
inXEnable: []
outXEnable: []

»params2==PsychSerial('Params', portA,params)

params2 =
hardwareReset: []
baudRate: 9600
dataBits: 8
stopBits: 1
parity: 'none'
RTS: []
DTR: []
inDTREnable: []
outCTSEnable: []
inXEnable: []
outXEnable: []
Hi Emmy,

Psychtoolbox functions which both return and set values generally
return the previous setting, not the new setting.

Call PsychSerial a second time and you should get back what you expect.

best,

Allen




On Feb 10, 2005, at 3:10 PM, Emmy Grossman wrote:

>
>
> We are working with PsychSerial to read in bytes originating from a pc
> and
> read into a G4 through a Keyspan Pro SX serial card.
>
> We are having problems changing the port parameters using the command:
> oldparams == psychserial('Params', port, params);
>
> Any changes made to the params structure get reverted immediately to
> the defaults (see
> output below).
>
> Any thoughts as to why we can't change these parameters?
>
> -Emily
>
> »params==PsychSerial('Params', portA)
>
> params =
> hardwareReset: []
> baudRate: 9600
> dataBits: 8
> stopBits: 1
> parity: 'none'
> RTS: []
> DTR: []
> inDTREnable: []
> outCTSEnable: []
> inXEnable: []
> outXEnable: []
>
> »params.outCTSEnable==1
>
> params =
> hardwareReset: []
> baudRate: 9600
> dataBits: 8
> stopBits: 1
> parity: 'none'
> RTS: []
> DTR: []
> inDTREnable: []
> outCTSEnable: 1
> inXEnable: []
> outXEnable: []
>
> »params2==PsychSerial('Params', portA,params)
>
> params2 =
> hardwareReset: []
> baudRate: 9600
> dataBits: 8
> stopBits: 1
> parity: 'none'
> RTS: []
> DTR: []
> inDTREnable: []
> outCTSEnable: []
> inXEnable: []
> outXEnable: []
>
>
>
>
>
>
>
>
>
>
> Post your message to: psychtoolbox@yahoogroups.com
> Please indicate OS9, OSX, or WIN version, and include your full name.
> Denis Pelli, David Brainard, and Allen Ingling.
> http://psychtoolbox.org
>
> Yahoo! Groups Links
>
>
>
>
>
>
>