hello all, beginner here with some issues with linux cnc

More
14 Mar 2021 08:15 #202194 by santiagoe
ok this is my first time with linux and the cnc world, currently building a PrintNC my first diy proyect, i was having issues with the wifi and mesa 7i96 at the same time but i fixed that thanks to a thread in this forum, now i am facing some difficulties trying to run linuxcnc properly.

first i am trying to control the speed of the spindle through a USB-rs485 adapter connected between the Rpi4 and a huanyang vfd, to do that i followed this thread in the project wiki wiki.printnc.info/en/controllers/linuxcnc/vfd , so i added some commands to the custom.hal and custom_postgui.hal(i followed all the steps) then when i try to execute linuxcnc i get the following

debug file information:
custom_postgui.hal:5: Pin 'gmoccapy.spindle_feedback_bar' does not exist
2768
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime

after that if i comment that line, i get the following error
Debug file information:
custom_postgui.hal:6: Pin 'gmoccapy.spindle_at_speed_led' does not exist
3078
Stopping realtime threads
Unloading hal components

so i think i am missing something in my GUI? so well i comment those two lines and then i get two errors like this

Debug file information:
Note: Using POSIX realtime
./vfd.hal:5: Pin 'spindle.0.speed-out' was already linked to signal 'spindle-vel-cmd-rpm'
3709
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime

with that line and this one ``spindle-enable <= spindle.0.on`` so again i comment those lines in the main hal file and this time linuxcnc executes successfully, but when i try to start and run the spindle it only goes up to 10Hz, i tested the vfd with the knob and it worked fine and the spindle ran flawlessly up to 400Hz, i tried to fix that but was not successful so here i am,those are the three issues i have so far, the spindle speed issue and the gui missing pins(?) and the commands that are double linked, also i used the pncconf wizard and already have the motors moving, thank you for taking the time to read this and hopefully you can help me.

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

More
14 Mar 2021 08:18 #202195 by santiagoe
forgot to mention that i changed the parameters in the vfd to work correctly

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

More
15 Mar 2021 06:26 #202308 by newbynobi
Please try to enable again the line gmoccapy.spindle_at_speed, as that one should work.
If it does let's take the next step and enable the feedback bar.

IMHO that error was caused as consequence of the vfd error.

If enabling the spindle at spped line in postgui Hal does throw errors, please post the complete output from the terminal.

Norbert

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

More
16 Mar 2021 07:36 #202455 by santiagoe
thank you for your response, tbh not sure if i followed you correctly but i just enabled both lines of the custom_postgui.hal, one at a time and at the same time and still got the same errors so i am lost here, i am going to upload the report file not sure if that is what you need as i am not sure what output from the terminal is, if that file is not useful please tell me how can i get what you need.

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

More
16 Mar 2021 07:38 #202456 by santiagoe
.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.0
Machine configuration directory is '/home/pi/linuxcnc/configs/santiPNC'
Machine configuration file is 'santiPNC.ini'
INIFILE=/home/pi/linuxcnc/configs/santiPNC/santiPNC.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=gmoccapy
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): ./santiPNC.hal
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
custom_postgui.hal:4: Pin 'gmoccapy.spindle_at_speed_led' does not exist
6281
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:
pastebin.com
in order to provide information about the linuxcnc
system and configuration.

Date: Tue 16 Mar 2021 02:27:50 AM CDT
UTC Date: Tue 16 Mar 2021 07:27:50 AM UTC
this program: /usr/bin/linuxcnc_info
uptime: 02:27:50 up 2 days, 12:54, 2 users, load average: 0.57, 0.94, 1.43
lsb_release -sa: Raspbian Raspbian GNU/Linux 10 (buster) 10 buster
which linuxcnc: /usr/bin/linuxcnc
pwd: /home/pi/linuxcnc/configs/santiPNC
USER: pi
LOGNAME: pi
HOME: /home/pi
EDITOR:
VISUAL:
LANGUAGE:
TERM: dumb
COLORTERM:
DISPLAY: :0.0
DESKTOP: LXDE-pi
display size: 1920x1080 pixels (508x285 millimeters)
PATH: /usr/bin:/home/pi/linuxcnc/configs/santiPNC/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games

uname items:
nodename -n: linuxcnc
kernel-name -s: Linux
kernel-vers -v: #4 SMP PREEMPT RT Thu Apr 30 22:00:15 CDT 2020
machine -m: armv7l
processor -p: unknown
platform -i: unknown
oper system -o: GNU/Linux

/proc items:
cmdline: coherent_pool=1M 8250.nr_uarts=0 cma=64M cma=256M video=HDMI-A-1:1920x1080M@60 smsc95xx.macaddr=DC:A6:32:69:AF:89 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 console=tty1 root=PARTUUID=f8afa9f2-02 rootfstype=ext4 elevator=deadline fsck.repair=yes isolcpus=3 idle=poll rootwait quiet splash plymouth.ignore-serial-consoles
model name: ARMv7 Processor rev 3 (v7l)
cores:
cpu MHz:
parport:
serial:

Versions:
gcc: gcc (Raspbian 8.3.0-6+rpi1) 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.0
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*':
Desired=Unknown/Install/Remove/Purge/Hold
| 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-doc <none> <none> (no description available)
ii linuxcnc-doc-en 1:2.8.0 all motion controller for CNC machines and robots (English documentation)
un linuxcnc-sim <none> <none> (no description available)

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

More
16 Mar 2021 08:14 - 16 Mar 2021 08:23 #202459 by Aciera
I think the problem is this in the second line of your 'santiPNC.hal':
source postgui_call_list.hal

This tells LCNC to load the postgui_call_list.hal before the GUI has been loaded and that is why the gmoccapy pins do not yet exist.
So delete that line.

Note that this line in the [HAL] section of your INI tells LCNC to load your postgui_call_list.hal automatically once the GUI has been loaded:

POSTGUI_HALFILE = postgui_call_list.hal


So you don't need to load it manually.

[edit]
Just noticed that you have this in your 'postgui_call_list.hal':
source pyvcp_options.hal

I'm not sure you need that to be loaded after the GUI. If it needs to be loaded earlier you could move it to the [HAL] section of your INI:
[HAL]
HALUI = halui
HALFILE = santiPNC.hal
HALFILE = pyvcp_options.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal
Last edit: 16 Mar 2021 08:23 by Aciera.
The following user(s) said Thank You: santiagoe

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

More
16 Mar 2021 14:34 #202481 by newbynobi
@Aciera,

thanks for your attention, I must have overlooked that one. Your solution should solve the problem.

Norbert
The following user(s) said Thank You: santiagoe

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

More
16 Mar 2021 19:26 #202505 by santiagoe
hi thanks for your answer, with that i was able to get the led and feedback bar working in gmoccapy also i commented the pyvcp lines so that does not show up anymore, thank you very much but i am still unable to set the speed in the vfd, it still starts at 300 rpm but it does not let me go faster, i have not found the line to configure that, thanks again

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

More
16 Mar 2021 19:53 #202508 by Aciera
I'm not familiar with that vfd component.
Are there any commands that work with your vfd using your current config?

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

More
16 Mar 2021 20:00 #202509 by santiagoe
the only way i found to go higher was to set the starting rpm to 10000 but that is the limit, i think that is not the right way to do it, i also tried changing the spindle max output in the ini file but that is not working
[SPINDLE_0]
P = 0.0
I = 0.0
D = 0.0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 24000.0

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

Time to create page: 0.136 seconds
Powered by Kunena Forum