Mesa 7i96S SSERIAL and pktuart
12 Apr 2024 01:23 #298041
by PCW
Replied by PCW on topic Mesa 7i96S SSERIAL and pktuart
I did check that firmware with a modbus device (GS10 VFD) and it worked
(+- the known Mesa-Modbus bugs)
(+- the known Mesa-Modbus bugs)
Please Log in or Create an account to join the conversation.
13 Apr 2024 11:54 #298162
by lkavan
Replied by lkavan on topic Mesa 7i96S SSERIAL and pktuart
First of all: I am sorry, you was right I have problem in HAL: I forgot # before addf But when I enabled addf, lcnc cannot start, becouse cannot find function. I didn't found GS10 driver as you have, so I have tried to test example: modcompile relayboard.mod. It was compiled, installed, but the same problemn with addf. when I disable addf and leave loadrt only, lcnc starts and I see relayboard in halshow, not work, of course.
Found file(REL): ./custom.hal
HAL: ERROR: function 'relayboard' not found
./custom.hal:58: addf failed
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
USRMOT: ERROR: command 3 timeout
HAL: ERROR: component 0 not found
hm2_eth: in hm2_eth_reset
hm2_eth: HostMot2 ethernet driver unloaded
hm2: unloading
my custom.hal:
l# Include your custom HAL commands here
# This file will not be overwritten when you run PNCconf again
loadrt threads name1=pwm-thread period1=1000000 fp1=1
# --- Teploty Libor ---
# *** nastaveni rozsahu analogovych vstupu
setp hm2_7i96s.0.7i87.0.0.analogin0-scalemax 750
setp hm2_7i96s.0.7i87.0.0.analogin1-scalemax 750
#loadrt pid num_chan=1
addf pid.tb.do-pid-calcs servo-thread
loadrt pwmgen output_type=0
addf pwmgen.update pwm-thread
addf pwmgen.make-pulses servo-thread
newsig temp_bath_enable bit
sets temp_bath_enable FALSE
net temp_bath_enable => pid.tb.enable
net temp_bath_enable => pwmgen.0.enable
net temp_bath_set => pid.tb.command
net temp_bath_pidout pid.tb.output => pwmgen.0.value
net temp_bath_pwmout pwmgen.0.pwm => hm2_7i96s.0.7i87.0.0.output-00
net temp_bath <= hm2_7i96s.0.7i87.0.0.analogin0 => pid.tb.feedback
# net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.01.enable
# net emcmot.01.enable <= axis.1.amp-enable-out
# set PID loop gains from inifile
setp pid.tb.Pgain [TEMP_BATH]P
setp pid.tb.Igain [TEMP_BATH]I
setp pid.tb.Dgain [TEMP_BATH]D
setp pid.tb.bias [TEMP_BATH]BIAS
setp pid.tb.FF0 [TEMP_BATH]FF0
setp pid.tb.FF1 [TEMP_BATH]FF1
setp pid.tb.FF2 [TEMP_BATH]FF2
setp pid.tb.deadband [TEMP_BATH]DEADBAND
setp pid.tb.maxoutput [TEMP_BATH]MAX_OUTPUT
setp pwmgen.0.scale [TEMP_BATH]PWM_SCALE
setp pwmgen.0.pwm-freq [TEMP_BATH]PWM_FREQ
setp pwmgen.0.dither-pwm [TEMP_BATH]PWM_DITHER
setp pwmgen.0.max-dc [TEMP_BATH]PWM_MAX_DC
setp pwmgen.0.min-dc [TEMP_BATH]PWM_MIN_DC
#setp pid.tb.command 50
# Predehrev
net temp_preheat <= hm2_7i96s.0.7i87.0.0.analogin1
#
IFM bus
#loadrt mesa_ifm ports=hm2_7i96s.0.pktuart.0
#addf mesa_ifm servo-thread
loadrt relayboard ports=hm2_7i96s.0.pktuart.0
addf relayboard servo-thread
Found file(REL): ./custom.hal
HAL: ERROR: function 'relayboard' not found
./custom.hal:58: addf failed
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
USRMOT: ERROR: command 3 timeout
HAL: ERROR: component 0 not found
hm2_eth: in hm2_eth_reset
hm2_eth: HostMot2 ethernet driver unloaded
hm2: unloading
my custom.hal:
l# Include your custom HAL commands here
# This file will not be overwritten when you run PNCconf again
loadrt threads name1=pwm-thread period1=1000000 fp1=1
# --- Teploty Libor ---
# *** nastaveni rozsahu analogovych vstupu
setp hm2_7i96s.0.7i87.0.0.analogin0-scalemax 750
setp hm2_7i96s.0.7i87.0.0.analogin1-scalemax 750
#loadrt pid num_chan=1
addf pid.tb.do-pid-calcs servo-thread
loadrt pwmgen output_type=0
addf pwmgen.update pwm-thread
addf pwmgen.make-pulses servo-thread
newsig temp_bath_enable bit
sets temp_bath_enable FALSE
net temp_bath_enable => pid.tb.enable
net temp_bath_enable => pwmgen.0.enable
net temp_bath_set => pid.tb.command
net temp_bath_pidout pid.tb.output => pwmgen.0.value
net temp_bath_pwmout pwmgen.0.pwm => hm2_7i96s.0.7i87.0.0.output-00
net temp_bath <= hm2_7i96s.0.7i87.0.0.analogin0 => pid.tb.feedback
# net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.pwmgen.01.enable
# net emcmot.01.enable <= axis.1.amp-enable-out
# set PID loop gains from inifile
setp pid.tb.Pgain [TEMP_BATH]P
setp pid.tb.Igain [TEMP_BATH]I
setp pid.tb.Dgain [TEMP_BATH]D
setp pid.tb.bias [TEMP_BATH]BIAS
setp pid.tb.FF0 [TEMP_BATH]FF0
setp pid.tb.FF1 [TEMP_BATH]FF1
setp pid.tb.FF2 [TEMP_BATH]FF2
setp pid.tb.deadband [TEMP_BATH]DEADBAND
setp pid.tb.maxoutput [TEMP_BATH]MAX_OUTPUT
setp pwmgen.0.scale [TEMP_BATH]PWM_SCALE
setp pwmgen.0.pwm-freq [TEMP_BATH]PWM_FREQ
setp pwmgen.0.dither-pwm [TEMP_BATH]PWM_DITHER
setp pwmgen.0.max-dc [TEMP_BATH]PWM_MAX_DC
setp pwmgen.0.min-dc [TEMP_BATH]PWM_MIN_DC
#setp pid.tb.command 50
# Predehrev
net temp_preheat <= hm2_7i96s.0.7i87.0.0.analogin1
#
IFM bus
#loadrt mesa_ifm ports=hm2_7i96s.0.pktuart.0
#addf mesa_ifm servo-thread
loadrt relayboard ports=hm2_7i96s.0.pktuart.0
addf relayboard servo-thread
Please Log in or Create an account to join the conversation.
13 Apr 2024 14:01 #298164
by PCW
Replied by PCW on topic Mesa 7i96S SSERIAL and pktuart
It's probably:
addf mesa_ifm.00 servo-thread
If in doubt about function names, run linuxcnc with a working
configuration with the desired components loaded and then
run this command (in a terminal):
halcmd show funct
addf mesa_ifm.00 servo-thread
If in doubt about function names, run linuxcnc with a working
configuration with the desired components loaded and then
run this command (in a terminal):
halcmd show funct
The following user(s) said Thank You: lkavan
Please Log in or Create an account to join the conversation.
14 Apr 2024 12:12 #298225
by lkavan
Replied by lkavan on topic Mesa 7i96S SSERIAL and pktuart
Great! addf mesa_ifm.00 servo-thread was the solution! Now, HAL started and I have a data on RS485 Now, I am going to modify modbus driver to IFM bus - there are different opcodes and different checksum. It is the protocol of www.sabo.de I hope, this should not be so big problem.
But please, you have written about "known mesa-modbus bug" What are they? Will be better to know about them when there will be any problem with communication...
Thanx a lot for your help!
But please, you have written about "known mesa-modbus bug" What are they? Will be better to know about them when there will be any problem with communication...
Thanx a lot for your help!
Please Log in or Create an account to join the conversation.
24 Apr 2024 18:16 #299014
by lkavan
Replied by lkavan on topic Mesa 7i96S SSERIAL and pktuart
Thanx a lot again, it works finally! I have improved mesa-modbus to IFM bus and machine running
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
24 Apr 2024 22:49 #299034
by PCW
Replied by PCW on topic Mesa 7i96S SSERIAL and pktuart
Glad that it worked for you.
Please Log in or Create an account to join the conversation.
Time to create page: 0.077 seconds