controlling A DC spindle with mesa 7i92

More
20 Sep 2018 12:49 #117788 by Clive S
I am struggling to controlling A DC spindle with mesa 7i92_C11Gx2D.bit file.

The spindle board (sprint) requires 0-10v I have one of these www.ebay.co.uk/sch/i.html?_from=R40&_trk...log+PLC+New&_sacat=0

So I will need a PWM signal on an output pin on the 7i92.

How do I do this? I have tried and failed using pncconf to set up a temporary hal file ( know it uses the 5i25).
What am I missing?

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

More
20 Sep 2018 14:44 #117794 by PCW
So you are not using a C11G breakout? (the C11 has a built in analog output)

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

More
20 Sep 2018 17:04 #117806 by Clive S

So you are not using a C11G breakout? (the C11 has a built in analog output)


No, This is going on a small Novamill I have put a cheap China bob on the IDC port and encoder pots for the sliders on the other port.

I am using the relay to start the spindle. The spindle driver board (sprint) needs an isolated 0-10v is it not possible to generate the pwm on one of the pins?

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

More
20 Sep 2018 17:33 #117807 by PCW
The 7i92_C11Gx2D configuration has 2 PWM generators available on pins that match The C11Gs pin-out one on each connector = pin 14 on the DB, pin2 on the IDC26 connector.

The pinout listing is in the 7I92 configuration directory of the 7i92.zip file, all bit files have a corresponding.pin file that lists the available modules and I/O pin-out of the specific configuration
The following user(s) said Thank You: Clive S

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

More
20 Sep 2018 18:52 #117813 by Clive S
Thanks Peter.
In the pin out with halcmd show pin. I don't see the gpio i001 or i018 showing as an output. Is this correct?

Just to make sure I have the correct bit file loaded what is the command to check that?

I know I have 3 pins blown on the 7i92 they are i019,i032,i033 so I will have to use the one on P2 i001

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

More
20 Sep 2018 19:01 #117815 by PCW
You can read the pinout of the currently loaded firmware with

mesaflash --device 7i92 --readhmid
(at the default 192.168.1.121 IP address) or

mesaflash --device 7i92 --addr 10.10.10.10 --readhmid
at the default EEPROM IP address of 10.10.10.10

if you dont see an pin available as a GPIO output it means its been claimed
by a special function (and you should see PWM hardware pins and parameters if you look at the halcmd show pin list or halcmd show param list. As an example you can "halcmd show all hm2*" to show _all_ hardware pins, parameter, and functions of any Mesa hardware system.

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

More
20 Sep 2018 19:06 #117817 by Clive S
Ok Now I understand so if I reduce the number of stepgens might it show up?

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

More
20 Sep 2018 19:11 - 20 Sep 2018 19:13 #117818 by PCW
if you reduced the number of _pwmgens_ it will show up
(since those are both PWM pins and if you disable the PWM generators those pins will revert to plain GPIO)
Last edit: 20 Sep 2018 19:13 by PCW.

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

More
20 Sep 2018 21:41 #117829 by Clive S

if you reduced the number of _pwmgens_ it will show up
(since those are both PWM pins and if you disable the PWM generators those pins will revert to plain GPIO)


Many thanks yet again.

I can now see the pwm stuff and the gpio output pin. Now what do I need to start to connect to the output gpio pin to get the pwm on the gpio i018.

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

More
20 Sep 2018 22:53 #117832 by PCW
You don't connnect anything to the GPIO hal pin (since it will be a PWM pin if the PWM generator is enabled )

If you want PWM instead of GPIO you enable the PWM generator and control the PWM generator
via the hal pins and parameters that the PWM interface provides:

pins:

hm2_7i92.0.pwmgen.00.enable
hm2_7i92.0.pwmgen.00.value
hm2_7i92.0.pwmgen.01.enable
hm2_7i92.0.pwmgen.01.value

parameters:
hm2_7i92.0.pwmgen.00.output-type
hm2_7i92.0.pwmgen.00.scale
hm2_7i92.0.pwmgen.01.output-type
hm2_7i92.0.pwmgen.01.scale
hm2_7i92.0.pwmgen.pdm_frequency
hm2_7i92.0.pwmgen.pwm_frequency

To know what these pins and parameters mean you need to look at the PWM section of the hostmot2 manual page
The following user(s) said Thank You: Clive S

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

Time to create page: 0.085 seconds
Powered by Kunena Forum