Mesa 7i96 and Gecko G540

More
11 May 2020 20:49 - 12 May 2020 07:47 #167421 by dubstar_04
I am in the process of swapping my controller from Mach4 to LinuxCNC.

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
Attachments:
Last edit: 12 May 2020 07:47 by dubstar_04.

Please Log in or Create an account to join the conversation.

More
11 May 2020 22:51 - 11 May 2020 22:51 #167431 by PCW
Replied by PCW on topic Mesa 7i96 and Gecko G540
1. AFAIK JT's config utility creates a separate hal file for I/O not sure why
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
Last edit: 11 May 2020 22:51 by PCW.
The following user(s) said Thank You: dubstar_04

Please Log in or Create an account to join the conversation.

More
12 May 2020 06:41 - 12 May 2020 07:43 #167469 by dubstar_04
Replied by dubstar_04 on topic Mesa 7i96 and Gecko G540
Thank you for the reply.

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
Last edit: 12 May 2020 07:43 by dubstar_04.

Please Log in or Create an account to join the conversation.

More
12 May 2020 07:44 - 12 May 2020 08:46 #167476 by dubstar_04
Replied by dubstar_04 on topic Mesa 7i96 and Gecko G540
Do I need to do anything special to enable the chargepump pin (IO39) once the machine is enabled in linuxcnc?

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
Last edit: 12 May 2020 08:46 by dubstar_04.

Please Log in or Create an account to join the conversation.

More
12 May 2020 14:03 - 12 May 2020 14:04 #167525 by PCW
Replied by PCW on topic Mesa 7i96 and Gecko G540
The G540 needs a 10 KHz charge-pump signal so you cannot generate it in software
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
Last edit: 12 May 2020 14:04 by PCW.
The following user(s) said Thank You: dubstar_04

Please Log in or Create an account to join the conversation.

More
12 May 2020 18:18 - 12 May 2020 18:30 #167538 by dubstar_04
Replied by dubstar_04 on topic Mesa 7i96 and Gecko G540
Thanks for the reply.

Thats working thanks!

Dan
Last edit: 12 May 2020 18:30 by dubstar_04.

Please Log in or Create an account to join the conversation.

More
12 May 2020 18:41 - 12 May 2020 18:43 #167539 by PCW
Replied by PCW on topic Mesa 7i96 and Gecko G540
Sorry step_type is correct

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
Last edit: 12 May 2020 18:43 by PCW.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.281 seconds
Powered by Kunena Forum