All GPIO pins not shown by PnCConf for 7i96s

More
26 Jul 2022 09:08 - 26 Jul 2022 09:11 #248307 by vkhargwanshi
Hello,

I recently got 7i96s. I could get the x,y,z stepper motor working using pncconf. Now I need to setup one GPIO pin as output pin. If I set pin 0 to GPIO out it always gives error saying 
./my_LinuxCNC_machine.hal:25: parameter or pin 'hm2_7i96.0.gpio.000.is_output' not found

By default its showing me only 7i96 internal data for selection and firmware as 7i96d and not 7i96s. I tried performing discovery option, but it always gives me error  as follow

PNCconf encountered an error.  The following information may be useful in troubleshooting:

LinuxCNC Version:  2.8

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pncconf/pages.py", line 914, in on_mesa0_discovery_clicked
    self.a.discovery_selection_update(info,0)
  File "/usr/bin/pncconf", line 1499, in discovery_selection_update
    firmdata = self.parse_xml( driver,boardname,firmname,path,boardnum)
NameError: global name 'boardnum' is not defined


So my questions are
1) I understand that pncconf is in BETA version. Would like to know, if to have 3 stepper motors and one controller output pin, do I need to create HAL file manually?
2) Is the default selection of firmware is to be 7i96d instead of 7i96s?
3) Where should I make change so that boardnum is picked up correctly.
4) I understand from 7i96s manual that in TB3 from pin no 13 to 24 I can use as output pin, but same is not reflected in pncconf, is this expected behavior as its in Beta version?
Last edit: 26 Jul 2022 09:11 by vkhargwanshi.

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

More
26 Jul 2022 14:44 - 26 Jul 2022 15:23 #248334 by PCW
1. GPIO 0 can not be an output pin (its connected to isolated input 0)
2. I believe phillc54 has just added 7I96S support to pncconf so if you are
building from source, and do a new pull, it should be supported.
3. You could try JTs mesact: github.com/jethornton/mesact , which supports the 7I96S
4. The isolated outputs are not controlled by GPIO on the 7I96/7I96S,
but rather by SSR or OUTM pins.
Last edit: 26 Jul 2022 15:23 by PCW.

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

More
26 Jul 2022 15:26 #248336 by vkhargwanshi
Thank you so much PCW, i will try all these and get back if stuck.

From your answers i believe i don't have to manually write hal file and should be able to use pncconf. Please correct if my understanding is not correct.

I plan to use 3 stepper motor, 1 solenoid valve controlled through IO pin and 3 limit switches.. may be home switch if need be

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

More
27 Jul 2022 01:27 #248383 by phillc54
7i96s support in PnCconf has been pushed to 2.8 branch now. If you are using a Buildbot package then it should be available when the Builbot has completed.
The following user(s) said Thank You: arvidb, snowgoer540

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

More
28 Jul 2022 05:07 #248507 by vkhargwanshi
Thank you so much phillc54 for merging in 2.8 branch itself.
I took the code, downloaded all dependency, could built and run all tests successfully on RPI.

However came across the same error as mentioned in
forum.linuxcnc.org/39-pncconf/46366-linu...pncconf-error#247191

I also had to disable advance options to proceed.
However now I am getting following error when running linuxcnc with created ini and hal file.
Debug file information:
Note: Using POSIX realtime
hm2/hm2_7i96s.0: config.num_encoders=3, but only 1 are available, not loading driver
hm2/hm2_7i96s.0: failed to parse Module Descriptor 6
hm2_eth: rtapi_app_main: Invalid argument (-22)
./my_LinuxCNC_machine.hal:9: waitpid failed /home/pi/LinuxCNC_2.8_source/linuxcnc/bin/rtapi_app hm2_eth
./my_LinuxCNC_machine.hal:9: /home/pi/LinuxCNC_2.8_source/linuxcnc/bin/rtapi_app exited without becoming ready
./my_LinuxCNC_machine.hal:9: insmod for hm2_eth failed, returned -1


Here are the system configuration for your reference.
system and configuration.

Date: Thu 28 Jul 2022 10:32:17 AM IST
UTC Date: Thu 28 Jul 2022 05:02:17 AM UTC
this program: /home/pi/LinuxCNC_2.8_source/linuxcnc/scripts/linuxcnc_info
uptime: 10:32:17 up 55 min, 2 users, load average: 0.39, 0.35, 0.39
lsb_release -sa: Debian Debian GNU/Linux 10 (buster) 10 buster
linuxcnc: /home/pi/LinuxCNC_2.8_source/linuxcnc/scripts/linuxcnc
pwd: /home/pi/linuxcnc/configs/my_LinuxCNC_machine
USER: pi
LOGNAME: pi
HOME: /home/pi
EDITOR:
VISUAL:
LANGUAGE: en_US
TERM: dumb
COLORTERM:
DISPLAY: :0.0
DESKTOP: LXDE-pi
display size: 1280x720 pixels (338x190 millimeters)
PATH: /home/pi/LinuxCNC_2.8_source/linuxcnc/bin:/home/pi/linuxcnc/configs/my_LinuxCNC_machine/bin:/home/pi/LinuxCNC_2.8_source/linuxcnc/scripts:/home/pi/LinuxCNC_2.8_source/linuxcnc/bin:/home/pi/LinuxCNC_2.8_source/linuxcnc/bin:/home/pi/LinuxCNC_2.8_source/linuxcnc/scripts:/home/pi/LinuxCNC_2.8_source/linuxcnc/tcl:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

uname items:
nodename -n: raspberrypi
kernel-name -s: Linux
kernel-vers -v: #1 SMP PREEMPT_RT Fri Oct 22 10:15:42 PDT 2021
machine -m: aarch64
processor -p: unknown
platform -i: unknown
oper system -o: GNU/Linux

/proc items:
cmdline: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1280x720M@60 smsc95xx.macaddr=E4:5F:01:9D:24:22 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=2809d831-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
model name:
cores:
cpu MHz:
parport:
serial:

Versions:
gcc: gcc (Debian 8.3.0-6) 8.3.0
python: Python 3.7.3
git: git version 2.20.1
git commit: ecdea1ae89
tcl: 8.6
tk: 8.6
glade: not_in_PATH

linuxcnc_var all:

LINUXCNCVERSION: 2.9.0~pre0
LINUXCNC_AUX_GLADEVCP: /usr/share/linuxcnc/aux_gladevcp
LINUXCNC_AUX_EXAMPLES: /usr/share/linuxcnc/aux_examples
REALTIME: /home/pi/LinuxCNC_2.8_source/linuxcnc/scripts/realtime
RTS: uspace
HALLIB_DIR: /home/pi/LinuxCNC_2.8_source/linuxcnc/lib/hallib
PYTHON: /usr/bin/python3.7

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

More
28 Jul 2022 07:34 - 28 Jul 2022 07:37 #248514 by phillc54
Is it possible that you selected the 7i96s_dpl firmware and your card has the 7i96s_d firmware?

Oops, I didn't read your post correctly, The 7i96s card was removed from 2.8 PnCconf because it is not fully supported by hostmot2 in 2.8
Last edit: 28 Jul 2022 07:37 by phillc54.

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

More
28 Jul 2022 08:51 - 28 Jul 2022 08:52 #248518 by vkhargwanshi
Ok thanks for update.

I could get some ini and hal generated using pncconf, while trying to use it with linuxcnc, i am getting following error
Note: Using POSIX realtime
note: MAXV max: 50.000 units/sec 3000.000 units/min
note: LJOG max: 50.000 units/sec 3000.000 units/min
note: LJOG default: 6.000 units/sec 360.000 units/min
note: jog_order='XYZ'
note: jog_invert=set()
Traceback (most recent call last):
File "/home/pi/LinuxCNC_2.8_source/linuxcnc/bin/axis", line 3942, in <module>
get_coordinate_font(vars.dro_large_font.get())
File "/home/pi/LinuxCNC_2.8_source/linuxcnc/bin/axis", line 3820, in get_coordinate_font
glnav.use_pango_font(coordinate_font, 0, 128)
File "/home/pi/LinuxCNC_2.8_source/linuxcnc/lib/python/glnav.py", line 21, in use_pango_font
pango_context = PangoCairo.create_context(context)
KeyError: 'could not find foreign type Context'

Here is the related discussion, reading which I feel there are conflicts in package requirements and a bit difficult for me to find as it needs complete knowledge of source code.
github.com/wxWidgets/Phoenix/issues/247


I believe some support is added in 2.9 for running 7i98s, but I am wondering if I need that added support to run 3 stepper motor and one GPIO output pin.

So here are my thoughts on how to proceed, please confirm
1) Revert to my old setup with LinuxCNC 2.8
2) Select 7i96 in pncconf and generate base ini and hal for 3 stepper motor
3) Add the code in hal for the GPIO pin I want to use.
Last edit: 28 Jul 2022 08:52 by vkhargwanshi.

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

More
28 Jul 2022 09:01 #248519 by phillc54
I see in this post:
forum.linuxcnc.org/39-pncconf/46479-all-...onf-for-7i96s#248507
that it mentions python 3.7, for LinuxCNC 2.8 you require python 2.7.

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

More
28 Jul 2022 13:09 - 28 Jul 2022 13:09 #248529 by vkhargwanshi
If you observe  the log I have given is for LinuxCNC 2.9 which has installed Python 3.7 and using it. I have built it for run in place.

However when I use the installed version LinuxCNC 2.8.2 its using Python 2.7.16

Configured Python version is being picked up by LinuxCNC itself.
Last edit: 28 Jul 2022 13:09 by vkhargwanshi.

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

More
28 Jul 2022 13:17 #248530 by phillc54
Sorry, I saw this, and was a bit confused:
HALLIB_DIR: /home/pi/LinuxCNC_2.8_source/linuxcnc/lib/hallib
PYTHON: /usr/bin/python3.7

What firmware did you select and what firmware does your card have?

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

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