0% found this document useful (0 votes)
122 views2 pages

Linuxcnc Config

This document contains configuration code for a 3040t CNC machine. It defines the pin connections and settings for the stepper motor drivers and other hardware using HAL components.

Uploaded by

LeandroCarlos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views2 pages

Linuxcnc Config

This document contains configuration code for a 3040t CNC machine. It defines the pin connections and settings for the stepper motor drivers and other hardware using HAL components.

Uploaded by

LeandroCarlos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

04/09/2016

linuxcnc-config/3040t.hal at master jieter/linuxcnc-config GitHub

Personal

Open source

Business

Explore

Pricing

Blog

jieter / linuxcnc-config
Code

Branch: master

Issues 0

Support

This repository

Watch

Pull requests 0

Pulse

Sign in

Search

Star

Sign up

Fork

Graphs

linuxcnc-config / configs / 3040t / 3040t.hal

Find file

jieter initial commit

Copy path

71e2c90on 20 Jun 2014

0 contributors

96 lines (83 sloc)

3.29 KB

Raw

Blame

History

# Generated by stepconf at Tue Jun 17 18:52:45 2014

# If you make changes to this file, they will be

# overwritten when you run stepconf again

loadrt trivkins

loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES

loadrt probe_parport

loadrt hal_parport cfg="0x378 out "

setp parport.0.reset-time 5000

loadrt stepgen step_type=0,0,0

10
11

addf parport.0.read base-thread

12

addf stepgen.make-pulses base-thread

13

addf parport.0.write base-thread

14

addf parport.0.reset base-thread

15
16

addf stepgen.capture-position servo-thread

17

addf motion-command-handler servo-thread

18

addf motion-controller servo-thread

19

addf stepgen.update-freq servo-thread

20

net spindle-cmd <= motion.spindle-speed-out

21

net spindle-at-speed => motion.spindle-at-speed

22
23

net probe-in => motion.probe-input

24
25

setp parport.0.pin-02-out-invert 1

26

net xstep => parport.0.pin-02-out

27

setp parport.0.pin-02-out-reset 1

28

net xdir => parport.0.pin-03-out

29

setp parport.0.pin-04-out-invert 1

30

net ystep => parport.0.pin-04-out

31

setp parport.0.pin-04-out-reset 1

32

setp parport.0.pin-05-out-invert 1

33

net ydir => parport.0.pin-05-out

34

setp parport.0.pin-06-out-invert 1

35

net zstep => parport.0.pin-06-out

36

setp parport.0.pin-06-out-reset 1

37

net zdir => parport.0.pin-07-out

38
39
40

net estop-ext <= parport.0.pin-10-in

41

net both-home-x <= parport.0.pin-11-in

42

net both-home-y <= parport.0.pin-12-in

43

net probe-in <= parport.0.pin-15-in-not

44
45
46

setp stepgen.0.position-scale [AXIS_0]SCALE

47

setp stepgen.0.steplen 1

48

setp stepgen.0.stepspace 0

49

setp stepgen.0.dirhold 70000

50

setp stepgen.0.dirsetup 70000

51

setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL

52

net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd

53

net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb

54

net xstep <= stepgen.0.step

55

net xdir <= stepgen.0.dir

https://github.com/jieter/linuxcnc-config/blob/master/configs/3040t/3040t.hal

1/2

04/09/2016

linuxcnc-config/3040t.hal at master jieter/linuxcnc-config GitHub

56

net xenable axis.0.amp-enable-out => stepgen.0.enable

57

net both-home-x => axis.0.home-sw-in

58

net both-home-x => axis.0.neg-lim-sw-in

59

net both-home-x => axis.0.pos-lim-sw-in

60
61

setp stepgen.1.position-scale [AXIS_1]SCALE

62

setp stepgen.1.steplen 1

63

setp stepgen.1.stepspace 0

64

setp stepgen.1.dirhold 70000

65

setp stepgen.1.dirsetup 70000

66

setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL

67

net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd

68

net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb

69

net ystep <= stepgen.1.step

70

net ydir <= stepgen.1.dir

71

net yenable axis.1.amp-enable-out => stepgen.1.enable

72

net both-home-y => axis.1.home-sw-in

73

net both-home-y => axis.1.neg-lim-sw-in

74

net both-home-y => axis.1.pos-lim-sw-in

75
76

setp stepgen.2.position-scale [AXIS_2]SCALE

77

setp stepgen.2.steplen 1

78

setp stepgen.2.stepspace 0

79

setp stepgen.2.dirhold 70000

80

setp stepgen.2.dirsetup 70000

81

setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL

82

net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd

83

net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb

84

net zstep <= stepgen.2.step

85

net zdir <= stepgen.2.dir

86

net zenable axis.2.amp-enable-out => stepgen.2.enable

87
88

net estop-out <= iocontrol.0.user-enable-out

89

net estop-ext => iocontrol.0.emc-enable-in

90
91

loadusr -W hal_manualtoolchange

92

net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change

93

net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed

94

net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number

95

net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

2016 GitHub, Inc.

Terms

Privacy

Security

Status

Help

https://github.com/jieter/linuxcnc-config/blob/master/configs/3040t/3040t.hal

Contact GitHub

API

Training

Shop

Blog

About

2/2

You might also like