List of Useful Terminal Commands for LinuxCNC

More
4 years 1 month ago #251384 by jay.perez1
Greetings All,

I've been searching for a list of common commands for working within LinuxCNC without success.

There are many sites that have the usual Debian commands such as cp, ls -l, pwd, etc. but I'm looking for ones that are more useful for people trying to setup and query their LinuxCNC systems. These would include things like uname, ip -a, and others to tell me what versions of Debian and LinuxCNC and kernel I'm running and tools to determine details about the hardware involved in controlling a CNC like the network interfaces, etc.

It's likely I just haven't formulated the correct search terms to find such a list and would appreciate any help.

Thanks.

Jay

Please Log in to join the conversation.

More
4 years 1 month ago #251395 by tommylight
Uname, ip a, etc are also Linux commands, just related to kernel and network.
LinuxCNC commands i can think of now while having a coffee:
LinuxCNC, starts the config picker
Halrun, run hal commands without a GUI
Latency-histogram,
Glxgears, tests graphic
.....
From those only halrun is really usefull for deeper troubleshooting, so
halrun --help
Should show a list of commands, although i never tried it, but those commands should be the same ones used in a hal file, like:
Loadrt, load components
Addf, add functions to servo or base periods
Setp, set pins
Sets, set signals
Net, connect pins
Linkp, link pin
Unlinkp, disconnect pin
Links, link signal
Unlinks, disconnect signal
Etc.
-
Need more coffee... :) so you might want to double check those.

Please Log in to join the conversation.

More
4 years 1 month ago #251416 by JPL
Here is a link to HAL commands mentioned by tommylight : linuxcnc.org/docs/stable/html/hal/basic-hal.html

Maybe have a look there while he's having coffee

Please Log in to join the conversation.

More
4 years 1 month ago #251419 by tommylight
Just had my second coffee, still fuzzy ! :)

Please Log in to join the conversation.

More
4 years 1 month ago #251509 by tatel
Man, there is a whole mountain of commands. You'll have to look for the commands you need for each task, otherwise we would have to provide you with the complete debian manual. BTW, you should look at the debian reference and other debian documentation:

www.debian.org/doc/manuals/debian-reference/
debian-handbook.info/browse/stable/

You can get a mini-manual about every and each installed command with this command:

man (command-name)

To put it even more plainly: to get help about "grep", you do

man grep

To see wich distro you have installed -> lsb_release -d
To see kernel version -> uname -r
To see all kernel info: -> uname -a
Info about PCI devices -> lspci
Info about CPUs -> lscpu
Info about USB devices -> lsusb

And so on.

You don't need to know all commands, just the ones you feel you need. Your knowledge will increase wit time. Take it easy. If you want to become more proficient, see the Advanced Bash Scripting Guide, you'll see lots of useful examples there, here is the URL

tldp.org/LDP/abs/html/

Please Log in to join the conversation.

More
4 years 1 month ago #252185 by andypugh
You can also use any command that is valid in a HAL file at the command line. Especially useful are:
Code:
halcmd setp somepin somevalue eg halcmd setp parport.0.pin-00-out 1 halcmd sets somesignal somevalue eg halcmd sets spindle-index-enable 1 loadusr someprogram eg halcmd loadusr halmeter pin spindle.0.index-enable halcmd loadusr halscope halcmd loadusr halshow halcmd loadusr sim_pin spindle.0.index-enable halcmd show pin lists all hal pins. or you can filter halcmd show pin *7i76* halcmd show sig halcmd show param

"halrun" loads a new realtime environment and leaves you at the hal command prompt (so no need for the "halcmd" prefix.
To connect to a running system without needing halcmd (and with super-helpful tab-completion) use
Code:
halcmd -kf

Please Log in to join the conversation.

Time to create page: 0.103 seconds
Powered by Kunena Forum