I'm trying to control a Photo Research PR705. I'm able to do most things with Matlab I've written using SerialComm but I often get glitches and would like to try your new IOPort method. I'm using a Keyspan USB-RS232 gizmo to talk to the PR705.
The PR705 is a RS-232 device much like the PR650, but slightly updated (for $30K it's still not USB and doesn't have any memory!)
Currently I initialize with the following:
global g_serialPort
g_serialPort = FindSerialPort;
StdOutString = lower(evalc(['SerialComm(''open'',' int2str(g_serialPort) ',''9600,n,8,1'');']));
% put PR705 into remote mode:
StdOutString = lower(evalc(['SerialComm(''write'',' int2str(g_serialPort) ',''PR705'');']));
I can then talk to the thing with SerialComm...
I tried hacking the new PR655 toolbox file PR655init.m- changing
% Put in Remote Mode --No [CR] after 'PHOTO'
rm = 'PHOTO';
to 'PR705'
and also changing the FindSerialPort argument to 'KeySerial1' but didn't get very far...
I get errors like:
Error in function Write: Usage error
Invalid port handle 2 provided. No such port open. Maybe you closed it beforehand?
??? Error using ==> IOPort
Usage:
[nwritten, when, errmsg, prewritetime, postwritetime, lastchecktime] =
IOPort('Write', handle, data [, blocking=1]);
Error in ==> PR655init at 41
IOPort('write', g_serialPort, rm(i));
When I run the old FindSerialPort it finds the port to be '2'
Anyone ever try to run a PR705 with IOPort? Any ideas?
Thanks,
-Paul (hubel@...)
The PR705 is a RS-232 device much like the PR650, but slightly updated (for $30K it's still not USB and doesn't have any memory!)
Currently I initialize with the following:
global g_serialPort
g_serialPort = FindSerialPort;
StdOutString = lower(evalc(['SerialComm(''open'',' int2str(g_serialPort) ',''9600,n,8,1'');']));
% put PR705 into remote mode:
StdOutString = lower(evalc(['SerialComm(''write'',' int2str(g_serialPort) ',''PR705'');']));
I can then talk to the thing with SerialComm...
I tried hacking the new PR655 toolbox file PR655init.m- changing
% Put in Remote Mode --No [CR] after 'PHOTO'
rm = 'PHOTO';
to 'PR705'
and also changing the FindSerialPort argument to 'KeySerial1' but didn't get very far...
I get errors like:
Error in function Write: Usage error
Invalid port handle 2 provided. No such port open. Maybe you closed it beforehand?
??? Error using ==> IOPort
Usage:
[nwritten, when, errmsg, prewritetime, postwritetime, lastchecktime] =
IOPort('Write', handle, data [, blocking=1]);
Error in ==> PR655init at 41
IOPort('write', g_serialPort, rm(i));
When I run the old FindSerialPort it finds the port to be '2'
Anyone ever try to run a PR705 with IOPort? Any ideas?
Thanks,
-Paul (hubel@...)