components.txt
1 [[cha:hal-components]] 2 3 = HAL Components 4 5 == Commands and Userspace Components 6 7 All of the commands in the following list have man pages. 8 Some will have expanded descriptions, some will have limited descriptions. 9 Also, all of the components listed below have man pages. 10 From these two lists you know what components exist, 11 and you can use 'man n name' to get additional information. 12 To view the information in the man page, in a terminal window type: 13 14 ---- 15 man axis (or perhaps 'man 1 axis' if your system requires it.) 16 ---- 17 18 19 axis:: AXIS LinuxCNC (The Enhanced Machine Controller) Graphical User Interface. 20 axis-remote:: AXIS Remote Interface. 21 comp:: Build, compile and install LinuxCNC HAL components. 22 gladevcp:: Virtual Control Panel for LinuxCNC based on Glade, Gtk and HAL widgets. 23 gs2:: HAL userspace component for Automation Direct GS2 VFD's. 24 halcmd:: Manipulate the Enhanced Machine Controller HAL from the command line. 25 hal_input:: Control HAL pins with any Linux input device, including USB HID devices. 26 halmeter:: Observe HAL pins, signals, and parameters. 27 halrun:: Manipulate the Enhanced Machine Controller HAL from the command line. 28 halsampler:: Sample data from HAL in realtime. 29 halstreamer:: Stream file data into HAL in real time. 30 halui:: Observe HAL pins and command LinuxCNC through NML. 31 io:: Accepts NML I/O commands, interacts with HAL in userspace. 32 iocontrol:: Accepts NML I/O commands, interacts with HAL in userspace. 33 linuxcnc:: LinuxCNC (The Enhanced Machine Controller). 34 pyvcp:: Virtual Control Panel for LinuxCNC. 35 shuttle:: control HAL pins with the ShuttleXpress and ShuttlePRO devices made by Contour Design. 36 37 [[sec:realtime-components]] 38 39 == Realtime Components List 40 41 Some of these will have expanded descriptions from the man pages. Some 42 will have limited descriptions. All of the components have man pages. 43 From this list you know what components exist and can use 'man n name' to 44 get additional information in a terminal window. 45 46 [NOTE] 47 If the component requires a floating point thread that is usually the slower 48 servo-thread. 49 50 === Core LinuxCNC components 51 52 motion:: (((motion)))Accepts NML motion commands, interacts with HAL in realtime. 53 54 axis:: (((axis)))Accepts NML motion commands, interacts with HAL in realtime. 55 56 classicladder:: (((classicladder)))Realtime software PLC based on ladder logic. 57 See <<cha:classicladder,ClassicLadder>> chapter for more information. 58 59 gladevcp:: (((gladevcp)))Displays Virtual Control Panels built with GTK/Glade. 60 61 threads:: (((threads)))Creates hard realtime HAL threads. 62 63 === Logic and Bitwise components 64 65 and2:: (((and2)))Two-input AND gate. For out to be true both inputs must be true. 66 67 not:: (((not)))Inverter. 68 69 or2:: (((or2)))Two-input OR gate. 70 71 xor2:: (((xor2)))Two-input XOR (exclusive OR) gate. 72 73 debounce:: (((debounce)))Filter noisy digital inputs. <<sec:debounce, Description>> 74 75 edge:: (((edge)))Edge detector. 76 77 flipflop:: (((flipflop)))D type flip-flop. 78 79 oneshot:: (((oneshot)))One-shot pulse generator. 80 81 logic:: (((logic)))General logic function component. 82 83 lut5:: (((lut5)))A 5-input logic function based on a look-up table. <<sec:lut5,Description>> 84 85 match8:: (((match8)))8-bit binary match detector. 86 87 select8:: (((select8)))8-bit binary match detector. 88 89 === Arithmetic and float-components 90 91 abs:: [[sub:abs]](((abs)))Compute the absolute value and sign of the input signal. 92 93 blend:: (((blend)))Perform linear interpolation between two values. 94 95 comp:: (((comp)))Two input comparator with hysteresis. 96 97 constant:: (((constant)))Use a parameter to set the value of a pin. 98 99 sum2:: (((sum2)))Sum of two inputs (each with a gain) and an offset. 100 101 counter:: (((counter)))Counts input pulses (deprecated). 102 Use the <<sec:encoder, encoder>> component. 103 104 updown:: (((updown)))Counts up or down, with optional limits and wraparound behavior. 105 106 ddt:: (((ddt)))Compute the derivative of the input function. 107 108 deadzone:: (((deadzone)))Return the center if within the threshold. 109 110 hypot:: (((hypot)))Three-input hypotenuse (Euclidean distance) calculator. 111 112 mult2:: (((mult2)))Product of two inputs. 113 114 mux16:: (((mux16)))Select from one of sixteen input values. 115 116 mux2:: (((mux2)))Select from one of two input values. 117 118 mux4:: (((mux4)))Select from one of four input values. 119 120 mux8:: (((mux8)))Select from one of eight input values. 121 122 near:: (((near)))Determine whether two values are roughly equal. 123 124 offset:: (((offset)))Adds an offset to an input, and subtracts it from the feedback value. 125 126 integ:: (((integ)))Integrator. 127 128 invert:: (((invert)))Compute the inverse of the input signal. 129 130 wcomp:: (((wcomp)))Window comparator. 131 132 weighted_sum:: (((weighted_sum)))Convert a group of bits to an integer. 133 134 biquad:: (((biquad)))Biquad IIR filter 135 136 lowpass:: (((lowpass)))Low-pass filter 137 138 limit1:: (((limit1)))Limit the output signal to fall between min and max. footnote:[When the input 139 is a position, this means that the 'position' is limited.] 140 141 limit2:: (((limit2)))Limit the output signal to fall between min and max. 142 Limit its slew rate to less than maxv per second. footnote:[When the input 143 is a position, this means that 'position' and 'velocity' are limited.] 144 145 limit3:: (((limit3)))Limit the output signal to fall between min and max. 146 Limit its slew rate to less than maxv per second. 147 Limit its second derivative to less than MaxA per second squared. footnote:[When 148 the input is a position, this means that the 'position', 'velocity', and 149 'acceleration' are limited.] 150 151 maj3:: (((maj3)))Compute the majority of 3 inputs. 152 153 scale:: (((scale)))Applies a scale and offset to its input. 154 155 === Type conversion 156 157 conv_bit_s32:: (((conv_bit_s32)))Convert a value from bit to s32. 158 159 conv_bit_u32:: (((conv_bit_u32)))Convert a value from bit to u32. 160 161 conv_float_s32:: (((conv_float_s32)))Convert a value from float to s32. 162 163 conv_float_u32:: (((conv_float_u32)))Convert a value from float to u32. 164 165 conv_s32_bit:: (((conv_s32_bit)))Convert a value from s32 to bit. 166 167 conv_s32_float:: (((conv_s32_float)))Convert a value from s32 to float. 168 169 conv_s32_u32:: (((conv_s32_u32)))Convert a value from s32 to u32. 170 171 conv_u32_bit:: (((conv_u32_bit)))Convert a value from u32 to bit. 172 173 conv_u32_float:: (((conv_u32_float)))Convert a value from u32 to float. 174 175 conv_u32_s32:: (((conv_u32_s32)))Convert a value from u32 to s32. 176 177 === Hardware Drivers 178 179 hm2_7i43:: (((hm2_7i43)))HAL driver for the Mesa Electronics 7i43 EPP Anything IO board with 180 HostMot2. 181 182 hm2_pci:: (((hm2_pci)))HAL driver for the Mesa Electronics 5i20, 5i22, 5i23, 4i65, and 4i68 183 Anything I/O boards, with HostMot2 firmware. 184 185 hostmot2:: (((hostmot2)))HAL driver for the Mesa Electronics HostMot2 firmware. 186 187 mesa_7i65:: (((7i65)))Support for the Mesa 7i65 eight-axis servo card. 188 189 pluto_servo:: (((pluto_servo)))Hardware driver and firmware for the Pluto-P parallel-port FPGA, for 190 use with servos. 191 192 pluto_step:: (((pluto_step)))Hardware driver and firmware for the Pluto-P parallel-port FPGA, for 193 use with steppers. 194 195 thc:: (((torch height control)))Torch Height Control using a Mesa THC card. 196 197 serport:: (((serport)))Hardware driver for the digital I/O bits of the 8250 and 16550 serial port. 198 199 === Kinematics 200 201 kins:: (((kins)))kinematics definitions for LinuxCNC. 202 203 gantrykins:: (((gantrykins)))A kinematics module that maps one axis to multiple joints. 204 205 genhexkins:: (((genhexkins)))Gives six degrees of freedom in position and orientation (XYZABC). 206 The location of the motors is defined at compile time. 207 208 genserkins:: (((genserkins)))Kinematics that can model a general serial-link manipulator with up to 209 6 angular joints. 210 211 maxkins:: (((maxkins)))Kinematics for a tabletop 5 axis mill named 'max' with tilting head (B axis) and 212 horizontal rotary mounted to the table (C axis). 213 Provides UVW motion in the rotated coordinate system. 214 The source file, maxkins.c, may be a useful starting point for other 5-axis systems. 215 216 tripodkins:: (((tripodkins)))The joints represent the distance of the controlled point from three 217 predefined locations (the motors), giving three degrees of freedom in 218 position (XYZ). 219 220 trivkins:: (((trivkins)))There is a 1:1 correspondence between joints and axes. Most standard 221 milling machines and lathes use the trivial kinematics module. 222 223 pumakins:: (((pumakins)))Kinematics for PUMA-style robots. 224 225 rotatekins:: (((rotatekins)))The X and Y axes are rotated 45 degrees compared to the joints 0 and 1. 226 227 scarakins:: (((scarakins)))Kinematics for SCARA-type robots. 228 229 === Motor control 230 231 at_pid:: (((at_pid)))Proportional/integral/derivative controller with auto tuning. 232 233 pid:: Proportional/integral/derivative controller. <<sec:pid,Description>> 234 235 pwmgen:: (((pwmgen)))Software PWM/PDM generation. <<sec:pwmgen,Description>> 236 237 encoder:: (((encoder)))Software counting of quadrature encoder signals. <<sec:encoder,Description>>. 238 239 stepgen:: (((stepgen)))Software step pulse generation. <<sec:stepgen,Description>>. 240 241 === BLDC and 3-phase motor control 242 243 bldc_hall3:: (((bldc_hall3)))3-wire Bipolar trapezoidal commutation BLDC motor driver using Hall sensors. 244 245 clarke2:: (((clarke2)))Two input version of Clarke transform. 246 247 clarke3:: (((clarke3)))Clarke (3 phase to cartesian) transform. 248 249 clarkeinv:: (((clarkeinv)))Inverse Clarke transform. 250 251 === Other 252 253 charge_pump:: (((charge_pump)))Creates a square-wave for the 'charge pump' input of some controller boards. 254 The 'Charge Pump' should be added to the base thread function. When enabled the output is on for one period and off for one period. To calculate the frequency of the output 1/(period time in seconds x 2) = hz. For example if you have a base period of 100,000ns that is 0.0001 seconds and the formula would be 1/(0.0001 x 2) = 5,000 hz or 5 Khz. 255 256 encoder_ratio:: (((encoder_ratio)))An electronic gear to synchronize two axes. 257 258 estop_latch:: (((estop_latch)))ESTOP latch. 259 260 feedcomp:: (((feedcomp)))Multiply the input by the ratio of current velocity to the feed rate. 261 262 gearchange:: (((gearchange)))Select from one of two speed ranges. 263 264 [[sec:ilowpass]] (((ilowpass))) 265 266 ilowpass:: While it may find other applications, 267 this component was written to create smoother motion while jogging with an MPG. 268 + 269 In a machine with high acceleration, a short jog can behave almost like a step 270 function. By putting the ilowpass component between the MPG encoder counts 271 output and the axis jog-counts input, this can be smoothed. 272 + 273 Choose scale conservatively so that during a single session there will never 274 be more than about 2e9/scale pulses seen on the MPG. Choose gain according 275 to the smoothing level desired. Divide the axis.N.jog-scale values by scale. 276 277 joyhandle:: (((joyhandle)))Sets nonlinear joypad movements, deadbands and scales. 278 279 knob2float:: (((knob2float)))Convert counts (probably from an encoder) to a float value. 280 281 minmax:: (((minmax)))Track the minimum and maximum values of the input to the outputs. 282 283 sample_hold:: (((sample_hold)))Sample and Hold. 284 285 sampler:: (((sampler)))Sample data from HAL in real time. 286 287 siggen:: Signal generator. <<sec:siggen,Description>>. 288 289 sim_encoder:: (((sim_encoder)))Simulated quadrature encoder. <<sec:simulated-encoder,Description>>. 290 291 sphereprobe:: (((sphereprobe)))Probe a pretend hemisphere. 292 293 steptest:: (((steptest)))Used by Stepconf to allow testing of acceleration and velocity values for an axis. 294 295 streamer:: (((streamer)))Stream file data into HAL in real time. 296 297 supply:: (((supply)))Set output pins with values from parameters (deprecated). 298 299 threadtest:: (((threadtest)))Component for testing thread behavior. 300 301 time:: (((time)))Accumulated run-time timer counts HH:MM:SS of 'active' input. 302 303 timedelay:: (((timedelay)))The equivalent of a time-delay relay. 304 305 timedelta:: (((timedelta)))Component that measures thread scheduling timing behavior. 306 307 toggle2nist:: (((toggle2nist)))Toggle button to nist logic. 308 309 toggle:: (((toggle)))Push-on, push-off from momentary pushbuttons. 310 311 tristate_bit:: (((tristate_bit)))Place a signal on an I/O pin only when enabled, similar to a tristate 312 buffer in electronics. 313 314 tristate_float:: (((tristate_float)))Place a signal on an I/O pin only when enabled, similar to a tristate 315 buffer in electronics. 316 317 318 319 watchdog:: (((watchdog)))Monitor one to thirty-two inputs for a 'heartbeat'. 320 321 322 == HAL API calls 323 .... 324 hal_add_funct_to_thread.3hal 325 hal_bit_t.3hal 326 hal_create_thread.3hal 327 hal_del_funct_from_thread.3hal 328 hal_exit.3hal 329 hal_export_funct.3hal 330 hal_float_t.3hal 331 hal_get_lock.3hal 332 hal_init.3hal 333 hal_link.3hal 334 hal_malloc.3hal 335 hal_param_bit_new.3hal 336 hal_param_bit_newf.3hal 337 hal_param_float_new.3hal 338 hal_param_float_newf.3hal 339 hal_param_new.3hal 340 hal_param_s32_new.3hal 341 hal_param_s32_newf.3hal 342 hal_param_u32_new.3hal 343 hal_param_u32_newf.3hal 344 hal_parport.3hal 345 hal_pin_bit_new.3hal 346 hal_pin_bit_newf.3hal 347 hal_pin_float_new.3hal 348 hal_pin_float_newf.3hal 349 hal_pin_new.3hal 350 hal_pin_s32_new.3hal 351 hal_pin_s32_newf.3hal 352 hal_pin_u32_new.3hal 353 hal_pin_u32_newf.3hal 354 hal_ready.3hal 355 hal_s32_t.3hal 356 hal_set_constructor.3hal 357 hal_set_lock.3hal 358 hal_signal_delete.3hal 359 hal_signal_new.3hal 360 hal_start_threads.3hal 361 hal_type_t.3hal 362 hal_u32_t.3hal 363 hal_unlink.3hal 364 intro.3hal 365 undocumented.3hal 366 .... 367 368 == RTAPI calls 369 .... 370 EXPORT_FUNCTION.3rtapi 371 MODULE_AUTHOR.3rtapi 372 MODULE_DESCRIPTION.3rtapi 373 MODULE_LICENSE.3rtapi 374 RTAPI_MP_ARRAY_INT.3rtapi 375 RTAPI_MP_ARRAY_LONG.3rtapi 376 RTAPI_MP_ARRAY_STRING.3rtapi 377 RTAPI_MP_INT.3rtapi 378 RTAPI_MP_LONG.3rtapi 379 RTAPI_MP_STRING.3rtapi 380 intro.3rtapi 381 rtapi_app_exit.3rtapi 382 rtapi_app_main.3rtapi 383 rtapi_clock_set_period.3rtapi 384 rtapi_delay.3rtapi 385 rtapi_delay_max.3rtapi 386 rtapi_exit.3rtapi 387 rtapi_get_clocks.3rtapi 388 rtapi_get_msg_level.3rtapi 389 rtapi_get_time.3rtapi 390 rtapi_inb.3rtapi 391 rtapi_init.3rtapi 392 rtapi_module_param.3rtapi 393 RTAPI_MP_ARRAY_INT.3rtapi 394 RTAPI_MP_ARRAY_LONG.3rtapi 395 RTAPI_MP_ARRAY_STRING.3rtapi 396 RTAPI_MP_INT.3rtapi 397 RTAPI_MP_LONG.3rtapi 398 RTAPI_MP_STRING.3rtapi 399 rtapi_mutex.3rtapi 400 rtapi_outb.3rtapi 401 rtapi_print.3rtap 402 rtapi_prio.3rtapi 403 rtapi_prio_highest.3rtapi 404 rtapi_prio_lowest.3rtapi 405 rtapi_prio_next_higher.3rtapi 406 rtapi_prio_next_lower.3rtapi 407 rtapi_region.3rtapi 408 rtapi_release_region.3rtapi 409 rtapi_request_region.3rtapi 410 rtapi_set_msg_level.3rtapi 411 rtapi_shmem.3rtapi 412 rtapi_shmem_delete.3rtapi 413 rtapi_shmem_getptr.3rtapi 414 rtapi_shmem_new.3rtapi 415 rtapi_snprintf.3rtapi 416 rtapi_task_delete.3rtpi 417 rtapi_task_new.3rtapi 418 rtapi_task_pause.3rtapi 419 rtapi_task_resume.3rtapi 420 rtapi_task_start.3rtapi 421 rtapi_task_wait.3rtapi 422 .... 423