Is a solution to this problem in progress?

Posts made by cnc65
-
RE: Gcode upload with python and OpenAPI
-
RE: Gcode upload with python and OpenAPI
@T3P3Tony Thank you for your help.
What I have tried so far:- Update RRF to 3.6beta4
- Test CURL commands:
F:\temp>curl http://192.168.2.1/rr_connect?password= {"err":0,"sessionTimeout":8000,"boardType":"duet3mb6hc102","apiLevel":2,"sessionKey":0} F:\temp>curl --data-binary @"test.g" "http://192.168.2.1/rr_upload?name=/gcodes/test.g" {"err":0} F:\temp>
No success with Python so far.
What I dont understand is that the Python function generated from OpenAPI has only one parameter "name". The parameters "time" and "crc32" are optional. But at least two variables are required: source(path_and_filename.gcode) and destination(name) like in CURL.
rr_upload_post
Example
from __future__ import print_function import time import swagger_client from swagger_client.rest import ApiException from pprint import pprint # create an instance of the API class api_instance = swagger_client.DefaultApi() name = 'name_example' # str | Path to the file to upload time = '2013-10-20T19:20:30+01:00' # datetime | ISO8601-like represenation of the time the file was last modified (optional) crc32 = 'crc32_example' # str | CRC32 checksum of the file content as hex string *without* leading `0x`. Usage of this parameter is encouraged (optional) try: # Upload a file api_response = api_instance.rr_upload_post(name, time=time, crc32=crc32) pprint(api_response) except ApiException as e: print("Exception when calling DefaultApi->rr_upload_post: %s\n" % e)
Parameters
Name Type Description Notes name str Path to the file to upload time datetime ISO8601-like represenation of the time the file was last modified [optional] crc32 str CRC32 checksum of the file content as hex string without leading `0x`. Usage of this parameter is encouraged [optional] -
RE: Gcode upload with python and OpenAPI
RepRapFirmware: 3.5.4
OpenAPI yaml: 3.6 and also tested with 3.4 -
Gcode upload with python and OpenAPI
I am trying to write a Python program to control a Duet 3 mainboard 6HC via Ethernet. I am using the OpenAPI definition for standalone mode. Everything works well except for the file upload function.
When I run my test program, I get this error message:
File Path exists: True
Exception when calling DefaultApi->rr_upload_post: (0)
Reason: Cannot prepare a request message for provided arguments. Please check that your arguments match declared content type.Does anyone have any idea what I am doing wrong?
Here is my test program:
#! /usr/bin/python3 # -*- coding: utf-8 -*- """ Duet file upload test """ from __future__ import print_function import os from datetime import datetime import swagger_client from swagger_client.rest import ApiException from pprint import pprint """ create an instance of the API class and connect Duet to fixed host address DUET_HOST """ configuration = swagger_client.Configuration() configuration.host = "http://192.168.2.1" # instance of the API class api_instance = swagger_client.DefaultApi(swagger_client.ApiClient(configuration)) time = datetime.now() try: # new connection and log in duet_response = api_instance.rr_connect_get(password="", time=time) except ApiException as e: print("Exception when calling DefaultApi->rr_connect_get: %s\n" % e) # Upload a file file = "f:/temp/test.g" print("File Path exists: ", os.path.exists(file)) try: duet_response = api_instance.rr_upload_post(file) except ApiException as e: print("Exception when calling DefaultApi->rr_upload_post: %s\n" % e) # Disconnect Duet try: duet_response = api_instance.rr_disconnect_get() # pprint(duet_response) except ApiException as e: print("Exception when calling DefaultApi->rr_disconnect_get: %s\n" % e)
-
RE: OpenAPI definitions
@chrishamm Thank you. That's exactly what I was looking for.
-
OpenAPI definitions
Re: OpenAPI definitions
Will there be an update of the OpenAPI definition for software version 3.5.x? -
RE: VFD spindle drive 0-10V output
In the CNC world 0-10VDC VFD spindle controls are standard. Only a few VFDs accept also a PWM input. Of course that can be solved with an external PWM to analog converter. But I prefer an integrated solution like the Azteeg X5 GT has:
http://www.panucatt.com/azteeg_X5_GT_reprap_3d_printer_controller_p/ax5gt.htm
-
VFD spindle drive 0-10V output
Are there any plans to add a 0-10VDC output to control a VFD spindle drive?
-
RE: Workpiece Coordinate System (WCS)
Thanks for the new RC!
I tried G53 to G56. All is working as expected. -
RE: Workpiece Coordinate System (WCS)
I hope you understand my explanations.
1. e.g. G10 L2 P1 X100 and then G54 G0 X20 -> absolute movement to X120 in machine coordinates (G53 G0 X120). The same result without WCS is to move absolute (G0 X120) or moving the MCS after homing (G92 X-100 and then G0 X20).
2. The offset apply to all tools, when you are using the G54 coordinate system.
-
RE: Workpiece Coordinate System (WCS)
I use often more fixtures to mill the same part. With the WCS I can jump easy from one fixture to the next.
-
RE: Workpiece Coordinate System (WCS)
In my opinion most cnc users would be happy to have 3 or 4 sets of tool offsets.
-
Workpiece Coordinate System (WCS)
I use a Duet WiFi to control a CNC Mill. What I miss is a workpiece coordinate system (G54 - G59).