Hi Bruce,
Two thoughts:
Sending all these settings on each connect, is some sort of
tradition with TinyG, that I (had to) embrace(d), when creating
Issues & Solutions. But I don't think it is actually a good
idea, especially for $ex. This should be done externally, once,
and the settings script kept around separately, as a file. Like
for other controllers. The CONNECT_COMMAND should only do
transient stuff.
_Mark
--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/f6eacf50-f990-498f-8473-9263733a311an%40googlegroups.com.
Hi Bruce,
> Using CoolTerm I cannot get a properly formed $ex command to fail.
Try setting CoolTerm to different flow control settings explicitly, and then retry your experiment. Does this work?
If yes, there may be some additional auto-dicovery-flow-control "magic" in there, that is reasonable for such a terminal program to have. But it is beyond the job description of OpenPnP. Configuring flow-control on your controller side is not OpenPnP's business, is it? 😉
> if you accept the Issues & Solutions recommendation to
use XON/XOFF flow control, from then on the driver always sends "$ex=1"
regardless of the value of "flow-control" attribute
No, the two are not coupled. It just sends whatever is in the
CONNECT_COMMAND (or wherever you have it), blindly. You
have to accept both the G-code and the Flow control suggestion of
Issues & Solutions for it to correspond.
> The above $ex=1,5000 is NOT in the CONNECT_COMMAND.
Well, then have a look at the ENABLE_COMMAND, but that would be
[twice] wrong. Btw. that ",5000" part is the milliseconds timeout
argument inside OpenPnP, it won't appear as such in the command,
nor will it be sent to the controller, so just look for $ex=1
> I suggest that the following protocol ..
I doubt this will help, we would have to disconnect after that command and then reconnect using the changed driver flow control. But like I said, this is not OpenPnP's business (and it would be useless and slow to repeat on each connect, if the setting was already correct before).
Just set $ex=1 once using CoolTerm and then remove it from any command in OpenPnP.
Learning from this discussion, I will remove $ex=1 from being proposed for fresh TinyG configurations, it will only be proposed to replace any pre-existing (wrong) $ex=0 or $ex=2 commands.
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/d6e54793-92dc-49bc-95f4-e46dc340364fn%40googlegroups.com.
> I saw no change in TinyG's behavior regardless of the CoolTerm Flow Control settings.
Possible explanation: You're never hitting a flow control
situation (where the TinyG read or write buffer is full) in the
first place. Whereas in OpenPnP this will likely happen, if you
have the typical TinyG "let's set a gazillion of options at once"
CONNECT_COMMAND. So it's no wonder CoolTerm will keep... erm ...
cool.
Or there is some secret "magic" as I said before.
I would not spend more time pondering that. We need to get
OpenPnP running not analyze CoolTerm.
> What could explain the spurious $ex=1 being emitted?
I just searched
the whole of OpenPnP and there is no $ex except where I
described.
Something is "haunted", please send the machine.xml
and a full log at TRACE level.
👻
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/b0ef3014-6376-4286-93b6-d802ac66b3a9n%40googlegroups.com.
> Given this new information, I now suspect that the
CONNECT_COMMAND 's from both GcodeDriver and GcodeAsyncDriver
are being sent to the TinyG controller.
You mean they were configured on the same serial port? Yeah, that
could explain all kinds of strange behavior, also depends on the
OS where it fails, I guess.
If you don't use the second controller (yet) you need to either
delete it or you can use this trick:
This enables a virtual/simulated GcodeServer inside OpenPnP, this time a true 👻 in the box!
_Mark
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/2b66e746-e0a8-46a5-97d2-e421d8af698bn%40googlegroups.com.