I mean the pulses the coming on Hardware CROscilloscope but not with same period (6.7 ms)
From: adit bhargava <adit_bh...@yahoo.com> To: andy pugh <bodge...@gmail.com>; Enhanced Machine Controller (EMC) <emc-users@lists.sourceforge.net> Sent: Monday, April 18, 2016 8:34 PM Subject: Re: [Emc-users] Need to add a faster thread base-thread with 100 microseconds, Compilation changes required !!! Hello Andy, Thanks you for suggestions. I am able to add a new faster thread ( 100 microseconds ) now.But, now the problem is I am not getting the output as desired on hardware although I am getting correct output on HALSCOPE. RECAP: I wanted a square pulse of T-On = 2 ms and T-Off = 4.7 ms I used pwmgen as suggested by you with Freq = 150 Hz and Duty cycle = 29.9%I am getting the pulses correctly with 6.7 ms period on HALSCOPE but not on hardware FPGA which is connected to CROscilloscope. Following are details of my hardware: MESA 5I25 I/O FPGA Card with two breakout cards MESA 7I76 STEP/IO Step&dir plus I/O daughtercard and MESA 7I78 Step&dir daughtercard Oscilloscope connect to 7176 daughtercard Plus: TB6 PIN24 => OUT7 Gnd: TB3 PIN15 => GND PWM Signal Routed to OUT 7 BRAdit From: andy pugh <bodge...@gmail.com> To: adit bhargava <adit_bh...@yahoo.com>; Enhanced Machine Controller (EMC) <emc-users@lists.sourceforge.net> Sent: Monday, April 18, 2016 5:07 PM Subject: Re: [Emc-users] Need to add a faster thread base-thread with 100 microseconds, Compilation changes required !!! On 18 April 2016 at 15:36, adit bhargava <adit_bh...@yahoo.com> wrote: > 1. TFP_Steurung.ini - In this file, I have under [EMCMOT] section, > SERVO_PERIOD = 1000000(1 ms) > Should I put my BASE_PERIOD = 100000 (100 microsec) ? The actual thread is created by the "loadrt motmod ...." line in the HAL file. Values may be substituted into that line from the INI, but adding values to the INI that are not referenced in the HAL will not have any effect. Your HAL file might well have "loadrt [EMCMOT]EMCMOT ..." though there is no defined standard here, just custom and habit. Basically the INI file can contain almost anything, it is up to the HAL file (and HAL components) how that data is used. So, there are a couple of things you can do, either edit the "loadrt [EMCMOT]EMCMOT... line to create two threads according to the format in the manual page, or just write it all out explicitly. I prefer the second option in my own configs. loadrt motmod base_period_ns=100000 servo_period_ns=1000000 (and the rest to match the existing config). To add a thread _slower_ than existing threads you can use the "threads" HAL call: http://linuxcnc.org/docs/2.7/html/man/man9/threads.9.html And that lets you choose the name of the threads too. However I doubt that would work well with motmod, which likes to create threads with defined names, and as threads need to be created fastest to slowest I suspect this way would be more trouble > I tried to change base period, but seems my file dosen't compile. I don't > have any idea how to compile this file. Can you please suggest something how > to compile ? You _really_ don't need to recompile motion to achieve what you want to achieve. You just need to pass the corrct parameters to the motion component. -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1916 ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users