Encoder for axis tacho feed back
- johnmc1
- Offline
- Senior Member
- Posts: 78
- Thank you received: 21
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
Attachments:
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
- Posts: 17974
- Thank you received: 4831
When linuxcnc is running, what does
halcmd show all hm2_5i24.0.7i83
report?
Please Log in or Create an account to join the conversation.
- johnmc1
- Offline
- Senior Member
- Posts: 78
- Thank you received: 21
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.
- PCW
- Away
- Moderator
- Posts: 17974
- Thank you received: 4831
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-)
Please Log in or Create an account to join the conversation.
- johnmc1
- Offline
- Senior Member
- Posts: 78
- Thank you received: 21
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.
- johnmc1
- Offline
- Senior Member
- Posts: 78
- Thank you received: 21
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.
- PCW
- Away
- Moderator
- Posts: 17974
- Thank you received: 4831
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.
- johnmc1
- Offline
- Senior Member
- Posts: 78
- Thank you received: 21
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.
- johnmc1
- Offline
- Senior Member
- Posts: 78
- Thank you received: 21
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.
- aleksamc
- Offline
- Platinum Member
- Posts: 567
- Thank you received: 65
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
Please Log in or Create an account to join the conversation.