Mesa modbus and pktUart
02 Sep 2023 00:33 #279633
by PCW
Replied by PCW on topic Mesa modbus and pktUart
Unless you cross compiled the mesa_modbus_AS_Driver.so on the X86 system,
it will not run on a ARM system
it will not run on a ARM system
Please Log in or Create an account to join the conversation.
02 Sep 2023 16:47 #279666
by Donno
Replied by Donno on topic Mesa modbus and pktUart
I downloaded Linuxcnc 2.9pre image for raspberry pi 4B and compiled linuxcnc-dev
I copied driver to another raspberry with linuxcnc2.9pre and copied driver to /usr/lib/linuxcnc/modules/mesa_modbus_A5_Driver.so
I now get the following error in linuxcnc
Any help PCW ?
git clone https://github.com/LinuxCNC/linuxcnc.git linuxcnc-dev
cd linuxcnc-dev/src
sudo apt install automake
./autogen.sh
sudo apt-get install libmodbus-dev
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install yapps2
sudo apt-get install intltool
sudo apt-get install libboost
sudo apt install devscripts
sudo apt install dh-python libudev-dev tcl8.6-dev tk8.6-dev asciidoc dblatex
sudo apt install libreadline-gplv2-dev docbook-xsl dvipng ghostscript graphviz
sudo apt install groff imagemagick inkscape python-lxml source-highlight
sudo apt install texlive-extra-utils texlive-font-utils texlive-fonts-recommended
sudo apt install texlive-lang-cyrillic texlive-lang-french texlive-lang-german
sudo apt install texlive-lang-polish texlive-lang-spanish texlive-latex-recommended
sudo apt install w3c-linkchecker xsltproc python-dev python-tk libxmu-dev
sudo apt install libglu1-mesa-dev libgtk2.0-dev intltool libboost-python-dev
sudo apt install libmodbus-dev libusb-1.0-0-dev desktop-file-utils yapps2
sudo apt install python-yapps bwidget libtk-img mesa-utils tclx8.4
sudo apt install tcl-tclreadline python-configobj python-gtkglext1
sudo apt install python-xlib gstreamer0.10-plugins-base netcat
sudo apt install python-pil python-glade2 python-pil.imagetk
sudo apt install python-gst-1.0 w3c-linkchecker libxmu-dev libtirpc-dev
sudo apt install gdebi gdebi-core
sudo apt install libreadline-dev
sudo apt install libeditreadline-dev
sudo apt install libxmu-headers
sudo apt install libxmu-dev
./configure --with-realtime=uspace
make
sudo make setuid
source ../scripts/rip-environment
cd ~/linuxcnc-dev/bin
(edit modcompile to use ../src instead of src else it will not find makefile.modinc)
./modcompile mesa_modbus_A5_Driver.mod
I copied driver to another raspberry with linuxcnc2.9pre and copied driver to /usr/lib/linuxcnc/modules/mesa_modbus_A5_Driver.so
I now get the following error in linuxcnc
Debug file information:
Note: Using POSIX non-realtime
mesa_modbus_A5_Driver: dlopen: /usr/lib/linuxcnc/modules/mesa_modbus_A5_Driver.so: undefined symbol: hm2_pktuart_setup_rx
./Lathe_7i92T_0.hal:10: waitpid failed /usr/bin/rtapi_app mesa_modbus_A5_Driver
./Lathe_7i92T_0.hal:10: /usr/bin/rtapi_app exited without becoming ready
./Lathe_7i92T_0.hal:10: insmod for mesa_modbus_A5_Driver failed, returned -1
2759
Stopping realtime threads
Unloading hal components
Note: Using POSIX non-realtime
Any help PCW ?
Please Log in or Create an account to join the conversation.
02 Sep 2023 16:51 #279667
by Donno
Replied by Donno on topic Mesa modbus and pktUart
Driver :
// Lichuan A5 AC Servo Drive Driver
#define MAX_MSG_LEN 16 // may be increased if necessary to max 251
#define DEBUG 1
static const hm2_modbus_chan_descriptor_t channels[] = {
/* {TYPE, FUNC, ADDR, COUNT, pin_name} */
{HAL_U32, 3, 0x9C8, 1, "speed-actual"},
{HAL_U32, 3, 0x9C9, 1, "speed-instruction"},
{HAL_U32, 3, 0x9CA, 1, "torque-instruction"},
{HAL_U32, 3, 0x9D4, 1, "avg-load-rate"},
{HAL_U32, 3, 0x9E0, 1, "phase-current"},
{HAL_U32, 3, 0x9E2, 1, "bus-voltage"},
{HAL_U32, 3, 0x9E3, 1, "tempreture"},
{HAL_U32, 6, 0x4CB, 1, "set-speed"},
};
Please Log in or Create an account to join the conversation.
02 Sep 2023 17:37 #279668
by PCW
Replied by PCW on topic Mesa modbus and pktUart
What is you loardrt line in your hal file?
Does your firmware have a pktuart?
Does your firmware have a pktuart?
Please Log in or Create an account to join the conversation.
02 Sep 2023 17:53 #279671
by Donno
Replied by Donno on topic Mesa modbus and pktUart
mesaflash --device 7i92T --addr 192.168.1.121 --readhmid
Hal File loadrt mesa_modbus_A5_Driver names=hm2_7i92.0.pktuart.0 and addf mesa_modbus_A5_Driver servo-thread
donno@linuxcnc:~/Desktop $ mesaflash --device 7i92T --addr 192.168.1.121 --readhmid
Configuration Name: HOSTMOT2
General configuration information:
BoardName : MESA7I92
FPGA Size: 20 KGates
FPGA Pins: 256
Number of IO Ports: 2
Width of one I/O port: 17
Clock Low frequency: 100.0000 MHz
Clock High frequency: 175.0000 MHz
IDROM Type: 3
Instance Stride 0: 4
Instance Stride 1: 64
Register Stride 0: 256
Register Stride 1: 256
Modules in configuration:
Module: DPLL
There are 1 of DPLL in configuration
Version: 0
Registers: 7
BaseAddress: 7000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: WatchDog
There are 1 of WatchDog in configuration
Version: 0
Registers: 3
BaseAddress: 0C00
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: IOPort
There are 2 of IOPort in configuration
Version: 0
Registers: 5
BaseAddress: 1000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: QCount
There are 2 of QCount in configuration
Version: 2
Registers: 5
BaseAddress: 3000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: StepGen
There are 10 of StepGen in configuration
Version: 2
Registers: 10
BaseAddress: 2000
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: PWM
There are 2 of PWM in configuration
Version: 0
Registers: 5
BaseAddress: 4100
ClockFrequency: 175.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: LED
There are 1 of LED in configuration
Version: 0
Registers: 1
BaseAddress: 0200
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: PktUARTTX
There are 1 of PktUARTTX in configuration
Version: 0
Registers: 4
BaseAddress: 6100
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Module: PktUARTRX
There are 1 of PktUARTRX in configuration
Version: 0
Registers: 4
BaseAddress: 6500
ClockFrequency: 100.000 MHz
Register Stride: 256 bytes
Instance Stride: 4 bytes
Configuration pin-out:
IO Connections for P2
DB25 pin# I/O Pri. func Sec. func Chan Sec. Pin func Sec. Pin Dir
1 0 IOPort PWM 0 PWM (Out)
14 1 IOPort StepGen 0 Step/Table1 (Out)
2 2 IOPort StepGen 0 Dir/Table2 (Out)
15 3 IOPort StepGen 1 Step/Table1 (Out)
3 4 IOPort StepGen 1 Dir/Table2 (Out)
16 5 IOPort None
4 6 IOPort None
17 7 IOPort None
5 8 IOPort None
6 9 IOPort QCount 0 Quad-A (In)
7 10 IOPort QCount 0 Quad-B (In)
8 11 IOPort QCount 0 Quad-IDX (In)
9 12 IOPort None
10 13 IOPort None
11 14 IOPort None
12 15 IOPort None
13 16 IOPort None
IO Connections for P1
DB25 pin# I/O Pri. func Sec. func Chan Sec. Pin func Sec. Pin Dir
1 17 IOPort PktUARTRX 0 RXData (In)
14 18 IOPort PktUARTTX 0 TXData (Out)
2 19 IOPort PktUARTTX 0 TXEna (Out)
15 20 IOPort None
3 21 IOPort None
16 22 IOPort None
4 23 IOPort None
17 24 IOPort None
5 25 IOPort None
6 26 IOPort None
7 27 IOPort None
8 28 IOPort None
9 29 IOPort None
10 30 IOPort None
11 31 IOPort None
12 32 IOPort None
13 33 IOPort None
Hal File loadrt mesa_modbus_A5_Driver names=hm2_7i92.0.pktuart.0 and addf mesa_modbus_A5_Driver servo-thread
# Generated by PNCconf at Mon Aug 28 20:19:10 2023
# 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_eth board_ip="192.168.1.121" config="num_encoders=1 num_pwmgens=0 num_stepgens=2"
loadrt mesa_modbus_A5_Driver names=hm2_7i92.0.pktuart.0
setp hm2_7i92.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.z,pid.s
loadrt abs names=abs.spindle
loadrt lowpass names=lowpass.spindle
loadrt scale names=scale.spindle
loadrt near
addf hm2_7i92.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.z.do-pid-calcs servo-thread
addf pid.s.do-pid-calcs servo-thread
addf scale.spindle servo-thread
addf abs.spindle servo-thread
addf lowpass.spindle servo-thread
addf near.0 servo-thread
addf hm2_7i92.0.write servo-thread
addf mesa_modbus_A5_Driver servo-thread
setp hm2_7i92.0.dpll.01.timer-us -50
setp hm2_7i92.0.stepgen.timer-number 1
# external output signals
# --- DOUT-00 ---
setp hm2_7i92.0.gpio.000.is_output true
net dout-00 => hm2_7i92.0.gpio.000.out
# --- SPINDLE-ENABLE ---
setp hm2_7i92.0.gpio.005.is_output true
net spindle-enable => hm2_7i92.0.gpio.005.out
# --- SPINDLE-CW ---
setp hm2_7i92.0.gpio.006.is_output true
net spindle-cw => hm2_7i92.0.gpio.006.out
# --- SPINDLE-CCW ---
setp hm2_7i92.0.gpio.007.is_output true
net spindle-ccw => hm2_7i92.0.gpio.007.out
# --- COOLANT-MIST ---
setp hm2_7i92.0.gpio.008.is_output true
net coolant-mist => hm2_7i92.0.gpio.008.out
# --- DOUT-01 ---
setp hm2_7i92.0.gpio.013.is_output true
net dout-01 => hm2_7i92.0.gpio.013.out
# --- DOUT-02 ---
setp hm2_7i92.0.gpio.015.is_output true
net dout-02 => hm2_7i92.0.gpio.015.out
# --- DOUT-03 ---
setp hm2_7i92.0.gpio.016.is_output true
net dout-03 => hm2_7i92.0.gpio.016.out
# --- ESTOP-OUT ---
setp hm2_7i92.0.gpio.030.is_output true
net estop-out => hm2_7i92.0.gpio.030.out
# --- MACHINE-IS-ENABLED ---
setp hm2_7i92.0.gpio.032.is_output true
net machine-is-enabled => hm2_7i92.0.gpio.032.out
# --- SPINDLE-ENABLE ---
setp hm2_7i92.0.gpio.033.is_output true
net spindle-enable => hm2_7i92.0.gpio.033.out
# external input signals
# --- HOME-X ---
net home-x <= hm2_7i92.0.gpio.012.in
# --- HOME-Z ---
net home-z <= hm2_7i92.0.gpio.014.in
# --- DIN-00 ---
net din-00 <= hm2_7i92.0.gpio.019.in
# --- DIN-01 ---
net din-01 <= hm2_7i92.0.gpio.020.in
# --- DIN-02 ---
net din-02 <= hm2_7i92.0.gpio.021.in
# --- DIN-03 ---
net din-03 <= hm2_7i92.0.gpio.022.in
# --- ESTOP-EXT ---
net estop-ext <= hm2_7i92.0.gpio.023.in
# --- PROBE-IN ---
net probe-in <= hm2_7i92.0.gpio.024.in
#*******************
# 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.012700
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 hm2_7i92.0.stepgen.00.dirsetup [JOINT_0]DIRSETUP
setp hm2_7i92.0.stepgen.00.dirhold [JOINT_0]DIRHOLD
setp hm2_7i92.0.stepgen.00.steplen [JOINT_0]STEPLEN
setp hm2_7i92.0.stepgen.00.stepspace [JOINT_0]STEPSPACE
setp hm2_7i92.0.stepgen.00.position-scale [JOINT_0]STEP_SCALE
setp hm2_7i92.0.stepgen.00.step_type 0
setp hm2_7i92.0.stepgen.00.control-type 1
setp hm2_7i92.0.stepgen.00.maxaccel [JOINT_0]STEPGEN_MAXACCEL
setp hm2_7i92.0.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 => hm2_7i92.0.stepgen.00.velocity-cmd
net x-pos-fb <= hm2_7i92.0.stepgen.00.position-fb
net x-pos-fb => joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net x-enable => hm2_7i92.0.stepgen.00.enable
# ---setup home / limit switch signals---
net home-x => 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.012700
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 hm2_7i92.0.stepgen.01.dirsetup [JOINT_1]DIRSETUP
setp hm2_7i92.0.stepgen.01.dirhold [JOINT_1]DIRHOLD
setp hm2_7i92.0.stepgen.01.steplen [JOINT_1]STEPLEN
setp hm2_7i92.0.stepgen.01.stepspace [JOINT_1]STEPSPACE
setp hm2_7i92.0.stepgen.01.position-scale [JOINT_1]STEP_SCALE
setp hm2_7i92.0.stepgen.01.step_type 0
setp hm2_7i92.0.stepgen.01.control-type 1
setp hm2_7i92.0.stepgen.01.maxaccel [JOINT_1]STEPGEN_MAXACCEL
setp hm2_7i92.0.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 => hm2_7i92.0.stepgen.01.velocity-cmd
net z-pos-fb <= hm2_7i92.0.stepgen.01.position-fb
net z-pos-fb => joint.1.motor-pos-fb
net z-enable <= joint.1.amp-enable-out
net z-enable => hm2_7i92.0.stepgen.01.enable
# ---setup home / limit switch signals---
net home-z => 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
net spindle-index-enable => pid.s.index-enable
net spindle-enable => pid.s.enable
net spindle-vel-cmd-rpm-abs => pid.s.command
net spindle-vel-fb-rpm-abs => pid.s.feedback
net spindle-output <= pid.s.output
# ---Encoder feedback signals/setup---
setp hm2_7i92.0.encoder.00.counter-mode 0
setp hm2_7i92.0.encoder.00.filter 1
setp hm2_7i92.0.encoder.00.index-invert 0
setp hm2_7i92.0.encoder.00.index-mask 0
setp hm2_7i92.0.encoder.00.index-mask-invert 0
setp hm2_7i92.0.encoder.00.scale [SPINDLE_0]ENCODER_SCALE
net spindle-revs <= hm2_7i92.0.encoder.00.position
net spindle-vel-fb-rps <= hm2_7i92.0.encoder.00.velocity
net spindle-vel-fb-rpm <= hm2_7i92.0.encoder.00.velocity-rpm
net spindle-index-enable <=> hm2_7i92.0.encoder.00.index-enable
# ---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---
net spindle-vel-cmd-rps => near.0.in1
net spindle-vel-fb-rps => near.0.in2
net spindle-at-speed <= near.0.out
setp near.0.scale 1.000000
setp near.0.difference 0.166667
# Use ACTUAL spindle velocity from spindle encoder
# spindle-velocity bounces around so we filter it with lowpass
# spindle-velocity is signed so we use absolute component to remove sign
# ACTUAL velocity is in RPS not RPM so we scale it.
setp scale.spindle.gain 60
setp lowpass.spindle.gain 1.000000
net spindle-vel-fb-rps => scale.spindle.in
net spindle-fb-rpm scale.spindle.out => abs.spindle.in
net spindle-fb-rpm-abs abs.spindle.out => lowpass.spindle.in
net spindle-fb-rpm-abs-filtered lowpass.spindle.out
#******************************
# 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---
net dout-00 <= motion.digital-out-00
net dout-01 <= motion.digital-out-01
net dout-02 <= motion.digital-out-02
net dout-03 <= motion.digital-out-03
net din-00 => motion.digital-in-00
net din-01 => motion.digital-in-01
net din-02 => motion.digital-in-02
net din-03 => motion.digital-in-03
# ---estop signals---
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in
# ---manual tool change signals---
net tool-change-request <= iocontrol.0.tool-change
net tool-change-confirmed => iocontrol.0.tool-changed
net tool-number <= iocontrol.0.tool-prep-number
# ---Use external manual tool change dialog---
loadusr -W hal_manualtoolchange
net tool-change-request => hal_manualtoolchange.change
net tool-change-confirmed <= hal_manualtoolchange.changed
net tool-number => hal_manualtoolchange.number
# ---ignore tool prepare requests---
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
Please Log in or Create an account to join the conversation.
02 Sep 2023 18:20 - 02 Sep 2023 18:33 #279673
by PCW
Replied by PCW on topic Mesa modbus and pktUart
Don't know, maybe some difference in the build and run systems.
Also the loadrt line should have "ports" instead of "names"
I was able to launch your configuration here without error
(I shortened the name to lichuan)
halcmd: loadrt lichuan ports=hm2_7i96s.0.pktuart.0
halcmd: addf lichuan.00 servo-thread
halcmd:
Also the loadrt line should have "ports" instead of "names"
I was able to launch your configuration here without error
(I shortened the name to lichuan)
halcmd: loadrt lichuan ports=hm2_7i96s.0.pktuart.0
halcmd: addf lichuan.00 servo-thread
halcmd:
Last edit: 02 Sep 2023 18:33 by PCW.
Please Log in or Create an account to join the conversation.
03 Sep 2023 08:25 #279701
by Donno
Replied by Donno on topic Mesa modbus and pktUart
Thanks for showing me the mistake:
halcmd: loadrt lichuan ports=hm2_7i96s.0.pktuart.0
halcmd: addf lichuan.00 servo-thread
I manage to find the hm2_pktuart_setup_rx -> hostmot2-serial.h i then copied hostmot2.so from linuxcnc-dev/rtlib to /usr/lib/linuxcnc/modules it then through error about hm2_eth so i did the same with hm2_eth.so
I manage to load linuxcnc and found my driver under Pins in HALSHOW will try to get communication going
halcmd: loadrt lichuan ports=hm2_7i96s.0.pktuart.0
halcmd: addf lichuan.00 servo-thread
I manage to find the hm2_pktuart_setup_rx -> hostmot2-serial.h i then copied hostmot2.so from linuxcnc-dev/rtlib to /usr/lib/linuxcnc/modules it then through error about hm2_eth so i did the same with hm2_eth.so
I manage to load linuxcnc and found my driver under Pins in HALSHOW will try to get communication going
Please Log in or Create an account to join the conversation.
03 Sep 2023 10:40 #279709
by Donno
Replied by Donno on topic Mesa modbus and pktUart
Attachments:
Please Log in or Create an account to join the conversation.
04 Sep 2023 10:33 #279811
by Donno
Replied by Donno on topic Mesa modbus and pktUart
Attachments:
Please Log in or Create an account to join the conversation.
04 Sep 2023 14:45 #279834
by PCW
Replied by PCW on topic Mesa modbus and pktUart
1. Do you have the RS-485 bias resistors added as shown earlier in this thread?
2. You might try enabling debug (=3) to see whats going on (and post the results here)
2. You might try enabling debug (=3) to see whats going on (and post the results here)
Please Log in or Create an account to join the conversation.
Time to create page: 0.229 seconds