Advanced Search

Search Results (Searched for: adaptive feed)

26 Apr 2017 11:50 - 26 Apr 2017 11:53
andypugh replied the topic:Can we use python scripts to assign value to hal pins directly.

Can we use python scripts to assign value to hal pins directly.

Category: HAL

You might be able to do this with a mux4 HAL component.

If no pins then override = current value
If pin 1 then override = current value * 0.1
if pin 2 then override = -1
if pin1 AND pin2 then override = +1

The last part is critical, as otherwise there is a risk of continually multiplying -1 by 0.1 and reversing at increasing speed. So you need to make sure that pin1 goes true before pin2 goes false.

this is mux4

To make mux4 act as described above:
loadrt mux4
loadrt scale
addf mux4.0 servo-thread
addf scale.0 servo-thread

setp scale.0.gain 1.1

net feed-scale mux4.0.out => motion.adaptive-feed  mux4.0.in0  scale.0.in
net feed-inc scale.0.out => mux4.0.in1
setp mux4.0.in2 -1
setp mux4.0.in3 +1

net increment-pin parport.0.pin-NN-in => mux4.0.sel0
net reverse-pin parport.0.pin-NN-in => mix4.0.sel1

Please don't just paste this code and expect it to work, it is just intended as an instructional example.

A scale of 1.1 is almost certainly far too much, as this runs 1000 times per second. So the feed rate will double in 8mS.
25 Apr 2017 18:59
kpj10 replied the topic:Can we use python scripts to assign value to hal pins directly.

Can we use python scripts to assign value to hal pins directly.

Category: HAL

Dear Andy,

The links you mentioned me in the previous comment, I have gone through those links previously. Also, I would like to point it out that I'm retrofitting Wire cut-EDM with reciprocating wire, but not a die-sinker EDM.

Let me address your concern about me committing to current-only feedback system:
In my system, only current monitoring can help to maintain the spark. If wire and job are shorted excessive current flows, and if a proper gap is maintained between the two there is the spark, and cutting progresses. We know the maximum current value to keep the spark, and if in the system current is more than that preset value the spark is gone, and there is no cutting afterwards.

In the link, Pete_Gruendeman says: "adaptive feed slows down till the velocity does not overshoot the removal rate", I'm also trying to achieve the same but in reverse. Meaning: Instead of starting at a higher feed rate, we start the machine at slower feed rates and raise the feed rate for optimum MRR.

Now, I'm stuck with how to do that, hope from your and Chris's guidance I'll probably achieve what I want.

Regards,
Kunal.
25 Apr 2017 17:41
kpj10 replied the topic:Can we use python scripts to assign value to hal pins directly.

Can we use python scripts to assign value to hal pins directly.

Category: HAL

Dear Andy,

I'm planning to eliminate computation to estimate the feed rate, and hence eliminate the Arduino. This is because; current sensing, then computing based on PID, and then sending to HAL is quite a complex system, which requires a certain level of sophistication to work as expected. Instead, I plan to use a simple hardware setup as follows:
1. If the current in the system is below the preset level raise the speed. I will use an input pin of the parallel port to detect this state.
2. If the current level is above the preset value reverse the feed. I will use another input pin of the parallel port to detect this state.
3. If either mentioned above state is false then that will be the best feed rate to run the machine.

As in the previous comment, Chris did suggest a method for implementing what I want, but unfortunately, I'm not progressing ahead with that much amount of information.

I would be thankful if you or Chris can put more light on the matter: how to connect and update value of motion.adaptive-feed HAL based on the input from the parallel port. To make it simpler,
if Linuxcnc detects the parallel port input pin high(used to increase feed rate, if the current is below the preset value) it should scale up the feed rate by the factor of 0.01 for motion.adaptive-feed. Also, the value of motion.adaptive-pin should not go above 1.
Or
if Linuxcnc detects the parallel port input pin high(used to reverse feed rate, if the current is higher than the preset value) it should set down the feed rate to -1, hence starts moving reverse.

Apart from the above-mentioned requirement also there should be a slider embedded in Axis, for operator control the feed rate when things get out of control.

Regards,
Kunal .
25 Apr 2017 07:18
cmorley replied the topic:Can we use python scripts to assign value to hal pins directly.

Can we use python scripts to assign value to hal pins directly.

Category: HAL

Yes I would scale your slider so it is between -1 and +1 and multiply it with your feedback number (also between -1 and 1)
This works because IIRC adaptivefeed expects a value between -1 and 1.
You could use classicladder or the mult2 component.
I would use gladevcp for the slider.

Chris M
24 Apr 2017 18:26
kpj10 replied the topic:Can we use python scripts to assign value to hal pins directly.

Can we use python scripts to assign value to hal pins directly.

Category: HAL

Dear Chris,

I'm thinking to monitor two input pins of the parallel port using the ClassicLadder. One to increase the speed the other one to decrease the speed. Is there a way I can connect the ClassicLadder to hal pin motion.adaptive-feed and provide value to it, and still keep a slider, connected on hal pin motion.adaptive-feed, in my axis window to control feed rates from the GUI.

Thank you.
20 Apr 2017 19:10 - 20 Apr 2017 19:13
kpj10 replied the topic:Can we use python scripts to assign value to hal pins directly.

Can we use python scripts to assign value to hal pins directly.

Category: HAL

Ok. I'm trying to do as suggested on the URL Chris suggested. Will report ASAP.

Can you please put more light on this:
"Of course the other way is to create a python HAL component and connect it to motion.adaptive-feed.
Either way should work."


Thank you.
20 Apr 2017 19:07
cmorley replied the topic:Can we use python scripts to assign value to hal pins directly.

Can we use python scripts to assign value to hal pins directly.

Category: HAL

Of course the other way is to create a python HAL component and connect it to motion.adaptive-feed.
Either way should work.

Chris M
20 Apr 2017 18:13
kpj10 created the topic:Can we use python scripts to assign value to hal pins directly.

Can we use python scripts to assign value to hal pins directly.

Category: HAL

Linuxcnc offers feed rates control using HAL pin motion.adaptive-feed. Is there a possible way to directly, using a python script, to assign values to "motion.adaptive-feed".

The python interface suggests
c = linuxcnc.command()
c.feedrate("ENTER REQUIRED FEED RATE")

The problem is: As I'm trying to run reciprocating wire EDM using LinuxCNC I need to reverse my feed. I'm using linuxcnc-mirror-feature-reverse branch to move reverse, but I cannot assign negative feed rates. Adding a slider with the value from -1 to 1, and attaching it to motion.adaptive-feed pin lets me do that in Axis, while the slider is embedded in Axis as pyVCP.

I want python to assign values to motion.adaptive-feed say the values as: 1, 0.65 for forwarding movement or -1, -0.65 for reversing movement.

Also, I'm not able to run reverse using c.auto(linuxcnc.AUTO_REVERSE), in my python script.

The author of feature reverse branch; Robert Ellenberg (genius) suggested a halpin for setting reverse feed, using a single bit, but I think it is still not added for the good reasons Robert know's.

I will be running my python script using the command: rip-environment.

I would be thankful if anyone can help me.
Displaying 1 - 8 out of 8 results.
Time to create page: 0.194 seconds
Powered by Kunena Forum