Starting over
I realize I could get my existing hardware working after I do endless edits and hammer the forum with questions while you teach me esoteric HAL programming but I'd rather swim with rather than against the tide.
How are you enjoying the journey upstream?
It just occurred to me that we haven't really done much to prove that it is easy. But I am hoping that you are at least enjoying the process?
See it as like skid-pan training. It's not an easy way to drive a car, but you learn a lot about the car.
Please Log in or Create an account to join the conversation.
- blacksmith
- Offline
- New Member
- Posts: 19
- Thank you received: 0
If this is for a G540 I would set the steplength on all axis to 2500 minimum (1000 will not work reliably)
If the axis are swapped that suggests that you are not using the proper FPGA configuration
It is a 540 and I guess the readhmid file above doesn't reference that I uploaded the 5i25_g540x2.bit file. I'll try those steplength values.
Please Log in or Create an account to join the conversation.
- blacksmith
- Offline
- New Member
- Posts: 19
- Thank you received: 0
How are you enjoying the journey upstream?
It just occurred to me that we haven't really done much to prove that it is easy. But I am hoping that you are at least enjoying the process?
See it as like skid-pan training. It's not an easy way to drive a car, but you learn a lot about the car.
I watched a guy drive a new shiny red Lotus a little too far under a guard rail shattering the front windscreen into smithereens. His rage at his ineptness was close to seismic - I'm not quite there yet.
Please Log in or Create an account to join the conversation.
- Patrick Obrien
- Offline
- Junior Member
- Posts: 32
- Thank you received: 0
sudo mesaflash --device 5i25 --write 5i25_g540x2.bit
sudo mesaflash --device 5i25 --reload
The enclosure is the mesaflash reflash - no issues there, I just enclosed it for illustration - assuming there is not a version issue.
On steplength, 2500 does change a few things; "X" moves the Y axis, "Y" moves Z and "Z" moves X2 (aka A). This is a G540 so miswiring the drivers is almost idiot proof.
Please Log in or Create an account to join the conversation.
The G540 FPGA config is straight forward (stepgens 0,1,2,3 map into G540 axis X,Y,Z,A)
Please Log in or Create an account to join the conversation.
- Patrick Obrien
- Offline
- Junior Member
- Posts: 32
- Thank you received: 0
Right, so the errors are in the hal axis --> stepgen mapping
The G540 FPGA config is straight forward (stepgens 0,1,2,3 map into G540 axis X,Y,Z,A)
How can I verify I have the correct 5i25_g540x2.bit file?
cksum 5i25_g540x2.bit
3087903293 340704 5i25_g540x2.bit
sum 5i25_g540x2.bit
17348 333
Please Log in or Create an account to join the conversation.
( and your mesaflash readhmid listing shows the expected G540 compatible pinout )
As I said, the joint mapping error is in the HAL file
Please Log in or Create an account to join the conversation.
- Patrick Obrien
- Offline
- Junior Member
- Posts: 32
- Thank you received: 0
As I said, the joint mapping error is in the HAL file
Thanks for that. I assumed since PNCCONF generated the file it was correct.
I did a simple test, I generated a XYZ config using PNCCONF and the axis work, X moves X ,etc. This tells me you are correct, the hal is off - it looks like a PNCCONF bug but probably a newbie snafu,
I did a diff of the two files, the XXYZ and the XYZ.
Using the XXYZ fundamentally shift the stepgen's. See the diff output enclosed.
Here is a sample:
setp hm2_5i25.0.stepgen.02.dirsetup [AXIS_1]DIRSETUP | setp hm2_5i25.0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
Please Log in or Create an account to join the conversation.
Normally a XYZ config to maps like this
X => 0
Y => 1
Z => 2
And I would expect a XXYZ config to map like this
Xa => 0
Xb => 1
Y => 2
Z => 3
but of course the mapping of axis to stepgens is arbitrary but the created hal file
should match what you select in pncconf
Please Log in or Create an account to join the conversation.
- Patrick Obrien
- Offline
- Junior Member
- Posts: 32
- Thank you received: 0
And I would expect a XXYZ config to map like this
Xa => 0
Xb => 1
Y => 2
Z => 3
Ok if that is the case (Y and Z shift one plus) then the HAL is correct. Ok more digging.
Please Log in or Create an account to join the conversation.