Encoder for axis tacho feed back

More
07 Feb 2021 11:50 #197909 by johnmc1
Good Day All

After many days with no success I seek guidance.
I am trying to use the y axis encoder for the information input ,
then passing the scaled voltage to the 7i83 analogout1
As yet, I have not been able to produce a voltage at the
hm2_5i24.0.7i83.0.4.analogout1 output.

# encoder pulses 2500*4 =10000 pulses per rev
#lead screw pitch, 10 mm
#encoder 1000 pulses / mm
#y-axis scale = 1000 pulses /mm
#scale = tacho feedback required is , 6volts per 1000 encoder RPM
# 1000 rpm = 16.7 revs per sec, * 10mm = 167mm
# 167 * 10/6 = 278
# Is this the analog scale or the maxscale
# I am lost

#####


#setp hm2_5i24.0.7i83.0.4.analogout1-maxlim 278
#setp hm2_5i24.0.7i83.0.4.analogout1-minlim -278
#setp hm2_5i24.0.7i83.0.4.analogout1-maxscale 278
#dmesg can not find pin maxscale
net ytacho hm2_5i24.0.encoder.05.velocity
# encoder 05 (mpg) used instead of y-axis motor encoder 01, for testing.

Hal and Ini files attached

File Attachment:

File Name: 10_matsuura.hal
File Size:24 KB

File Attachment:

File Name: 10_matsuura.ini
File Size:4 KB
Attachments:

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

More
07 Feb 2021 14:27 - 07 Feb 2021 14:27 #197915 by PCW
One thing missing is the analog enable.

When linuxcnc is running, what does

halcmd show all hm2_5i24.0.7i83

report?
Last edit: 07 Feb 2021 14:27 by PCW.

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

More
08 Feb 2021 12:02 #197993 by johnmc1
Good Day, PCW

Thanks for your reply, much appreciated.
The 7i83 show all is enclosed.

The show all for hm2_5i24.0.7i83 (24v enable)
24v applied to the ENA1 + input
0v applied to to the ENA1 – input
First show all (24v enable)

Second show all, no voltage applied to enable pins

I had incorrectly entered maxscale instead of scalemax

Is the following a correct understanding of miaxlim,minlin,scalemax?

The maxlim 100
The minlim 100
The scalemax 100 same units as (maxlim and minlim) is a ratio maxlim(-) to scalemax ,
For example a input of 50 (maxlim) 50/100 = 0.5*10 which equals output of 5vpositive.

Is there any source of information available on this matter to help me understand enough to implement the scalemax system ,for the tacho feedback.

Cheers john

halcmd: show all hm2_5i24.0.7i83
Loaded HAL Components:
ID Type Name PID State

Component Pins:
Owner Type Dir Value Name
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena0
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena1
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena2
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena3
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena4
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena5
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout0
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout1
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout2
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout3
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout4
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout5
26 float OUT 23.96404 hm2_5i24.0.7i83.0.4.fieldvoltage

Pin Aliases:
Alias Original Name

Signals:
Type Value Name (linked to)

Parameters:
Owner Type Dir Value Name
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena0-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena1-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena2-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena3-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena4-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena5-invert
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout0-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout0-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout0-scalemax
26 float RW 278 hm2_5i24.0.7i83.0.4.analogout1-maxlim
26 float RW -278 hm2_5i24.0.7i83.0.4.analogout1-minlim
26 float RW 278 hm2_5i24.0.7i83.0.4.analogout1-scalemax
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout2-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout2-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout2-scalemax
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout3-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout3-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout3-scalemax
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout4-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout4-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout4-scalemax
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout5-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout5-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout5-scalemax
26 float RW 36.3 hm2_5i24.0.7i83.0.4.fieldvoltage-scalemax
26 u32 RW 0x00000001 hm2_5i24.0.7i83.0.4.hwrevision
26 u32 RW 0x00000009 hm2_5i24.0.7i83.0.4.nvbaudrate
26 u32 RO 0x17000052 hm2_5i24.0.7i83.0.4.nvunitnumber
26 u32 RW 0x00000032 hm2_5i24.0.7i83.0.4.nvwatchdogtimeout
26 u32 RW 0x0000000E hm2_5i24.0.7i83.0.4.swrevision

Parameter Aliases:
Alias Original Name

Exported Functions:
Owner CodeAddr Arg FP Users Name

Realtime Threads:
Period FP Name ( Time, Max-Time )

Second show all

halcmd: show all hm2_5i24.0.7i83
Loaded HAL Components:
ID Type Name PID State

Component Pins:
Owner Type Dir Value Name
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena0
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena1
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena2
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena3
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena4
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena5
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout0
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout1
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout2
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout3
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout4
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout5
26 float OUT 23.96404 hm2_5i24.0.7i83.0.4.fieldvoltage

Pin Aliases:
Alias Original Name

Signals:
Type Value Name (linked to)

Parameters:
Owner Type Dir Value Name
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena0-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena1-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena2-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena3-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena4-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena5-invert
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout0-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout0-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout0-scalemax
26 float RW 278 hm2_5i24.0.7i83.0.4.analogout1-maxlim
26 float RW -278 hm2_5i24.0.7i83.0.4.analogout1-minlim
26 float RW 278 hm2_5i24.0.7i83.0.4.analogout1-scalemax
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout2-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout2-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout2-scalemax
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout3-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout3-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout3-scalemax
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout4-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout4-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout4-scalemax
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout5-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout5-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout5-scalemax
26 float RW 36.3 hm2_5i24.0.7i83.0.4.fieldvoltage-scalemax
26 u32 RW 0x00000001 hm2_5i24.0.7i83.0.4.hwrevision
26 u32 RW 0x00000009 hm2_5i24.0.7i83.0.4.nvbaudrate
26 u32 RO 0x17000052 hm2_5i24.0.7i83.0.4.nvunitnumber
26 u32 RW 0x00000032 hm2_5i24.0.7i83.0.4.nvwatchdogtimeout
26 u32 RW 0x0000000E hm2_5i24.0.7i83.0.4.swrevision

Parameter Aliases:
Alias Original Name

Exported Functions:
Owner CodeAddr Arg FP Users Name

Realtime Threads:
Period FP Name ( Time, Max-Time )

halcmd:

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

More
08 Feb 2021 15:43 - 08 Feb 2021 15:47 #198010 by PCW

The show all for hm2_5i24.0.7i83 (24v enable)
24v applied to the ENA1 + input
0v applied to to the ENA1 – input
First show all (24v enable)


If you did this you have destroyed the enable OUTPUT
(if you set the corresponding analogena hal pin true)

The analog channels are enabled by setting the corresponding analogena
pin true in hal. This enables the corresponding analog output and turns on
the corresponding enable output. (closes the connection between ENA+ and ENA-)
Last edit: 08 Feb 2021 15:47 by PCW.
The following user(s) said Thank You: johnmc1

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

More
09 Feb 2021 08:01 #198127 by johnmc1
Thanks for the reply
PCW replied, If you did this you have destroyed the enable OUTPUT
(if you set the corresponding analogena hal pin true)

I did not enable the analogena hal pin and will check it out
tomorrow.
cheers john

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

More
10 Feb 2021 13:27 #198273 by johnmc1
It appears that I have damaged The mesa 7i83 , because when a ENAn is enabled by hal,
resistance between ENAn+ and ENAn- show 14k ohm resistance,
and when not enabled mega ohms (open circuit)

7i83 print out part of hal file

#####

#lead screw pitch, 10 mm
#encoder 100000 pulses / rev
#y-axis scale = 1000 pulses /mm
#scale = tacho feedback ratio of, 6volts/1000rpm,
# rev/sec = 16.7
# analog scale(scalemax?) * 10/6 = 278
#mcc-y signal for the fanuc drive enable
# y-tacho-fb is derived from y axis velocity in revs/second
#####

#As I have no idea how the scalemax works, and have not found any information,
#related to using it for tacho feed back.

#Is a loadrt, or addf required required in the hal file for scalemax?
#Any help is most welcome.
It is midnight 19deg C tomorrow 37deg C

cheers john





setp hm2_5i24.0.7i83.0.4.analogout4-maxlim 278
setp hm2_5i24.0.7i83.0.4.analogout4-minlim -278
setp hm2_5i24.0.7i83.0.4.analogout4-scalemax 278

# should there not also be some means to input to analog4 ?
# such as y-tacho-fb I have missed something.

net mcc-y hm2_5i24.0.7i83.0.4.analogena4

net y-tacho-out hm2_5i24.0.7i83.0.4.analogout4
#should this be velocity input y-tacho-fb
# and the result by magic appears on the analog4 out pins :(
########





halcmd: show all hm2_5i24.0.7i83
Loaded HAL Components:
ID Type Name PID State

Component Pins:
Owner Type Dir Value Name
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena0
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena1
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena2
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena3
26 bit IN TRUE hm2_5i24.0.7i83.0.4.analogena4 <== mcc-y #mcc-y is true
26 bit IN FALSE hm2_5i24.0.7i83.0.4.analogena5
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout0
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout1
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout2
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout3
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout4 <== y-tacho-out
26 float IN 0 hm2_5i24.0.7i83.0.4.analogout5
26 float OUT 23.96404 hm2_5i24.0.7i83.0.4.fieldvoltage

Pin Aliases:
Alias Original Name

Signals:
Type Value Name (linked to)

Parameters:
Owner Type Dir Value Name
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena0-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena1-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena2-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena3-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena4-invert
26 bit RW FALSE hm2_5i24.0.7i83.0.4.analogena5-invert
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout0-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout0-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout0-scalemax
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout1-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout1-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout1-scalemax
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout2-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout2-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout2-scalemax
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout3-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout3-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout3-scalemax
26 float RW 278 hm2_5i24.0.7i83.0.4.analogout4-maxlim
26 float RW -278 hm2_5i24.0.7i83.0.4.analogout4-minlim
26 float RW 278 hm2_5i24.0.7i83.0.4.analogout4-scalemax
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout5-maxlim
26 float RW -10 hm2_5i24.0.7i83.0.4.analogout5-minlim
26 float RW 10 hm2_5i24.0.7i83.0.4.analogout5-scalemax
26 float RW 36.3 hm2_5i24.0.7i83.0.4.fieldvoltage-scalemax
26 u32 RW 0x00000001 hm2_5i24.0.7i83.0.4.hwrevision
26 u32 RW 0x00000009 hm2_5i24.0.7i83.0.4.nvbaudrate
26 u32 RO 0x17000052 hm2_5i24.0.7i83.0.4.nvunitnumber
26 u32 RW 0x00000032 hm2_5i24.0.7i83.0.4.nvwatchdogtimeout
26 u32 RW 0x0000000E hm2_5i24.0.7i83.0.4.swrevision

Parameter Aliases:
Alias Original Name

Exported Functions:
Owner CodeAddr Arg FP Users Name

Realtime Threads:
Period FP Name ( Time, Max-Time )

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

More
10 Feb 2021 14:23 #198277 by PCW

It appears that I have damaged The mesa 7i83 , because when a ENAn is enabled by hal,
resistance between ENAn+ and ENAn- show 14k ohm resistance,
and when not enabled mega ohms (open circuit)


That is probably OK since the enable OPTOs are Darlingtinon type
and have a fixed 0.7V or so drop regardless of current so tend to read
high on Ohmmeters (you could check another enable output to verify)

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

More
11 Feb 2021 10:20 #198377 by johnmc1
Thanks PCW ,

I just could not see the tree for, the forrest.
Tacho feedback working, It seems so simple now.

setp hm2_5i24.0.7i83.0.4.analogout4-maxlim 278
setp hm2_5i24.0.7i83.0.4.analogout4-minlim -278
setp hm2_5i24.0.7i83.0.4.analogout4-scalemax 278

net mcc-y hm2_5i24.0.7i83.0.4.analogena4
net y-tacho-out hm2_5i24.0.7i83.0.4.analogout4

cheers john

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

More
14 Feb 2021 01:49 #198773 by johnmc1
The encoder tacho feed back, is used with a fanuc servo amp and series 20 servo motors ,which worked flawlessly before the refit.
The x and y axis move correctly and smoothly in a negative direction.
The x and y axis shudder violently when trying to move in a positive direction.
I have not been able to tune this out at all.
Any suggestions most welcome.
cheers john

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

More
14 Feb 2021 12:13 - 14 Feb 2021 12:25 #198795 by aleksamc
Signal from tacho - ALWAYS POSITIVE!

As I remember from my tries of tuning of servodrive with tacho:
0) Disconect motor from mechanic
1) Control voltage from linuxcnc should be disconnected (I don't mean tacho feedback)
2) Enable servodrive and look how it behaves. It should stand still or have slow movement. If it runs away then change taho-pins vice-versa
3) Check also direction of encoder feedback to linuxcnc
4) Adjust ofset of servodrive that it stans still or better as you can
5) Adjust on servodrive Gain and Tachofeedback
6) Adjust in linuxcnc gains, FF1 and other parameters
7) If everything works fine connect to mechanical side
Last edit: 14 Feb 2021 12:25 by aleksamc.
The following user(s) said Thank You: johnmc1

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

Time to create page: 0.130 seconds
Powered by Kunena Forum