Future Option for Linear Absolute Encoders
-
@joergs5 How to tell the Duet, (Duet3 btw) the actual Position from the ESP Board?
then it would be interesting,
i checked the Information about the HCL Board.. it's simply just a "Standard" for the most common Encodertype that's in Use in the Printers, so for me sadly no way.now i test a little bit around with Variables and Assignments...
i created these 2 in the config.g file:
; Variables
global LastZAxisPosition = 0
global LastUAxisPosition = 0in other Controllers (example ABB, KUKA) they will be updated in the config file if i set an Value,
in the Duet Framework after a Restart it's 0 again (like i wrote the in the config file...) -
@neueklasse said in Future Option for Linear Absolute Encoders:
How to tell the Duet, (Duet3 btw) the actual Position from the ESP Board?
Duet has a very clever concept: it is controlled by G-Code commands completely. Everything from config.g to sliced 3D printing is based on it. So the ESP32 needs to send a G-Code command like a G92 to the Duet, that's it. You only need a connection between ESP and Duet which is supported by both. ESP and Duet support eg SPI, I2C, http, even TCP through WLAN if Duet supports Wifi. If Duet 3 is in the internal network, the ESP32 could send the data through WLAN and router to the Duet 3.
-
-
@neueklasse said in Future Option for Linear Absolute Encoders:
work after a Restart it's 0 again (like i wrote the in the config fil
there was a thread recently how to store global variables:
https://forum.duet3d.com/topic/24880/does-rrf-have-maintenance-counters-timers -
@joergs5 i tested that,
=> config.g = global ZAxisPos = 0
=> i created a "VariableBuffer.g" file in the sys Folder and Inside:
set global ZAxisPos = 0then A Macrofile w.
M28 "0:/sys/VariableBuffer.g"
set global.ZAxisPos = -25
M29After Calling the Macro the Variable inside the VariableBuffer.g file is Updated,
it's also persistent through a Restart.if i set it under the M29 Command in the Macro: G92 Z{global.ZAxisPos}
the Z Value Remains 0so i checked it in the Objekt Model Browser under "global" ... it remains 0.
-
@neueklasse I did not use and test it myself, I only saw the thread. If you have negative results, you could post your try and question in this thread where storing the variable was discussed.
-
the easiest way i think would be over UART, but in my case a PanelDue is connected on IO0,
do i have to Activate the SPI Protocol (M576) to send the Commands via the GPIO Header and
the SPI Pins?
I think the Second UART Port on IO1 is not working right now? -
@neueklasse you don't need something fast or permanent for this task, so I would not waste a dedicated line, but use the Lan connection.*)
*) but there is https://github.com/technik-gegg/SMuFF-Ifc which could be used to be between Duet and Paneldue. But I2C is sensitive, I would prefer Lan.
If I remember correctly, you're using a Raspi with Octoprint also, so using Lan for all communication would be fine and usable for other ideas.
A different direction would be CAN-FD, with a board like Teensy 4 or Sammy-C21, or using the MCP2542FD chips. The Duet 3 is a groving environment with CAN-FD components, enlarging it with a component for encoder would be interesting. But this may require some development of the communication.
-
@neueklasse I've been looking at whether the forthcoming closed loop board could support this type of absolute encoder. It appears to me that it could, with a little extra hardware (possibly on a daughter board) to provide an RS422 interface. We would use BISS C protocol to communicate with the encoder.
-
@dc42 Thanks for the info, that would be great! i'm looking forward to the developments.
BISS C would be perfect (at least in my Case) -
You could make a completely separate board with hardware quadrature counters or biss-c master ic(ic-haus makes them) then just use SPI to talk to them. The master ic supports SSI too.