dabit20 / dabitusb_cnc

9 stars 9 forks source link

problem when starting axis #2

Open creisey opened 4 years ago

creisey commented 4 years ago

hi dabit

i tired to install the usb stm32 driver as described but i struggle here:

when i start the axis.ini from the sample-configuration i get immediately an error:

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/share/linuxcnc/tcl/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.7.14
Machine configuration directory is '/home/linuxcnc/linuxcnc/sample_configs/axis_dabitusb'
Machine configuration file is 'axis.ini'
INIFILE=/home/linuxcnc/linuxcnc/sample_configs/axis_dabitusb/axis.ini
PARAMETER_FILE=workshop.var
TASK=milltask
HALUI=halui
DISPLAY=axis
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): ./usbmotion.hal
loading DaBitUSB module
Found device at /dev/hidraw0
SUCCESS opening device
Shutting down and cleaning up LinuxCNC...
Killing task linuxcncsvr, PID=4796
DaBitUSB module unloaded
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

Debug file information:
Note: Using POSIX realtime
./usbmotion.hal:25: Pin 'joint.0.amp-enable-out' does not exist
4796
  PID TTY      STAT   TIME COMMAND
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime

i may didnt set the permissions correctly here:

Also, note that the driver needs access to the correct /dev/hidrawX device.

and when i made: linuxcnc@debian:~/dabitusb_cnc/linuxcnc_modules$ halrun -I dabitusb_test.hal

Note: Using POSIX realtime
loading DaBitUSB module
Found device at /dev/hidraw0
SUCCESS opening device
Loaded HAL Components:
ID      Type  Name                                            PID   State
    13  RT    siggen                                                ready
    12  User  halcmd5378                                       5378 ready
    10  RT    dabitusb                                              ready
     7  RT    __test-thread                                         ready
     6  RT    threads                                               ready

Component Pins:
Owner   Type  Dir         Value  Name
    10  float OUT             0  dabitusb.analogin0
    10  float OUT             0  dabitusb.analogin1
    10  float OUT             0  dabitusb.analogin2
    10  float OUT             0  dabitusb.analogin3
    10  bit   OUT         FALSE  dabitusb.digitalin0
    10  bit   OUT         FALSE  dabitusb.digitalin1
    10  bit   OUT         FALSE  dabitusb.digitalin2
    10  bit   OUT         FALSE  dabitusb.digitalin3
    10  bit   OUT         FALSE  dabitusb.digitalin4
    10  bit   OUT         FALSE  dabitusb.digitalin5
    10  bit   IN          FALSE  dabitusb.digout0
    10  bit   IN          FALSE  dabitusb.digout1
    10  bit   IN          FALSE  dabitusb.digout2
    10  bit   IN           TRUE  dabitusb.digout3
    10  bit   IN           TRUE  dabitusb.enable
    10  s32   OUT             0  dabitusb.handwheelcount0
    10  s32   OUT             0  dabitusb.handwheelcount1
    10  s32   OUT             0  dabitusb.handwheelcount2
    10  float IN              0  dabitusb.position-cmd-joint0 <== motionx
    10  float IN              0  dabitusb.position-cmd-joint1 <== motiony
    10  float IN              0  dabitusb.position-cmd-joint2
    10  float IN              0  dabitusb.position-cmd-joint3
    10  float OUT             0  dabitusb.position-fb-joint0
    10  float OUT             0  dabitusb.position-fb-joint1
    10  float OUT             0  dabitusb.position-fb-joint2
    10  float OUT             0  dabitusb.position-fb-joint3
    10  float IN              0  dabitusb.pwm0
    10  float IN              0  dabitusb.pwm1
    10  s32   OUT             0  dabitusb.time
    10  u32   OUT    0x00000000  dabitusb.tslowres
    13  float IN             10  siggen.0.amplitude
    13  bit   OUT         FALSE  siggen.0.clock
    13  float OUT             0  siggen.0.cosine ==> motiony
    13  float IN           0.25  siggen.0.frequency
    13  float IN              0  siggen.0.offset
    13  float OUT             0  siggen.0.sawtooth
    13  float OUT             0  siggen.0.sine ==> motionx
    13  float OUT             0  siggen.0.square
    13  float OUT             0  siggen.0.triangle
    13  s32   OUT             0  siggen.0.update.time
     7  s32   OUT             0  test-thread.time

Pin Aliases:
 Alias                                            Original Name

Signals:
Type          Value  Name     (linked to)
float             0  motionx
                         ==> dabitusb.position-cmd-joint0
                         <== siggen.0.sine
float             0  motiony
                         ==> dabitusb.position-cmd-joint1
                         <== siggen.0.cosine

Parameters:
Owner   Type  Dir         Value  Name
    10  float RW            200  dabitusb.position-scale-joint0
    10  float RW            200  dabitusb.position-scale-joint1
    10  float RW            200  dabitusb.position-scale-joint2
    10  float RW            200  dabitusb.position-scale-joint3
    10  s32   RW              0  dabitusb.tmax
    10  bit   RO          FALSE  dabitusb.tmax-increased
    13  s32   RW              0  siggen.0.update.tmax
    13  bit   RO          FALSE  siggen.0.update.tmax-increased
     7  s32   RW              0  test-thread.tmax

Parameter Aliases:
 Alias                                            Original Name

Exported Functions:
Owner   CodeAddr  Arg       FP   Users  Name
 00010  7f4bb98c3c10  7f4bbb2d0100  YES      1   dabitusb
 00013  7f4bb96c0bf0  7f4bbb2d02a8  YES      1   siggen.0.update

Realtime Threads:
     Period  FP     Name               (     Time, Max-Time )
   10000000  YES           test-thread (        0,        0 )
                  1 dabitusb
                  2 siggen.0.update

a window appeared and i didnt know what else to do.. do you have a hint, whats missing?

BosniaCNC commented 4 years ago

I have the same problem. I’ve tried to insert comments on controversial lines but it goes on indefinitely. dabitusb_test.hal do without problems. Usbmotin.hal does not match the module in linuxcnc. I sent a letter to the author but have not yet received a reply. Screenshot_1 Screenshot_2 Screenshot_3

creisey commented 4 years ago

he's not responding on any channel.. i've moved to a modded mojo board that acts like a mesa card. its a pretty stable environment! i've you wanna stay with the STM32 have a look at GRBL https://github.com/dungjk/grbl-stm32

BosniaCNC commented 4 years ago

No need to compare EMC2 (LinuxCNC) and grbl.If I wanted to, I had another option.The point is LinuxCNC via usb. I'm not familiar with the "modded mojo board" function, post a link to see what it's all about.