Re: [Machinekit] Re: DE10 Nano suggested development environment?

2019-07-25 Thread Michael Brown
I can perhaps look it up later today but clock low is 50mhz clk medium is
100 MHz and clock high should be 200 mhz as far as I can recall.

On Fri, 26 Jul 2019, 04.57 justin White  wrote:

> I whipped up the board with the rs422 tranceiver and I'm getting
> *somewhere* I guess. I get a message transmitted at 115200 or best I can
> tell from the scope but I'm not sure, Serial Terminal gets printable
> results at 230400 8n1
> *115200 8n1 * A9 AD A9 A9 AD E9
> ..
> *230400 8n1*  36 36 32 36 36 32 36 36   32
>  662662662
>
> From the Mesa manuals it says 115200 is setup mode or something. Scope
> picture doesn't look like it's saying much and no talking to the 8i20 yet.
> From /var/linuxcnc.log:
> SS pins are 000 and 001
> Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: ØMQ=4.2.1 czmq=4.0.2
> protobuf=3.0.0 atomics=gcc intrinsicslibwebsockets=2.0.3
> Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: configured: sha=58fe987
> Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: built:  Mar 23 2019
> 18:41:31 sha=58fe987
> Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: register_stuff: actual hostname
> as announced by avahi='mksocfpga-nano-soc.local'
> Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: zeroconf: registering: 'Log
> service on mksocfpga-nano-soc.local pid 2469'
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2485:user iocontrol:
> machine: 'ST_FPGA_SOC_DC1_test2'  version 'unknown'
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2: loading
> Mesa HostMot2 driver version 0.15
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2_soc_ol:
> loading Mesa AnyIO HostMot2 socfpga overlay driver version 0.9
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:
> Smart Serial Firmware Version 0
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: zeroconf: registered 'Log
> service on mksocfpga-nano-soc.local pid 2469' _machinekit._tcp 0 TXT
> "uuid=abc21811-1fb4-4ba9-98f3-6ca4138d9f21"
> "instance=5451ecc8-aea1-11e9-a89e-ba072231546c" "service=log"
> "dsn=ipc:///tmp/0.log.abc21811-1fb4-4ba9-98f3-6ca4138d9f21"
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:
> 72 I/O Pins used:
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 000 (GPIO0.P0-01): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 001 (GPIO0.P0-02): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 002 (GPIO0.P0-03): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 003 (GPIO0.P0-04): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 004 (GPIO0.P0-05): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 005 (GPIO0.P0-06): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 006 (GPIO0.P0-07): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 007 (GPIO0.P0-08): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 008 (GPIO0.P0-09): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 009 (GPIO0.P0-10): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 010 (GPIO0.P0-11): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 011 (GPIO0.P0-12): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 012 (GPIO0.P0-13): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 013 (GPIO0.P0-14): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 014 (GPIO0.P0-15): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 015 (GPIO0.P0-16): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 016 (GPIO0.P0-17): Encoder #1, pin Index (Input)
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 017 (GPIO0.P0-18): Encoder #0, pin Index (Input)
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 018 (GPIO0.P0-19): Encoder #0, pin A (Input)
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 019 (GPIO0.P0-20): Encoder #2, pin Index (Input)
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 020 (GPIO0.P0-21): Encoder #2, pin A (Input)
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 021 (GPIO0.P0-22): Encoder #1, pin A (Input)
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt
> hm2/hm2_5i25.0: IO Pin 022 (GPIO0.P0-23): Encoder #1, pin B (Input)
> 

Re: [Machinekit] Re: DE10 Nano suggested development environment?

2019-07-25 Thread justin White
BTW, when I try to build with SS "ClockMedTag" in the pinfile I get:
 
Error (10482): VHDL error at PIN_st_fpga_soc_dc1f.vhd(80): object 
"ClockMedTag" is used but not declared File: 
/work/HW/hm2/config/DExx_Nano_xxx_Cramps/PIN_st_fpga_soc_dc1f.vhd Line: 80
Warning (10236): Verilog HDL Implicit Net warning at top_io_modules.sv(39): 
created implicit net for "hps_reset_req" File: 
/work/HW/QuartusProjects/Common/top_io_modules.sv Line: 39
Warning (10236): Verilog HDL Implicit Net warning at 
altera_edge_detector.v(21): created implicit net for "reset_qual_n" File: 
/work/HW/cv-ip/edge_detect/altera_edge_detector.v Line: 21
Warning (10236): Verilog HDL Implicit Net warning at hps_sdram_pll.sv(168): 
created implicit net for "pll_dr_clk" File: 
/work/HW/QuartusProjects/DE10_Nano_FB_Cramps/soc_system/synthesis/submodules/hps_sdram_pll.sv
 
Line: 168
Warning (10236): Verilog HDL Implicit Net warning at 
alt_vipvfr131_prc.v(142): created implicit net for "master_clock" File: 
/work/HW/QuartusProjects/DE10_Nano_FB_Cramps/soc_system/synthesis/submodules/alt_vipvfr131_prc.v
 
Line: 142
Warning (10236): Verilog HDL Implicit Net warning at 
alt_vipvfr131_prc.v(143): created implicit net for "master_reset" File: 
/work/HW/QuartusProjects/DE10_Nano_FB_Cramps/soc_system/synthesis/submodules/alt_vipvfr131_prc.v
 
Line: 143
Info (144001): Generated suppressed messages file 
/work/HW/QuartusProjects/DE10_Nano_FB_Cramps/output_files/DE10_Nano_FB_Cramps.map.smsg
Error: Quartus Prime Analysis & Synthesis was unsuccessful. 1 error, 8 
warnings
Error: Peak virtual memory: 1288 megabytes
Error: Processing ended: Thu Jul 25 00:43:19 2019
Error: Elapsed time: 00:03:22
Error: Total CPU time (on all processors): 00:03:37



On Thursday, July 25, 2019 at 10:57:01 PM UTC-4, justin White wrote:
>
> I whipped up the board with the rs422 tranceiver and I'm getting 
> *somewhere* I guess. I get a message transmitted at 115200 or best I can 
> tell from the scope but I'm not sure, Serial Terminal gets printable 
> results at 230400 8n1
> *115200 8n1 * A9 AD A9 A9 AD E9  
> ..
> *230400 8n1*  36 36 32 36 36 32 36 36   32  
>  662662662
>
> From the Mesa manuals it says 115200 is setup mode or something. Scope 
> picture doesn't look like it's saying much and no talking to the 8i20 yet. 
> From /var/linuxcnc.log:
> SS pins are 000 and 001
> Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: ØMQ=4.2.1 czmq=4.0.2 
> protobuf=3.0.0 atomics=gcc intrinsicslibwebsockets=2.0.3
> Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: configured: sha=58fe987
> Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: built:  Mar 23 2019 
> 18:41:31 sha=58fe987
> Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: register_stuff: actual hostname 
> as announced by avahi='mksocfpga-nano-soc.local'
> Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: zeroconf: registering: 'Log 
> service on mksocfpga-nano-soc.local pid 2469'
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2485:user iocontrol: 
> machine: 'ST_FPGA_SOC_DC1_test2'  version 'unknown'
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2: loading 
> Mesa HostMot2 driver version 0.15
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2_soc_ol: 
> loading Mesa AnyIO HostMot2 socfpga overlay driver version 0.9
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0: 
> Smart Serial Firmware Version 0
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: zeroconf: registered 'Log 
> service on mksocfpga-nano-soc.local pid 2469' _machinekit._tcp 0 TXT 
> "uuid=abc21811-1fb4-4ba9-98f3-6ca4138d9f21" 
> "instance=5451ecc8-aea1-11e9-a89e-ba072231546c" "service=log" 
> "dsn=ipc:///tmp/0.log.abc21811-1fb4-4ba9-98f3-6ca4138d9f21"
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0: 
> 72 I/O Pins used:
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt 
> hm2/hm2_5i25.0: IO Pin 000 (GPIO0.P0-01): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt 
> hm2/hm2_5i25.0: IO Pin 001 (GPIO0.P0-02): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt 
> hm2/hm2_5i25.0: IO Pin 002 (GPIO0.P0-03): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt 
> hm2/hm2_5i25.0: IO Pin 003 (GPIO0.P0-04): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt 
> hm2/hm2_5i25.0: IO Pin 004 (GPIO0.P0-05): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt 
> hm2/hm2_5i25.0: IO Pin 005 (GPIO0.P0-06): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt 
> hm2/hm2_5i25.0: IO Pin 006 (GPIO0.P0-07): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt 
> hm2/hm2_5i25.0: IO Pin 007 (GPIO0.P0-08): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt 
> hm2/hm2_5i25.0: IO Pin 008 (GPIO0.P0-09): IOPort
> Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt 

Re: [Machinekit] Re: DE10 Nano suggested development environment?

2019-07-25 Thread justin White
I whipped up the board with the rs422 tranceiver and I'm getting *somewhere* I 
guess. I get a message transmitted at 115200 or best I can tell from the 
scope but I'm not sure, Serial Terminal gets printable results at 230400 8n1
*115200 8n1 * A9 AD A9 A9 AD E9  
..
*230400 8n1*  36 36 32 36 36 32 36 36   32  
 662662662

>From the Mesa manuals it says 115200 is setup mode or something. Scope 
picture doesn't look like it's saying much and no talking to the 8i20 yet. 
>From /var/linuxcnc.log:
SS pins are 000 and 001
Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: ØMQ=4.2.1 czmq=4.0.2 
protobuf=3.0.0 atomics=gcc intrinsicslibwebsockets=2.0.3
Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: configured: sha=58fe987
Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: built:  Mar 23 2019 18:41:31 
sha=58fe987
Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: register_stuff: actual hostname 
as announced by avahi='mksocfpga-nano-soc.local'
Jul 25 05:59:13 mksocfpga-nano-soc msgd:0: zeroconf: registering: 'Log 
service on mksocfpga-nano-soc.local pid 2469'
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2485:user iocontrol: 
machine: 'ST_FPGA_SOC_DC1_test2'  version 'unknown'
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2: loading 
Mesa HostMot2 driver version 0.15
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2_soc_ol: 
loading Mesa AnyIO HostMot2 socfpga overlay driver version 0.9
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0: 
Smart Serial Firmware Version 0
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: zeroconf: registered 'Log 
service on mksocfpga-nano-soc.local pid 2469' _machinekit._tcp 0 TXT 
"uuid=abc21811-1fb4-4ba9-98f3-6ca4138d9f21" 
"instance=5451ecc8-aea1-11e9-a89e-ba072231546c" "service=log" 
"dsn=ipc:///tmp/0.log.abc21811-1fb4-4ba9-98f3-6ca4138d9f21"
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0: 
72 I/O Pins used:
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 000 (GPIO0.P0-01): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 001 (GPIO0.P0-02): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 002 (GPIO0.P0-03): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 003 (GPIO0.P0-04): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 004 (GPIO0.P0-05): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 005 (GPIO0.P0-06): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 006 (GPIO0.P0-07): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 007 (GPIO0.P0-08): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 008 (GPIO0.P0-09): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 009 (GPIO0.P0-10): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 010 (GPIO0.P0-11): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 011 (GPIO0.P0-12): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 012 (GPIO0.P0-13): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 013 (GPIO0.P0-14): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 014 (GPIO0.P0-15): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 015 (GPIO0.P0-16): IOPort
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 016 (GPIO0.P0-17): Encoder #1, pin Index (Input)
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 017 (GPIO0.P0-18): Encoder #0, pin Index (Input)
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 018 (GPIO0.P0-19): Encoder #0, pin A (Input)
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 019 (GPIO0.P0-20): Encoder #2, pin Index (Input)
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 020 (GPIO0.P0-21): Encoder #2, pin A (Input)
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 021 (GPIO0.P0-22): Encoder #1, pin A (Input)
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 022 (GPIO0.P0-23): Encoder #1, pin B (Input)
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 023 (GPIO0.P0-24): Encoder #0, pin B (Input)
Jul 25 05:59:14 mksocfpga-nano-soc msgd:0: hal_lib:2475:rt hm2/hm2_5i25.0:  
   IO Pin 024 (GPIO0.P1-25): Encoder #3, pin Inde

[Machinekit] Re: MachineKit Closed loop on X and Y

2019-07-25 Thread justin White
I missed the part where you said you are using linear encoders, that's a 
bit different. Backlash comp is probably not a great idea in that case as 
I'm pretty sure it's just a dumb "whip the lash out" on direction change 
kind of thing. Your backlash is already accounted for by the fact that your 
measuring the table directly and not the motor prior to the point the 
backlash exists or not measuring it at all.

The fact that the axis has to stop and reverse a noticeable amount implies 
that it is overshooting too far and just requires better PID tuning, the 
error should be decreasing over time as the PID "learns" the correction 
values. I'm not a PID tuning wizard, I generally have to read up on it 
every time I do it since I don't do it often. I  run the Brushless DC 
spindle motor on my mill with a torque mode drive (Mesa 8i20) which is 
generally not the thing to do since spindle control is inherently a 
velocity mode deal with the drive handling half the loop. The moment a free 
spinning cutter enters a workpiece there is a drastic change in the torque 
required to maintain that spindle speed, then it levels off mid cut. It's 
difficult to tune a PID for velocity control over a torque mode drive but 
it works very well now, and as you can imagine it has to be very fast. I do 
rigid tapping as well with this setup. Your use case is typical, the only 
thing you should really need is what you originally had with a position 
input and velocity output PID it just needs proper tuning.

As a side note I just stumbled across the AT_PID 
 component. 
Didn't even know it existed but an auto tuning PID would be pretty neat if 
it actually works well. I may try it on my spindle

On Thursday, July 25, 2019 at 11:41:50 AM UTC-4, Edgardo Gho wrote:
>
>
> I tried setting up backlash compensation (setting the backlash = x on 
> the axis) and increasing accelerations but that did not help much.
> I spent more time trying to figure out how motion works, and noticed that 
> motion keeps moving independently from what the PID is doing. Basically 
> motion is reading the encoder position for an axis, generates a "next 
> position" at a certain feed rate and outputs the error from the current 
> position vs desired position.. and if this error is higher than a preset 
> value it reports joint x error.
> So if the preset error is too low, it fails pretty quickly.
>
> What I ended up doing is putting a comp module with the f-error output vs 
> a preset value (0.1mm) .. so if the error is greater than that, it would 
> set the feed-hold input for motion. This way motion will stop until the 
> error goes back to less than 0.1mm. I combined X and Y using an or2 and the 
> backlash gets compensated by the PID.
> Basically I'm stopping the motion module so it won't keep trying to change 
> the position until the PID reaches (or is close to reach) the desired 
> position.
>
> I upload a picture generated by recording the encoder output for X and Y. 
> Each pixels is 0.01mm. You can see artifacts when the spiral changes 
> direction on one of the 2 axis but this is greatly reduced compared to 
> running it without stopping motion.
>
> I still have to adjust error values and tune the PID.
> The speed that I get is obviously not great considering most of the time 
> motion is stopped waiting for the PIDs to reach the desired position.
>
>
>

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/machinekit/d04c7a95-7a31-4ff2-af87-f0dcfca237ab%40googlegroups.com.


[Machinekit] Re: MachineKit Closed loop on X and Y

2019-07-25 Thread Edgardo Gho

I tried setting up backlash compensation (setting the backlash = x on 
the axis) and increasing accelerations but that did not help much.
I spent more time trying to figure out how motion works, and noticed that 
motion keeps moving independently from what the PID is doing. Basically 
motion is reading the encoder position for an axis, generates a "next 
position" at a certain feed rate and outputs the error from the current 
position vs desired position.. and if this error is higher than a preset 
value it reports joint x error.
So if the preset error is too low, it fails pretty quickly.

What I ended up doing is putting a comp module with the f-error output vs a 
preset value (0.1mm) .. so if the error is greater than that, it would set 
the feed-hold input for motion. This way motion will stop until the error 
goes back to less than 0.1mm. I combined X and Y using an or2 and the 
backlash gets compensated by the PID.
Basically I'm stopping the motion module so it won't keep trying to change 
the position until the PID reaches (or is close to reach) the desired 
position.

I upload a picture generated by recording the encoder output for X and Y. 
Each pixels is 0.01mm. You can see artifacts when the spiral changes 
direction on one of the 2 axis but this is greatly reduced compared to 
running it without stopping motion.

I still have to adjust error values and tune the PID.
The speed that I get is obviously not great considering most of the time 
motion is stopped waiting for the PIDs to reach the desired position.


-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to machinekit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/machinekit/5dfb68b1-4470-41de-97e5-29ae9c3592b8%40googlegroups.com.