How to configure TCP/IP

125 views
Skip to first unread message

Nom Dinet

unread,
Nov 2, 2020, 10:03:23 AM11/2/20
to OpenPnP
Dear All,
Can somebody please point me to the documentation regarding TCP/IP configuration.

Regards
NOM

Bill Ruckman

unread,
Nov 2, 2020, 11:26:55 AM11/2/20
to ope...@googlegroups.com
The configuration is very simple.  Just select TCP instead of Serial as the communication method for the driver and set the IP address.

image.png

--
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/c914cd85-2c7e-4b8a-b1b6-99d504256015n%40googlegroups.com.

Marek T.

unread,
Nov 2, 2020, 11:43:43 AM11/2/20
to OpenPnP
Note you need a bit "special" tcpip cable if you want connect Smoothieboard to the PC directly, not typical like you use for PC<->Router connecting.
And that generally, in case of Smoothieboard, it works few times slower than over the serial port.

Clemens Koller

unread,
Nov 2, 2020, 3:48:02 PM11/2/20
to ope...@googlegroups.com
Hi!

On 02/11/2020 17.43, Marek T. wrote:
> Note you need a bit "special" tcpip cable if you want connect Smoothieboard to the PC directly, not typical like you use for PC<->Router connecting.
> And that generally, in case of Smoothieboard, it works few times slower than over the serial port.

Is there documentation regarding the "special TCP/IP" cable? I didn't find anything useful [1].
And is it correct to conclude that this TCP/IP connection in the OpenPnP Driver is a special thing only supposed to work with a Smoothieboard?

I was considering to configure this TCP/IP thing to remote-control a different host in the other room which has a TinyQ connected to it's USB/CDC serial port... for a moment.
This is not going to work yet from within OpenPnP, correct?

[1] http://smoothieware.org/network

Regards,

Clemens
--
> --
> 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 <mailto:openpnp+u...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/a4f36a67-4a5b-4ce9-bc1c-7963f9dd01c1o%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/a4f36a67-4a5b-4ce9-bc1c-7963f9dd01c1o%40googlegroups.com?utm_medium=email&utm_source=footer>.

bert shivaan

unread,
Nov 2, 2020, 4:01:00 PM11/2/20
to OpenPnP
I think the special cable is just to reverse the wires on the other end, like a null modem cable.

I don't think it is for smoothie, just that is what lots of folks here are using so the speed warning.

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/f39a18a6-7428-eabb-e50e-0116238251c9%40gmx.net.

ma...@makr.zone

unread,
Nov 2, 2020, 4:03:52 PM11/2/20
to ope...@googlegroups.com

Hi Clemens

What Marek T. meant is when you directly connect the PC to the controller, you probably need a crossover cable.

https://en.wikipedia.org/wiki/Ethernet_crossover_cable

However, if you connect the Smoothie via a hub/switch to another room, this should not  be necessary.

An no, this should not be Smoothie specific. Any controller or host exposing or relaying a socket should work. I'm not an expert but I guess most of the time this goes as "telnet":

https://en.wikipedia.org/wiki/Telnet

_Mark

Marek Twarowski

unread,
Nov 2, 2020, 4:18:29 PM11/2/20
to ope...@googlegroups.com
Sorry that I've been not so precise as Mark but I thought it's quite obvious...
As Mark said, there are two types of tcpip cables, typical-cable when you go with any device through the router, switch etc, or crossover-cable when you establish the direct connection like Smoothieboard need.

And rather forget it if you don't have to use tcpip connection with Smoothie, it's really really not acceptable slow.

You received this message because you are subscribed to a topic in the Google Groups "OpenPnP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/Cft56ML_6Dw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/93ec36c4-c5f8-71ce-950e-e31cdf7c9da7%40makr.zone.

Clemens Koller

unread,
Nov 2, 2020, 5:21:12 PM11/2/20
to ope...@googlegroups.com
Thanks!

The good old crossover cables as we used when we ran out of the ports on our 10MBit hub. :-)

It would be interesting if OpenPnP could operate transparently over IP abstracting above (not below?) the driver level.
But nowadays, USB can be "forwarded" via IP [1], so this might not be necessary.

(Side note: Because of been there, done that: It could be a major safety issue to control moving/dangerous machines remotely...)

Regards,

Clemens

http://usbip.sourceforge.net/
--

On 02/11/2020 22.03, ma...@makr.zone wrote:
> Hi Clemens
>
> What Marek T. meant is when you directly connect the PC to the controller, you probably need a crossover cable.
>
> https://en.wikipedia.org/wiki/Ethernet_crossover_cable
>
> However, if you connect the Smoothie via a hub/switch to another room, this should not  be necessary.
>
> An *no*, this should not be Smoothie specific. Any controller or host exposing or relaying a socket should work. I'm not an expert but I guess most of the time this goes as "telnet":
> To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/93ec36c4-c5f8-71ce-950e-e31cdf7c9da7%40makr.zone <https://groups.google.com/d/msgid/openpnp/93ec36c4-c5f8-71ce-950e-e31cdf7c9da7%40makr.zone?utm_medium=email&utm_source=footer>.

Nom Dinet

unread,
Nov 2, 2020, 8:07:42 PM11/2/20
to OpenPnP
Dear All,

Many thanks for you replies.  I failed to see the X and + in the tree of the Reference Machine.

I am very new to OpenPnP  and am only just starting down the road.

Regards
Nom

Marius Liebenberg

unread,
Nov 3, 2020, 5:49:27 AM11/3/20
to OpenPnP
@Marek, is TCPIP with Smoothie only slow through a router or is it always slow? 

Marek Twarowski

unread,
Nov 3, 2020, 5:56:20 AM11/3/20
to ope...@googlegroups.com
Hi Marius,
I've tried directly only, so through the router is rather the same slow. It's kind of Smoothie issue not Openpnp. There was a discussion of Jason with @Wolfman to improve it but finished with conclusion that nothing is possible to improve.


You received this message because you are subscribed to a topic in the Google Groups "OpenPnP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/Cft56ML_6Dw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.

ma...@makr.zone

unread,
Nov 3, 2020, 6:10:17 AM11/3/20
to ope...@googlegroups.com

Hi Marius

See the discussion Jason had here:

https://groups.google.com/d/msg/openpnp/boXGRCA-REI/29es5F6QGAAJ

The new GcodeAsyncDriver and the Advanced Motion Planner in the OpenPnP 2.0 testing version will probably help a bit, as they will no longer wait for individual commands to be confirmed unless it is really necessary (e.g. before taking a picture with the camera). But OpenPnP still needs to wait for the controller quite a lot of times, so the effect of this might be limited.

https://github.com/openpnp/openpnp/wiki/Motion-Planner#motion-path-planning

Still, I would be very interested for somebody to test this and document the difference. Supporting slow connections is one of the reasons I made the whole thing. ;-)

_Mark

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/5939ccfc-6c2b-4145-af26-c1c784de5791n%40googlegroups.com.

Marek T.

unread,
Nov 3, 2020, 6:47:18 AM11/3/20
to OpenPnP
Hi Mark,

I didn't follow your updates of testing versions too carefully (not that I think it's not amazing job, just 2.0 is generally not for me with the actual issues pending to be fixed), but now you said something sounding dangeorus if I'd like to use it.
"as they will no longer wait for individual commands"
I use following operation: send the gcode to the driver to check whether the nozzle is really raised up (my hardware controller is waiting for proper Z-position sensor feedback and response OK to the driver when the head is really phisically up) then Openpnp may send some motion code to perform some XY move. You must know why I do it, I don't believe in any SafeZ not confirmed with the real position reading.
So, in agree with what you said, it would not work for me anymore? In my case this hardware controller is separated controller not the same as for the motions responsible - if it is important.
To unsubscribe from this group and stop receiving emails from it, send an email to ope...@googlegroups.com.

ma...@makr.zone

unread,
Nov 3, 2020, 7:32:09 AM11/3/20
to ope...@googlegroups.com

Hi Marek

First of all, if you are reading a value from a controller (Z height) for instance through an Actuator read, OpenPnP will always wait for that response to match the ACTUATOR_READ_REGEX or similar, no matter what.  So I'm not sure this is even relevant. 

Even if you don't read a value and you just want to wait for an "ok" it is not a problem.

You can still use the GcodeDriver instead of the GcodeAsyncDriver. Everything should work as before. After you upgrade it will be left as a GcodeDriver. Conversion is only done, if you really want to. You can just press Dismiss and it will leave it alone:

Even with the GcodeAsyncDriver each driver/controller can be configured differently:

https://github.com/openpnp/openpnp/wiki/GcodeAsyncDriver#advanced-settings

With the Confirmation Flow Control option you will get a similar behavior when OpenPnP is waiting for completion. If your check is done through an Actuator, this will work.

Btw. I ported the MarekNozzle to the new system. But I don't see the Z check in there. How do you do it?

New:
https://github.com/openpnp/openpnp/blob/test/src/main/java/org/openpnp/machine/marek/MarekNozzle.java

Old:
https://github.com/openpnp/openpnp/blob/develop/src/main/java/org/openpnp/machine/marek/MarekNozzle.java

Note that much of the old code is now unnecessary, because I cleaned the system up. Double.NaN hacks gone, no need to compare locations to avoid unnecessary moves etc., all that is now done by the motion planner or the base class.

_Mark

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/e4ce9372-0f9c-4da2-b0bd-b24695173c93o%40googlegroups.com.

Marek T.

unread,
Nov 3, 2020, 8:05:24 AM11/3/20
to OpenPnP
Hi Mark,

I'm waiting for <ok>.
The controller boards is nonstop checking the status of the input connected to the opto-sensor (mounted on the head to  "monitor" the nozzle position), in every 10ms or so so. States Low or High, not any regex to read.
When I send the gcode H101.1 (don't remember now an exact code, it is just some my code not typical for any system) it means "is Nozzle1 up?". Controller checks this and if see the "nozzle is down" - does nothing but check it after 10ms again and again until get the state telling that nozzle is in upper position - then send <OK> to Openpnp and it may perform soem xy motion. Or Openpnp will throw communication error if must wait too long (the driver settings delay I have 2sec moreless).

MarekNozzle has nothing to this. This is to controll my Z-motions. I have pneumatically controlled nozzles and need an actuator for this. Giving output state Low or High to turn on/off valve driving the pneumatic head.
MarekNozzle associates this actuator to the Openpno driver, to "automatically" set actuator on/off when some Z value is exceeded (above or below). So when I jog ArrowDown and exceed -2 an actuator is set on and my nozzle goes down, when I jog back above -2 - actuator is set off and nozzle goes up. Of course, the same control works for the Openpnp when it automatically (not manually) controls the nozzle during pick and place. I only must rememebr to have board location Z-2.

Also when Openpnp commands moveToSafeZ the nozzle goes up. So if you ask me about the section:
@Override
    public void moveToSafeZ(double speed) throws Exception {
        Logger.debug("{}.moveToSafeZ({})", getName(), speed);
        Length safeZ = this.safeZ.convertToUnits(getLocation().getUnits());
        Location l = new Location(getLocation().getUnits(), Double.NaN, Double.NaN,
                safeZ.getValue(), Double.NaN);
        moveTo(l);                                     
    }
I'm not sure how it will work since you have removed Nan double.

Marek T.

unread,
Nov 3, 2020, 8:13:47 AM11/3/20
to OpenPnP
BTW: a reason why I use my controller board for Nozzles position reading - it's the only reason I've described above. This is something that I coudn't create in Smoothieboard modules so made it on separate board.
I have there following command working:
- H101.x - is specified nozzle Up?
- H102.x - is specified nozzle Down?
- H101.0 - are every nozzles Up?
- H102.0 - are every nozzles Down?
If I had it working in Smoothie I wouldn't need my board at all. I thought to modify Smoothie and add it to there, but it's too complicated for me.
I never had an idea to ask you to do something like this (with Smoothie) because I understand that it is not something commonly used and you have more important things to do...

ma...@makr.zone

unread,
Nov 3, 2020, 8:27:46 AM11/3/20
to ope...@googlegroups.com

> When I send the gcode H101.1

From where exactly do you send it?

> I'm not sure how it will work since you have removed Nan double.

It is done inside toHeadLocation().

And all the moveToSafeZ() stuff is now done in the base class.

_Mark

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/e90d7059-238c-49b2-b3e5-01383e4205c7o%40googlegroups.com.

Marek T.

unread,
Nov 3, 2020, 8:53:58 AM11/3/20
to OpenPnP
From Openpnp :-) :-). Ok, from the Move_To_Command in the driver.
My controller is the Main and Smoothie is the Sub-Driver. So it goes first and then the motion command to Smoothieboard.

Clear about SafeZ.

greg.hj...@gmail.com

unread,
Nov 3, 2020, 9:01:50 AM11/3/20
to OpenPnP
I just converted my machine from a cohesion board (smoothie) to a duet3d.  I'm experimenting with IP cameras so one of the reasons I liked the duet is that it supports tcp/ip.  I was hoping to have a hub on the machine and thus end up with just one ethernet cable to communicate with everything on the machine.   I've heard tcp/ip was slow on smoothie so I had hoped it would be better with Duet3d but it is noticeably slower or has more latency than when I connect to the duet board using a usb cable.  This doesn't really make sense to me since tcp/ip should be quite fast.  Does anyone know why these boards seem to have very slow behavior when using tcp/ip?  For example jogging the machine repeatedly ends up with significant pauses between each move.

Marek Twarowski

unread,
Nov 3, 2020, 9:37:16 AM11/3/20
to ope...@googlegroups.com

You received this message because you are subscribed to a topic in the Google Groups "OpenPnP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openpnp/Cft56ML_6Dw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/3c238b36-8779-4708-8a0f-4f34ae423157n%40googlegroups.com.

ma...@makr.zone

unread,
Nov 3, 2020, 9:39:52 AM11/3/20
to ope...@googlegroups.com

> My controller is the Main and Smoothie is the Sub-Driver. So it goes first and then the motion command to Smoothieboard.

Hacks like these are among the very few things that are no longer supported. Only a controller with an axis mapped to it will be taken into consideration in a MOVE_TO_COMMAND. The other controllers can't define MOVE_TO_COMMANDs anymore.

We could replace it with a new hack, but I think this should be solved properly. But not in this  "TCP/IP" thread.

I'll open a new one.

_Mark

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/68488f51-918f-4934-9509-b84e009aaeedo%40googlegroups.com.

Marek T.

unread,
Nov 3, 2020, 9:48:56 AM11/3/20
to OpenPnP
Good idea...
Reply all
Reply to author
Forward
0 new messages