I am trying to write a StreamDevice protocol file for a
Thorlabs SC10 shutter Controller and have struck a problem.
The protocol to obtain eg. “data” is to send the
string “data?”. The device then responds in three steps:
* echoes the request string “data?” followed by a
terminator (CR)
* provides the current value (0 or 1) followed by a
terminator (CR)
* sends back a prompt string“> “ BUT WITH NO
TERMINATOR
I can handle the first two steps:
TERMINATOR=CR
getData {
out “data?”; in “data?”;
in “{0|1}”;
}
How do I best handle parsing the trailing characters of the prompt
string “> “ which is not terminated?
I will be polling the device for multiple pieces of data.
Thanks in advance,
Dr Mark Bennett
Principal Controls Engineer
Australian Synchrotron