Rpi 400, 7c85 to 7185s setup? xylotex

More
5 years 7 months ago #201133 by 1RandomSquirrel
Thanks on those pins.

The db25 pins you added to master is that in the buildbot 2.9 and 2.8?

Please Log in to join the conversation.

More
5 years 7 months ago #201134 by PCW
Just 2.9

Please Log in to join the conversation.

More
5 years 7 months ago #201180 by 1RandomSquirrel
I am making progress. When i start linuxcnc the driver makes a noise change! I am so happy!

Now i am getting hm2/hm2_7c81.0: Watchdog has bit! (set the .has-bit pin to False to resume)

I'm not sure if i have the right kernel for some reason i thought the when i did cat /proc/version it would say realtime but maybe that way because of rtai and now i should be running preempt

pi@raspberrypi:~ $ cat /proc/version
Linux version 5.10.17-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1403 SMP Mon Feb 22 11:33:35 GMT 2021


Code:
pi@raspberrypi:~ $ linuxcnc -d Debug mode on + getopts dvlhkr opt + shift 1 + case "" in + '[' -z ']' + tty -s + trap ErrorCheck EXIT + '[' '!' -z '' ']' + EXTRA_ARGS= + RUN_IN_PLACE=no + echo RUN_IN_PLACE=no + LINUXCNCVERSION=2.9.0-pre0-3640-g8be0ba545 + export LINUXCNCVERSION + INIVAR=inivar + HALCMD='halcmd ' + PICKCONFIG='/usr/bin/wish8.6 /usr/lib/tcltk/linuxcnc/bin/pickconfig.tcl' + LINUXCNC_EMCSH=/usr/bin/wish8.6 + echo LINUXCNC_DIR= + echo LINUXCNC_BIN_DIR=/usr/bin + echo LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc + echo LINUXCNC_SCRIPT_DIR= + echo LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules + echo LINUXCNC_CONFIG_DIR= + echo LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs + echo INIVAR=inivar + echo HALCMD=halcmd + echo LINUXCNC_EMCSH=/usr/bin/wish8.6 + export LINUXCNC_TCL_DIR + export LINUXCNC_EMCSH + export LINUXCNC_HELP_DIR + export LINUXCNC_LANG_DIR + export REALTIME + export HALCMD + export LINUXCNC_NCFILES_DIR + '[' -z ']' + echo 'LINUXCNC - 2.9.0-pre0-3640-g8be0ba545' LINUXCNC - 2.9.0-pre0-3640-g8be0ba545 + '[' '!' -z '' ']' + '[' '!' -n '' ']' ++ /usr/bin/wish8.6 /usr/lib/tcltk/linuxcnc/bin/pickconfig.tcl + INIFILE=/home/pi/linuxcnc/configs/Lathe/Lathe.ini + '[' /home/pi/linuxcnc/configs/Lathe/Lathe.ini.demo = /home/pi/linuxcnc/configs/Lathe/Lathe.ini ']' + '[' '!' -n /home/pi/linuxcnc/configs/Lathe/Lathe.ini ']' ++ handle_includes /home/pi/linuxcnc/configs/Lathe/Lathe.ini ++ hdr='# handle_includes():' ++ inifile=/home/pi/linuxcnc/configs/Lathe/Lathe.ini +++ dirname /home/pi/linuxcnc/configs/Lathe/Lathe.ini ++ cd /home/pi/linuxcnc/configs/Lathe ++ /bin/grep '^#INCLUDE' /home/pi/linuxcnc/configs/Lathe/Lathe.ini ++ status=1 ++ '[' 1 -ne 0 ']' ++ echo /home/pi/linuxcnc/configs/Lathe/Lathe.ini ++ return 0 + INIFILE=/home/pi/linuxcnc/configs/Lathe/Lathe.ini + INI_NAME=Lathe.ini + INI_DIR=/home/pi/linuxcnc/configs/Lathe + CONFIG_DIR=/home/pi/linuxcnc/configs/Lathe + export CONFIG_DIR + export PATH=/home/pi/linuxcnc/configs/Lathe/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games + PATH=/home/pi/linuxcnc/configs/Lathe/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games + '[' -z ']' + echo 'Machine configuration directory is '\''/home/pi/linuxcnc/configs/Lathe'\''' Machine configuration directory is '/home/pi/linuxcnc/configs/Lathe' + echo 'Machine configuration file is '\''Lathe.ini'\''' Machine configuration file is 'Lathe.ini' + '[' '!' -f /home/pi/linuxcnc/configs/Lathe/Lathe.ini ']' + echo INIFILE=/home/pi/linuxcnc/configs/Lathe/Lathe.ini + retval= + GetFromIni VERSION EMC + name=VERSION ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var VERSION -sec EMC + retval=1.1 + '[' '!' -n VERSION ']' + echo VERSION=1.1 + '[' 1.1 '!=' 1.1 ']' + /usr/bin/tclsh8.6 /usr/share/linuxcnc/hallib/check_config.tcl /home/pi/linuxcnc/configs/Lathe/Lathe.ini + exitval=0 + case "$exitval" in + GetFromIni PARAMETER_FILE RS274NGC + name=PARAMETER_FILE ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var PARAMETER_FILE -sec RS274NGC + retval=linuxcnc.var + '[' '!' -n PARAMETER_FILE ']' + echo PARAMETER_FILE=linuxcnc.var + RS274NGC_PARAMFILE=linuxcnc.var + GetFromIniEx MOT MOT EMCMOT EMCMOT motmod + original_var='[MOT]MOT' + '[' 5 -ge 2 ']' ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var MOT -sec MOT + retval= + shift 2 + '[' 3 -ge 2 ']' ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var EMCMOT -sec EMCMOT + retval=motmod + return + EMCMOT=motmod.so + GetFromIniEx IO IO EMCIO EMCIO io + original_var='[IO]IO' + '[' 5 -ge 2 ']' ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var IO -sec IO + retval= + shift 2 + '[' 3 -ge 2 ']' ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var EMCIO -sec EMCIO + retval=io + return + EMCIO=io + GetFromIni TASK TASK + name=TASK ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var TASK -sec TASK + retval=milltask + '[' '!' -n TASK ']' + echo TASK=milltask + EMCTASK=milltask + '[' milltask = emctask ']' + EMCSERVER=linuxcncsvr + GetFromIniQuiet HALUI HAL + name=HALUI ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var HALUI -sec HAL + retval=halui + '[' '!' -n HALUI ']' + echo HALUI=halui + HALUI=halui + GetFromIni DISPLAY DISPLAY + name=DISPLAY ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var DISPLAY -sec DISPLAY + retval=axis + '[' '!' -n DISPLAY ']' + echo DISPLAY=axis ++ set -- axis ++ echo axis + EMCDISPLAY=axis ++ set -- axis ++ shift ++ echo + EMCDISPLAYARGS= + case $EMCDISPLAY in + GetFromIniEx NML_FILE LINUXCNC NML_FILE EMC /usr/share/linuxcnc/linuxcnc.nml + original_var='[LINUXCNC]NML_FILE' + '[' 5 -ge 2 ']' ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var NML_FILE -sec LINUXCNC + retval= + shift 2 + '[' 3 -ge 2 ']' ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var NML_FILE -sec EMC + retval= + shift 2 + '[' 1 -ge 2 ']' + '[' 1 -eq 0 ']' + retval=/usr/share/linuxcnc/linuxcnc.nml + NMLFILE=/usr/share/linuxcnc/linuxcnc.nml + export NMLFILE + GetFromIni COORDINATES TRAJ + name=COORDINATES ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var COORDINATES -sec TRAJ + retval=XZ + '[' '!' -n COORDINATES ']' + echo COORDINATES=XZ + TRAJ_COORDINATES=XZ + export TRAJ_COORDINATES + GetFromIni KINEMATICS KINS + name=KINEMATICS ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var KINEMATICS -sec KINS + retval='trivkins coordinates=XZ' + '[' '!' -n KINEMATICS ']' + echo 'KINEMATICS=trivkins coordinates=XZ' + KINS_KINEMATICS='trivkins coordinates=XZ' + export KINS_KINEMATICS + KILL_TASK= + KILL_TIMEOUT=20 + LOCKFILE=/tmp/linuxcnc.lock + '[' -f /tmp/linuxcnc.lock ']' + echo Starting LinuxCNC... Starting LinuxCNC... + trap 'Cleanup ; exit 0' SIGINT SIGTERM + cd /home/pi/linuxcnc/configs/Lathe + touch /tmp/linuxcnc.lock ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var INTRO_GRAPHIC -sec DISPLAY + img=linuxcnc.gif ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var INTRO_TIME -sec DISPLAY + imgtime=5 + '[' 5 = '' ']' + '[' linuxcnc.gif '!=' '' ']' + '[' -e linuxcnc.gif ']' + '[' -e /home/pi/linuxcnc/configs/Lathe/linuxcnc.gif ']' + '[' -e /usr/share/linuxcnc/linuxcnc.gif ']' + img=/usr/share/linuxcnc/linuxcnc.gif + '[' /usr/share/linuxcnc/linuxcnc.gif '!=' '' ']' + '[' -x /usr/lib/tcltk/linuxcnc/bin/popimage ']' + echo 'Starting LinuxCNC server program: linuxcncsvr' + /usr/lib/tcltk/linuxcnc/bin/popimage /usr/share/linuxcnc/linuxcnc.gif 5 + program_available linuxcncsvr + type -path linuxcncsvr + export INI_FILE_NAME=/home/pi/linuxcnc/configs/Lathe/Lathe.ini + INI_FILE_NAME=/home/pi/linuxcnc/configs/Lathe/Lathe.ini + linuxcncsvr -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini + echo 'Loading Real Time OS, RTAPI, and HAL_LIB modules' + /etc/init.d/realtime start + export HAL_RTMOD_DIR=/usr/lib/linuxcnc/modules + HAL_RTMOD_DIR=/usr/lib/linuxcnc/modules + '[' io '!=' '' ']' + echo 'Starting LinuxCNC IO program: io' + program_available io + type -path io + halcmd loadusr -Wn iocontrol io -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini + '[' -n halui ']' + echo 'Starting HAL User Interface program: halui' + program_available halui + type -path halui + halcmd loadusr -Wn halui halui -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var TWOPASS -sec HAL -num 1 + TWOPASS= + '[' -n '' ']' + NUM=1 ++ inivar -tildeexpand -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var HALFILE -sec HAL -num 1 + CFGFILE=Lathe.hal + '[' -n Lathe.hal ']' + IFS='\ ' + read CFGFILE CFGFILE_ARGS + foundmsg= + saveIFS=' ' + IFS=: + explicit_file_in_hallib=Lathe.hal + '[' -z Lathe.hal ']' + '[' Lathe.hal '!=' Lathe.hal ']' + '[' L = / ']' + for pathdir in $HALLIB_PATH + foundfile=./Lathe.hal + '[' -r ./Lathe.hal ']' + '[' . = . ']' + foundmsg='Found file(REL): ./Lathe.hal' + break + '[' -d ./Lathe.hal ']' + IFS=' ' + '[' -z 'Found file(REL): ./Lathe.hal' ']' + echo 'Found file(REL): ./Lathe.hal' Found file(REL): ./Lathe.hal + CFGFILE=./Lathe.hal + case $CFGFILE in + halcmd -i /home/pi/linuxcnc/configs/Lathe/Lathe.ini -f ./Lathe.hal Note: Using POSIX non-realtime hm2: loading Mesa HostMot2 driver version 0.15 hm2/hm2_7c81.0: Low Level init 0.15 hm2/hm2_7c81.0: Smart Serial Firmware Version 43 hm2/hm2_7c81.0: 57 I/O Pins used: hm2/hm2_7c81.0: IO Pin 000 (P1-01/DB25-01): IOPort hm2/hm2_7c81.0: IO Pin 001 (P1-02/DB25-14): IOPort hm2/hm2_7c81.0: IO Pin 002 (P1-03/DB25-02): StepGen #3, pin Step (Output) hm2/hm2_7c81.0: IO Pin 003 (P1-04/DB25-15): StepGen #3, pin Direction (Output) hm2/hm2_7c81.0: IO Pin 004 (P1-05/DB25-03): StepGen #2, pin Step (Output) hm2/hm2_7c81.0: IO Pin 005 (P1-06/DB25-16): StepGen #2, pin Direction (Output) hm2/hm2_7c81.0: IO Pin 006 (P1-07/DB25-04): StepGen #1, pin Step (Output) hm2/hm2_7c81.0: IO Pin 007 (P1-08/DB25-17): StepGen #1, pin Direction (Output) hm2/hm2_7c81.0: IO Pin 008 (P1-09/DB25-05): StepGen #0, pin Step (Output) hm2/hm2_7c81.0: IO Pin 009 (P1-11/DB25-06): StepGen #0, pin Direction (Output) hm2/hm2_7c81.0: IO Pin 010 (P1-13/DB25-07): Muxed Encoder Select #0, pin Mux Select 0 (Output) hm2/hm2_7c81.0: IO Pin 011 (P1-15/DB25-08): Muxed Encoder #0, pin Muxed A (Input) hm2/hm2_7c81.0: IO Pin 012 (P1-17/DB25-09): Muxed Encoder #0, pin Muxed B (Input) hm2/hm2_7c81.0: IO Pin 013 (P1-19/DB25-10): Muxed Encoder #0, pin Muxed Index (Input) hm2/hm2_7c81.0: IO Pin 014 (P1-21/DB25-11): IOPort hm2/hm2_7c81.0: IO Pin 015 (P1-23/DB25-12): IOPort hm2/hm2_7c81.0: IO Pin 016 (P1-25/DB25-13): IOPort hm2/hm2_7c81.0: IO Pin 017 (J5-TX0): IOPort hm2/hm2_7c81.0: IO Pin 018 (J6-TX1): IOPort hm2/hm2_7c81.0: IO Pin 019 (P2-01/DB25-01): IOPort hm2/hm2_7c81.0: IO Pin 020 (P2-02/DB25-14): IOPort hm2/hm2_7c81.0: IO Pin 021 (P2-03/DB25-02): IOPort hm2/hm2_7c81.0: IO Pin 022 (P2-04/DB25-15): IOPort hm2/hm2_7c81.0: IO Pin 023 (P2-05/DB25-03): StepGen #6, pin Step (Output) hm2/hm2_7c81.0: IO Pin 024 (P2-06/DB25-16): StepGen #6, pin Direction (Output) hm2/hm2_7c81.0: IO Pin 025 (P2-07/DB25-04): StepGen #5, pin Step (Output) hm2/hm2_7c81.0: IO Pin 026 (P2-08/DB25-17): StepGen #5, pin Direction (Output) hm2/hm2_7c81.0: IO Pin 027 (P2-09/DB25-05): StepGen #4, pin Step (Output) hm2/hm2_7c81.0: IO Pin 028 (P2-11/DB25-06): StepGen #4, pin Direction (Output) hm2/hm2_7c81.0: IO Pin 029 (P2-13/DB25-07): IOPort hm2/hm2_7c81.0: IO Pin 030 (P2-15/DB25-08): IOPort hm2/hm2_7c81.0: IO Pin 031 (P2-17/DB25-09): IOPort hm2/hm2_7c81.0: IO Pin 032 (P2-19/DB25-10): IOPort hm2/hm2_7c81.0: IO Pin 033 (P2-21/DB25-11): IOPort hm2/hm2_7c81.0: IO Pin 034 (P2-23/DB25-12): IOPort hm2/hm2_7c81.0: IO Pin 035 (P2-25/DB25-13): IOPort hm2/hm2_7c81.0: IO Pin 036 (J5-TXEN0): IOPort hm2/hm2_7c81.0: IO Pin 037 (J6-TXEN1): IOPort hm2/hm2_7c81.0: IO Pin 038 (P7-01/DB25-01): IOPort hm2/hm2_7c81.0: IO Pin 039 (P7-02/DB25-14): IOPort hm2/hm2_7c81.0: IO Pin 040 (P7-03/DB25-02): IOPort hm2/hm2_7c81.0: IO Pin 041 (P7-04/DB25-15): IOPort hm2/hm2_7c81.0: IO Pin 042 (P7-05/DB25-03): IOPort hm2/hm2_7c81.0: IO Pin 043 (P7-06/DB25-16): IOPort hm2/hm2_7c81.0: IO Pin 044 (P7-07/DB25-04): IOPort hm2/hm2_7c81.0: IO Pin 045 (P7-08/DB25-17): IOPort hm2/hm2_7c81.0: IO Pin 046 (P7-09/DB25-05): IOPort hm2/hm2_7c81.0: IO Pin 047 (P7-11/DB25-06): IOPort hm2/hm2_7c81.0: IO Pin 048 (P7-13/DB25-07): IOPort hm2/hm2_7c81.0: IO Pin 049 (P7-15/DB25-08): IOPort hm2/hm2_7c81.0: IO Pin 050 (P7-17/DB25-09): IOPort hm2/hm2_7c81.0: IO Pin 051 (P7-19/DB25-10): IOPort hm2/hm2_7c81.0: IO Pin 052 (P7-21/DB25-11): IOPort hm2/hm2_7c81.0: IO Pin 053 (P7-23/DB25-12): IOPort hm2/hm2_7c81.0: IO Pin 054 (P7-25/DB25-13): IOPort hm2/hm2_7c81.0: IO Pin 055 (P5-RX0): IOPort hm2/hm2_7c81.0: IO Pin 056 (P6-RX1): IOPort hm2/hm2_7c81.0: registered + NUM=2 ++ inivar -tildeexpand -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var HALFILE -sec HAL -num 2 + CFGFILE=custom.hal + '[' -n custom.hal ']' + IFS='\ ' + read CFGFILE CFGFILE_ARGS + foundmsg= + saveIFS=' ' + IFS=: + explicit_file_in_hallib=custom.hal + '[' -z custom.hal ']' + '[' custom.hal '!=' custom.hal ']' + '[' c = / ']' + for pathdir in $HALLIB_PATH + foundfile=./custom.hal + '[' -r ./custom.hal ']' + '[' . = . ']' + foundmsg='Found file(REL): ./custom.hal' + break + '[' -d ./custom.hal ']' + IFS=' ' + '[' -z 'Found file(REL): ./custom.hal' ']' + echo 'Found file(REL): ./custom.hal' Found file(REL): ./custom.hal + CFGFILE=./custom.hal + case $CFGFILE in + halcmd -i /home/pi/linuxcnc/configs/Lathe/Lathe.ini -f ./custom.hal + NUM=3 ++ inivar -tildeexpand -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var HALFILE -sec HAL -num 3 + CFGFILE= + '[' -n '' ']' + echo 'Starting TASK program: milltask' + program_available milltask + type -path milltask + NUM=1 + halcmd loadusr -Wn inihal milltask -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini ++ inivar -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var HALCMD -sec HAL -num 1 + HALCOMMAND= + '[' -n '' ']' + halcmd start + run_applications + NUM=1 ++ inivar -tildeexpand -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini -var APP -sec APPLICATIONS -num 1 + APPFILE= + '[' -z '' ']' + return + echo 'Starting DISPLAY program: axis' + result=0 + case $EMCDISPLAY in + program_available axis + type -path axis + axis -ini /home/pi/linuxcnc/configs/Lathe/Lathe.ini note: MAXV max: 1.000 units/sec 60.000 units/min note: LJOG max: 1.000 units/sec 60.000 units/min note: LJOG default: 0.250 units/sec 15.000 units/min note: jog_order='ZX' note: jog_invert=set(['X']) hm2/hm2_7c81.0: Watchdog has bit! (set the .has-bit pin to False to resume) hm2/hm2_7c81.0: Watchdog has bit! (set the .has-bit pin to False to resume)

Please Log in to join the conversation.

More
5 years 7 months ago #201188 by PCW
Yeah, you are not running a real time kernel, so watchdog timeouts are expected.

Please Log in to join the conversation.

More
5 years 7 months ago #201244 by andypugh
Note: Using POSIX non-realtime

You should be able to get the realtime kernel with:

sudo apt-get install linux-image-4.19.71-rt24-v7l+

(from linuxcnc.org/docs/2.8/html/getting-start...lling_on_raspbian_10 )

Please Log in to join the conversation.

More
5 years 7 months ago #201384 by 1RandomSquirrel
Thanks I was able to get it working. Atleast the proof of concept. It was a combination of my .hal file being wrong and the db25 pins. I will try to post my hal and ini files after I make sure the bugs are out of them.

I did end up going back and changing these back to the original numbers.
Steplen =5000
StepSpace=5000
DirSetup=10000
DirHold=10000

Andy thanks for posting those docs it made me go back and look at things again.

Please Log in to join the conversation.

More
5 years 7 months ago #201902 by 1RandomSquirrel
Still working on a figuring out a few things.
Flood coolant on. I could use one of the pins on7c81 board say in p2 or p7 but i would like to use a pin on the the 7i85 for simplicity i used flood coolant set as gpio pin 000 and i can see on with the voltmeter that db1 turns on and off. But i cannot find it on the 7i85s. is there a way i am supposed to use the pins say on tb1 like one of the differential outputs or just tb1 pin 3?
Code:
hm2: loading Mesa HostMot2 driver version 0.15 hm2/hm2_7c81.0: Low Level init 0.15 hm2/hm2_7c81.0: Smart Serial Firmware Version 43 hm2/hm2_7c81.0: 57 I/O Pins used: hm2/hm2_7c81.0: IO Pin 000 (P1-01/DB25-01): IOPort hm2/hm2_7c81.0: IO Pin 001 (P1-02/DB25-14): IOPort hm2/hm2_7c81.0: IO Pin 002 (P1-03/DB25-02): StepGen #3, pin Step (Output) hm2/hm2_7c81.0: IO Pin 003 (P1-04/DB25-15): StepGen #3, pin Direction (Output) hm2/hm2_7c81.0: IO Pin 004 (P1-05/DB25-03): StepGen #2, pin Step (Output) hm2/hm2_7c81.0: IO Pin 005 (P1-06/DB25-16): StepGen #2, pin Direction (Output) hm2/hm2_7c81.0: IO Pin 006 (P1-07/DB25-04): StepGen #1, pin Step (Output) hm2/hm2_7c81.0: IO Pin 007 (P1-08/DB25-17): StepGen #1, pin Direction (Output) hm2/hm2_7c81.0: IO Pin 008 (P1-09/DB25-05): StepGen #0, pin Step (Output) hm2/hm2_7c81.0: IO Pin 009 (P1-11/DB25-06): StepGen #0, pin Direction (Output) hm2/hm2_7c81.0: IO Pin 010 (P1-13/DB25-07): IOPort hm2/hm2_7c81.0: IO Pin 011 (P1-15/DB25-08): IOPort hm2/hm2_7c81.0: IO Pin 012 (P1-17/DB25-09): IOPort hm2/hm2_7c81.0: IO Pin 013 (P1-19/DB25-10): IOPort hm2/hm2_7c81.0: IO Pin 014 (P1-21/DB25-11): IOPort hm2/hm2_7c81.0: IO Pin 015 (P1-23/DB25-12): IOPort hm2/hm2_7c81.0: IO Pin 016 (P1-25/DB25-13): IOPort hm2/hm2_7c81.0: IO Pin 017 (J5-TX0): IOPort hm2/hm2_7c81.0: IO Pin 018 (J6-TX1): IOPort hm2/hm2_7c81.0: IO Pin 019 (P2-01/DB25-01): IOPort hm2/hm2_7c81.0: IO Pin 020 (P2-02/DB25-14): IOPort hm2/hm2_7c81.0: IO Pin 021 (P2-03/DB25-02): IOPort hm2/hm2_7c81.0: IO Pin 022 (P2-04/DB25-15): IOPort hm2/hm2_7c81.0: IO Pin 023 (P2-05/DB25-03): IOPort hm2/hm2_7c81.0: IO Pin 024 (P2-06/DB25-16): IOPort hm2/hm2_7c81.0: IO Pin 025 (P2-07/DB25-04): IOPort hm2/hm2_7c81.0: IO Pin 026 (P2-08/DB25-17): IOPort hm2/hm2_7c81.0: IO Pin 027 (P2-09/DB25-05): IOPort hm2/hm2_7c81.0: IO Pin 028 (P2-11/DB25-06): IOPort hm2/hm2_7c81.0: IO Pin 029 (P2-13/DB25-07): IOPort hm2/hm2_7c81.0: IO Pin 030 (P2-15/DB25-08): IOPort hm2/hm2_7c81.0: IO Pin 031 (P2-17/DB25-09): IOPort hm2/hm2_7c81.0: IO Pin 032 (P2-19/DB25-10): IOPort hm2/hm2_7c81.0: IO Pin 033 (P2-21/DB25-11): IOPort hm2/hm2_7c81.0: IO Pin 034 (P2-23/DB25-12): IOPort hm2/hm2_7c81.0: IO Pin 035999o (P2-25/DB25-13): IOPort hm2/hm2_7c81.0: IO Pin 036 (J5-TXEN0): IOPort hm2/hm2_7c81.0: IO Pin 037 (J6-TXEN1): IOPort hm2/hm2_7c81.0: IO Pin 038 (P7-01/DB25-01): IOPort hm2/hm2_7c81.0: IO Pin 039 (P7-02/DB25-14): IOPort hm2/hm2_7c81.0: IO Pin 040 (P7-03/DB25-02): IOPort hm2/hm2_7c81.0: IO Pin 041 (P7-04/DB25-15): IOPort hm2/hm2_7c81.0: IO Pin 042 (P7-05/DB25-03): IOPort hm2/hm2_7c81.0: IO Pin 043 (P7-06/DB25-16): IOPort hm2/hm2_7c81.0: IO Pin 044 (P7-07/DB25-04): IOPort hm2/hm2_7c81.0: IO Pin 045 (P7-08/DB25-17): IOPort hm2/hm2_7c81.0: IO Pin 046 (P7-09/DB25-05): IOPort hm2/hm2_7c81.0: IO Pin 047 (P7-11/DB25-06): IOPort hm2/hm2_7c81.0: IO Pin 048 (P7-13/DB25-07): IOPort hm2/hm2_7c81.0: IO Pin 049 (P7-15/DB25-08): IOPort hm2/hm2_7c81.0: IO Pin 050 (P7-17/DB25-09): IOPort hm2/hm2_7c81.0: IO Pin 051 (P7-19/DB25-10): IOPort hm2/hm2_7c81.0: IO Pin 052 (P7-21/DB25-11): IOPort hm2/hm2_7c81.0: IO Pin 053 (P7-23/DB25-12): IOPort hm2/hm2_7c81.0: IO Pin 054 (P7-25/DB25-13): IOPort hm2/hm2_7c81.0: IO Pin 055 (P5-RX0): IOPort hm2/hm2_7c81.0: IO Pin 056 (P6-RX1): IOPort hm2/hm2_7c81.0: registered
Code:
# Generated by PNCconf at Sun Mar 7 17:18:55 2021 # Using LinuxCNC version: Master (2.9) # If you make changes to this file, they will be # overwritten when you run PNCconf again loadrt [KINS]KINEMATICS loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS loadrt hostmot2 loadrt hm2_rpspi config=" num_encoders=0 num_pwmgens=0 num_stepgens=4" setp [HMOT](CARD0).watchdog.timeout_ns 5000000 loadrt pid names=pid.x,pid.z,pid.s addf [HMOT](CARD0).read servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf pid.x.do-pid-calcs servo-thread addf pid.z.do-pid-calcs servo-thread addf pid.s.do-pid-calcs servo-thread addf [HMOT](CARD0).write servo-thread # external output signals # --- COOLANT-FLOOD --- setp [HMOT](CARD0).gpio.000.is_output true # setp [HMOT](CARD0).gpio.000.invert_output true net coolant-flood => [HMOT](CARD0).gpio.000.out # external input signals #******************* # AXIS X JOINT 0 #******************* setp pid.x.Pgain [JOINT_0]P setp pid.x.Igain [JOINT_0]I setp pid.x.Dgain [JOINT_0]D setp pid.x.bias [JOINT_0]BIAS setp pid.x.FF0 [JOINT_0]FF0 setp pid.x.FF1 [JOINT_0]FF1 setp pid.x.FF2 [JOINT_0]FF2 setp pid.x.deadband [JOINT_0]DEADBAND setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT setp pid.x.error-previous-target true # This setting is to limit bogus stepgen # velocity corrections caused by position # feedback sample time jitter. setp pid.x.maxerror 0.000500 net x-index-enable <=> pid.x.index-enable net x-enable => pid.x.enable net x-pos-cmd => pid.x.command net x-pos-fb => pid.x.feedback net x-output <= pid.x.output # Step Gen signals/setup setp [HMOT](CARD0).stepgen.00.dirsetup [JOINT_0]DIRSETUP setp [HMOT](CARD0).stepgen.00.dirhold [JOINT_0]DIRHOLD setp [HMOT](CARD0).stepgen.00.steplen [JOINT_0]STEPLEN setp [HMOT](CARD0).stepgen.00.stepspace [JOINT_0]STEPSPACE setp [HMOT](CARD0).stepgen.00.position-scale [JOINT_0]STEP_SCALE setp [HMOT](CARD0).stepgen.00.step_type 0 setp [HMOT](CARD0).stepgen.00.control-type 1 setp [HMOT](CARD0).stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL setp [HMOT](CARD0).stepgen.00.maxvel [JOINT_0]STEPGEN_MAXVEL # ---closedloop stepper signals--- net x-pos-cmd <= joint.0.motor-pos-cmd net x-vel-cmd <= joint.0.vel-cmd net x-output <= [HMOT](CARD0).stepgen.00.velocity-cmd net x-pos-fb <= [HMOT](CARD0).stepgen.00.position-fb net x-pos-fb => joint.0.motor-pos-fb net x-enable <= joint.0.amp-enable-out net x-enable => [HMOT](CARD0).stepgen.00.enable # ---setup home / limit switch signals--- net x-home-sw => joint.0.home-sw-in net x-neg-limit => joint.0.neg-lim-sw-in net x-pos-limit => joint.0.pos-lim-sw-in #******************* # AXIS Z JOINT 1 #******************* setp pid.z.Pgain [JOINT_1]P setp pid.z.Igain [JOINT_1]I setp pid.z.Dgain [JOINT_1]D setp pid.z.bias [JOINT_1]BIAS setp pid.z.FF0 [JOINT_1]FF0 setp pid.z.FF1 [JOINT_1]FF1 setp pid.z.FF2 [JOINT_1]FF2 setp pid.z.deadband [JOINT_1]DEADBAND setp pid.z.maxoutput [JOINT_1]MAX_OUTPUT setp pid.z.error-previous-target true # This setting is to limit bogus stepgen # velocity corrections caused by position # feedback sample time jitter. setp pid.z.maxerror 0.000500 net z-index-enable <=> pid.z.index-enable net z-enable => pid.z.enable net z-pos-cmd => pid.z.command net z-pos-fb => pid.z.feedback net z-output <= pid.z.output # Step Gen signals/setup setp [HMOT](CARD0).stepgen.01.dirsetup [JOINT_1]DIRSETUP setp [HMOT](CARD0).stepgen.01.dirhold [JOINT_1]DIRHOLD setp [HMOT](CARD0).stepgen.01.steplen [JOINT_1]STEPLEN setp [HMOT](CARD0).stepgen.01.stepspace [JOINT_1]STEPSPACE setp [HMOT](CARD0).stepgen.01.position-scale [JOINT_1]STEP_SCALE setp [HMOT](CARD0).stepgen.01.step_type 0 setp [HMOT](CARD0).stepgen.01.control-type 1 setp [HMOT](CARD0).stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL setp [HMOT](CARD0).stepgen.01.maxvel [JOINT_1]STEPGEN_MAXVEL # ---closedloop stepper signals--- net z-pos-cmd <= joint.1.motor-pos-cmd net z-vel-cmd <= joint.1.vel-cmd net z-output <= [HMOT](CARD0).stepgen.01.velocity-cmd net z-pos-fb <= [HMOT](CARD0).stepgen.01.position-fb net z-pos-fb => joint.1.motor-pos-fb net z-enable <= joint.1.amp-enable-out net z-enable => [HMOT](CARD0).stepgen.01.enable # ---setup home / limit switch signals--- net z-home-sw => joint.1.home-sw-in net z-neg-limit => joint.1.neg-lim-sw-in net z-pos-limit => joint.1.pos-lim-sw-in #******************* # SPINDLE #******************* setp pid.s.Pgain [SPINDLE_0]P setp pid.s.Igain [SPINDLE_0]I setp pid.s.Dgain [SPINDLE_0]D setp pid.s.bias [SPINDLE_0]BIAS setp pid.s.FF0 [SPINDLE_0]FF0 setp pid.s.FF1 [SPINDLE_0]FF1 setp pid.s.FF2 [SPINDLE_0]FF2 setp pid.s.deadband [SPINDLE_0]DEADBAND setp pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT setp pid.s.error-previous-target true # This setting is to limit bogus stepgen # velocity corrections caused by position # feedback sample time jitter. setp pid.s.maxerror 0.000500 net spindle-index-enable <=> pid.s.index-enable net spindle-enable => pid.s.enable net spindle-vel-cmd-rpm => pid.s.command net spindle-vel-fb-rpm => pid.s.feedback net spindle-output <= pid.s.output # Step Gen signals/setup setp [HMOT](CARD0).stepgen.02.dirsetup [SPINDLE_0]DIRSETUP setp [HMOT](CARD0).stepgen.02.dirhold [SPINDLE_0]DIRHOLD setp [HMOT](CARD0).stepgen.02.steplen [SPINDLE_0]STEPLEN setp [HMOT](CARD0).stepgen.02.stepspace [SPINDLE_0]STEPSPACE setp [HMOT](CARD0).stepgen.02.position-scale [SPINDLE_0]STEP_SCALE setp [HMOT](CARD0).stepgen.02.step_type 0 setp [HMOT](CARD0).stepgen.02.control-type 1 setp [HMOT](CARD0).stepgen.02.maxaccel [SPINDLE_0]MAX_ACCELERATION setp [HMOT](CARD0).stepgen.02.maxvel [SPINDLE_0]MAX_VELOCITY net spindle-enable => [HMOT](CARD0).stepgen.02.enable net spindle-vel-cmd-rps => [HMOT](CARD0).stepgen.02.velocity-cmd net spindle-vel-fb-rps <= [HMOT](CARD0).stepgen.02.velocity-fb # ---setup spindle control signals--- net spindle-vel-cmd-rps <= spindle.0.speed-out-rps net spindle-vel-cmd-rps-abs <= spindle.0.speed-out-rps-abs net spindle-vel-cmd-rpm <= spindle.0.speed-out net spindle-vel-cmd-rpm-abs <= spindle.0.speed-out-abs net spindle-enable <= spindle.0.on net spindle-cw <= spindle.0.forward net spindle-ccw <= spindle.0.reverse net spindle-brake <= spindle.0.brake net spindle-revs => spindle.0.revs net spindle-at-speed => spindle.0.at-speed net spindle-vel-fb-rps => spindle.0.speed-in net spindle-index-enable <=> spindle.0.index-enable # ---Setup spindle at speed signals--- sets spindle-at-speed true #****************************** # connect miscellaneous signals #****************************** # ---HALUI signals--- net axis-select-x halui.axis.x.select net jog-x-pos halui.axis.x.plus net jog-x-neg halui.axis.x.minus net jog-x-analog halui.axis.x.analog net x-is-homed halui.joint.0.is-homed net axis-select-z halui.axis.z.select net jog-z-pos halui.axis.z.plus net jog-z-neg halui.axis.z.minus net jog-z-analog halui.axis.z.analog net z-is-homed halui.joint.1.is-homed net jog-selected-pos halui.axis.selected.plus net jog-selected-neg halui.axis.selected.minus net spindle-manual-cw halui.spindle.0.forward net spindle-manual-ccw halui.spindle.0.reverse net spindle-manual-stop halui.spindle.0.stop net machine-is-on halui.machine.is-on net jog-speed halui.axis.jog-speed net MDI-mode halui.mode.is-mdi # ---coolant signals--- net coolant-mist <= iocontrol.0.coolant-mist net coolant-flood <= iocontrol.0.coolant-flood # ---probe signal--- net probe-in => motion.probe-input # ---motion control signals--- net in-position <= motion.in-position net machine-is-enabled <= motion.motion-enabled # ---digital in / out signals--- # ---estop signals--- net estop-out <= iocontrol.0.user-enable-out net estop-out => iocontrol.0.emc-enable-in # ---manual tool change signals--- loadusr -W hal_manualtoolchange net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change net tool-change-confirmed iocontrol.0.tool-changed <= hal_manualtoolchange.changed net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

Please Log in to join the conversation.

More
5 years 7 months ago #201907 by PCW
You can get the 7I85S terminal to DB25 pin mapping from the 7I85S manual (page 4)

Note that there will not be any free 5V outputs unless you reduce the number of stepgens (say to 3)

(The 7I85S's serial port TX line could be used but it does not have full 5V swing
since is a RS-485 type driver)

Please Log in to join the conversation.

Time to create page: 0.052 seconds
Powered by Kunena Forum