G-commands thrue ethernet

146 views
Skip to first unread message

rune veddegjerde

unread,
Feb 2, 2019, 9:47:52 AM2/2/19
to Pocket NC
Is it possible to send G commands directly thrue ethernet?
 I want to use my own software to run the G-code.

Tokyo Pav

unread,
Feb 3, 2019, 5:54:02 PM2/3/19
to Pocket NC
Hi Rune
I’d say possible but probably not a simple task.
Here is a sample video of somebody controlling their pocketnc via different interface.
https://youtu.be/q12Qrdgq10k
Regards
TP

ke...@pocketnc.com

unread,
Feb 4, 2019, 1:36:02 PM2/4/19
to Pocket NC
Hi Rune,

You can send G code through ethernet. The process to do that currently is unsupported, it's a bit clunky. You'll need to go into the V2 interface Config > Version > Host IP address and change that IP address to the network that controls the IP address, which you can find in your DHCP table. If you put that IP address in, you should be able to upload G code over ethernet.

Thanks,
Kerry

rune veddegjerde

unread,
Feb 6, 2019, 3:10:55 AM2/6/19
to Pocket NC
Hi Kerry thanks for your reply,

I'm not sure what you think Is this a description of how to run the pocketnc web interface on the an other PC in the network?
I'm looking for an opportunity to send commands from another application. I need the pocketNC to collaborate with an other machine/Software. Is there a way to send MDI commands to the LinuxCNC server.

Thanks,
Rune

jo...@pocketnc.com

unread,
Feb 6, 2019, 2:06:40 PM2/6/19
to Pocket NC
Hi Rune,

It is possible to communicate with the Pocket NC over ethernet. By default, your Pocket NC will request an IP address over DHCP when the ethernet port is connected and you can then connect to your Pocket NC using that IP address. In the Conf > Network tab you would then have to change the Host IP Address to the DHCP-assigned IP address. If you get that working, then your Pocket NC is on the network properly.

To interface another application with the Pocket NC, you'll need to connect over WebSockets like the UI does. This is not yet an officially supported workflow, but you can find some documentation on how to communicate over WebSockets on your Pocket NC. You can go to Conf > Server and click the Launch In New Window button. In the new window, click the Server Doc tab for the documentation. When connected to your Pocket NC over USB this address will get you there: http://192.168.7.2:8000/LinuxCNCWebServerDoc.html

Keep in mind that communication with the Pocket NC is not encrypted and anyone on the network will be able see your messages to and from the Pocket NC when doing this. You are responsible for securing your own network.

-John

rune veddegjerde

unread,
Feb 11, 2019, 3:55:26 AM2/11/19
to Pocket NC
Hi John,

I am strugling with the Wbsocket, I am able to connect to the webserver but get {"code": "?User not logged in", "data": "?User not logged in", "id": "my-id"} reply when I send  { "id": "my-id", "command":"get", "name":"actual_position" }. Please advice

Thanks
Rune

jo...@pocketnc.com

unread,
Feb 11, 2019, 9:56:02 AM2/11/19
to Pocket NC
You must first send the login command:

{ "id":"Login", "user":user, "password":pw }

default is both the username and password initially.

rune veddegjerde

unread,
Feb 12, 2019, 1:24:42 PM2/12/19
to Pocket NC
Thanks John,

That was what i needed.
Now everything works perfeckt and thank you for great support.

Br
Rune

peeters...@gmail.com

unread,
Apr 29, 2019, 5:22:18 AM4/29/19
to Pocket NC
Is it possible to have the documentation here (the one that should be in http://192.168.7.2:8000/LinuxCNCWebServerDoc.html)?

I'm in charge of pre-evaluation on the software side, our setup will request collaboration between the pocketNC and other equipements.

Is there an access to the e-stop on hardware point a view in order to trigger it with an real emergency button? Do it have digital input or output that can be set/reset?

jo...@pocketnc.com

unread,
Apr 29, 2019, 12:21:01 PM4/29/19
to Pocket NC
Unfortunately, the documentation isn’t served from any convenient location except for on the Pocket NC itself. The source code, though, is located here: https://github.com/PocketNC/Rockhopper/blob/master/templates/LinuxCNCWebServerDoc.html

The E-Stop signal pin isn’t conveniently exposed in an official way, but you could potentially tie into the Beaglebone Black’s P8.10 pin to trigger an E-Stop (short it to ground momentarily to toggle it on and off).
Reply all
Reply to author
Forward
0 new messages