Replies: 2 comments 2 replies
-
I think that the easiest way to do this is to query the pendant HTTP API. Here is a search where you'll find information on how to get started: |
Beta Was this translation helpful? Give feedback.
2 replies
-
Eg:
curl -H "Content-Type: application/json" -X POST -d
"{\"commands\":\"G20G90G53G0Z0;G53G0X0Y0\"}"
http://192.168.7.85:8080/api/v1/machine/sendGcode
Also a handy one-liner:
FOR /F "delims=" %%A IN ('xidel.exe
http://192.168.7.196:8080/api/v1/status/getStatus -e
"rowCount:=($json).rowCount" -e
"completedRowCount:=($json).completedRowCount" -e
"remainingRowCount:=($json).remainingRowCount" -e
"sendDuration:=($json).sendDuration" -e
"sendRemainingDuration:=($json).sendRemainingDuration" -e
"workCoordX:=round(($json).workCoord.x,2)" -e
"workCoordY:=round(($json).workCoord.y,2)" -e
"workCoordZ:=round(($json).workCoord.z,2)" -e "state:=($json).state" -e
"fileName:=($json).fileName" --output-format=cmd') DO %%A
…-Chris
On Sat, Nov 12, 2022 at 2:48 AM Joacim Breiler ***@***.***> wrote:
I think that you would be better of by just query the API instead of
scraping the web page: curl -v -X GET
http://localhost:8080/api/v1/status/getStatus
The frequency for status updates is limited by the controller. UGS is
polling the status by default every 200ms, there is a setting for making it
more frequent. However, GRBL recommends a max status update frequency of
5-10Hz:
https://github.com/gnea/grbl/wiki/Grbl-v1.1-Interface#status-reporting
—
Reply to this email directly, view it on GitHub
<#2040 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKYAC2SRVIDPFNU42QUMWRDWH5YWNANCNFSM6AAAAAARY3PZSY>
.
You are receiving this because you are subscribed to this thread.Message
ID: <winder/Universal-G-Code-Sender/repo-discussions/2040/comments/4122981
@github.com>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We need a dump of controller state (workCoord machineCoord) with their respective timestamps. Could the community suggest a right way to tweak the existing code or if this functionality already exists in the current build (I couldn't find it in the GUI).
I have installed Jdk-8.
I could compile Universal-G-Code-Sender-2.0.9.
I'm using apache-maven-3.8.6-bin & OpenJDK13U-jdk_x64_windows_hotspot_13.0.1_9 for compiling
Thanks for any help.
Beta Was this translation helpful? Give feedback.
All reactions