How do I control the speed and acceleration of the analog output of the 7i77 ?

More
1 year 9 months ago #319026 by programador
I can't find a suitable configuration so that the analog output can control the correct movement of the punching machine's piston. How do I solve this?Summary of what I'm trying to control:The piston that hits the punches is hydraulic, but it has an actuator that controls its descent and ascent by applying analog voltage of -10 volts and +10 volts, where +10 volts goes up and -10 volts goes down. However, unlike a motor, when there is no voltage at all, the piston descends gradually. To keep it high, a voltage above 2 volts positive will always be necessary.Hardware information: the sensor that detects the movement of the piston hitting the punches is magnetic and provides an analog output voltage, being 0 volts when it descends completely and 8 volts when it rises completely. This position voltage is connected to the THCAD2 electronic board that converts it into frequency. This frequency is used in channel 0 of the 7i77 electronic board's encoder, which is configured as
Code:
setp hm2_7i96s.0.encoder.00.counter-mode 1
This reading is being shown on the display after the following modification
Code:
#net z-pos-fb <= hm2_7i96s.0.encoder.00.position # Disabled Linenet z-pos-fb <= hm2_7i96s.0.encoder.00.velocity #New Linenet z-pos-fb => joint.1.motor-pos-fb#net z-vel-fb <= hm2_7i96s.0.encoder.00.velocity # Disabled Linenet z-pos-fb => joint.1.motor-pos-fbnet z-index-enable joint.1.index-enable <=> hm2_7i96s.0.encoder.00.index-enablenet z-pos-rawcounts <= hm2_7i96s.0.encoder.00.rawcounts
I'm worried that the problem is because
Code:
net z-vel-fb
was disconnected since it is being used to report the position, will the 7i77 electronic board work without net z-vel-fb?

Below is information that may helpWhen I manually jog the Z axis to 1mm or 5mm, it makes no difference in the actual movement of the piston, it always moves the same and the Z axis calculation error appearsWhen I manually jog the Z axis to 1mm

 

Attachment not found

When I manually jog the Z axis to 5mm 

Attachment not found

Piston hitting the punches in the zero position

 

Attachment not found

Piston hitting the punches in the position after a 1mm jog

 

Attachment not found


 Piston hitting the punches in the position after a 5mm jog 

Attachment not found

I have been working on this machine retrofit for over 2 years, unfortunately here in Brazil I have not found qualified labor to perform this service. If I cannot resolve this step I will have to give up on LinuxCNC. I am willing to pay if someone resolves this situation. Even so, I thank all the contributions from the Forum and Mr. Peter.

Please Log in to join the conversation.

More
1 year 9 months ago #319027 by programador
This reading is being shown on the display after the following modification

Code:
#net z-pos-fb <= hm2_7i96s.0.encoder.00.position # Disabled Line net z-pos-fb <= hm2_7i96s.0.encoder.00.velocity #New Line net z-pos-fb => joint.1.motor-pos-fb #net z-vel-fb <= hm2_7i96s.0.encoder.00.velocity # Disabled Line net z-pos-fb => joint.1.motor-pos-fb net z-index-enable joint.1.index-enable <=> hm2_7i96s.0.encoder.00.index-enable net z-pos-rawcounts <= hm2_7i96s.0.encoder.00.rawcounts

 

Please Log in to join the conversation.

More
1 year 9 months ago #319028 by programador

Attachment not found

Attachment not found

Please Log in to join the conversation.

More
1 year 9 months ago #319032 by PCW
One thing I see is that the Z encoder scale is off by orders of magnitude.
If you are using the ~100 to 900 KHz range of the THCAD2, I would expect
and encoder scale to be roughly 800,000 / Z_motion_range.

What is the Z motion range for 0 to 10V out from your sensor?

It addition the scale may need to be negative. This is the first thing to get setup correctly

Also as I mentioned, you may need to feed the encoder velocity signal through LinuxCNCs
offset component to remove the offset at 0V
 

Please Log in to join the conversation.

More
1 year 9 months ago #319042 by programador
What is the Z motion range for 0 to 10V out from your sensor?

Response:
ranger 10364.831 hm2_7i96s.00.enconder.00.velocity
ranger 621866.8 hm2_7i96s.00.velocity-rpm
I am testing with jump 64 on the THCAD2 board.

Simulations with other jumpers:


advanced hydraulic cylinder THCAD2 jump128

1416.431 hm2_7i96s.00.enconder.00.velocity
84985.84 hm2_7i96s.00.velocity-rpm

 

Attachment not found



recessed hydraulic cylinder THCAD2 jump128

6616.257 hm2_7i96s.00.enconder.00.velocity
396875.4 hm2_7i96s.00.velocity-rpm

 

Attachment not found



advanced hydraulic cylinder THCAD2 jump64

2868.069 hm2_7i96s.00.enconder.00.velocity
172084.1 hm2_7i96s.00.velocity-rpm

 

Attachment not found



recessed hydraulic cylinder THCAD2 jump64

13232.51 hm2_7i96s.00.enconder.00.velocity
793950.9 hm2_7i96s.00.velocity-rpm

 

Attachment not found



advanced hydraulic cylinder THCAD2 jump32

5671.078 hm2_7i96s.00.enconder.00.velocity
340264.7 hm2_7i96s.00.velocity-rpm

 

Attachment not found



recessed hydraulic cylinder THCAD2 jump32

26449.64 hm2_7i96s.00.enconder.00.velocity
1586979 hm2_7i96s.00.velocity-rpm

 

Attachment not found



I put the value 800 in the scale encoder, but it continues to display a calculation error message on the axis, but the axis moves a little, below is the video showing the result



Regarding another question, sorry for my lack of knowledge, do you have any example of how to: feed the encoder velocity signal through LinuxCNCs
offset component to remove the offset at 0V ?






















 

Please Log in to join the conversation.

More
1 year 9 months ago #319047 by PCW
You still did not answer what the Z motion range was

Anyway say its 50 mm and using the /32 tap that's
a encoder scale of ~415

When tuning you need to loosen the following error limits
and have some reasonable output scale value:TYPE = LINEAR
HOME = 0.0
FERROR = 50
MIN_FERROR = 50
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
P = 50.0
I = 0.0
D = 0.0
FF0 = 0.0
FF1 = 1.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 0.0
ENCODER_SCALE = 415 # estimate with THCAD /32 and 50 mm full motion
OUTPUT_SCALE = 10
OUTPUT_MIN_LIMIT = -10.0
OUTPUT_MAX_LIMIT = 10.0
#MIN_LIMIT = -100.0
#MAX_LIMIT = 0.01
MIN_LIMIT = -15000.0 # these should be some reasonable numbers one you get the encoder scale correct
MAX_LIMIT = 15000.0
HOME_OFFSET = 0.0
loadrt offset
addf offset.0.update-feedback servo-thread
addf offset.0.update-output servo-thread

setp offset.0.offset -5671.078   # for /32net z-pos-fb_with_offset <= hm2_7i96s.0.encoder.00.velocity #New Line
net z-pos-fb_with_offset => offset.0.in
net z-pos-fb <= offset.0.out
net z-pos-fb => joint.1.motor-pos-fb
net z-index-enable joint.1.index-enable <=> hm2_7i96s.0.encoder.00.index-enable
net z-pos-rawcounts <= hm2_7i96s.0.encoder.00.rawcounts



 

Please Log in to join the conversation.

More
1 year 9 months ago #319048 by programador
You still did not answer what the Z motion range was?
Answer: Sorry, I didn't understand the question, due to the automatic language translator. But you got it right, 50mm, in the photo below.

 

Attachment not found



regarding the model code it worked! the Z axis movement works without error. Thank you





 

Please Log in to join the conversation.

Time to create page: 0.122 seconds
Powered by Kunena Forum