Mesa 7i96 and Gecko G540
- dubstar_04
- Topic Author
- Offline
- New Member
- Posts: 7
- Thank you received: 0
I have a Mesa 7i96 and a G540 and I was hoping that someone could give me a little help.
I flashed the 7i96_g540dpl.bit to the board that seems ok and reports the correct pins for the P1 connector.
I then used the 7i96 configuration tool from here: github.com/jethornton/7i96 to generate the attached .hal and .ini files.
At this point I plugged the g540 in and powered the machine and the spindle and coolant pump both enabled.
1. How do the input and output options from the 7i96 config get written to the hal file?
2. should the 'hm2_[HOSTMOT2](BOARD)' entries in the hal file be 'hm2_7i96'?
Thanks,
Dan
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17875
- Thank you received: 4778
this was not done. I don't know if the config utility has the ability to use I/O on
the expansion connector, but for example setting up the coolant would be
something like this:
setp hm2_[HOSTMOT2](BOARD).0.gpio.034 is_output true
net coolant_on iocontrol.0.coolant-flood hm2_[HOSTMOT2](BOARD).0.gpio.034.out
2. You can use hm2_7i96, but the hal file is setup to retrieve the card name from
the ini file to make the hal file more card agnostic
Please Log in or Create an account to join the conversation.
- dubstar_04
- Topic Author
- Offline
- New Member
- Posts: 7
- Thank you received: 0
Is there any way to control the default state of the pins?
As soon as I power the machine on the outputs are enabled making the spindle and coolant turn on.
Edit: Nevermind, the manual states:
After power-up or system reset and before the the FPGA is configured, the pull-upresistors will pull all I/O signals to a high level. If the FPGA is used for motion control orcontrolling devices that could present a hazard when enabled, external circuitry should bedesigned so that this initial state (high) results in a safe condition.
Thanks,
Dan
Please Log in or Create an account to join the conversation.
- dubstar_04
- Topic Author
- Offline
- New Member
- Posts: 7
- Thank you received: 0
loadrt charge_pump
addf charge-pump servo-thread
setp hm2_7i96.0.gpio.039.is_output true
net charge-pump => hm2_7i96.0.gpio.039.out
net estop-out => charge-pump.enable
should this enable the charge pump once the estop is released in linuxcnc?
Thanks,
Dan
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17875
- Thank you received: 4778
on the 7I96, instead, there is a step generator assigned the G540s charge pump pin.
To use this as a charge pump, this stepgen must be enabled and setup properly
If you are using the 7i96_g540dpl firmware the charge-pump stepgen is #8, and the
setup is like this:
# set stepgen 8 into velocity mode
setp hm2_[HOSTMOT2](BOARD).0.stepgen.08.control-type 1
# set frequency to 10 Khz
setp hm2_[HOSTMOT2](BOARD).0.stepgen.08.velocity-cmd 10000
# set output mode to quadrature (this will give a square wave output)
setp hm2_[HOSTMOT2](BOARD).0.stepgen.08.output mode 2
and then connect the stepgen enable to the desired control signal:
net machine-on hm2_[HOSTMOT2](BOARD).0.stepgen.08.enable
You will have to enable 9 stepgens in the driver command line to access stepgen 8
Please Log in or Create an account to join the conversation.
- dubstar_04
- Topic Author
- Offline
- New Member
- Posts: 7
- Thank you received: 0
Thats working thanks!
Dan
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
- Posts: 17875
- Thank you received: 4778
I had assumed that the default step settings were reasonable so omitted setting them
but it appears they are set to the maximum possible values so steplength and stepspace
must also be set to be able to generate 10 KHz:
# set step length and step space short enough that they do not limit the frequency
setp hm2_[HOSTMOT2](BOARD).0.stepgen.08.steplen 100
setp hm2_[HOSTMOT2](BOARD).0.stepgen.08.stepspace 100
Please Log in or Create an account to join the conversation.