Replies: 3 comments
-
Hi there! It's not currently exposed in a direct manner, but it should be relatively straightforward to do, with a few points of note: The If that sounds reasonable it's just a 1-line change to instruct it to also capture the position, in "steps" which you can then convert based on steps/mm and microstep resolutions. (I wouldn't necessarly recommend capturing the raw floating-point positions, as there is some hackery to mash that into a uint32 and back again for use with the integer-based IRQ system.) Alternately, the OpenGL helper class (MK3SGL.cpp) has all of these values come to a single location since it needs to know them to draw the 3D models - so this is potentially another place where some code could be added to dump data to a file. Yet another possible approach is the "PLY export" format. The original intent of this was to be able to capture/dump simulated prints from the 3D view for future reference - however, I would think it could easily be repurposed - if there is constant positive extrusion on the E-axis (assuming you only care about XYZ), it will continue logging positions into the polygon data to be dumped. Can I maybe have a little more detail about what you're trying to do/the reason you'd like this data? Perhaps then I can suggest which is more suitable. Also, what is your programming skill level? (Just so I can craft my response more accordingly). Cheers, |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response!
I'm looking to run gcode and look for printhead/print collisions.
I'm a decent programmer but haven't slung much C++ in a while, so depending
on "how C++" this project is, I may have some more questions :)
…On Tue, Jul 19, 2022 at 6:48 PM vintagepc ***@***.***> wrote:
Hi there!
It's not currently exposed in a direct manner, but it should be relatively
straightforward to do, with a few points of note:
The Trace system (-t on the command line) is able to capture IRQ values
and dump them to a .VCD file. Many of the stepper functions (step/dir) as
you note are already captured; the gotcha is this runs at a fixed sampling
frequency rather than capturing every change - so if per-step accuracy is
what you are looking for it may not be quite what you are looking for.
(this frequency can be changed though)
If that sounds reasonable it's just a 1-line change to instruct it to also
capture the position, in "steps" which you can then convert based on
steps/mm and microstep resolutions. (I wouldn't necessarly recommend
capturing the raw floating-point positions, as there is some hackery to
mash that into a uint32 and back again for use with the integer-based IRQ
system.)
Alternately, the OpenGL helper class (MK3SGL.cpp) has all of these values
come to a single location since it needs to know them to draw the 3D models
- so this is potentially another place where some code could be added to
dump data to a file.
Yet another possible approach is the "PLY export" format. The original
intent of this was to be able to capture/dump simulated prints from the 3D
view for future reference - however, I would think it could easily be
repurposed - if there is constant positive extrusion on the E-axis
(assuming you only care about XYZ), it will continue logging positions into
the polygon data to be dumped.
Can I maybe have a little more detail about what you're trying to do/the
reason you'd like this data? Perhaps then I can suggest which is more
suitable.
Also, what is your programming skill level? (Just so I can craft my
response more accordingly).
Cheers,
~Vintage
—
Reply to this email directly, view it on GitHub
<#366 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAIWYOQVFWABVUJIXXK3NTVU45F7ANCNFSM54BULAQA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Ah, nice. That's probably on a slow enough scale that the trace system is sufficient. This: MK404/parts/components/TMC2130.cpp Line 313 in edb79ce
to the end of the list. You'll know if it worked if you see it show up in Tip: Traces don't start automatically to reduce spam. Logging is started/stopped with either the Hope that helps - and don't hesitate to ask if you need further help! |
Beta Was this translation helpful? Give feedback.
-
Hi!
This is awesome. Could I use this to get a list of coordinates of the extruder tip? Would I have to watch the step/dir pins per axis, or is this already calculated?
Beta Was this translation helpful? Give feedback.
All reactions