- Hardware & Machines
- Driver Boards
- [SOLVED]How to configure the PWM signal in a MESA 7i96 for a spindle?
[SOLVED]How to configure the PWM signal in a MESA 7i96 for a spindle?
15 Mar 2022 21:47 - 15 Mar 2022 21:48 #237386
by PCW
Replied by PCW on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
"hm2/hm2_7i96.0: config.num_stepgens=5, but only 4 are available, not loading driver"
You need to change the number of stepgens to 4:
num_stepgens=4
In the driver configuration line
(since the last step generator has been replaced with the PWMGen)
You need to change the number of stepgens to 4:
num_stepgens=4
In the driver configuration line
(since the last step generator has been replaced with the PWMGen)
Last edit: 15 Mar 2022 21:48 by PCW.
Please Log in or Create an account to join the conversation.
15 Mar 2022 22:00 #237391
by Nest
Replied by Nest on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
Ok, at now work fine.... and at now what's the next step?
Please Log in or Create an account to join the conversation.
15 Mar 2022 23:07 #237404
by PCW
Replied by PCW on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
Not sure, what doesn't work?
Please Log in or Create an account to join the conversation.
16 Mar 2022 09:48 #237448
by Nest
Replied by Nest on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
Now when I run linuxcnc I don't see the error, but I don't know how I have to configure PncConf for the PWM signal to work, or to which port the cables are connected.
Please Log in or Create an account to join the conversation.
16 Mar 2022 15:46 - 16 Mar 2022 15:47 #237474
by PCW
Replied by PCW on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
Pretty sure pncconf doesn't know how to setup PWM on a 7I96
so it needs to be added by editing the hal file. This consists
of adding the lines that setup the PWM and lines that connect the
7I96's PWM value and enable pins to the appropriate LinuxCNC
spindle control pins. I can suggest how to do this if you post your current
hal/ini files.
The PWM output is on the STEP4- pin of the 7I96 as discussed previously
so it needs to be added by editing the hal file. This consists
of adding the lines that setup the PWM and lines that connect the
7I96's PWM value and enable pins to the appropriate LinuxCNC
spindle control pins. I can suggest how to do this if you post your current
hal/ini files.
The PWM output is on the STEP4- pin of the 7I96 as discussed previously
Last edit: 16 Mar 2022 15:47 by PCW.
Please Log in or Create an account to join the conversation.
16 Mar 2022 18:07 #237481
by Nest
Replied by Nest on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
Ok, i upload my files
Please Log in or Create an account to join the conversation.
16 Mar 2022 18:30 - 16 Mar 2022 18:31 #237482
by PCW
Replied by PCW on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
Adding these lines to the spindle section of the hal file should be close:
(you will probably need to change the pwm frequency and scale values to match your hardware)
setp hm2_7i96.0.pwmgen.00.pwm-frequency 10000
setp hm2_7i96.0.pwmgen.00.scale 3600
net spindle-output hm2_7i96.0.pwmgen.00.value
net spindle-enable hm2_7i96.0.pwmgen.00.enable
(you will probably need to change the pwm frequency and scale values to match your hardware)
setp hm2_7i96.0.pwmgen.00.pwm-frequency 10000
setp hm2_7i96.0.pwmgen.00.scale 3600
net spindle-output hm2_7i96.0.pwmgen.00.value
net spindle-enable hm2_7i96.0.pwmgen.00.enable
Last edit: 16 Mar 2022 18:31 by PCW.
Please Log in or Create an account to join the conversation.
16 Mar 2022 19:23 - 16 Mar 2022 19:28 #237488
by Nest
Replied by Nest on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
Error start the linuxcnc
The problem is
setp hm2_7i96.0.pwmgen.00.pwm-frequency 10000
The problem is
setp hm2_7i96.0.pwmgen.00.pwm-frequency 10000
Error report created by /usr/lib/tcltk/linuxcnc/show_errors.tcl:
Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.8.2-11-g6a3d0a434
Machine configuration directory is '/home/nest/linuxcnc/configs/CNC3040Z-DQ'
Machine configuration file is 'CNC3040Z-DQ.ini'
INIFILE=/home/nest/linuxcnc/configs/CNC3040Z-DQ/CNC3040Z-DQ.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=axis
COORDINATES=XYZ
KINEMATICS=trivkins coordinates=XYZ
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
Starting HAL User Interface program: halui
Found file(REL): ./CNC3040Z-DQ.hal
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
hm2: loading Mesa HostMot2 driver version 0.15
hm2_eth: loading Mesa AnyIO HostMot2 ethernet driver version 0.2
hm2_eth: 192.168.1.121: INFO: Hardware address (MAC): 00:60:1b:16:02:07
hm2_eth: discovered 7I96
hm2/hm2_7i96.0: Low Level init 0.15
hm2/hm2_7i96.0: Smart Serial Firmware Version 43
hm2/hm2_7i96.0: 51 I/O Pins used:
hm2/hm2_7i96.0: IO Pin 000 (TB3-01): IOPort
hm2/hm2_7i96.0: IO Pin 001 (TB3-02): IOPort
hm2/hm2_7i96.0: IO Pin 002 (TB3-03): IOPort
hm2/hm2_7i96.0: IO Pin 003 (TB3-04): IOPort
hm2/hm2_7i96.0: IO Pin 004 (TB3-05): IOPort
hm2/hm2_7i96.0: IO Pin 005 (TB3-06): IOPort
hm2/hm2_7i96.0: IO Pin 006 (TB3-07): IOPort
hm2/hm2_7i96.0: IO Pin 007 (TB3-08): IOPort
hm2/hm2_7i96.0: IO Pin 008 (TB3-09): IOPort
hm2/hm2_7i96.0: IO Pin 009 (TB3-10): IOPort
hm2/hm2_7i96.0: IO Pin 010 (TB3-11): IOPort
hm2/hm2_7i96.0: IO Pin 011 (TB3-13/TB3-14): SSR #0, pin Out-00 (Output)
hm2/hm2_7i96.0: IO Pin 012 (TB3-15/TB3-16): SSR #0, pin Out-01 (Output)
hm2/hm2_7i96.0: IO Pin 013 (TB3-17/TB3-18): SSR #0, pin Out-02 (Output)
hm2/hm2_7i96.0: IO Pin 014 (TB3-19/TB3-20): SSR #0, pin Out-03 (Output)
hm2/hm2_7i96.0: IO Pin 015 (TB3-21/TB3-22): SSR #0, pin Out-04 (Output)
hm2/hm2_7i96.0: IO Pin 016 (TB3-23/TB3-24): SSR #0, pin Out-05 (Output)
hm2/hm2_7i96.0: IO Pin 017 (TB1-02/TB1-03): StepGen #0, pin Step (Output)
hm2/hm2_7i96.0: IO Pin 018 (TB1-04/TB1-05): StepGen #0, pin Direction (Output)
hm2/hm2_7i96.0: IO Pin 019 (TB1-08/TB1-09): StepGen #1, pin Step (Output)
hm2/hm2_7i96.0: IO Pin 020 (TB1-10/TB1-11): StepGen #1, pin Direction (Output)
hm2/hm2_7i96.0: IO Pin 021 (TB1-14/TB1-15): StepGen #2, pin Step (Output)
hm2/hm2_7i96.0: IO Pin 022 (TB1-16/TB1-17): StepGen #2, pin Direction (Output)
hm2/hm2_7i96.0: IO Pin 023 (TB1-20/TB1-21): StepGen #3, pin Step (Output)
hm2/hm2_7i96.0: IO Pin 024 (TB1-22-TB1-23): StepGen #3, pin Direction (Output)
hm2/hm2_7i96.0: IO Pin 025 (TB2-02/TB2-03): PWMGen #0, pin Out0 (PWM or Up) (Output)
hm2/hm2_7i96.0: IO Pin 026 (TB2-04/TB2-05): PWMGen #0, pin Out1 (Dir or Down) (Output)
hm2/hm2_7i96.0: IO Pin 027 (TB2-07/TB2-08): Encoder #0, pin A (Input)
hm2/hm2_7i96.0: IO Pin 028 (TB2-10/TB2-11): Encoder #0, pin B (Input)
hm2/hm2_7i96.0: IO Pin 029 (TB2-13/TB2-14): Encoder #0, pin Index (Input)
hm2/hm2_7i96.0: IO Pin 030 (TB2-16/TB2-17): IOPort
hm2/hm2_7i96.0: IO Pin 031 (TB2-18/TB2-19): IOPort
hm2/hm2_7i96.0: IO Pin 032 (internal): IOPort
hm2/hm2_7i96.0: IO Pin 033 (internal): SSR #0, pin AC Ref (internal) (Output)
hm2/hm2_7i96.0: IO Pin 034 (P1-01): IOPort
hm2/hm2_7i96.0: IO Pin 035 (P1-02): IOPort
hm2/hm2_7i96.0: IO Pin 036 (P1-03): IOPort
hm2/hm2_7i96.0: IO Pin 037 (P1-04): IOPort
hm2/hm2_7i96.0: IO Pin 038 (P1-05): IOPort
hm2/hm2_7i96.0: IO Pin 039 (P1-06): IOPort
hm2/hm2_7i96.0: IO Pin 040 (P1-07): IOPort
hm2/hm2_7i96.0: IO Pin 041 (P1-08): IOPort
hm2/hm2_7i96.0: IO Pin 042 (P1-09): IOPort
hm2/hm2_7i96.0: IO Pin 043 (P1-11): IOPort
hm2/hm2_7i96.0: IO Pin 044 (P1-13): IOPort
hm2/hm2_7i96.0: IO Pin 045 (P1-15): IOPort
hm2/hm2_7i96.0: IO Pin 046 (P1-17): IOPort
hm2/hm2_7i96.0: IO Pin 047 (P1-19): IOPort
hm2/hm2_7i96.0: IO Pin 048 (P1-21): IOPort
hm2/hm2_7i96.0: IO Pin 049 (P1-23): IOPort
hm2/hm2_7i96.0: IO Pin 050 (P1-25): IOPort
hm2/hm2_7i96.0: registered
hm2_eth: in hm2_eth_reset
hm2_eth: HostMot2 ethernet driver unloaded
hm2: unloading
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
Note: Using POSIX realtime
./CNC3040Z-DQ.hal:208: parameter or pin 'hm2_7i96.0.pwmgen.00.pwm-frequency' not found
5392
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
-----------------------------------------------------------------------
Info report created by linuxcnc_info:
The file: /tmp/linuxcnc_info.txt
can be posted to a forum or a web site like:
http://pastebin.com
in order to provide information about the linuxcnc
system and configuration.
Date: mié mar 16 19:21:03 WET 2022
UTC Date: mié mar 16 19:21:03 UTC 2022
this program: /usr/bin/linuxcnc_info
uptime: 19:21:03 up 1:21, 1 user, load average: 1,30, 1,07, 0,76
lsb_release -sa: Debian Debian GNU/Linux 10 (buster) 10 buster
which linuxcnc: /usr/bin/linuxcnc
pwd: /home/nest/linuxcnc/configs/CNC3040Z-DQ
USER: nest
LOGNAME: nest
HOME: /home/nest
EDITOR:
VISUAL:
LANGUAGE:
TERM: dumb
COLORTERM:
DISPLAY: :0.0
DESKTOP: lightdm-xsession
display size: 1920x1080 pixels (508x285 millimeters)
PATH: /usr/bin:/home/nest/linuxcnc/configs/CNC3040Z-DQ/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
uname items:
nodename -n: linuxcnc
kernel-name -s: Linux
kernel-vers -v: #1 SMP PREEMPT RT Debian 4.19.208-1 (2021-09-29)
machine -m: x86_64
processor -p: unknown
platform -i: unknown
oper system -o: GNU/Linux
/proc items:
cmdline: BOOT_IMAGE=/boot/vmlinuz-4.19.0-18-rt-amd64 root=UUID=d8d1ad22-76ae-49c2-b593-5cb7c4750291 ro initrd=/install/initrd.gz quiet
model name: Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz
cores: 4
cpu MHz: 1612.974
parport: 0000-0000 : parport0
serial: 0000-0000 : serial
Versions:
gcc: gcc (Debian 8.3.0-6) 8.3.0
python: Python 2.7.16
git: git version 2.20.1
git commit: NA
tcl: 8.6
tk: 8.6
glade: not_in_PATH
glade-gtk2: not_in_PATH
linuxcnc_var all:
LINUXCNCVERSION: 2.8.2-11-g6a3d0a434
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
REALTIME: /etc/init.d/realtime
RTS: uspace
HALLIB_DIR: /usr/share/linuxcnc/hallib
dpkg -l '*linuxcnc*':
Deseado=desconocido(U)/Instalar/eliminaR/Purgar/retener(H)
| Estado=No/Inst/ficheros-Conf/desempaqUetado/medio-conF/medio-inst(H)/espera-disparo(W)/pendienTe-disparo
|/ Err?=(ninguno)/requiere-Reinst (Estado,Err: mayúsc.=malo)
||/ Nombre Versión Arquitectura Descripción
+++-===================-=====================-============-=====================================================================
un linuxcnc <ninguna> <ninguna> (no hay ninguna descripción disponible)
un linuxcnc-dev <ninguna> <ninguna> (no hay ninguna descripción disponible)
un linuxcnc-doc <ninguna> <ninguna> (no hay ninguna descripción disponible)
ii linuxcnc-doc-en 1:2.8.2.11.g6a3d0a434 all motion controller for CNC machines and robots (English documentation)
ii linuxcnc-doc-es 1:2.8.2.11.g6a3d0a434 all controlador de movimiento para máquinas CNC y robots (Español).
ii linuxcnc-doc-fr 1:2.8.2.11.g6a3d0a434 all motion controller for CNC machines and robots (French documentation)
un linuxcnc-sim <ninguna> <ninguna> (no hay ninguna descripción disponible)
un linuxcnc-sim-dev <ninguna> <ninguna> (no hay ninguna descripción disponible)
ii linuxcnc-uspace 1:2.8.2.11.g6a3d0a434 amd64 motion controller for CNC machines and robots
ii linuxcnc-uspace-dev 1:2.8.2.11.g6a3d0a434 amd64 PC based motion controller for real-time Linux
Last edit: 16 Mar 2022 19:28 by Nest.
Please Log in or Create an account to join the conversation.
16 Mar 2022 19:38 - 16 Mar 2022 19:40 #237489
by PCW
Replied by PCW on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
That should be:
setp hm2_7i96.0.pwmgen.pwm_frequency 10000
(or whatever frequency your spindle interface requires)
setp hm2_7i96.0.pwmgen.pwm_frequency 10000
(or whatever frequency your spindle interface requires)
Last edit: 16 Mar 2022 19:40 by PCW.
Please Log in or Create an account to join the conversation.
16 Mar 2022 21:26 #237498
by Nest
Replied by Nest on topic How to configure the PWM signal in a MESA 7i96 for a spindle?
ok, now linuxcnc start without errors.
but when linuxcnc starts, the spindle starts to the maximum and when I send the M3 S11000 code the spindle speed decreases and when I send the M3 stop code the spindle speed increases to the maximum
How do I configure the hal file so that linuxcnc start with the spindle powered off?
but when linuxcnc starts, the spindle starts to the maximum and when I send the M3 S11000 code the spindle speed decreases and when I send the M3 stop code the spindle speed increases to the maximum
How do I configure the hal file so that linuxcnc start with the spindle powered off?
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- Driver Boards
- [SOLVED]How to configure the PWM signal in a MESA 7i96 for a spindle?
Time to create page: 0.223 seconds