Yes in TMCL MSB travels first.
But you still do not explain why there are 8 bytes quoted.
So, your status
is "1 - run
I will clarify myself. My previous message was specifically about command #135
. Not about all commands.
Here is an excerpt from my documentation, which I attach to my own software:
Command #135 "Get application status"
. Returns 4 bytes (MSB,...,LSB).
MSB in Value field of reply is equivalent to "GGP 128,0"
- 0 - stop
- 1 - run
- 2 - step
- 3 - reset
The other 3 bytes return some additional information that will be needed by some future version of the TMCL-IDE software.
I don't remember if it is my own wording, or did I copy it from a private discussion with Trinamic.
Status byte being MSB
rather than LSB
explains why you get an awkward big number from the 4 bytes combined. You need to take just one highest byte
One interesting feature of this command you may use right away. It is not for the future. It is already implemeted:
During an upload
of a TMCL
program, this command returns the address
of next upload in the mentioned 3 redundant bytes. So you have one extra means of verifying the upload, or the absence of it.