Comunication COM1: and a CNC milling machine (timeout?)

Malte Brill malte.brill at t-online.de
Thu Sep 18 06:11:01 EDT 2003


Hi Dar, Sarah and all,

Developing this stack is a bit complicated, as I need to write it in my
office, compile it and then test it in the company of my father.
I got the manual of the machine today but have not found any useful hints on
communication with a PC.

Quoting Dar:

>For a quick test, add a second delay before the read.
I´ll try that. The Problem might be that the Stack needs to wait until one
hits the save button on the machine to receive the data. So the time span
might be different each time the machine sends its data.

>Also, for your testing you might want to replace numToChar(13) with
>"<cr>" and numToChar(10) with "<lf>" to make sure you understand what
>data you are really getting.

Thanks for the tip.

>I suspect what Malte is running against is that the mill had no time to
>respond.  A short delay might provide some or all of the response.

That´s what I guess too.

Quoting Sarah:
>You might want to try out my Serial test stack - available from my web
>page at
><http://www.troz.net/Rev/>
>I have just updated it so that it allows you to select termination
>characters i.e. whether sends should end with CR (ASCII 13), LF (ASCII
>10) or CRLF and the same for receives.
>I think it will solve your reading problem, because it doesn't do a
>single read, but reads continuously as long as the port is open,
>reporting whenever it gets any data.
That´s an interesting approach.
I had a look at your stack, but couldn´t test it with the mill yet, as I
disturb the production process every time I try testing the stack and they
are really busy today.
When I would use the method of testing if there is data sent, how would I
know that the transmission is done?
Could I try "listening" to the port until data is sent and then read until
EOF? Or would I need to write a stop handler to terminate reading when no
more data is sent? 
>One other thought: you probably
>have to send a command to the milling machine first, to tell it to send
>it's data and which data to send.
I don´t hope so. The documentation on the mill is very bad. They only speak
of backing up to tapes or use their software for DOS, written by a company
that has vanished in mid 90s.

Dar:
>I wish you the best.  Would you be willing to let us know how this
>works out?

Thanks a lot. :-)
I will have to do further testing on reading and I hope I am courages enough
to send the data back to the mill, once I have read the data. I hope I don´t
kill that thing somehow...
I´ll keep you posted anyway...

Regards,

Malte





More information about the use-livecode mailing list