Comunication COM1: and a CNC milling machine (timeout?)
Malte Brill
malte.brill at t-online.de
Wed Sep 17 06:00:01 EDT 2003
Hi List,
my dad asked me if I could build an app. that stores the Programs of his CNC
milling machine on his Windows PC. I promised him to try it.
The Machine is connected with the computer on com1 and seems to be sending
plain text.
So I walked through the Dictionary and set up the following:
I set the serialControlString to:
baud=300 parity=E data=7 stop=1
(Looking at the old DOS program he has, thats what the machine needs)
I created a button:
on mouseUp
put empty into fld "fehler"
open file "COM1:" for read
put "opened"&cr into fld "log"
read from file "COM1:" until end
put "reading done"&cr after fld "log"
put the result into fld "Fehler"
put it into fld "Ausgabe"
close file "COM1:"
put "closed"&cr after fld "log"
end mouseUp
When I hit the button, it instantly reports EOF in fld "fehler".
How do I tell Revolution to wait until the data is sent by the CNC milling
machine? Can I set a timeout somehow to wait let´s say for about 2 minutes?
Any help is greatly apreciated!
Regards,
Malte
More information about the use-livecode
mailing list