Mesa 7i92 .bit file
- 10K
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 124
- Thank you received: 31
14 Jan 2016 04:44 - 14 Jan 2016 13:35 #68348
by 10K
Mesa 7i92 .bit file was created by 10K
I have a Mesa 7i92 board. It's plugged into a generic breakout board.
I ran the command
sudo /usr/bin/mesaflash --device 7i92 --addr 192.168.1.121 --readhmid
to see how it was configured. The initial pinout won't work. I need a new .bit file for my board. I looked around, but could not find anything about how to make a custom file. Here's what I need:
Pin#FunctionDir
1 PWM out
2 X Step out
3 X Dir out
4 Y Step out
5 Y Dir out
6 Z Step out
7 Z Dir out
8 A Step out
9 A Dir out
14 Enable out
16 spare in
17 Relay out
10 eStop in
11 Probe in
12 X Limit/Home in
13 Y Limit/Home in
15 Z Limit/Home in
Could someone point me in the right direction, or possibly generate the file for me?
Thanks.
I ran the command
sudo /usr/bin/mesaflash --device 7i92 --addr 192.168.1.121 --readhmid
to see how it was configured. The initial pinout won't work. I need a new .bit file for my board. I looked around, but could not find anything about how to make a custom file. Here's what I need:
Pin#FunctionDir
1 PWM out
2 X Step out
3 X Dir out
4 Y Step out
5 Y Dir out
6 Z Step out
7 Z Dir out
8 A Step out
9 A Dir out
14 Enable out
16 spare in
17 Relay out
10 eStop in
11 Probe in
12 X Limit/Home in
13 Y Limit/Home in
15 Z Limit/Home in
Could someone point me in the right direction, or possibly generate the file for me?
Thanks.
Last edit: 14 Jan 2016 13:35 by 10K. Reason: Added pin 14 function
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
14 Jan 2016 11:50 - 14 Jan 2016 11:51 #68353
by andypugh
Replied by andypugh on topic Mesa 7i92 .bit file
You don't need any special functions on pins 10-17, as those will be GPIO functions and you can turn any pin into GPIO by inhibiting tha appropriate function.
The DMMBOB firmware is very close, except that the steps and dir are the wrong way round. Is there any scope for re-wiring? (you said it was a generic BoB)
Are you needing a PWM on pin 1, or a charge-pump? If it is a charge pump (and if 500Hz is enough) then the G540 firmware can be used. with a software charge-pump connected to Pin 1. In some ways this is prefereable as it requires both LiniuxCNC HAL and the FPGA to be working properly for a valid charge-pump signal to be output.
The DMMBOB firmware is very close, except that the steps and dir are the wrong way round. Is there any scope for re-wiring? (you said it was a generic BoB)
Are you needing a PWM on pin 1, or a charge-pump? If it is a charge pump (and if 500Hz is enough) then the G540 firmware can be used. with a software charge-pump connected to Pin 1. In some ways this is prefereable as it requires both LiniuxCNC HAL and the FPGA to be working properly for a valid charge-pump signal to be output.
Last edit: 14 Jan 2016 11:51 by andypugh.
Please Log in or Create an account to join the conversation.
- 10K
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 124
- Thank you received: 31
14 Jan 2016 13:31 #68365
by 10K
Replied by 10K on topic Mesa 7i92 .bit file
Thanks for the quick reply.
I saw the DMMBOB file in the zip file I got from Mesa, but didn't know what it did. Thanks for the link.
Yes, I could rewire, but I'd prefer not to. The board is stenciled with the functions on those pinouts. I've used JST-XH modular connectors for each of the axes. They're soldered to DB-9 connectors. I could resolder them differently, but I always seem to melt stuff I didn't want to on the second go-around.
Regarding the PWM, I have no current use for it, so if it does not work, that's OK. If I ever need to control a VFD, I'd likely do it with a 0-10V signal anyway.
In summary, it will take some time to change the wiring around, and I'll have to remember that the labels are not correct. If it'll take hours to make a new .bit file, then it'll probably be better off to move the hardware. I don't know what's involved in making a .bit file, so I'm unable to make the best decision here!
I saw the DMMBOB file in the zip file I got from Mesa, but didn't know what it did. Thanks for the link.
Yes, I could rewire, but I'd prefer not to. The board is stenciled with the functions on those pinouts. I've used JST-XH modular connectors for each of the axes. They're soldered to DB-9 connectors. I could resolder them differently, but I always seem to melt stuff I didn't want to on the second go-around.
Regarding the PWM, I have no current use for it, so if it does not work, that's OK. If I ever need to control a VFD, I'd likely do it with a 0-10V signal anyway.
In summary, it will take some time to change the wiring around, and I'll have to remember that the labels are not correct. If it'll take hours to make a new .bit file, then it'll probably be better off to move the hardware. I don't know what's involved in making a .bit file, so I'm unable to make the best decision here!
Please Log in or Create an account to join the conversation.
- 10K
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 124
- Thank you received: 31
14 Jan 2016 13:34 #68366
by 10K
Replied by 10K on topic Mesa 7i92 .bit file
I was looking over the pinout in my original post, and realized I neglected to put the function for pin 14. It's the Stepper Enable output.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
14 Jan 2016 13:41 #68367
by andypugh
Replied by andypugh on topic Mesa 7i92 .bit file
Stepper enable is another GPIO function, so it looks like your best bet is a G540 firmware.
7i92_G540x2D.bit is in the download from Mesa
7i92_G540x2D.bit is in the download from Mesa
Please Log in or Create an account to join the conversation.
- 10K
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 124
- Thank you received: 31
14 Jan 2016 13:58 #68370
by 10K
Replied by 10K on topic Mesa 7i92 .bit file
OK. Is there any way to see what the pinout on this .bit file is, other than installing it on the board and running the --readhmid command? I looked in the hostmot2-firmware.git / tree, and did not see it.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
14 Jan 2016 14:08 #68371
by andypugh
Replied by andypugh on topic Mesa 7i92 .bit file
I linked to the vhd file in my first message, and the pinout is listed towards the bottom.
I think there is a way to do it with mesaflash, but I am not on a LinuxCNC machine at the moment. "man mesaflash" might elucidate.
Bear in mind that if you set num_stepgens to 2 then all pins associated with stepgens 0,1 will appear, but stepgens 2,3 etc will not appear and their outputs are available as general-purpose IO pins. For example you probably want num_encoders to be 0.
I think there is a way to do it with mesaflash, but I am not on a LinuxCNC machine at the moment. "man mesaflash" might elucidate.
Bear in mind that if you set num_stepgens to 2 then all pins associated with stepgens 0,1 will appear, but stepgens 2,3 etc will not appear and their outputs are available as general-purpose IO pins. For example you probably want num_encoders to be 0.
Please Log in or Create an account to join the conversation.
- 10K
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 124
- Thank you received: 31
14 Jan 2016 17:09 #68395
by 10K
Replied by 10K on topic Mesa 7i92 .bit file
OK, I see what you're saying. The G540 is really close to my BOB. Here's the comparison with a revised mapping:
Pin G540 my BOB
1 GPIO eStop
2 X Step X Step
3 X Dir X Dir
4 Y Step Y Step
5 Y Dir Y Dir
6 Z Step Z Step
7 Z Dir Z Dir
8 A Step A Step
9 A Dir A Dir
10 Quad A Quad A
11 Quad B Quad B
12 Quad Idx Quad Idx
13 GPIO X Limit
14 PWM Enable
15 GPIO Y Limit
16 Charge Pump Z Limit
17 GPIO Relay
I've got one question. Is pin 14, the PWM, something special, or can I use it as a GPIO for the Enable signal? This particular pin is hardwired in the breakout board to each of the JST-XH modular connectors.
I also realized that I forgot to include the lathe spindle encoder in the list. But I can easily rewire pins 10-17, so I can just shuffle things around as shown.
Pin G540 my BOB
1 GPIO eStop
2 X Step X Step
3 X Dir X Dir
4 Y Step Y Step
5 Y Dir Y Dir
6 Z Step Z Step
7 Z Dir Z Dir
8 A Step A Step
9 A Dir A Dir
10 Quad A Quad A
11 Quad B Quad B
12 Quad Idx Quad Idx
13 GPIO X Limit
14 PWM Enable
15 GPIO Y Limit
16 Charge Pump Z Limit
17 GPIO Relay
I've got one question. Is pin 14, the PWM, something special, or can I use it as a GPIO for the Enable signal? This particular pin is hardwired in the breakout board to each of the JST-XH modular connectors.
I also realized that I forgot to include the lathe spindle encoder in the list. But I can easily rewire pins 10-17, so I can just shuffle things around as shown.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23559
- Thank you received: 4858
14 Jan 2016 17:29 #68397
by andypugh
If you set num_pwmgen to zero then it will become a GPIO pin.
Replied by andypugh on topic Mesa 7i92 .bit file
I've got one question. Is pin 14, the PWM, something special, or can I use it as a GPIO for the Enable signal?
If you set num_pwmgen to zero then it will become a GPIO pin.
The following user(s) said Thank You: 10K
Please Log in or Create an account to join the conversation.
- 10K
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 124
- Thank you received: 31
14 Jan 2016 21:42 #68408
by 10K
Replied by 10K on topic Mesa 7i92 .bit file
I have the configuration flashed and verified on the 7i92.
The next step is to modify the (machine).hal and (machine).ini files. I generated the initial version of both files using the Stepconf Wizard. I realize that I can't use the Wizard to make the files I really need, or to edit them in the future.
I downloaded the 7i92step.zip file, and it contains two example configuration files. Based on that, I modified the .ini file as follows:
[HOSTMOT2]
DRIVER=hm2_eth board_ip="192.168.1.121"
BOARD=7i92
CONFIG="num_stepgens=4 num_encoders=3 num_pwmgen=0"
I then started work on the .hal file. I added these lines at the beginning:
loadrt trivkins (not sure if I actually need this line)
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt hostmot2
loadrt [HOSTMOT2][DRIVER] config=[HOSTMOT2][CONFIG]
setp hm2_[HOSTMOT2][BOARD].0.watchdog.timeout_na 25000000
If I understand this correctly, I need three files in my /usr/lib/linuxcnc/modules directory to make this work:
hostmot2.so
hm2_eth.so
hm2_7i92.so
I'm missing the third file. Is there somewhere that I can get this file, or do I need to create it from a file on the 7i92.zip download?
The next step is to modify the (machine).hal and (machine).ini files. I generated the initial version of both files using the Stepconf Wizard. I realize that I can't use the Wizard to make the files I really need, or to edit them in the future.
I downloaded the 7i92step.zip file, and it contains two example configuration files. Based on that, I modified the .ini file as follows:
[HOSTMOT2]
DRIVER=hm2_eth board_ip="192.168.1.121"
BOARD=7i92
CONFIG="num_stepgens=4 num_encoders=3 num_pwmgen=0"
I then started work on the .hal file. I added these lines at the beginning:
loadrt trivkins (not sure if I actually need this line)
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt hostmot2
loadrt [HOSTMOT2][DRIVER] config=[HOSTMOT2][CONFIG]
setp hm2_[HOSTMOT2][BOARD].0.watchdog.timeout_na 25000000
If I understand this correctly, I need three files in my /usr/lib/linuxcnc/modules directory to make this work:
hostmot2.so
hm2_eth.so
hm2_7i92.so
I'm missing the third file. Is there somewhere that I can get this file, or do I need to create it from a file on the 7i92.zip download?
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.081 seconds