robokop píše: ↑29. 12. 2021, 2:58
tady o zadne programovani v pravem slova smyslu nejde
jde pouze o propojovani komponent ty sipky jsou nepovinne a nemaji vyznam
Kód: Vybrat vše
net nazev_tohoto_propojeni i/o_signal1 i/o_signal2
mas jiz drive definovany signal net probe-in kam to potrebujes dostat
a dva signaly kde beres stavovou hodnotu
hm2_5i20.0.7i64.0.0.input-22-not
hm2_5i20.0.7i64.0.0.input-20-not
komponentu or ktera ma input0 a input1 a output
net s1 net hm2_5i20.0.7i64.0.0.input-22-not or.in0
net s2 net hm2_5i20.0.7i64.0.0.input-20-not or.in1
net probe-in or.out
samozrejme musi predchazet loadnuti te komponenty pomoci loadrt a zapojeni do prislusneho realtime threadu pomoci addf
ked som to tam dal tak som dostal facku:
Kód: Vybrat vše
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/biesse/linuxcnc/configs/BIESSE_321_R'
Machine configuration file is 'BIESSE_321_R.ini'
INIFILE=/home/biesse/linuxcnc/configs/BIESSE_321_R/BIESSE_321_R.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TASK=milltask
HALUI=halui
DISPLAY=axis
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): ./BIESSE_321_R.hal
hm2: loading Mesa HostMot2 driver version 0.15
hm2_pci: loading Mesa AnyIO HostMot2 driver version 0.7
hm2_pci: discovered 5i20 at 0000:07:01.0
hm2/hm2_5i20.0: Smart Serial Firmware Version 42
hm2/hm2_5i20.0: 72 I/O Pins used:
hm2/hm2_5i20.0: IO Pin 000 (P2-01): Encoder #1, pin B (Input)
hm2/hm2_5i20.0: IO Pin 001 (P2-03): Encoder #1, pin A (Input)
hm2/hm2_5i20.0: IO Pin 002 (P2-05): Encoder #0, pin B (Input)
hm2/hm2_5i20.0: IO Pin 003 (P2-07): Encoder #0, pin A (Input)
hm2/hm2_5i20.0: IO Pin 004 (P2-09): Encoder #1, pin Index (Input)
hm2/hm2_5i20.0: IO Pin 005 (P2-11): Encoder #0, pin Index (Input)
hm2/hm2_5i20.0: IO Pin 006 (P2-13): PWMGen #1, pin Out0 (PWM or Up) (Output)
hm2/hm2_5i20.0: IO Pin 007 (P2-15): PWMGen #0, pin Out0 (PWM or Up) (Output)
hm2/hm2_5i20.0: IO Pin 008 (P2-17): PWMGen #1, pin Out1 (Dir or Down) (Output)
hm2/hm2_5i20.0: IO Pin 009 (P2-19): PWMGen #0, pin Out1 (Dir or Down) (Output)
hm2/hm2_5i20.0: IO Pin 010 (P2-21): PWMGen #1, pin Not-Enable (Output)
hm2/hm2_5i20.0: IO Pin 011 (P2-23): PWMGen #0, pin Not-Enable (Output)
hm2/hm2_5i20.0: IO Pin 012 (P2-25): IOPort
hm2/hm2_5i20.0: IO Pin 013 (P2-27): IOPort
hm2/hm2_5i20.0: IO Pin 014 (P2-29): Encoder #2, pin B (Input)
hm2/hm2_5i20.0: IO Pin 015 (P2-31): Encoder #2, pin A (Input)
hm2/hm2_5i20.0: IO Pin 016 (P2-33): IOPort
hm2/hm2_5i20.0: IO Pin 017 (P2-35): Encoder #2, pin Index (Input)
hm2/hm2_5i20.0: IO Pin 018 (P2-37): PWMGen #3, pin Out0 (PWM or Up) (Output)
hm2/hm2_5i20.0: IO Pin 019 (P2-39): PWMGen #2, pin Out0 (PWM or Up) (Output)
hm2/hm2_5i20.0: IO Pin 020 (P2-41): PWMGen #3, pin Out1 (Dir or Down) (Output)
hm2/hm2_5i20.0: IO Pin 021 (P2-43): PWMGen #2, pin Out1 (Dir or Down) (Output)
hm2/hm2_5i20.0: IO Pin 022 (P2-45): PWMGen #3, pin Not-Enable (Output)
hm2/hm2_5i20.0: IO Pin 023 (P2-47): PWMGen #2, pin Not-Enable (Output)
hm2/hm2_5i20.0: IO Pin 024 (P3-01): IOPort
hm2/hm2_5i20.0: IO Pin 025 (P3-03): IOPort
hm2/hm2_5i20.0: IO Pin 026 (P3-05): IOPort
hm2/hm2_5i20.0: IO Pin 027 (P3-07): IOPort
hm2/hm2_5i20.0: IO Pin 028 (P3-09): IOPort
hm2/hm2_5i20.0: IO Pin 029 (P3-11): IOPort
hm2/hm2_5i20.0: IO Pin 030 (P3-13): IOPort
hm2/hm2_5i20.0: IO Pin 031 (P3-15): IOPort
hm2/hm2_5i20.0: IO Pin 032 (P3-17): IOPort
hm2/hm2_5i20.0: IO Pin 033 (P3-19): IOPort
hm2/hm2_5i20.0: IO Pin 034 (P3-21): IOPort
hm2/hm2_5i20.0: IO Pin 035 (P3-23): IOPort
hm2/hm2_5i20.0: IO Pin 036 (P3-25): IOPort
hm2/hm2_5i20.0: IO Pin 037 (P3-27): IOPort
hm2/hm2_5i20.0: IO Pin 038 (P3-29): IOPort
hm2/hm2_5i20.0: IO Pin 039 (P3-31): IOPort
hm2/hm2_5i20.0: IO Pin 040 (P3-33): IOPort
hm2/hm2_5i20.0: IO Pin 041 (P3-35): IOPort
hm2/hm2_5i20.0: IO Pin 042 (P3-37): IOPort
hm2/hm2_5i20.0: IO Pin 043 (P3-39): IOPort
hm2/hm2_5i20.0: IO Pin 044 (P3-41): IOPort
hm2/hm2_5i20.0: IO Pin 045 (P3-43): IOPort
hm2/hm2_5i20.0: IO Pin 046 (P3-45): IOPort
hm2/hm2_5i20.0: IO Pin 047 (P3-47): IOPort
hm2/hm2_5i20.0: IO Pin 048 (P4-01): Smart Serial Interface #0, pin RxData0 (Input)
hm2/hm2_5i20.0: IO Pin 049 (P4-03): Smart Serial Interface #0, pin RxData1 (Input)
hm2/hm2_5i20.0: IO Pin 050 (P4-05): IOPort
hm2/hm2_5i20.0: IO Pin 051 (P4-07): IOPort
hm2/hm2_5i20.0: IO Pin 052 (P4-09): Smart Serial Interface #0, pin TxData0 (Output)
hm2/hm2_5i20.0: IO Pin 053 (P4-11): Smart Serial Interface #0, pin TxEn0 (Output)
hm2/hm2_5i20.0: IO Pin 054 (P4-13): Smart Serial Interface #0, pin TxData1 (Output)
hm2/hm2_5i20.0: IO Pin 055 (P4-15): Smart Serial Interface #0, pin TxEn1 (Output)
hm2/hm2_5i20.0: IO Pin 056 (P4-17): IOPort
hm2/hm2_5i20.0: IO Pin 057 (P4-19): IOPort
hm2/hm2_5i20.0: IO Pin 058 (P4-21): IOPort
hm2/hm2_5i20.0: IO Pin 059 (P4-23): IOPort
hm2/hm2_5i20.0: IO Pin 060 (P4-25): IOPort
hm2/hm2_5i20.0: IO Pin 061 (P4-27): IOPort
hm2/hm2_5i20.0: IO Pin 062 (P4-29): IOPort
hm2/hm2_5i20.0: IO Pin 063 (P4-31): IOPort
hm2/hm2_5i20.0: IO Pin 064 (P4-33): IOShutting down and cleaning up LinuxCNC...
Running HAL shutdown script
Port
hm2/hm2_5i20.0: IO Pin 065 (P4-35): IOPort
hm2/hm2_5i20.0: IO Pin 066 (P4-37): IOPort
hm2/hm2_5i20.0: IO Pin 067 (P4-39): IOPort
hm2/hm2_5i20.0: IO Pin 068 (P4-41): IOPort
hm2/hm2_5i20.0: IO Pin 069 (P4-43): IOPort
hm2/hm2_5i20.0: IO Pin 070 (P4-45): IOPort
hm2/hm2_5i20.0: IO Pin 071 (P4-47): IOPort
hm2/hm2_5i20.0: registered
hm2_5i20.0: initialized AnyIO board at 0000:07:01.0
hm2_5i20.0: dropping AnyIO board at 0000:07:01.0
hm2/hm2_5i20.0: unregistered
hm2_pci: driver unloaded
hm2: unloading
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
inifile: warning: File contains DOS-style line endings.
Note: Using POSIX realtime
./BIESSE_321_R.hal:136: Pin 'net' does not exist
2640
Stopping realtime threads
Unloading hal components
RTAPI_PCI: Unmapped 65536 bytes at 0x7f82cdf4e000
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:
http://pastebin.com
in order to provide information about the linuxcnc
system and configuration.
Date: St dec 29 17:30:14 CET 2021
UTC Date: St dec 29 16:30:14 UTC 2021
this program: /usr/bin/linuxcnc_info
uptime: 17:30:14 up 8 min, 1 user, load average: 1,42, 1,23, 0,72
lsb_release -sa: Debian Debian GNU/Linux 10 (buster) 10 buster
which linuxcnc: /usr/bin/linuxcnc
pwd: /home/biesse/linuxcnc/configs/BIESSE_321_R
USER: biesse
LOGNAME: biesse
HOME: /home/biesse
EDITOR:
VISUAL:
LANGUAGE:
TERM: dumb
COLORTERM:
DISPLAY: :0
DESKTOP: mate
display size: 1600x900 pixels (423x238 millimeters)
PATH: /usr/bin:/home/biesse/linuxcnc/configs/BIESSE_321_R/bin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
uname items:
nodename -n: biesse
kernel-name -s: Linux
kernel-vers -v: #1 SMP PREEMPT RT Debian 4.19.146-1 (2020-09-17)
machine -m: x86_64
processor -p: unknown
platform -i: unknown
oper system -o: GNU/Linux
/proc items:
cmdline: BOOT_IMAGE=/boot/vmlinuz-4.19.0-11-rt-amd64 root=UUID=643a490c-eabc-4051-bb88-fad21bf4c4b2 ro initrd=/install/gtk/initrd.gz quiet
model name: Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz
cores: 4
cpu MHz: 1443.369
parport:
serial: 0000-0000 : serial
Versions:
gcc: gcc (Debian 8.3.0-6) 8.3.0
python: Python 2.7.16
git: not_in_PATH
git commit: NA
tcl: 8.6
tk: 8.6
glade: glade 3.22.1
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*':
Požadovaný=Neznámy/Inštalovať/Odstrániť/Vyčistiť/Podržať
| Stav=Nie/Inštalovaný/Konfig-súbory/Rozbalený/Zlý-konfig/Polo-inštalovaný/očak-spúšť/čaká-na-spúšť
|/ Chyba?=(žiadna)/Reinšt-vyžadovaná (Stav,Chyba: veľké písmeno=zle)
||/ Názov Verzia Architektúra Popis
+++-===================-============-============-=====================================================================
un linuxcnc <žiadna> <none> (popis nie je k dispozícii)
un linuxcnc-dev <žiadna> <none> (popis nie je k dispozícii)
un linuxcnc-doc <žiadna> <none> (popis nie je k dispozícii)
ii linuxcnc-doc-cn 1:2.8.0 all motion controller for CNC machines and robots (Chinese
ii linuxcnc-doc-en 1:2.8.0 all motion controller for CNC machines and robots (English documentation)
ii linuxcnc-doc-es 1:2.8.0 all controlador de movimiento para máquinas CNC y robots (Español).
ii linuxcnc-doc-fr 1:2.8.0 all motion controller for CNC machines and robots (French documentation)
un linuxcnc-sim <žiadna> <none> (popis nie je k dispozícii)
un linuxcnc-sim-dev <žiadna> <none> (popis nie je k dispozícii)
ii linuxcnc-uspace 1:2.8.0 amd64 motion controller for CNC machines and robots
ii linuxcnc-uspace-dev 1:2.8.0 amd64 PC based motion controller for real-time Linux
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS num_dio=64
loadrt hostmot2
loadrt hm2_pci config="firmware=hm2/5i20/svss4_8.BIT num_encoders=3 num_pwmgens=4 num_3pwmgens=0 num_stepgens=0 sserial_port_0=00xxx "
loadrt or2
setp hm2_5i20.0.pwmgen.pwm_frequency 100000
setp hm2_5i20.0.pwmgen.pdm_frequency 6000000
setp hm2_5i20.0.watchdog.timeout_ns 10000000
loadrt pid names=pid.x,pid.y,pid.z
addf or2.0 servo-thread
addf hm2_5i20.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf pid.x.do-pid-calcs servo-thread
addf pid.y.do-pid-calcs servo-thread
addf pid.z.do-pid-calcs servo-thread
addf hm2_5i20.0.write servo-thread
#addf hm2_5i20.0.pet_watchdog servo-thread
# --- PROBE-IN ---
#net probe-in <= hm2_5i20.0.7i64.0.0.input-22-not # -not invertuje pin
#net probe1-in <= hm2_5i20.0.7i64.0.0.input-20-not # -not invertuje pin
net s1 net hm2_5i20.0.7i64.0.0.input-22-not or.in0
net s2 net hm2_5i20.0.7i64.0.0.input-20-not or.in1
net probe-in or.out