Glasmaßstab EIA-422 an Mesa 7i85 (S)

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
13 Aug 2025 12:42 #333330 by tommylight
Replied by tommylight on topic Glasmaßstab EIA-422 an Mesa 7i85 (S)

 By the way, I've always wanted to ask you, what's with the goat in the picture? 

The internet uses G.O.A.T for "Greatest of All Times", and this is where it absolutely makes sense as PCW is the Greatest of All Times for support of it's products.
Asking for new firmware and having it in use in a single day, that is ultimate support.

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

More
13 Aug 2025 18:25 #333357 by PCW
Replied by PCW on topic Glasmaßstab EIA-422 an Mesa 7i85 (S)
Not a goat but rather one of our Blackbelly sheep.

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

More
09 Sep 2025 15:21 #334712 by WKS-3D
Replied by WKS-3D on topic Glasmaßstab EIA-422 an Mesa 7i85 (S)
@PCW

Sorry for only getting back to you now, but I've only just had a chance to try it out.
When I insert this:

setp    hm2_7192.0.encoder.00.index-enable true

and comment out this:

net x-index-enable  joint.0.index-enable  <=>  hm2_7i92.0.encoder.00.index-enable

I get an error message when starting LinuxCNC.

The complete section for the X-axis looks like this:
# Verwendete LinuxCNC version:  Master (2.9)

# Mesa 7i76 LAUFT IN MODE 1 MIT 4 ANALOGEN EINGANGEN (sserial_port_0=1000000x) !!!!!!

loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT unlock_joints_mask=0x8 servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS num_dio=6 num_aio=3
loadrt hostmot2
loadrt hm2_eth board_ip="10.10.10.10" config="num_encoders=5 num_pwmgens=0 num_stepgens=5 sserial_port_0=1000000x" 
loadrt flipflop count=2
setp   hm2_7i92.0.watchdog.timeout_ns 5000000
loadrt pid names=pid.x,pid.z
loadrt debounce cfg=8,1
setp debounce.0.delay 1
addf debounce.0                 servo-thread
setp debounce.1.delay 1
addf debounce.1                 servo-thread
addf flipflop.0                 servo-thread
addf flipflop.1                    servo-thread
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 hm2_7i92.0.write             servo-thread
setp hm2_7i92.0.dpll.01.timer-us -50
setp hm2_7i92.0.stepgen.timer-number 1

# --- Pinole Input Signale ---
net taster-pinole-minus  <=  hm2_7i92.0.7i76.0.0.input-25
net taster-pinole-plus   <=  hm2_7i92.0.7i76.0.0.input-24

# Set flipflops
net taster-pinole-minus => flipflop.0.set 
net taster-pinole-plus => flipflop.1.set
net buf_taster-pinole-minus <= flipflop.0.out => hm2_7i92.0.7i76.0.0.output-01
net buf_taster-pinole-plus <= flipflop.1.out => flipflop.0.reset => flipflop.1.reset

# --- Werkzeug-Revolver loesen-spannen ---
net   revolver-unlock  joint.3.unlock  =>  hm2_7i92.0.7i76.0.0.output-00
net   revolver-is-unlocked  joint.3.is-unlocked  <=  hm2_7i92.0.7i76.0.0.input-09
net   joint.3.is-locked  motion.digital-in-00  <=  hm2_7i92.0.7i76.0.0.input-15

#*******************
#  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

# Schritt-Gen Signale/Setup

setp   hm2_7i92.0.stepgen.01.dirsetup        [JOINT_0]DIRSETUP
setp   hm2_7i92.0.stepgen.01.dirhold         [JOINT_0]DIRHOLD
setp   hm2_7i92.0.stepgen.01.steplen         [JOINT_0]STEPLEN
setp   hm2_7i92.0.stepgen.01.stepspace       [JOINT_0]STEPSPACE
setp   hm2_7i92.0.stepgen.01.position-scale  [JOINT_0]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_0]STEPGEN_MAXACCEL
setp   hm2_7i92.0.stepgen.01.maxvel           [JOINT_0]STEPGEN_MAXVEL

# ---Closed-Loop Schrittmotor-Signale---

net x-pos-cmd    <= joint.0.motor-pos-cmd
net x-vel-cmd    <= joint.0.vel-cmd
net x-output     => hm2_7i92.0.stepgen.01.velocity-cmd
net x-enable     <= joint.0.amp-enable-out
net x-enable     => hm2_7i92.0.stepgen.01.enable

# ---Einrichtung Referenzfahrt X-ACHSE / Signal des Endschalters---

#(--- Hier nur normaler positiv Endschalter und Home-Switch ---)
net x-home-sw  hm2_7i92.0.7i76.0.0.input-06-not   =>  joint.0.home-sw-in
net x-pos-limit     =>  joint.0.pos-lim-sw-in

# --- Mit Glasmassstab ---
#net x-pos debounce.0.0.in  <=  hm2_7i92.0.7i76.0.0.input-06-not
#net x-pos-limit debounce.0.0.out
#net x-pos-limit  =>  joint.0.pos-lim-sw-in  joint.0.home-sw-in

# ---Encoder Feedback Signals/Setup

setp    hm2_7i92.0.encoder.00.counter-mode 0
setp    hm2_7i92.0.encoder.00.filter 0
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 1
setp    hm2_7i92.0.encoder.00.scale  [JOINT_0]ENCODER_SCALE
setp    hm2_7192.0.encoder.00.index-enable true

# ---Indexsignal GMS fuer Referenzpunkt X (NICHT MIT NORMALEM ENDSCHALTER)

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

What's wrong?
 

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

More
13 Sep 2025 12:03 #334917 by WKS-3D
Replied by WKS-3D on topic Glasmaßstab EIA-422 an Mesa 7i85 (S)
Sind noch alle im Urlaub?
So ruhig geworden hier 

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

More
13 Sep 2025 12:13 - 13 Sep 2025 12:13 #334918 by Hakan
Replied by Hakan on topic Glasmaßstab EIA-422 an Mesa 7i85 (S)
We would like to see the error you get.
Nevertheless, I happen to know why. It's because index-enable is an IO pin, it's both input and output, a bit special.
So you can not set it to true, only connect it to a pin that is IO both input and output. Such as joint..index-enable
Relevant links www.linuxcnc.org/docs/html/drivers/hostmot2.html#_pins_5
linuxcnc.org/docs/html/man/man9/motion.9.html#JOINT%20PINS
Last edit: 13 Sep 2025 12:13 by Hakan.

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

More
13 Sep 2025 13:58 - 13 Sep 2025 14:08 #334924 by PCW
Replied by PCW on topic Glasmaßstab EIA-422 an Mesa 7i85 (S)
Actually you can:

setp  hm2_7192.0.encoder.00.index-enable true

As long as hm2_7192.0.encoder.00.index-enable is not connected to
a signal in the hal fiie. It will be set true once at LinuxCNC startup.

The error you have is that you did not comment out the net command connecting
hm2_7192.0.encoder.00.index-enable to the signal x-index-enable:

# ---Indexsignal GMS fuer Referenzpunkt X (NICHT MIT NORMALEM ENDSCHALTER)

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

But for testing it's better to do this in halshow

Note that while you cannot change hm2_7192.0.encoder.00.index-enable
in halshow (or the hal file) if it's connected to a signal, you can
change the signal ( x-index-enable) in halshow for testing.
 
Last edit: 13 Sep 2025 14:08 by PCW.

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

More
14 Sep 2025 07:25 #334965 by WKS-3D
Replied by WKS-3D on topic Glasmaßstab EIA-422 an Mesa 7i85 (S)
That's what I did:
net x-index-enable joint.0.index-enable <=> hm2_7i92.0.encoder.00.index-enable

but it doesn't work

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

More
14 Sep 2025 07:48 #334968 by WKS-3D
Replied by WKS-3D on topic Glasmaßstab EIA-422 an Mesa 7i85 (S)
I changed it as follows:

# ---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 # war 0
setp    hm2_7i92.0.encoder.00.index-mask 0
setp    hm2_7i92.0.encoder.00.index-mask-invert 1  # war 1
setp    hm2_7i92.0.encoder.00.scale  [JOINT_0]ENCODER_SCALE
setp    hm2_7192.0.encoder.00.index-enable true

# ---Indexsignal GMS fuer Referenzpunkt X (NICHT MIT NORMALEM ENDSCHALTER)

net x-pos-fb  <=  hm2_7i92.0.encoder.00.position
net x-vel-fb  <=  hm2_7i92.0.encoder.00.velocity
net x-pos-fb  =>  joint.0.motor-pos-fb
#net x-index-enable  joint.0.index-enable  <=>  hm2_7i92.0.encoder.00.index-enable
net x-pos-rawcounts  <=  hm2_7i92.0.encoder.00.rawcounts
 but I get this error message: 
Attachments:

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

More
15 Sep 2025 03:16 #335004 by PCW
Replied by PCW on topic Glasmaßstab EIA-422 an Mesa 7i85 (S)
Not sure what that issue is, the "cannot gain I/O privileges" is not related to index at all

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

More
15 Sep 2025 10:56 - 15 Sep 2025 11:02 #335014 by WKS-3D
Replied by WKS-3D on topic Glasmaßstab EIA-422 an Mesa 7i85 (S)
I tried a few more things and just couldn't get anywhere. So I decided to take another look at the wiring and the 7i85. I noticed that the jumpers for the signal are not set to RS-422 (in the down position) but to the up position for TTL signal.
Unfortunately, the nine-pin TTL signal pin assignment is the same as the RS-422 assignment, except that A-, B-, and R- are omitted. The signals are then ignored anyway. So there's probably no point in changing the jumpers.
Or should I try?

 
 
Attachments:
Last edit: 15 Sep 2025 11:02 by WKS-3D.

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

Time to create page: 0.158 seconds
Powered by Kunena Forum