I too have used those HyperCard serial port x-things for many years to talk
to various A/D converters. Now I am switching to using Rev for the same
purposes and I have got it working OK.

I don't know if it matters, but I use upper case for the serialControlString
e.g. BAUD=9600 DATA=1 etc etc.

The other thing I would suggest is to try different forms of the "read"
command. Try reading until return or reading 1 word or something like that
until you at last get something.

One final thought: perhaps when you open & close the port, the data buffer
is cleared. Try opening the port in a separate handler and just leaving it
open. Then have a repeating handler that gets anything that comes in and a
close port handler that you can call when you've finished.

One thing missing from the Rev serial stuff is the equivalent of
sendSPortDone() which allowed you to know when all the data had all been
sent. I found that in Rev I just have to wait before trying to receive the
answer to any commands I send out. My instrumentation only operates at 1200
baud, so data transmission is not fast.

Sarah


> Dear List
> Using good old Hypercard I can send stuff from one mac to another
> using some serial port control xfcns written in 1994.
> 
> When I replace the receiving stack with a runrev stack with the
> following code I get nothing.
> 
> Would someone at runrev (you still owe me a phone call!) or anyone
> give me a hand on this, either through the list or privately.
> 
> Many thanks
> 
> Howard
> Leicester UK
> 
> 
> set the serialcontrolstring to\
> "data=8" &\
> " baud="& the label of btn baudrate of cd 2 of this stack &\
> " parity="&char 1 of the label of btn parity of cd 2 of this stack &\
> " stop="&the label of btn stopbits of cd 2 of this stack
> 
> put the serialcontrolstring
> 
> open file "modem:"
> read from file "modem:" until eof
> put it into temp
> put temp after field "inputfld"
> close file "modem:"
> 

Reply via email to