Mesa 5i24 mesaflash : No 5I24 board found

More
17 Aug 2016 06:20 #78917 by erasmo
Ok I set in halfile

setp hm2_[HOSTMOT2](BOARD0).0.gpio.021.is_output 1
setp hm2_[HOSTMOT2](BOARD0).0.gpio.022.is_output 1
setp hm2_[HOSTMOT2](BOARD0).0.gpio.023.is_output 1

setp hm2_[HOSTMOT2](BOARD0).0.gpio.021.out 0
setp hm2_[HOSTMOT2](BOARD0).0.gpio.022.out 0
setp hm2_[HOSTMOT2](BOARD0).0.gpio.023.out 0

and Red watchdog LED went OFF

Please Log in or Create an account to join the conversation.

More
19 Aug 2016 06:05 #79037 by erasmo
I still can't get AOUTx voltages working

Please Log in or Create an account to join the conversation.

More
19 Aug 2016 11:59 #79048 by PCW
Hmm I tried this with LinuxCNC 2.7.6, a 5I24 with 7I65 on P4
and the bitfile I created for you, and setting analog voltages worked OK

Can you post your hal file here?

Please Log in or Create an account to join the conversation.

More
19 Aug 2016 12:24 #79053 by erasmo
loadrt trivkins
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES

loadrt hostmot2
loadrt hm2_pci config=[HOSTMOT2](CONFIG0)


setp hm2_[HOSTMOT2](BOARD0).0.watchdog.timeout_ns 10000000

loadrt mesa_7i65 bspi_chans=hm2_5i24.0.bspi.0

loadrt pid names=pid.x,pid.y,pid.z,pid.a,pid.b,pid.c,pid.spindle,pid.4,pid.5
loadrt abs names=abs.spindle
loadrt lowpass names=lowpass.spindle

addf hm2_[HOSTMOT2](BOARD0).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 pid.a.do-pid-calcs servo-thread
addf pid.b.do-pid-calcs servo-thread
addf pid.c.do-pid-calcs servo-thread
addf pid.spindle.do-pid-calcs servo-thread
addf pid.4.do-pid-calcs servo-thread
addf pid.5.do-pid-calcs servo-thread
addf abs.spindle servo-thread
addf lowpass.spindle servo-thread
addf hm2_[HOSTMOT2](BOARD0).0.write servo-thread
#addf mesa_7i65.0 servo-thread



setp hm2_[HOSTMOT2](BOARD0).0.gpio.021.is_output 1
setp hm2_[HOSTMOT2](BOARD0).0.gpio.022.is_output 1
setp hm2_[HOSTMOT2](BOARD0).0.gpio.023.is_output 1

setp hm2_[HOSTMOT2](BOARD0).0.gpio.021.out 0
setp hm2_[HOSTMOT2](BOARD0).0.gpio.022.out 0
setp hm2_[HOSTMOT2](BOARD0).0.gpio.023.out 0



# external output signals
# external input signals

#*******************
# AXIS X
#*******************

setp pid.x.Pgain [AXIS_0]P
setp pid.x.Igain [AXIS_0]I
setp pid.x.Dgain [AXIS_0]D
setp pid.x.bias [AXIS_0]BIAS
setp pid.x.FF0 [AXIS_0]FF0
setp pid.x.FF1 [AXIS_0]FF1
setp pid.x.FF2 [AXIS_0]FF2
setp pid.x.deadband [AXIS_0]DEADBAND
setp pid.x.maxoutput [AXIS_0]MAX_OUTPUT

net x-index-enable <=> pid.x.index-enable
net x-enable => pid.x.enable
net x-output => pid.x.output
net x-pos-cmd => pid.x.command
net x-vel-fb => pid.x.feedback-deriv
net x-pos-fb => pid.x.feedback

# ---PWM Generator signals/setup---

######setp hm2_[HOSTMOT2](BOARD0).0.analog.00.scale [AXIS_0]OUTPUT_SCALE

###net x-output => hm2_5i24.0.pwmgen.00.value
net x-pos-cmd axis.0.motor-pos-cmd
net x-enable axis.0.amp-enable-out => mesa-7i65.0.enable.0.out

# ---Encoder feedback signals/setup---

setp hm2_5i24.0.encoder.00.counter-mode 0
setp hm2_5i24.0.encoder.00.filter 1
setp hm2_5i24.0.encoder.00.index-invert 0
setp hm2_5i24.0.encoder.00.index-mask 0
setp hm2_5i24.0.encoder.00.index-mask-invert 0
setp hm2_5i24.0.encoder.00.scale [AXIS_0]ENCODER_SCALE

net x-pos-fb <= hm2_5i24.0.encoder.00.position
net x-vel-fb <= hm2_5i24.0.encoder.00.velocity
net x-pos-fb => axis.0.motor-pos-fb
net x-index-enable axis.0.index-enable <=> hm2_5i24.0.encoder.00.index-enable
net x-pos-rawcounts <= hm2_5i24.0.encoder.00.rawcounts

# ---setup home / limit switch signals---

net x-home-limit => axis.0.home-sw-in
net x-both-limit => axis.0.neg-lim-sw-in
net x-both-limit => axis.0.pos-lim-sw-in



#*******************
# AXIS Y
#*******************

setp pid.y.Pgain [AXIS_1]P
setp pid.y.Igain [AXIS_1]I
setp pid.y.Dgain [AXIS_1]D
setp pid.y.bias [AXIS_1]BIAS
setp pid.y.FF0 [AXIS_1]FF0
setp pid.y.FF1 [AXIS_1]FF1
setp pid.y.FF2 [AXIS_1]FF2
setp pid.y.deadband [AXIS_1]DEADBAND
setp pid.y.maxoutput [AXIS_1]MAX_OUTPUT

net y-index-enable <=> pid.y.index-enable
net y-enable => pid.y.enable
net y-output => pid.y.output
net y-pos-cmd => pid.y.command
net y-vel-fb => pid.y.feedback-deriv
net y-pos-fb => pid.y.feedback

# ---PWM Generator signals/setup---

###setp hm2_5i24.0.pwmgen.02.output-type 2
###setp hm2_5i24.0.pwmgen.02.scale [AXIS_1]OUTPUT_SCALE

###net y-output => hm2_5i24.0.pwmgen.02.value
net y-pos-cmd axis.1.motor-pos-cmd
net y-enable axis.1.amp-enable-out => mesa-7i65.0.enable.1.out

# ---Encoder feedback signals/setup---

setp hm2_5i24.0.encoder.02.counter-mode 0
setp hm2_5i24.0.encoder.02.filter 1
setp hm2_5i24.0.encoder.02.index-invert 0
setp hm2_5i24.0.encoder.02.index-mask 0
setp hm2_5i24.0.encoder.02.index-mask-invert 0
setp hm2_5i24.0.encoder.02.scale [AXIS_1]ENCODER_SCALE

net y-pos-fb <= hm2_5i24.0.encoder.02.position
net y-vel-fb <= hm2_5i24.0.encoder.02.velocity
net y-pos-fb => axis.1.motor-pos-fb
net y-index-enable axis.1.index-enable <=> hm2_5i24.0.encoder.02.index-enable
net y-pos-rawcounts <= hm2_5i24.0.encoder.02.rawcounts

# ---setup home / limit switch signals---

net y-home-limit => axis.2.home-sw-in
net y-both-limit => axis.2.neg-lim-sw-in
net y-both-limit => axis.2.pos-lim-sw-in






#*******************
# AXIS Z
#*******************

setp pid.z.Pgain [AXIS_2]P
setp pid.z.Igain [AXIS_2]I
setp pid.z.Dgain [AXIS_2]D
setp pid.z.bias [AXIS_2]BIAS
setp pid.z.FF0 [AXIS_2]FF0
setp pid.z.FF1 [AXIS_2]FF1
setp pid.z.FF2 [AXIS_2]FF2
setp pid.z.deadband [AXIS_2]DEADBAND
setp pid.z.maxoutput [AXIS_2]MAX_OUTPUT

net z-index-enable <=> pid.z.index-enable
net z-enable => pid.z.enable
net z-output => pid.z.output
net z-pos-cmd => pid.z.command
net z-vel-fb => pid.z.feedback-deriv
net z-pos-fb => pid.z.feedback

# ---PWM Generator signals/setup---

###setp hm2_5i24.0.pwmgen.01.output-type 2
###setp hm2_5i24.0.pwmgen.01.scale [AXIS_2]OUTPUT_SCALE

###net z-output => hm2_5i24.0.pwmgen.01.value
net z-pos-cmd axis.2.motor-pos-cmd
net z-enable axis.2.amp-enable-out => mesa-7i65.0.enable.2.out

# ---Encoder feedback signals/setup---

setp hm2_5i24.0.encoder.01.counter-mode 0
setp hm2_5i24.0.encoder.01.filter 1
setp hm2_5i24.0.encoder.01.index-invert 0
setp hm2_5i24.0.encoder.01.index-mask 0
setp hm2_5i24.0.encoder.01.index-mask-invert 0
setp hm2_5i24.0.encoder.01.scale [AXIS_2]ENCODER_SCALE

net z-pos-fb <= hm2_5i24.0.encoder.01.position
net z-vel-fb <= hm2_5i24.0.encoder.01.velocity
net z-pos-fb => axis.2.motor-pos-fb
net z-index-enable axis.2.index-enable <=> hm2_5i24.0.encoder.01.index-enable
net z-pos-rawcounts <= hm2_5i24.0.encoder.01.rawcounts

# ---setup home / limit switch signals---

net z-home-limit => axis.1.home-sw-in
net z-both-limit => axis.1.neg-lim-sw-in
net z-both-limit => axis.1.pos-lim-sw-in


#*******************
# AXIS B
#*******************

setp pid.b.Pgain [AXIS_4]P
setp pid.b.Igain [AXIS_4]I
setp pid.b.Dgain [AXIS_4]D
setp pid.b.bias [AXIS_4]BIAS
setp pid.b.FF0 [AXIS_4]FF0
setp pid.b.FF1 [AXIS_4]FF1
setp pid.b.FF2 [AXIS_4]FF2
setp pid.b.deadband [AXIS_4]DEADBAND
setp pid.b.maxoutput [AXIS_4]MAX_OUTPUT

net b-index-enable <=> pid.b.index-enable
net b-enable => pid.b.enable
net b-output => pid.b.output
net b-pos-cmd => pid.b.command
net b-vel-fb => pid.b.feedback-deriv
net b-pos-fb => pid.b.feedback

# ---PWM Generator signals/setup---
# W przypdku dolozenia podzielnicy zrobic odpowiednie pwmgen.03 pwmgen.04 A - zamienione z B

###setp hm2_5i24.0.pwmgen.03.output-type 2
###setp hm2_5i24.0.pwmgen.03.scale [AXIS_4]OUTPUT_SCALE

###net b-output => hm2_5i24.0.pwmgen.03.value
net b-pos-cmd axis.4.motor-pos-cmd
net b-enable axis.4.amp-enable-out => mesa-7i65.0.enable.3.out


# ---Encoder feedback signals/setup---

setp hm2_5i24.0.encoder.03.counter-mode 0
setp hm2_5i24.0.encoder.03.filter 1
setp hm2_5i24.0.encoder.03.index-invert 0
setp hm2_5i24.0.encoder.03.index-mask 0
setp hm2_5i24.0.encoder.03.index-mask-invert 0
setp hm2_5i24.0.encoder.03.scale [AXIS_4]ENCODER_SCALE

net b-pos-fb <= hm2_5i24.0.encoder.03.position
net b-vel-fb <= hm2_5i24.0.encoder.03.velocity
net b-pos-fb => axis.4.motor-pos-fb
net b-index-enable axis.4.index-enable <=> hm2_5i24.0.encoder.03.index-enable
net b-pos-rawcounts <= hm2_5i24.0.encoder.03.rawcounts

# ---setup home / limit switch signals---

net b-home-limit => axis.4.home-sw-in
net b-both-limit => axis.4.neg-lim-sw-in
net b-both-limit => axis.4.pos-lim-sw-in






#*******************
# SPINDLE S
#*******************


setp pid.spindle.Pgain 0140 #[SPINDLE_9]P
setp pid.spindle.Igain 0 #[SPINDLE_9]I
setp pid.spindle.Dgain 0 #[SPINDLE_9]D
setp pid.spindle.bias 0 #[SPINDLE_9]BIAS
setp pid.spindle.FF0 0 #[SPINDLE_9]FF0
setp pid.spindle.FF1 0 #[SPINDLE_9]FF1
setp pid.spindle.FF2 0 #[SPINDLE_9]FF2
setp pid.spindle.deadband 20 #[SPINDLE_9]DEADBAND
setp pid.spindle.maxoutput [SPINDLE_9]OUTPUT_SCALE

net spindle-on => pid.spindle.enable


#net b-output => pid.b.output
#net b-pos-cmd => pid.b.command
#net b-vel-fb => pid.b.feedback-deriv
#net b-pos-fb => pid.b.feedback


#dzis setp hm2_5i24.0.pwmgen.05.output-type 2
#dzis setp hm2_5i24.0.pwmgen.05.scale [SPINDLE_9]OUTPUT_SCALE

#setp hm2_5i24.0.encoder.05.counter-mode 0
#setp hm2_5i24.0.encoder.05.filter 0
#setp hm2_5i24.0.encoder.05.index-invert 0
#setp hm2_5i24.0.encoder.05.index-mask 0
#setp hm2_5i24.0.encoder.05.index-mask-invert 0
#setp hm2_5i24.0.encoder.05.scale [SPINDLE_9]POSITION_SCALE


#




# ---setup spindle control signals---

net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd <= motion.spindle-speed-out
net spindle-on <= motion.spindle-on
net spindle-cw <= motion.spindle-forward
net spindle-ccw <= motion.spindle-reverse
net spindle-brake <= motion.spindle-brake
net spindle-revs => motion.spindle-revs
#net spindle-at-speed => motion.spindle-at-speed
#net spindle-vel-fb => motion.spindle-speed-in
net spindle-index-enable <=> motion.spindle-index-enable

loadrt mult2 count=1
addf mult2.0 servo-thread


net spindle-vel-fb => mult2.0.in0
setp mult2.0.in1 60

net spindle-vel-fb-rpm <= mult2.0.out
net spindle-vel-fb-rpm => motion.spindle-speed-in


# ---Setup spindle at speed signals---


# load a near component and attach it to a thread
loadrt near
addf near.0 servo-thread

net spindle-vel-cmd near.0.in1
net spindle-vel-fb-rpm near.0.in2

net spindle-at-speed motion.spindle-at-speed <= near.0.out

# set the spindle speed inputs to agree if within 10%
setp near.0.scale 1.1

#sets spindle-at-speed true
#net spindle-index-enable hm2_5i24.0.encoder.05.index-enable

# Używam ZADANEJ prędkości wrzeciona z LinuxCNC ponieważ nie był zdefiniowany enkoder wrzeciona
# prędkość ZADANA jest ze znakiem więc używamy komponentu abs aby usunąć znak

net spindle-vel-cmd => abs.spindle.in
net absolute-spindle-vel <= abs.spindle.out

#linkps hm2_5i24.0.encoder.05.position => spindle-revs
#linkps hm2_5i24.0.encoder.05.velocity => spindle-vel-fb

#******************************
# connect miscellaneous signals
#******************************

# ---HALUI signals---

net joint-select-a halui.joint.0.select
net x-is-homed halui.joint.0.is-homed
net jog-x-pos halui.jog.0.plus
net jog-x-neg halui.jog.0.minus
net jog-x-analog halui.jog.0.analog
net joint-select-b halui.joint.1.select
net y-is-homed halui.joint.1.is-homed
net jog-y-pos halui.jog.1.plus
net jog-y-neg halui.jog.1.minus
net jog-y-analog halui.jog.1.analog
net joint-select-c halui.joint.2.select
net z-is-homed halui.joint.2.is-homed
net jog-z-pos halui.jog.2.plus
net jog-z-neg halui.jog.2.minus
net jog-z-analog halui.jog.2.analog
net jog-selected-pos halui.jog.selected.plus
net jog-selected-neg halui.jog.selected.minus
net spindle-manual-cw halui.spindle.forward
net spindle-manual-ccw halui.spindle.reverse
net spindle-manual-stop halui.spindle.stop
net machine-is-on halui.machine.is-on
net jog-speed halui.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


# ---motion control signals---

net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled

# ---digital in / out 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



Before enabling mesa-7i64.0.output.0.out AOUT0 voltage is approx. 200mV
When I enable that pin voltage drops to 0.2 mV.
Changing mesa-7i64.0.analogue.0.out does nothing.

Please Log in or Create an account to join the conversation.

More
19 Aug 2016 12:31 #79055 by PCW
Enable is unrelated to the analog output ( it just controls the drive enable OPTO )

I suspect you have the Analog out and enable pins mixed up

Please Log in or Create an account to join the conversation.

More
19 Aug 2016 12:36 #79056 by erasmo
How is that possible?

Please Log in or Create an account to join the conversation.

More
19 Aug 2016 12:44 - 19 Aug 2016 12:50 #79058 by PCW
I dont know but I do know that the enable output OPTOs are independent
of the analog outputs and if you measure across them you will see a change
when enabled or not enabled

Also because the analog I/O has an isolated ground you must measure the analog output
between AOUTN and AGND (not system or digital ground)
Last edit: 19 Aug 2016 12:50 by PCW.

Please Log in or Create an account to join the conversation.

More
19 Aug 2016 12:52 - 19 Aug 2016 12:52 #79062 by Todd Zuercher
In your above Hal code you have these 2 lines commented out.
######setp hm2_[HOSTMOT2](BOARD0).0.analog.00.scale [AXIS_0]OUTPUT_SCALE

###net x-output => hm2_5i24.0.pwmgen.00.value
I wouldn't expect any reading on the X analog output without a single going to it.
Last edit: 19 Aug 2016 12:52 by Todd Zuercher.

Please Log in or Create an account to join the conversation.

More
19 Aug 2016 12:56 - 19 Aug 2016 12:56 #79063 by PCW
That should be OK ( the default scale is +-1 for full scale)
That worked for me anyway ( setting analog out to 0.5 gave 5V output)
Last edit: 19 Aug 2016 12:56 by PCW.
The following user(s) said Thank You: erasmo

Please Log in or Create an account to join the conversation.

More
22 Aug 2016 07:41 #79235 by erasmo
7i65 works fine.
Thanks for help, I have been probing wrong pins.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.096 seconds
Powered by Kunena Forum