No problem, thank you!
Best posts made by btmclain
Latest posts made by btmclain
-
Current Machine Position
Hello, I noticed this old thread and was wondering if anything has changed:
https://forum.duet3d.com/topic/2985/current-position
We are currently doing a long probe move where it would be very beneficial for us to query the machine position. Thank you!
-
RE: Current Machine Position Through Object Model
@dc42 I should clarify that when we use the move.axes[N].machinePosition in Gcode it works well. When using the rr_model with HTTP, it does not seem to have the same functionality.
-
RE: Current Machine Position Through Object Model
@dc42 Hi, thanks for the reply.
Yes we have tried that, unfortunately it only returns the position that the machine is heading. It does not output the current position.
-
Current Machine Position Through Object Model
Hi all,
Does anybody know of a way that we can pull the current machine position through HTTP requests such as rr_model? Currently , if we use rr_model we are only able to see where the machine is going, not where it is located. Right now, we are finding our machine position through M118 telnet messages imbedded within our gcode. If we could do this externally it would be ideal.
thanks in advance!
-
RE: Basic Telnet Connection Help
@dc42 We are using a Duet 3 MB 6HC with the latest firmware, 3.3 I believe? Alan's answer was perfect, it is exactly what I was looking for.
-
RE: Basic Telnet Connection Help
@alankilian That worked! Thank you very much for the help. I will run with it from here
-
RE: Basic Telnet Connection Help
@alankilian so I used the following line to try to connect to the machine:
sock = socket.create_connection((duet_host, 23), timeout=10)
I am getting this response: [WinError 10061] No connection could be made because the target machine actively refused it
Is there a security setting within the duet that is causing this to happen?
-
RE: Basic Telnet Connection Help
@alankilian Hi thanks for the quick reply. To be honest I am not really sure what I am doing.
Yes I am running the python script from my PC.
I was under the impression that the Duet would send a message to the specified port on my pc. I am obviously mistaken. Let me try to connect to a telnet port on the duet and see how that goes.
-
Basic Telnet Connection Help
Hi all,
I am hoping to read basic telnet messages sent through M118. I am running my Duet in standalone mode and it is directly connected to my pc. I am trying to use the socket library in python to listen for messages, but I am not having any luck. My basic config.g file contains the following:
global g = 0 M586 P2 S1 R23 M553 P255.255.255.0 M552 S1 P192.168.2.80
I am using the following macro to try to test the telnet messages:
set global.g = 0 while global.g < 20 M118 P4 S"message" set global.g = global.g + 1 G4 S3
And I am trying to use the following super basic Python script to listen:
import socket import sys sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_address = ('localhost', 23) sock.bind(server_address) sock.listen(1) while True: print(sys.stderr) print('waiting for a connection') connection, client_address = sock.accept()
If anybody could help me out I would definitely appreciate it. Thanks in advance!
-
RE: Quickly Pull Data from Duet3 6HC
Thanks for the reply. I will play around with it!