Hello,
I'm trying to get an interface working using the CMUBox function. We are using a new fiber optic button response box from PST (model number on the response box is PST-100759 http://www.pstnet.com/hardware.cfm?ID=91). The 'GetEvent' does not wait for a button press, but returns immediately which is not what I was expecting. I've changed the port settings under device manager to disable FIFO buffers. I've also tried with FIFO buffers enabled and also without the 'norelease=1' option. We are not using this device (http://www.pstnet.com/hardware.cfm?ID=102) which may be what the code is programmed to use. It is connected over the serial port, and the OS is Windows XP.
I've tried forpserial-0 (with and without norelease set, which will wait, but does not return when I hit a button on the response box (which is the same as hitting a button on the glove).
I would really appreciate if anyone (Mario?) can offer any hints on how to get this working (please respond to nickjon@... if possible). Thank you for your time and expertise in helping me.
Here is my test code:
h = CMUBox('Open', 'pst', 'COM1', 'norelease=1');
status = CMUBox('Status', h);
disp(status);
evt = CMUBox('GetEvent', h, 1);
disp(evt);
CMUBox('Close', h);
Here is the output:
CMUBox: Using PST serial response button box!
IOPort-Info: Configuration for device COM1:
IOPort-Info: Current baud rate is 19200
IOPort-Info: Baud rate changed to 19200
IOPort-Info: Configuration for device COM1:
IOPort-Info: Current baud rate is 19200
IOPort-Info: Baud rate changed to 19200
IOPort-Info: Configuration for device COM1:
IOPort-Info: Current baud rate is 19200
IOPort-Info: Baud rate changed to 19200
IOPort-Info: Configuration for device COM1:
IOPort-Info: Current baud rate is 19200
IOPort-Info: Baud rate changed to 19200
useBitwhacker: 0
Streaming: 0
type: 3
ftdiusbserialtype: 0
norelease: 1
portName: 'COM1'
port: 0
dt: 0.0012
oldState: 128
baseTime: 2.6674e+006
olderr: ''
oldTime: 2.6674e+006
tTrouble: 0
CMUBox: GetEvent: Timestamp trouble!! Delta 1.344484 msecs, ScanInterval 0.013000 msecs.
CMUBox: GetEvent: Timestamp trouble!! Delta 0.012741 msecs, ScanInterval 0.012000 msecs.
CMUBox: GetEvent: Timestamp trouble!! Delta 0.012666 msecs, ScanInterval 0.012000 msecs.
time: 2.6674e+006
streamTime: 0
state: 128
trouble: 1
deltaScan: 1.2000e-005
IOPort-Info: Configuration for device COM1:
IOPort-Info: Current baud rate is 19200
IOPort-Info: Baud rate changed to 19200
I'm trying to get an interface working using the CMUBox function. We are using a new fiber optic button response box from PST (model number on the response box is PST-100759 http://www.pstnet.com/hardware.cfm?ID=91). The 'GetEvent' does not wait for a button press, but returns immediately which is not what I was expecting. I've changed the port settings under device manager to disable FIFO buffers. I've also tried with FIFO buffers enabled and also without the 'norelease=1' option. We are not using this device (http://www.pstnet.com/hardware.cfm?ID=102) which may be what the code is programmed to use. It is connected over the serial port, and the OS is Windows XP.
I've tried forpserial-0 (with and without norelease set, which will wait, but does not return when I hit a button on the response box (which is the same as hitting a button on the glove).
I would really appreciate if anyone (Mario?) can offer any hints on how to get this working (please respond to nickjon@... if possible). Thank you for your time and expertise in helping me.
Here is my test code:
h = CMUBox('Open', 'pst', 'COM1', 'norelease=1');
status = CMUBox('Status', h);
disp(status);
evt = CMUBox('GetEvent', h, 1);
disp(evt);
CMUBox('Close', h);
Here is the output:
CMUBox: Using PST serial response button box!
IOPort-Info: Configuration for device COM1:
IOPort-Info: Current baud rate is 19200
IOPort-Info: Baud rate changed to 19200
IOPort-Info: Configuration for device COM1:
IOPort-Info: Current baud rate is 19200
IOPort-Info: Baud rate changed to 19200
IOPort-Info: Configuration for device COM1:
IOPort-Info: Current baud rate is 19200
IOPort-Info: Baud rate changed to 19200
IOPort-Info: Configuration for device COM1:
IOPort-Info: Current baud rate is 19200
IOPort-Info: Baud rate changed to 19200
useBitwhacker: 0
Streaming: 0
type: 3
ftdiusbserialtype: 0
norelease: 1
portName: 'COM1'
port: 0
dt: 0.0012
oldState: 128
baseTime: 2.6674e+006
olderr: ''
oldTime: 2.6674e+006
tTrouble: 0
CMUBox: GetEvent: Timestamp trouble!! Delta 1.344484 msecs, ScanInterval 0.013000 msecs.
CMUBox: GetEvent: Timestamp trouble!! Delta 0.012741 msecs, ScanInterval 0.012000 msecs.
CMUBox: GetEvent: Timestamp trouble!! Delta 0.012666 msecs, ScanInterval 0.012000 msecs.
time: 2.6674e+006
streamTime: 0
state: 128
trouble: 1
deltaScan: 1.2000e-005
IOPort-Info: Configuration for device COM1:
IOPort-Info: Current baud rate is 19200
IOPort-Info: Baud rate changed to 19200