That seems correct except normally the Slave Gain would be 1 not -1 if you want the two axes to move the same direction.
and this is the filter screen CH0 and CH1. and the response step.
for encoder counts from top to bottom = 0 to 47000 counts.
yesterday I measured with a ruler, for 1 mm = 170 count.
but I still can't find the perfect parameters for V, A and J.
but Dynomotion was amazing, yesterday the hydraulic moved very smoothly. and I set V not very fast, because I'm afraid it will overturn / skew.
Next, I want both hydraulics to move at the same speed, and have the same position.
what should I fix for parameters V, A and J, PID and all?
and why is the setting for slave different from master?
slave descends faster than master.
and which one is better to test the move, MOVE or STEP?
That seems correct except normally the Slave Gain would be 1 not -1 if you want the two axes to move the same direction.
Regards
TK http://dynomotion.com
Ok there are no filters. Note you can capture a window instead of desktop with Alt-PrintScreen.and this is the filter screen CH0 and CH1
What is the distance?for encoder counts from top to bottom = 0 to 47000 counts.
Seems strange. I would expect 200.yesterday I measured with a ruler, for 1 mm = 170 count.
First choose a velocity you would like to test in mm/sec. Then multiply by your counts/mmwhat should I fix for parameters V, A and J?
Set A to 5X the V so it changes to that Velocity in 0.2 seconds
Set J to 100X the A as limiting Jerk is not an issue for your machine.
I don't know. Why did you make the P Gains different?and why is the setting for slave different from master?
slave descends faster than master.
Moveand which one is better to test the move, MOVE or STEP?
It seems it is moving at a controlled 100 counts/sec. But It seems the amplifier/valves have significant offsets. With A DAC (Green Plot at 0) the axis moves. Some small I gain will correct for this. Maybe start with 1e-6.
Regards
TK http://dynomotion.com
43 cm or 430 mm
maybe i am wrong in measurement, because linear encoder is very sensitive. you're right about 200.
because when the ram drops, the hydraulic CH0 (slave) drops faster than the CH1 (master) hydraulic. after this, I will try again, according to your suggestions?
.[/QUOTE]
Slave Gain only matters for a Slave.Which channel should I change to Slave Gain -1?
They are both already set to -1
Regards
TK http://dynomotion.com
47000 counts / 43mm = 109.3 counts/mm. Seems wrong. I would expect 100.0 or 200.0. Are you measuring distance moved carefully?What is the distance?
43 cm or 430 mm
It should be exactSeems strange. I would expect 200.
maybe i am wrong in measurement, because linear encoder is very sensitive. you're right about 200.
P Gain should affect stability and accuracy not speed.because when the ram drops, the hydraulic CH0 (slave) drops faster than the CH1 (master) hydraulic. after this, I will try again, according to your suggestions?
Regards
TK http://dynomotion.com
I don't understand how to determine the slave gain for CH1 (master) and CH0. in your opinion, how much should it be in?
Please correct if it's wrong, if I click MOVE, the axis moves towards the target then returns to the starting position?
and SIZE is the value of the counter encoder (linear encoder)?
for SIZE, is it count / inch or count / mm?
this is a picture of my laptop, because now i am at home. tomorrow start retrying according to what you suggested yesterday.
Slave Gain isn't used for a Master.I don't understand how to determine the slave gain for CH1 (master)
A Slave that moves in the same direction and same amount as the Master should have a Slave Gain of 1.
The Axis should move all the way to the target and return to the starting position. If your configuration and tuning doesn't allow the axis to move the speed of the move then it will not move all the way before reversing.Please correct if it's wrong, if I click MOVE, the axis moves towards the target then returns to the starting position?
Neither. Units are encoder counts.for SIZE, is it count / inch or count / mm?
Regards
TK http://dynomotion.com
these are today's test results. for the results when the ram is down, it is very perfect, and the movement is smooth, the right axis (CH1) and the left axis (CH0) are very synchronous, the size is very accurate, the difference is only 0.5 mm. I tried with SIZE 32000, 1mm = 200 count, so 32000: 200 = 160 mm = 16 cm.
and ram can hold position. and I gave the voltage for the amplifier pressure = DAC 3.4 volts.
in your opinion, can this be more perfect, for output (green) and position (red)?
or just like this.
while for the ram to go up. the output looks unstable, and the position is wavy but the size is accurate as at the time of descent, the difference is only 0.5 mm.
what to fix when the position is up? even though I've given the DAC 5 volts to go up.
The following is my research, on my normal or original press machine:
There are 5 relays to activate the valve
Relay 1 = valve for fast descent Axis Y1 (not valve proportional)
Relay 2 = valve for fast descent Axis Y2 (not valve proportional)
Relay 3 = valve for slow down (not a proportional valve)
Relay 4 = valve for pressure (type valve proportional)
Relay 5 = valve for crowning (maybe temporarily not used according to your suggestion)
While the proportional valves for direction (Y1 and Y2), which are controlled by CNC, do not use Relays.
when in auto mode only one pedal is used, when I step on the right pedal (there are 2 pedals, left = cancel / up. and right = down) Relays 1 and 2 turn on and amplifier input Y1 and Y2 = -5 volts, amplifier input Pressure = +1.9 volts so that the ram drops quickly.
then Relays 1 and 2 turn off, change Relays 3 and 4 turn on at the same time, and the amplifier input Y1 and Y2 = -5 volts, the amplifier input Pressure = 3.4 volts so that the ram drops slowly. interval how many mm approaching the target Relay 5 is also on.
After reaching the target and bending and dwelling for 2 seconds, Relays 3 and 5 turn off, only Relay 4 turns on and the Y1 and Y2 amplifier inputs change to +5 volts, the amplifier input Pressure = 5 volts so that the ram rises quickly to the starting position.
my question is how to make a c program according to the description above?
and can c program make, if I let go of the right pedal, the ram stops, and if I step on it again the ram continues towards the target.
Last edited by Westjava; 08-31-2020 at 09:25 AM.
Hard to say if it can be made to be stable moving up or not. I would expect it could be. If a system is unstable it is usually because corrections are too large and too quickly. I would decrease P and I gains a lot to see if it can be made stable. Adding D gain may help. D Gain will reduce the output quickly when the axis begins to move. D Gain is usually a value 10-100X the P Gain.while for the ram to go up. the output looks unstable, and the position is wavy but the size is accurate as at the time of descent, the difference is only 0.5 mm.
what to fix when the position is up? even though I've given the DAC 5 volts to go up.
Because it seems to take ~ 800 DAC counts to move or stop I would increase the max limit integrator to 1000.
I can't really follow that. You will need to describe things more clearly. Describe what the pedals do. Describe what the relay controlled valves actually do. I don't understand how Relay 4 can be proportional if it is a Relay.The following is my research, on my normal or original press machine:
There are 5 relays to activate the valve
Relay 1 = valve for fast descent Axis Y1 (not valve proportional)
Relay 2 = valve for fast descent Axis Y2 (not valve proportional)
Relay 3 = valve for slow down (not a proportional valve)
Relay 4 = valve for pressure (type valve proportional)
Relay 5 = valve for crowning (maybe temporarily not used according to your suggestion)
While the proportional valves for direction (Y1 and Y2), which are controlled by CNC, do not use Relays.
when in auto mode only one pedal is used, when I step on the right pedal (there are 2 pedals, left = cancel / up. and right = down) Relays 1 and 2 turn on and amplifier input Y1 and Y2 = -5 volts, amplifier input Pressure = +1.9 volts so that the ram drops quickly.
then Relays 1 and 2 turn off, change Relays 3 and 4 turn on at the same time, and the amplifier input Y1 and Y2 = -5 volts, the amplifier input Pressure = 3.4 volts so that the ram drops slowly. interval how many mm approaching the target Relay 5 is also on.
After reaching the target and bending and dwelling for 2 seconds, Relays 3 and 5 turn off, only Relay 4 turns on and the Y1 and Y2 amplifier inputs change to +5 volts, the amplifier input Pressure = 5 volts so that the ram rises quickly to the starting position.
my question is how to make a c program according to the description above?
I'd suggest that you make a detailed flowchart of what needs to happen.
Normally Feed Hold can be used to stop motion and then released to continue motion,and can c program make, if I let go of the right pedal, the ram stops, and if I step on it again the ram continues towards the target.
Regards
TK http://dynomotion.com
this is the diagram i got from the machine.
pedal number 1 to start running the ram down, at the initial count Relays 1 and 2 become active so that the ram drops quickly, until the count approaches the material of about 10 cm Relays 1 and 2 are inactive, simultaneously Relays 3 and 4 are active so that the ram drops slowly until hit target and bend and dwel 2 seconds. when it goes up only relay 4 is active up to the starting position.
for this, I will reread the manual book and will return to explain it. because I am afraid of being wrong in explaining it.
below is the manual book for hydraulic and valve workflows:
and this manual book is in pdf format.
I have entered the CH0 and CH1 axes in the C program,
questions 1. How to add command div C program? as :
when I click run:
bit 152, 153 turns on and DAC 1024 (5 volts).
then when the target is reached:
bits 152, 153 are off and DAC 0 (0 volts).
question 2. is it true that I made this code? please correct and make suggestions.
if (Readbit (156) == HIGH)
DAC (1,512);
Setbit(148)=LOW;
Sorry I don't understand that and it seems to be a duplicate post from our forum.
ReadBit has a capital 'B' and returns 1 or 0 not HIGHif (Readbit (156) == HIGH)
'if' needs { } when it applies to multiple instructions. See here.if (Readbit (156) == HIGH)
SetBit has a captital 'B'. Use ClearBit to set a bit low.Setbit(148)=LOW;
Regards
TK http://dynomotion.com
thank you sir, this is very helpful