Closed loop - encoder/position not updating while moving

More
7 months 1 week ago #344680 by backyardengineer
Thank you for the suggestions. Those are Sino glass scales (KA500 and KA300 TTL 5V). I boosted the signal with npn transistors to 24v (reversing pin logic, shouldn´t matter though) as the smaller scale only gave a 3.3V signal which did not work. The weird thing for me is the working perfectly compared to not working at all, i woud expect a bad/unreliable signal from noise. I will try again on the weekend, putting input on COM1 and Steppers on COM2. Or i finally buy a mesa card ffs :). Any suggestions for a standard 2/3 Axis lathe with very little IO ?

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

More
7 months 1 week ago #344681 by backyardengineer
i was aware that i would get max. 1500-3000mm/min out of the COM Port. This would bee acceptable, as i will mainly use LinuxCNC as an ELS option with the occasional automated part (switching axis off when hand cranking of course)

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

More
7 months 6 days ago #344746 by tommylight
Some clarifications before this goes sideways:
-COM0/COM1/COM2 are referred to serial ports, be it RS232 o other, usually.
-LPT0/LPT1/LPT2 and sometimes only P0/P1/P2 are referred to parallel ports, usually.
What are you referring to with COMn ?
Serial ports are pretty much useless with LinuxCNC, except for some stuff.
Parallel ports, also known as IEEE 1284, are used for machine control still, are perfectly usable with LinuxCNC, but have limited pulse rate capabilities compared to Mesa board.
Reasonable pulse rate or encoder pulse rate for parallel port would be 10000-20000 PPS, sometimes can go to 50000 PPS with a bit of luck/tweaking the BIOS.
At 3000 RPM, that is 50 RPS, so for a 100PPR encoder ends up 5000 PPS, and for a 1000PPR encoder it is already way to fast for most PC setups, see above.
Now convert that to mm/m, as you gave us no info about drive/gear/reduction.
After all that, yes, you can use a parallel port, yes it will work with encoders (2 max normally per port), and yes, you can lower the speed if you have higher count encoders.
But first, fix the wiring and get rid of interference/bad grounding.

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

More
6 months 4 weeks ago #345078 by backyardengineer
Hi, my bad i did not mean COM but parallel port (must be a habit from my Arduino days). I did try to put the encoders on the second par port (parport 1) and for some reason it works now (parport 0 = stepper outputs, parport1 = encoder inputs). No idea why, i don´t think it is grounding related though.
As for the encoders: They are linear scales (5µm), my math was 5000 to 10000PPS * 0.005mm * 60 = 1500 to 3000 mm/min. The spindle has a 400PPR Encoder and max spindle speed is 3000rpm.
I still have to get the inputs on parport0 working to read the spindle encoder. Tomorrow i can send pics of the wiring.
The following user(s) said Thank You: tommylight

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

More
6 months 4 weeks ago #345180 by backyardengineer
Hi, just wanted to give an update. The problem was annoyingly trivial: The chinese board was faulty.... They are of astonishingly poor quality. I ordered two to new ones, one came already dead, they soldered the diode (on the 24v input) in the wrong way. Anyway thank you for troubleshooting with me. All the best, Marc
The following user(s) said Thank You: tommylight

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

More
6 months 3 weeks ago #345182 by tommylight
Thank you for reporting back.

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

Time to create page: 0.237 seconds
Powered by Kunena Forum