7i84 Software mode 3
- Duc
- Offline
- Premium Member
Less
More
- Posts: 101
- Thank you received: 1
20 Apr 2014 00:33 #46115
by Duc
7i84 Software mode 3 was created by Duc
Looking to configure the 7i84 to use software mode 3 so I can use the encoder function for a MPG.
I can see the pinout of the card from Halcmd but not sure how to force input 16,17,18,19 to encoder mode from the Hal file since PNCCONF does not see the card.
All other inputs are working on the card.
Thanks
I can see the pinout of the card from Halcmd but not sure how to force input 16,17,18,19 to encoder mode from the Hal file since PNCCONF does not see the card.
All other inputs are working on the card.
Thanks
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17904
- Thank you received: 4774
20 Apr 2014 00:40 - 20 Apr 2014 00:52 #46116
by PCW
Replied by PCW on topic 7i84 Software mode 3
Actually you want to set the 7I84's software mode to 2
(the manual had an error, fixed in rev 1.5 of the 7I84 manual)
This needs a tuple in the hm2_pci config string like "sserial_port_0=0200"
(assuming the 7I84 is on sserial channel 1 as it will be if you have a 7I76 on P3 )
Channel numbers of the sserial mode setting string are in left to right order
and start at channel 0. X's in the sserial mode setting string disable channels
For example "sserial_port_0=3415XX" would
set sserial channel 0 to mode 3
set sserial channel 1 to mode 4
set sserial channel 2 to mode 1
set sserial channel 3 to mode 5
disable sserial channel 4
disable sserial channel 5
(the manual had an error, fixed in rev 1.5 of the 7I84 manual)
This needs a tuple in the hm2_pci config string like "sserial_port_0=0200"
(assuming the 7I84 is on sserial channel 1 as it will be if you have a 7I76 on P3 )
Channel numbers of the sserial mode setting string are in left to right order
and start at channel 0. X's in the sserial mode setting string disable channels
For example "sserial_port_0=3415XX" would
set sserial channel 0 to mode 3
set sserial channel 1 to mode 4
set sserial channel 2 to mode 1
set sserial channel 3 to mode 5
disable sserial channel 4
disable sserial channel 5
Last edit: 20 Apr 2014 00:52 by PCW. Reason: adjust for 7I76 sserial exp channel
The following user(s) said Thank You: akb1212
Please Log in or Create an account to join the conversation.
- Duc
- Offline
- Premium Member
Less
More
- Posts: 101
- Thank you received: 1
20 Apr 2014 00:47 #46117
by Duc
My connections of difference is 5i25>7i76>7i84. The 7i76 and 7i84 are connected by a cable to the serial port between them.
How would you tell if it which over to a different mode in Halcmd?
Attached is the beginning part of my Hal file.
Replied by Duc on topic 7i84 Software mode 3
Actually you want to set the 7I84's software mode to 2
(the manual had an error, fixed in rev 1.5 of the 7I84 manual)
This needs a tuple in the hm2_pci config string like "sserial_port_0=0002"
(assuming the 7I84 is on sserial channel 3)
My connections of difference is 5i25>7i76>7i84. The 7i76 and 7i84 are connected by a cable to the serial port between them.
How would you tell if it which over to a different mode in Halcmd?
Attached is the beginning part of my Hal file.
loadrt abs count=1
loadrt trivkins
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=1 num_pwmgens=0 num_3pwmgens=0 num_stepgens=5 sserial_port_0=0002 "
setp hm2_5i25.0.watchdog.timeout_ns 10000000
loadrt mux16 names=jogincr,foincr,mvoincr,soincr
addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf jogincr servo-thread
addf foincr servo-thread
addf mvoincr servo-thread
addf soincr servo-thread
addf hm2_5i25.0.write servo-thread
addf hm2_5i25.0.pet_watchdog servo-thread
addf abs.0 servo-thread
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17904
- Thank you received: 4774
20 Apr 2014 00:55 - 20 Apr 2014 00:56 #46118
by PCW
Replied by PCW on topic 7i84 Software mode 3
I would try sserial_port_0=0200
and then halcmd show pin to check if the encoder pins show up
and then halcmd show pin to check if the encoder pins show up
Last edit: 20 Apr 2014 00:56 by PCW.
Please Log in or Create an account to join the conversation.
- Duc
- Offline
- Premium Member
Less
More
- Posts: 101
- Thank you received: 1
20 Apr 2014 01:02 #46119
by Duc
Replied by Duc on topic 7i84 Software mode 3
Worked like a champ. Im sure Ill have a ton more questions later on.
Thanks
Thanks
Please Log in or Create an account to join the conversation.
- Duc
- Offline
- Premium Member
Less
More
- Posts: 101
- Thank you received: 1
20 Apr 2014 01:44 #46120
by Duc
Replied by Duc on topic 7i84 Software mode 3
Might as well continue the questions in this thread for the encoder stuff.
Here is the MPG
www.redrive.biz/MGX-10B-SUMTAK-YASNAC-OP...-100mA-p/mgx-10b.htm
I have S1 hooked to enc0 on pins 16 and 17 and S2 hooked to enc1 on pins 18,19. Power is supplied by a 12v power supply with the ground tied to my main 24v power supply ground.
When I bring up the hal meter and watch hm2_5i25.0.7i84.01.1.enc0 I see no change. Stays on 276.
Here is the complete Hal file.
Here is the MPG
www.redrive.biz/MGX-10B-SUMTAK-YASNAC-OP...-100mA-p/mgx-10b.htm
I have S1 hooked to enc0 on pins 16 and 17 and S2 hooked to enc1 on pins 18,19. Power is supplied by a 12v power supply with the ground tied to my main 24v power supply ground.
When I bring up the hal meter and watch hm2_5i25.0.7i84.01.1.enc0 I see no change. Stays on 276.
Here is the complete Hal file.
loadrt abs count=1
loadrt trivkins
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hostmot2
loadrt hm2_pci config=" num_encoders=1 num_pwmgens=0 num_3pwmgens=0 num_stepgens=5 sserial_port_0=0200 "
setp hm2_5i25.0.watchdog.timeout_ns 10000000
loadrt mux16 names=jogincr,foincr,mvoincr,soincr
addf hm2_5i25.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf jogincr servo-thread
addf foincr servo-thread
addf mvoincr servo-thread
addf soincr servo-thread
addf hm2_5i25.0.write servo-thread
addf hm2_5i25.0.pet_watchdog servo-thread
addf abs.0 servo-thread
# external output signals
# external input signals
# ---COOLANT CONROL ---
net coolant-flood hm2_5i25.0.7i76.0.0.output-01
# ---LUBRICATION SYSTEM ---
# --- SPINDLE-BRAKE ---
net spindle-brake hm2_5i25.0.7i76.0.0.output-00
# --- BOTH-HOME-X ---
net both-home-x <= hm2_5i25.0.7i76.0.0.input-00
# --- BOTH-HOME-Y ---
net both-home-y <= hm2_5i25.0.7i76.0.0.input-01
# --- MAX-HOME-Z ---
net max-home-z <= hm2_5i25.0.7i76.0.0.input-03
# --- MIN-Z ---
net min-z <= hm2_5i25.0.7i76.0.0.input-04
# --- JOINT-SELECT-a-X ---
net joint-select-a <= hm2_5i25.0.7i84.0.1.input-00
# --- JOINT-SELECT-b-Y ---
net joint-select-b <= hm2_5i25.0.7i84.0.1.input-01
# --- JOINT-SELECT-c-Z ---
net joint-select-c <= hm2_5i25.0.7i84.0.1.input-02
# --- JOINT-SELECT-d-A ---
net joint-select-d <= hm2_5i25.0.7i84.0.1.input-03
# --- JOG-INCR-A ---
net jog-incr-a <= hm2_5i25.0.7i84.0.1.input-09
# --- JOG-INCR-B ---
net jog-incr-b <= hm2_5i25.0.7i84.0.1.input-10
# --- JOG-INCR-C ---
net jog-incr-c <= hm2_5i25.0.7i84.0.1.input-11
# --- Feedrate overide - FO-INCR-A ---
net fo-incr-a <= hm2_5i25.0.7i84.0.1.input-04
# --- FO-INCR-B ---
net fo-incr-b <= hm2_5i25.0.7i84.0.1.input-05
# --- FO-INCR-C ---
net fo-incr-c <= hm2_5i25.0.7i84.0.1.input-06
# --- FO-INCR-D ---
net fo-incr-d <= hm2_5i25.0.7i84.0.1.input-07
# --- Spindle override - SO-INCR-A ---
net so-incr-a <= hm2_5i25.0.7i84.0.1.input-29
# --- SO-INCR-B ---
net so-incr-b <= hm2_5i25.0.7i84.0.1.input-30
# --- SO-INCR-C ---
net so-incr-c <= hm2_5i25.0.7i84.0.1.input-31
# --- Max velocity override - MVO-INCR-A ---
net mvo-incr-a <= hm2_5i25.0.7i76.0.0.input-28
# --- MVO-INCR-B ---
net mvo-incr-b <= hm2_5i25.0.7i76.0.0.input-29
# --- MVO-INCR-C ---
net mvo-incr-c <= hm2_5i25.0.7i76.0.0.input-30
# --- MVO-INCR-D ---
net mvo-incr-d <= hm2_5i25.0.7i76.0.0.input-31
#*******************
# AXIS X
#*******************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.00.dirsetup [AXIS_0]DIRSETUP
setp hm2_5i25.0.stepgen.00.dirhold [AXIS_0]DIRHOLD
setp hm2_5i25.0.stepgen.00.steplen [AXIS_0]STEPLEN
setp hm2_5i25.0.stepgen.00.stepspace [AXIS_0]STEPSPACE
setp hm2_5i25.0.stepgen.00.position-scale [AXIS_0]STEP_SCALE
setp hm2_5i25.0.stepgen.00.step_type 0
setp hm2_5i25.0.stepgen.00.control-type 0
setp hm2_5i25.0.stepgen.00.maxaccel 5.0
setp hm2_5i25.0.stepgen.00.maxvel 2.1
net x-pos-fb axis.0.motor-pos-fb <= hm2_5i25.0.stepgen.00.position-fb
net x-pos-cmd axis.0.motor-pos-cmd => hm2_5i25.0.stepgen.00.position-cmd
net x-enable axis.0.amp-enable-out => hm2_5i25.0.stepgen.00.enable
# ---setup home / limit switch signals---
net both-home-x => axis.0.home-sw-in
net both-home-x => axis.0.neg-lim-sw-in
net both-home-x => axis.0.pos-lim-sw-in
#*******************
# AXIS Y
#*******************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.01.dirsetup [AXIS_1]DIRSETUP
setp hm2_5i25.0.stepgen.01.dirhold [AXIS_1]DIRHOLD
setp hm2_5i25.0.stepgen.01.steplen [AXIS_1]STEPLEN
setp hm2_5i25.0.stepgen.01.stepspace [AXIS_1]STEPSPACE
setp hm2_5i25.0.stepgen.01.position-scale [AXIS_1]STEP_SCALE
setp hm2_5i25.0.stepgen.01.step_type 0
setp hm2_5i25.0.stepgen.01.control-type 0
setp hm2_5i25.0.stepgen.01.maxaccel 2.5
setp hm2_5i25.0.stepgen.01.maxvel 2.1
net y-pos-fb axis.1.motor-pos-fb <= hm2_5i25.0.stepgen.01.position-fb
net y-pos-cmd axis.1.motor-pos-cmd => hm2_5i25.0.stepgen.01.position-cmd
net y-enable axis.1.amp-enable-out => hm2_5i25.0.stepgen.01.enable
# ---setup home / limit switch signals---
net both-home-y => axis.1.home-sw-in
net both-home-y => axis.1.neg-lim-sw-in
net both-home-y => axis.1.pos-lim-sw-in
#*******************
# AXIS Z
#*******************
# Step Gen signals/setup
setp hm2_5i25.0.stepgen.02.dirsetup [AXIS_2]DIRSETUP
setp hm2_5i25.0.stepgen.02.dirhold [AXIS_2]DIRHOLD
setp hm2_5i25.0.stepgen.02.steplen [AXIS_2]STEPLEN
setp hm2_5i25.0.stepgen.02.stepspace [AXIS_2]STEPSPACE
setp hm2_5i25.0.stepgen.02.position-scale [AXIS_2]STEP_SCALE
setp hm2_5i25.0.stepgen.02.step_type 0
setp hm2_5i25.0.stepgen.02.control-type 0
setp hm2_5i25.0.stepgen.02.maxaccel 2.5
setp hm2_5i25.0.stepgen.02.maxvel 2.1
net z-pos-fb axis.2.motor-pos-fb <= hm2_5i25.0.stepgen.02.position-fb
net z-pos-cmd axis.2.motor-pos-cmd => hm2_5i25.0.stepgen.02.position-cmd
net z-enable axis.2.amp-enable-out => hm2_5i25.0.stepgen.02.enable
# ---setup home / limit switch signals---
net max-home-z => axis.2.home-sw-in
net min-z => axis.2.neg-lim-sw-in
net max-home-z => axis.2.pos-lim-sw-in
#*******************
# SPINDLE S
#*******************
# ---digital potentionmeter output signals/setup---
setp hm2_5i25.0.7i76.0.0.spinout-minlim [SPINDLE_9]OUTPUT_MIN_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-maxlim [SPINDLE_9]OUTPUT_MAX_LIMIT
setp hm2_5i25.0.7i76.0.0.spinout-scalemax [SPINDLE_9]OUTPUT_SCALE
net abs-vel-cmd abs.0.out => hm2_5i25.0.7i76.0.0.spinout
net spindle-enable => hm2_5i25.0.7i76.0.0.spinena
net spindle-cw => hm2_5i25.0.7i76.0.0.output-04
net spindle-ccw => hm2_5i25.0.7i76.0.0.output-05
# ---setup spindle control signals---
net spindle-vel-cmd-rps <= motion.spindle-speed-out-rps
net spindle-vel-cmd abs.0.in <= motion.spindle-speed-out
net spindle-enable <= 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
# ---Setup spindle at speed signals---
sets spindle-at-speed true
#******************************
# 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
# ---probe signal---
net probe-in => motion.probe-input
# ---jog button signals---
sets jog-speed 1.000000
# ---jogwheel signals to mesa encoder - shared MPG---
net joint-selected-count <= hm2_5i25.0.7i84.0.1.enc0
setp hm2_5i25.0.encoder.00.filter true
setp hm2_5i25.0.encoder.00.counter-mode true
# ---mpg signals---
# for axis x MPG
setp axis.0.jog-vel-mode 0
net selected-jog-incr => axis.0.jog-scale
net joint-select-a => axis.0.jog-enable
net joint-selected-count => axis.0.jog-counts
# for axis y MPG
setp axis.1.jog-vel-mode 0
net selected-jog-incr => axis.1.jog-scale
net joint-select-b => axis.1.jog-enable
net joint-selected-count => axis.1.jog-counts
# for axis z MPG
setp axis.2.jog-vel-mode 0
net selected-jog-incr => axis.2.jog-scale
net joint-select-c => axis.2.jog-enable
net joint-selected-count => axis.2.jog-counts
sets selected-jog-incr 0.000000
# connect feed overide increments - switches
setp halui.feed-override.count-enable true
setp halui.feed-override.direct-value true
setp halui.feed-override.scale .01
net feedoverride-incr => halui.feed-override.counts
net fo-incr-a => foincr.sel0
net fo-incr-b => foincr.sel1
net fo-incr-c => foincr.sel2
net fo-incr-d => foincr.sel3
net feedoverride-incr <= foincr.out-s
setp foincr.debounce-time 0.200000
setp foincr.use-graycode False
setp foincr.suppress-no-input False
setp foincr.in00 0.000000
setp foincr.in01 10.000000
setp foincr.in02 20.000000
setp foincr.in03 30.000000
setp foincr.in04 40.000000
setp foincr.in05 50.000000
setp foincr.in06 60.000000
setp foincr.in07 70.000000
setp foincr.in08 80.000000
setp foincr.in09 90.000000
setp foincr.in10 100.000000
setp foincr.in11 110.000000
setp foincr.in12 120.000000
setp foincr.in13 130.000000
setp foincr.in14 140.000000
setp foincr.in15 150.000000
# connect max velocity overide increments - switches
setp halui.max-velocity.count-enable true
setp halui.max-velocity.direct-value true
setp halui.max-velocity.scale 0.016670
net max-vel-override-incr => halui.max-velocity.counts
net mvo-incr-a => mvoincr.sel0
net mvo-incr-b => mvoincr.sel1
net mvo-incr-c => mvoincr.sel2
net mvo-incr-d => mvoincr.sel3
net max-vel-override-incr <= mvoincr.out-s
setp mvoincr.debounce-time 0.200000
setp mvoincr.use-graycode False
setp mvoincr.suppress-no-input False
setp mvoincr.in00 0.000000
setp mvoincr.in01 5.000000
setp mvoincr.in02 10.000000
setp mvoincr.in03 25.000000
setp mvoincr.in04 50.000000
setp mvoincr.in05 75.000000
setp mvoincr.in06 90.000000
setp mvoincr.in07 100.000000
setp mvoincr.in08 100.000000
setp mvoincr.in09 100.000000
setp mvoincr.in10 100.000000
setp mvoincr.in11 100.000000
setp mvoincr.in12 100.000000
setp mvoincr.in13 100.000000
setp mvoincr.in14 100.000000
setp mvoincr.in15 100.000000
# connect spindle overide increments
setp halui.spindle-override.count-enable true
setp halui.spindle-override.direct-value true
setp halui.spindle-override.scale .01
net spindleoverride-incr => halui.spindle-override.counts
net so-incr-a => soincr.sel0
net so-incr-b => soincr.sel1
net so-incr-c => soincr.sel2
net spindleoverride-incr <= soincr.out-s
setp soincr.debounce-time 0.200000
setp soincr.use-graycode False
setp soincr.suppress-no-input False
setp soincr.in00 50.000000
setp soincr.in01 60.000000
setp soincr.in02 70.000000
setp soincr.in03 80.000000
setp soincr.in04 90.000000
setp soincr.in05 100.000000
setp soincr.in06 110.000000
setp soincr.in07 120.000000
# ---motion control signals---
net in-position <= motion.in-position
net machine-is-enabled <= motion.motion-enabled
# ---digital in / out signals---
# ---estop 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
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17904
- Thank you received: 4774
20 Apr 2014 02:53 - 20 Apr 2014 02:54 #46121
by PCW
Replied by PCW on topic 7i84 Software mode 3
I would try:
S1+ to IN16
S2+ to IN17
(and leave S1- and S2- unconnected)
S1+ to IN16
S2+ to IN17
(and leave S1- and S2- unconnected)
Last edit: 20 Apr 2014 02:54 by PCW.
Please Log in or Create an account to join the conversation.
- Duc
- Offline
- Premium Member
Less
More
- Posts: 101
- Thank you received: 1
20 Apr 2014 03:46 #46122
by Duc
Replied by Duc on topic 7i84 Software mode 3
That was the issue. Now I just need to solve the mux problem but I will continue that in the Hal section for the control panel.
Thank you for the help.
Thank you for the help.
Please Log in or Create an account to join the conversation.
- xenon-alien
- Offline
- Premium Member
Less
More
- Posts: 131
- Thank you received: 3
02 Aug 2024 06:04 #306695
by xenon-alien
Replied by xenon-alien on topic 7i84 Software mode 3
Hello.
I have issues with the MPG with the 7i96s+7i84 combination. (no blink no reaction, in an other setup it works correctly)
The MPG is a with 5V connected to the 7i96s an the AB - 16, 17 pin on the 7i84.
Should be connected the 5v GND and the 24v GND together? (not remember, did I connect them together in the other setup, where it works correctly)
I have issues with the MPG with the 7i96s+7i84 combination. (no blink no reaction, in an other setup it works correctly)
The MPG is a with 5V connected to the 7i96s an the AB - 16, 17 pin on the 7i84.
Should be connected the 5v GND and the 24v GND together? (not remember, did I connect them together in the other setup, where it works correctly)
Attachments:
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17904
- Thank you received: 4774
02 Aug 2024 13:09 - 02 Aug 2024 13:14 #306730
by PCW
Replied by PCW on topic 7i84 Software mode 3
Yes, you would need a common ground between the MPG ground
and the field power ground for the MPG to work with the 7I84.
If you did not want to make that connection, you could
use the 7I96S MPG inputs. (inputs 0..7 support up to 4 MPGs)
and the field power ground for the MPG to work with the 7I84.
If you did not want to make that connection, you could
use the 7I96S MPG inputs. (inputs 0..7 support up to 4 MPGs)
Last edit: 02 Aug 2024 13:14 by PCW.
Please Log in or Create an account to join the conversation.
Moderators: PCW, jmelson
Time to create page: 0.068 seconds