Mesa 7i78

More
14 Mar 2017 07:05 #89573 by raglanlittlejohn
Mesa 7i78 was created by raglanlittlejohn
I would like to see the pin outs on my new 7i78 Mesa daughter board. I've found a way to do this for a 7i76 board, by issuing the following instruction at a command prompt, loadrt hm2_pci config="num_encoders=1 num_stepgens=5 sserial_port_0=0XXX".
Please could someone tell me the equivalent instruction for the 7i78.
I'm also interested to know if its possible to force outputs on and off, as you can with the parallel port.

Thanks, John.

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

More
14 Mar 2017 14:09 - 14 Mar 2017 14:19 #89586 by PCW
Replied by PCW on topic Mesa 7i78
You need two pieces of information to understand the 7I78s I/O pinout

1. The 7I78 manual, specifically the "HOST INTERFACE CONNECTOR" pinout
2. The FPGA configuration pinout

you can get the current FPGA configuration pinout with

sudo mesaflash --device 5i25 --readhmid
(assuming your FPGA card is a 5I25)

Also unlike the 7I76, all 7I78 I/O is GPIO, so all I/O pins are 5i25 pins (or whatever FPGA card you have)
so
halcmd: show pin hm2
will show all the FPGA pins
and
halcmd: show param hm2
will show al the FPGA parameters

All FPGA configurations allow direct control of all I/O pins
except if the pin is "owned" by a alternate function like a stepgen

So for example GPIO 6 and GPIO 7 (DB25 pins 4 and 17) are normally
assigned to stepgen 3 on the most common FPGA firmware for the 7I78

So if you have the token num_stepgens=3 in the driver command line
stepgens 0,1,2 will be enabled but stepgen 3 will be disabled,
This allows GPIO6 and GPIO7 to be controlled as simple I/O like a parallel port

you can look at the hostmot2 manual for more information on this
Last edit: 14 Mar 2017 14:19 by PCW.

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

More
14 Mar 2017 17:06 #89608 by raglanlittlejohn
Replied by raglanlittlejohn on topic Mesa 7i78
Thanks for your very detailed reply, it is most helpful. I've been putting off getting my Mesa 5i25/7i78 running, as I find it quite difficult to understand compared to the parallel port configs. I'm planning to do a lathe conversion, and I've bought most of the parts (only the drivers left to buy). I'll let you know how I get on.

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

More
18 Mar 2017 09:22 #89849 by raglanlittlejohn
Replied by raglanlittlejohn on topic Mesa 7i78
I've managed to free up gpio pins 004 to 007, by only selecting x and z axes only when creating config in Pncconf Wizard. I had to add this line to my hal file for each pin needed, setp hm2_5i25.0.gpio.007.is_output true After that I was able to force the output gpio 007, and net it to the signal I wanted to use.
I've also got differential output to the steppers, and I can see the encoder inputs (just using a 500 ohm resistor for testing).
I may not need the spare outputs, as i have two parallel ports to use as well. I am starting to understand the differences between the 5i25/7i78 and parallel port.

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

More
22 Mar 2017 20:58 #90088 by raglanlittlejohn
Replied by raglanlittlejohn on topic Mesa 7i78
I'm trying to get spindle speed control working on my 5i25/7i78 Mesa setup. The Pncconf Wizard would not let me add a pwmgen , so I changed this line in my Hal file. loadrt hm2_pci config=" num_encoders=1 num_pwmgens=1 num_stepgens=2 sserial_port_0=00xxxx"
(num_pwmgens=0 is default from Pncconf).
I've also made the following changes to the hal file.
# available pwmgen params
#setp hm2_5i25.0.pwmgen.00.output-type
#setp hm2_5i25.0.pwmgen.00.scale
# hm2_5i25.0.pwmgen.01.output-type
# hm2_5i25.0.pwmgen.01.scale
#setp hm2_5i25.0.pwmgen.pdm_frequency


# available pwmgen pins
# FALSE hm2_5i25.0.pwmgen.00.enable
# 0 hm2_5i25.0.pwmgen.00.value
# FALSE hm2_5i25.0.pwmgen.01.enable
# 0 hm2_5i25.0.pwmgen.01.value

#These settings get pwm on gpio008 working
setp hm2_5i25.0.pwmgen.00.output-type 3
setp hm2_5i25.0.pwmgen.00.scale 1
setp hm2_5i25.0.pwmgen.pdm_frequency 5000
setp hm2_5i25.0.pwmgen.pwm_frequency 1000
net spindle-vel-cmd-rpm => hm2_5i25.0.pwmgen.00.value
#change num_pwmgens=0 to num_pwmgens=1(note this cannot be selected in Pncconfig 5i25/7i76)
net spindle-enable => hm2_5i25.0.pwmgen.00.enable
setp hm2_5i25.0.gpio.008.invert_output true

I'm getting a change of state on the gpio pin 008 in 'show hal configuration', when the spindle is started/speed increased in axis. I cannot see a change in pwm using the halscope. I have used the halscope to see changes in pwm using a parallel port config in the past, so know what it should look like.
Help would be appreciated, this is the last bit to sort out for my lathe config.
I

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

More
22 Mar 2017 22:01 - 22 Mar 2017 22:04 #90090 by PCW
Replied by PCW on topic Mesa 7i78
The PWM pin will not be accurately displayed in HALscope because of
HALScopes low (1 KHz) sample rate relative to the PWM rate, but if you set the PWM frequency
to 50 Hz for example, you will be able to see a reasonable representation of the PWM waveform in HALScope.

Note that 50 Hz is just for demonstrating the PWM signal in HALScope. For best linearity
and least ripple, the PWM frequency should be set to 5000 Hz for the 7I78's analog output
Last edit: 22 Mar 2017 22:04 by PCW.

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

More
23 Mar 2017 06:59 #90101 by raglanlittlejohn
Replied by raglanlittlejohn on topic Mesa 7i78
Thanks for the explanation. That explains why I could only see the odd single line on the Halscope.I'll try your settings later today.

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

More
23 Mar 2017 17:07 #90125 by raglanlittlejohn
Replied by raglanlittlejohn on topic Mesa 7i78
These lines in hal gave sensible readings on the halscope. Note the scale now the same as scale in the ini file.
#These settings get pwm on gpio008 working
setp hm2_5i25.0.pwmgen.00.output-type 1
setp hm2_5i25.0.pwmgen.00.scale 100
setp hm2_5i25.0.pwmgen.pdm_frequency 5000000
setp hm2_5i25.0.pwmgen.pwm_frequency 50 #(demo for halsope visibility. Normally 5000)
net spindle-vel-cmd-rps => hm2_5i25.0.pwmgen.00.value
#change num_pwmgens=0 to num_pwmgens=1(note this cannot be selected in Pncconfig 5i25/7i76)
#setp hm2_5i25.0.gpio.008.invert_output true
net spindle-enable => hm2_5i25.0.pwmgen.00.enable

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

More
27 Aug 2021 20:15 #218937 by COFHAL
Replied by COFHAL on topic Mesa 7i78 spindle control
I have tried to control the spindle of my lathe with the outputs of the 7i78. MI spindle is a BLDC and speed is controlled by a voltage between 0 and +5. When I do the test without connecting the speed control input of the spindle, increasing the speed in the GUI AXIS, the output varies from zero to 4.92 volts. But when I connect the control line of the spindle, the voltage is no more than 0.90 volts. What could be the problem?

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

More
27 Aug 2021 21:10 #218938 by COFHAL
Replied by COFHAL on topic Mesa 7i78
have tried to control the spindle of my lathe with the outputs of the 7i78. MI spindle is a BLDC and speed is controlled by a voltage between 0 and +5. When I do the test without connecting the speed control input of the spindle, increasing the speed in the GUI AXIS, the output varies from zero to 4.92 volts. But when I connect the control line of the spindle, the voltage is no more than 0.90 volts. What could be the problem?

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

Time to create page: 0.075 seconds
Powered by Kunena Forum