First steps linuxcnc 7i76E

More
19 Jan 2018 14:38 #104718 by kor
Replied by kor on topic First steps linuxcnc 7i76E
Now the motor is running again :) I cant say that I understand this. I tested the max jitter to be 35 000. So I set it to 100 000 to be on the safe site.
Still I don't really have a clue about how to determine the step and dir timings.

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

More
19 Jan 2018 17:12 #104721 by kor
Replied by kor on topic First steps linuxcnc 7i76E
I connected my stepper to an arduino and wrote a small program which gives one pulse every 50µs:
int pulPin = 10;
int dirPin = 11;
int enblPin = 12;
int ledPin = 13;

int loops = 0;

void setup() {
  // put your setup code here, to run once:
  pinMode(pulPin, OUTPUT);
  pinMode(dirPin, OUTPUT);
  pinMode(enblPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  
  digitalWrite(pulPin, LOW);
  digitalWrite(ledPin, LOW);
  digitalWrite(enblPin, LOW);
  digitalWrite(dirPin, LOW);
  
  Serial.begin(9600);
  Serial.println("init");
  
  digitalWrite(enblPin, HIGH);
  delay(100);
  digitalWrite(enblPin, LOW);
}

void loop() {
  // put your main code here, to run repeatedly:
  int steps=2000;
  digitalWrite(dirPin, LOW);
  Serial.println("steps: 2000");
  for (int i=1; i <= steps; i++)
  {
  digitalWrite(pulPin, HIGH);
  digitalWrite(ledPin, HIGH);
  digitalWrite(pulPin, LOW);
  digitalWrite(ledPin, LOW);
  delayMicroseconds(50);
  }
  delay(500);
  digitalWrite(dirPin, HIGH);
  Serial.println("steps: 2000");
  for (int i=1; i <= steps; i++)
  {
  digitalWrite(pulPin, HIGH);
  digitalWrite(ledPin, HIGH);
  digitalWrite(pulPin, LOW);
  digitalWrite(ledPin, LOW);
  delayMicroseconds(50);
  }
  delay(500);
  
  delay(1000);
}
this runs perfectly fine with my stepper and driver (10 microsteps)
this should be a frequency of 20khz
and roughly10 revs/s or 600 revolutions per minute. (assuming the pulse width is 0)
this would give me (5mm/U leadscrew 3000mm/min)
this is way more than I need but I am happy having the speed.
So why can't I get this to work in PNCconf. it took me 5 minutes to code this for arduino but this stepper tuning timing is driving me insane.
I calculated the stepper scale with the wizard. 10 microsteps 5mm leadscrew 200 full steps
min dist is 0.0025mm
steps per mm is 400
but I suspect the stepperscale calculated by the wizard is wrong: 4 000 000
could that be the case?

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

More
19 Jan 2018 17:16 #104722 by Todd Zuercher
That is usually determined by the requirements of your step drives. Set them to something more than their minimum required step spacings. Or you could calculate your maximum step rate and set it to about half the smallest step interval time.
The following user(s) said Thank You: kor

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

More
19 Jan 2018 17:37 #104723 by PCW
Replied by PCW on topic First steps linuxcnc 7i76E
If you have 400 steps per mm ( and a mm machine ) , the Stepper scale should be 400, Its as simple as that
( the stepper scale is steps per machine unit )
As Todd says the step timing should be set at something greater than the drives minimum settings.

If you don't know your drives specifications, as a starting point,

5000 steplength
5000 stepspace
20000 dirsetup
20000 dirhold

Works with almost all drives and gets you to 100 KHz = 15000 mm/m with your present scaling
( you motors/drives will limit you to much lower )
The following user(s) said Thank You: kor

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

More
19 Jan 2018 21:40 #104730 by kor
Replied by kor on topic First steps linuxcnc 7i76E
Oh the simple joy of seeing tha motor turning like it is supposed to.
I can't express in words how happy I am.
The stupid wizard just set the stepper scale wrong. no wonder that it could not work if linuxcnc thinks it needs to make 4 million steps instead of 400.
I think I am going to do the rest of the config manual. after that bad experience with pncconf.
Are there any good tutorials for hal and ini files?

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

More
19 Jan 2018 22:07 #104731 by PCW
Replied by PCW on topic First steps linuxcnc 7i76E
The "Calculate Scale" help seems to work OK for me, what numbers did you enter?

Attachments:

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

More
19 Jan 2018 22:39 #104732 by kor
Replied by kor on topic First steps linuxcnc 7i76E
exactly the same. but when I clicked apply it changed the stepscale to 4 million.
My first idea is it has something todo with localization. If i remember correctly that number had a comma.

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

More
19 Jan 2018 22:51 #104733 by rodw
Replied by rodw on topic First steps linuxcnc 7i76E
I really think long term you are better off learning how to edit the files yourself from this point on. Eventually it is easy!

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

More
19 Jan 2018 23:12 #104736 by kor
Replied by kor on topic First steps linuxcnc 7i76E
Yes I think so too. Are there any good tutorials to get yourself started.

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

More
19 Jan 2018 23:41 - 19 Jan 2018 23:42 #104737 by rodw
Replied by rodw on topic First steps linuxcnc 7i76E

Yes I think so too. Are there any good tutorials to get yourself started.


The immediate response is not really but in reality, there is plenty linuxcnc.org/docs/devel/html/

Just do one bit at a time and keep it all modular. One thing I have found that makes it easier is to adopt this style rather than trying to cram it all on one line
# --- TORCH BREAKAWAY E-STOP ---
net torch-breakaway <= hm2_7i76e.0.7i76.0.0.input-06
net torch-breakaway => estop-latch.2.fault-in
This creates a signal that can be reused
So now if I want to say turn on a light when this signal triggers, I just need to do something like
# --- TORCH BREAKAWAY WARNING LIGHT ---
net torch-breakaway => hm2_7i76e.0.7i76.0.0.output-03

If you want to talk to the linuxcnc internals, the answer is usually in the motion or halui components.
Last edit: 19 Jan 2018 23:42 by rodw.
The following user(s) said Thank You: DanMN

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

Moderators: PCWjmelson
Time to create page: 0.147 seconds
Powered by Kunena Forum