7i97+8i20 error function not found

11 Nov 2022 15:00 #256439 by saquzi
Hi, I have a ongoing retrofitting project that I have just started working on again. So i have a old 3 axis takisawa mill with fanuc servos, and currently I am trying to get just the one servo working on the bench. It is 10s servo with fanucs own encoder, these are wired to 7i97 and 8i20 will control all 3-axis movement.

Been working couple of days after wiring with the PNCCONF, and for a beginner it seems alone to be a big task to get somehow right. I did some kind of configuration with the config tool using 7i92+7i77, and then just changed the board name in the ini file from 7i92 to 7i97, which gives me:Error report created by /usr/lib/tcltk/linuxcnc/show_errors.tcl:

Print file information:
LINUXCNC - 2.8.4-1-gb7824717b
Machine configuration directory is '/home/saquzi/linuxcnc/configs/takisawa'
Machine configuration file is 'takisawa.ini'
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): ./takisawa.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: INFO: Hardware address (MAC): 00:60:1b:17:00:9c
hm2_eth: discovered 7I97
hm2/hm2_7i97.0: Low Level init 0.15
hm2/hm2_7i97.0: Smart Serial Firmware Version 43
hm2/hm2_7i97.0: 51 I/O Pins used:
hm2/hm2_7i97.0: IO Pin 000 (TB3-04): IOPort
hm2/hm2_7i97.0: IO Pin 001 (TB3-08): IOPort
hm2/hm2_7i97.0: IO Pin 002 (TB3-12): IOPort
hm2/hm2_7i97.0: IO Pin 003 (TB3-16): IOPort
hm2/hm2_7i97.0: IO Pin 004 (TB3-20): IOPort
hm2/hm2_7i97.0: IO Pin 005 (AN_ENA4): IOPort
hm2/hm2_7i97.0: IO Pin 006 (TB3-24): IOPort
hm2/hm2_7i97.0: IO Pin 007 (AN_ENA5): IOPort
hm2/hm2_7i97.0: IO Pin 008 (AN-ENA0..3): IOPort
hm2/hm2_7i97.0: IO Pin 009 (TB1-01/TB1-09): Muxed Encoder #0, pin Muxed A (Input)
hm2/hm2_7i97.0: IO Pin 010 (TB1-04/TB1-12): Muxed Encoder #0, pin Muxed B (Input)
hm2/hm2_7i97.0: IO Pin 011 (TB1-07/TB1-15): Muxed Encoder #0, pin Muxed Index (Input)
hm2/hm2_7i97.0: IO Pin 012 (TB1-17/TB2-01): Muxed Encoder #1, pin Muxed A (Input)
hm2/hm2_7i97.0: IO Pin 013 (TB1-20/TB2-04): Muxed Encoder #1, pin Muxed B (Input)
hm2/hm2_7i97.0: IO Pin 014 (TB1-23/TB2-07): Muxed Encoder #1, pin Muxed Index (Input)
hm2/hm2_7i97.0: IO Pin 015 (TB2-09/TB2-17): Muxed Encoder #2, pin Muxed A (Input)
hm2/hm2_7i97.0: IO Pin 016 (TB2-12/TB2-20): Muxed Encoder #2, pin Muxed B (Input)
hm2/hm2_7i97.0: IO Pin 017 (TB2-15/TB2-23): Muxed Encoder #2, pin Muxed Index (Input)
hm2/hm2_7i97.0: IO Pin 018 (Internal EncMux): Muxed Encoder Select #0, pin Mux Select 0 (Output)
hm2/hm2_7i97.0: IO Pin 019 (TB5-13/TB5-14): SSR #0, pin Out-00 (Output)
hm2/hm2_7i97.0: IO Pin 020 (TB5-15/TB5-16): SSR #0, pin Out-01 (Output)
hm2/hm2_7i97.0: IO Pin 021 (TB5-17/TB5-18): SSR #0, pin Out-02 (Output)
hm2/hm2_7i97.0: IO Pin 022 (TB5-19/TB5-20): SSR #0, pin Out-03 (Output)
hm2/hm2_7i97.0: IO Pin 023 (TB5-21/TB5-22): SSR #0, pin Out-04 (Output)
hm2/hm2_7i97.0: IO Pin 024 (TB5-23/TB5-24): SSR #0, pin Out-05 (Output)
hm2/hm2_7i97.0: IO Pin 025 (Internal InMux0): SSR #0, pin AC Ref (internal) (Output)
hm2/hm2_7i97.0: IO Pin 026 (Internal InMux1): InMux Input Mux #0, pin addr0 (Output)
hm2/hm2_7i97.0: IO Pin 027 (Internal InMux2): InMux Input Mux #0, pin addr1 (Output)
hm2/hm2_7i97.0: IO Pin 028 (Internal InMux3): InMux Input Mux #0, pin addr2 (Output)
hm2/hm2_7i97.0: IO Pin 029 (Internal InMuxData): InMux Input Mux #0, pin addr3 (Output)
hm2/hm2_7i97.0: IO Pin 030 (TB4-15/TB4-16): InMux Input Mux #0, pin muxdata (Input)
hm2/hm2_7i97.0: IO Pin 031 (TB4-17/TB4-18): IOPort
hm2/hm2_7i97.0: IO Pin 032 (TB4-17/TB4-18): IOPort
hm2/hm2_7i97.0: IO Pin 033 (P1-01): IOPort
hm2/hm2_7i97.0: IO Pin 034 (P1-02): IOPort
hm2/hm2_7i97.0: IO Pin 035 (P1-03): IOPort
hm2/hm2_7i97.0: IO Pin 036 (P1-04): IOPort
hm2/hm2_7i97.0: IO Pin 037 (P1-05): IOPort
hm2/hm2_7i97.0: IO Pin 038 (P1-06): IOPort
hm2/hm2_7i97.0: IO Pin 039 (P1-07): IOPort
hm2/hm2_7i97.0: IO Pin 040 (P1-08): IOPort
hm2/hm2_7i97.0: IO Pin 041 (P1-09): IOPort
hm2/hm2_7i97.0: IO Pin 042 (P1-11): IOPort
hm2/hm2_7i97.0: IO Pin 043 (P1-13): IOPort
hm2/hm2_7i97.0: IO Pin 044 (P1-15): IOPort
hm2/hm2_7i97.0: IO Pin 045 (P1-17): IOPort
hm2/hm2_7i97.0: IO Pin 046 (P1-19): IOPort
hm2/hm2_7i97.0: IO Pin 047 (P1-21): IOPort
hm2/hm2_7i97.0: IO Pin 048 (P1-23): IOPort
hm2/hm2_7i97.0: IO Pin 049 (P1-25): IOPort
hm2/hm2_7i97.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
HAL: ERROR: function 'bldc.3' not found
./takisawa.hal:24: addf failed
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:
in order to provide information about the linuxcnc
system and configuration.

Date: pe 11.11.2022 16.46.51 +0200
UTC Date: pe 11.11.2022 14.46.51 +0000
this program: /usr/bin/linuxcnc_info
uptime: 16:46:51 up 3 days, 4:32, 1 user, load average: 0,20, 0,34, 0,53
lsb_release -sa: Debian Debian GNU/Linux 10 (buster) 10 buster
which linuxcnc: /usr/bin/linuxcnc
pwd: /home/saquzi/linuxcnc/configs/takisawa
USER: saquzi
LOGNAME: saquzi
HOME: /home/saquzi
TERM: dumb
DESKTOP: lightdm-xsession
display size: 1920x1080 pixels (508x285 millimeters)
PATH: /usr/bin:/home/saquzi/linuxcnc/configs/takisawa/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

uname items:
nodename -n: debian
kernel-name -s: Linux
kernel-vers -v: #1 SMP PREEMPT RT Debian 4.19.249-2 (2022-06-30)
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-21-rt-amd64 root=UUID=2f07024a-9cf7-41ad-ac90-2f5c0b240596 ro quiet
model name: AMD A6-7400K Radeon R5, 6 Compute Cores 2C+4G
cores: 1
cpu MHz: 1907.553

gcc: gcc (Debian 8.3.0-6) 8.3.0
python: Python 2.7.16
git: not_in_PATH
git commit: NA
tcl: 8.6
tk: 8.6
glade: not_in_PATH
glade-gtk2: not_in_PATH

linuxcnc_var all:

LINUXCNCVERSION: 2.8.4-1-gb7824717b
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*':
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
un linuxcnc <none> <none> (no description available)
un linuxcnc-dev <none> <none> (no description available)
un linuxcnc-doc <none> <none> (no description available)
ii linuxcnc-doc-en 1: all motion controller for CNC machines and robots (English documentation)
ii linuxcnc-doc-es 1: all controlador de movimiento para máquinas CNC y robots (Español).
ii linuxcnc-doc-fr 1: all motion controller for CNC machines and robots (French documentation)
un linuxcnc-sim <none> <none> (no description available)
un linuxcnc-sim-dev <none> <none> (no description available)
ii linuxcnc-uspace 1: amd64 motion controller for CNC machines and robots
ii linuxcnc-uspace-dev 1: amd64 PC based motion controller for real-time Linux

So I am trying to get over that for the whole day and not really sure what that bldc.3 not found means, and how to work with that.. And I am also wondering about how the connection between 7i97+8i20 will work? (cut a cat5 cable in half and wired it like in instructions to the tb4 connector of the 7i97 for serial commutation, encoder is wired to encoder 0 and should be also right).
Attached the current HAL & INI files too. Thanks and sorry in advance!  

File Attachment:

File Name: takisawa.hal
File Size:11 KB

File Attachment:

File Name: takisawa.ini
File Size:3 KB

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

11 Nov 2022 16:21 - 11 Nov 2022 16:21 #256445 by PCW
loadrt bldc cfg=nifHF,nifHF,nifHF

Creates 3 instances of the BLDC component: bldc[0,1,2]

bldc.3 does not exist
Last edit: 11 Nov 2022 16:21 by PCW.

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

12 Nov 2022 12:35 #256503 by saquzi
okay, so now when i try to do ANY modification to the hal file, it will say:

Debug file information:
./takisawa.hal:1: Unknown command ''
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime

and when after this i modify to it just the way it was (like if i just add a "," in somewhere and then taking it of and saving the hal file) it will give the same unknown command.. So I think that i am modifying it somewhat wrong way or in wrong place?

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

12 Nov 2022 15:57 #256509 by PCW
It sounds like you are editing the hal file with a word processor, not a plain text editor
I would suggest geany or mousepad or gedit for editing the hal file

I just ran pncconf for a 7I92/7I77 configuration, and here are the spindle related sections
in the INI and HAL file tha pncconf created:

INI file:

P = 0.0
I = 0.0
D = 0.0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
MAX_OUTPUT = 2000.0

HAL file:


setp pid.s.Pgain [SPINDLE_0]P
setp pid.s.Igain [SPINDLE_0]I
setp pid.s.Dgain [SPINDLE_0]D
setp pid.s.bias [SPINDLE_0]BIAS
setp pid.s.FF0 [SPINDLE_0]FF0
setp pid.s.FF1 [SPINDLE_0]FF1
setp pid.s.FF2 [SPINDLE_0]FF2
setp pid.s.deadband [SPINDLE_0]DEADBAND
setp pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp pid.s.error-previous-target true

net spindle-index-enable => pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm => pid.s.command
net spindle-vel-fb-rpm => pid.s.feedback
net spindle-output <= pid.s.output

################## NOTE ############################################
########### These are the pin names that must change #####################
# ---PWM Generator signals/setup---

setp [HMOT](CARD0).7i77.0.1.analogout5-scalemax [SPINDLE_0]OUTPUT_SCALE
setp [HMOT](CARD0).7i77.0.1.analogout5-minlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp [HMOT](CARD0).7i77.0.1.analogout5-maxlim [SPINDLE_0]OUTPUT_MAX_LIMIT

net spindle-output => [HMOT](CARD0).7i77.0.1.analogout5
net spindle-enable => [HMOT](CARD0).7i77.0.1.spinena

# ---Encoder feedback signals/setup---

setp [HMOT](CARD0).encoder.05.counter-mode 0
setp [HMOT](CARD0).encoder.05.filter 1
setp [HMOT](CARD0).encoder.05.index-invert 0
setp [HMOT](CARD0).encoder.05.index-mask 0
setp [HMOT](CARD0).encoder.05.index-mask-invert 0
setp [HMOT](CARD0).encoder.05.scale [SPINDLE_0]ENCODER_SCALE

net spindle-revs <= [HMOT](CARD0).encoder.05.position
net spindle-vel-fb-rps <= [HMOT](CARD0).encoder.05.velocity
net spindle-vel-fb-rpm <= [HMOT](CARD0).encoder.05.velocity-rpm
net spindle-index-enable <=> [HMOT](CARD0).encoder.05.index-enable

# ---setup spindle control signals---

net spindle-vel-cmd-rps <= spindle.0.speed-out-rps
net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs
net spindle-vel-cmd-rpm <= spindle.0.speed-out
net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs
net spindle-enable <= spindle.0.on
net spindle-cw <= spindle.0.forward
net spindle-ccw <= spindle.0.reverse
net spindle-brake <= spindle.0.brake
net spindle-revs => spindle.0.revs
net spindle-at-speed => spindle.0.at-speed
net spindle-vel-fb-rps => spindle.0.speed-in
net spindle-index-enable <=> spindle.0.index-enable

# ---Setup spindle at speed signals---

sets spindle-at-speed true

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

14 Nov 2022 14:17 #256691 by saquzi
Okay well that explained it, started using geany and made some progress, thank you really much on to the next problems:

So now I managed to modify the hal fie in the way that the linuxcnc actually opens. I have all wires and power connected to the 7i97 and to the 8i20. When i spin the servo by hand, the X-axis value changes just like it should and it looks accurate! I am using just the A+, A-, B+, B-, Z+, Z- signals from the encoder for this. The encoder has the COMM signals too but do i need them? or can I use just limit swithes and the ABZ-encoder for homing every time the machine is powered?

But if i try to jog the X-axis it wont move, so no power yet going to the poles (which is no surprise for me, I just don´t know what to do or try next). In the 8i20 status led is flashing, iso pwr GREEN, lv status YELLOW and pwr GREEN. I currentyly have 40VDC going to the motor power of 8i20, but can up that if needed later in testing (Makita batteries). the enable is just shared 5vdc from the 7i97 power input for now.

Current Hal and Ini files attached once again, pretty sure that there might be something unneeded in the Hal too (tried to search other similar setup Hal files but could not find any, hopefully I can one day make some kind of a guidenance for this kind of setup for first time linuxcnc beginners like I am.). And not anything spindle related yet, i`m just trying to get some movement to the servo for now on the bench, and hopefully get it to move just like it should eventually.


File Attachment:

File Name: takisawa_2...1-14.hal
File Size:8 KB

File Attachment:

File Name: takisawa_2...14-2.hal
File Size:8 KB


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

14 Nov 2022 17:12 #256703 by PCW
I dont seen any connections to 8I20 pins in the hal file
Did you select a 8I20 on the sserial port and set the BLDC
options in pnnconf

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

14 Nov 2022 23:44 - 14 Nov 2022 23:50 #256743 by saquzi
No I did not had it selected, that explains a lot :-).. Modified and selected it, but now there is lots of errors in the Hal file with the nets etc. I marked all the error spots with ##, where the debug file says "xxxxx" does not exist.. There is many of them, so i think there would be somehow common problem between them? And is it normal that in pnnconf in the BLDC section you can not alter most of the values? Maximum current or any of the values on the right bar. You can write a number but when you press enter they all return back to zero..


File Attachment:

File Name: takisawa_2...14-3.hal
File Size:10 KB

E: I Know that most of the values causing the error needs the correct operating value, but in which exact way it should be written to them for it to be correct? (this ain´t the correct way?: setp       [HMOT](CARD0).8i20.0.2..max_current 10.000 )

Last edit: 14 Nov 2022 23:50 by saquzi.

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

15 Nov 2022 01:18 #256745 by PCW
Is the 8I20 detected?

Have you listed the hal pins with:

halcmd show pin


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

17 Nov 2022 22:58 #256978 by andypugh

setp       [HMOT](CARD0).8i20.0.2..max_current 10.000

I don't know where it has come from, but the double dots (2..max) isn't going to work.

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

Moderators: cmorley
Time to create page: 0.125 seconds
Powered by Kunena Forum