[Emc-users] XHC HB04 pendant stops updating its display

2014-01-14 Thread Marius Alksnys

I am writing this again with a new hope :)

Problem with the pendant is that sometimes, when it is left untouched 
for at least several seconds, it stops updating its display. For 
example, when the program is running or machine is jogged by a keyboard. 
And when you touch something on the pendant, the display updates.


Maybe somebody feels why this can happen?


By the way, my corrected driver is attached. Maybe someone could check 
and probably include it in future versions of LinuxCNC?


I made corrections to the driver for the numbers to appear exactly the
same like in the usual UI - I added round functions.
/*
   XHC-HB04 Wireless MPG pendant LinuxCNC HAL module for LinuxCNC

   Copyright (C) 2013 Frederic Rible (fri...@teaser.fr)

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 3 of the License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the program; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   02111-1307 USA.
 */

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#define ULAPI
#include 
#include 

const char *modname = "xhc-hb04";
int hal_comp_id;
const char *section = "XHC-HB04";
bool simu_mode = true;

typedef struct {
	char pin_name[256];
	unsigned int code;
} xhc_button_t;

typedef enum {
	axis_off = 0x00,
	axis_x = 0x11,
	axis_y = 0x12,
	axis_z = 0x13,
	axis_a = 0x18,
	axis_spindle = 0x14,
	axis_feed = 0x15
} xhc_axis_t;

static unsigned char _button_step = 0;
#define NB_MAX_BUTTONS 32

typedef struct {
	hal_float_t *x_wc, *y_wc, *z_wc, *a_wc;
	hal_float_t *x_mc, *y_mc, *z_mc, *a_mc;

	hal_float_t *feedrate_override, *feedrate;
	hal_float_t *spindle_override, *spindle_rps;

	hal_bit_t *button_pin[NB_MAX_BUTTONS];

hal_bit_t *jog_enable_off;
	hal_bit_t *jog_enable_x;
	hal_bit_t *jog_enable_y;
	hal_bit_t *jog_enable_z;
	hal_bit_t *jog_enable_a;
	hal_bit_t *jog_enable_feedrate;
	hal_bit_t *jog_enable_spindle;
	hal_float_t *jog_scale;
	hal_s32_t *jog_counts, *jog_counts_neg;

	hal_float_t *jog_velocity;
	hal_float_t *jog_max_velocity;
	hal_float_t *jog_increment;
	hal_bit_t *jog_plus_x, *jog_plus_y, *jog_plus_z, *jog_plus_a;
	hal_bit_t *jog_minus_x, *jog_minus_y, *jog_minus_z, *jog_minus_a;
} xhc_hal_t;

typedef struct {
	xhc_hal_t *hal;
	int step;
	xhc_axis_t axis;
	xhc_button_t buttons[NB_MAX_BUTTONS];
	unsigned char button_code;

	// Variables for velocity computation
	hal_s32_t last_jog_counts;
	struct timeval last_tv;
} xhc_t;

static xhc_t xhc;

static int do_exit = 0;

struct libusb_transfer *transfer_in  = NULL;
unsigned char in_buf[32];
void cb_transfer_in(struct libusb_transfer *transfer);
void setup_asynch_transfer(libusb_device_handle *dev_handle);

extern "C" const char *
iniFind(FILE *fp, const char *tag, const char *section)
{
IniFile f(false, fp);

return(f.Find(tag, section));
}

int xhc_encode_float(float v, unsigned char *buf)
{
	unsigned int int_v = round(fabs(v) * 1.0);
	unsigned short int_part = int_v / 1;
	unsigned short fract_part = int_v % 1;
	if (v < 0) fract_part = fract_part | 0x8000;
	*(short *)buf = int_part;
	*((short *)buf+1) = fract_part;
	return 4;
}

int xhc_encode_s16(int v, unsigned char *buf)
{
	*(short *)buf = v;
	return 2;
}

void xhc_display_encode(xhc_t *xhc, unsigned char *data, int len)
{
	unsigned char buf[6*7];
	unsigned char *p = buf;
	int i;
	int packet;

	assert(len == 6*8);

	memset(buf, 0, sizeof(buf));

	*p++ = 0xFE;
	*p++ = 0xFD;
	*p++ = 0x0C;

	if (xhc->axis == axis_a) p += xhc_encode_float(round(1000 * *(xhc->hal->a_wc)) / 1000, p);
	else p += xhc_encode_float(round(1000 * *(xhc->hal->x_wc)) / 1000, p);
	p += xhc_encode_float(round(1000 * *(xhc->hal->y_wc)) / 1000, p);
	p += xhc_encode_float(round(1000 * *(xhc->hal->z_wc)) / 1000, p);
	if (xhc->axis == axis_a) p += xhc_encode_float(round(1000 * *(xhc->hal->a_mc)) / 1000, p);
	else p += xhc_encode_float(round(1000 * *(xhc->hal->x_mc)) / 1000, p);
	p += xhc_encode_float(round(1000 * *(xhc->hal->y_mc)) / 1000, p);
	p += xhc_encode_float(round(1000 * *(xhc->hal->z_mc)) / 1000, p);
	p += xhc_encode_s16(round(100.0 * *(xhc->hal->feedrate_override)), p);
	p += xhc_encode_s16(round(100.0 * *(xhc->hal->spindle_override)), p);
	p += xhc_encode_s16(round(60.0 * *(xhc->hal->feedrate)), p);
	p += xhc_encode_s16(round(60.0 * *(xhc->hal->spindle_rps)), p);

	switch (xhc->step) {
	case 1:
		buf[35] = 0x01;
		break;
	case 10:
		buf[35] = 0x03;
		break;
	case 100:
		buf[35] = 0x0

Re: [Emc-users] XHC HB04 pendant stops updating its display

2014-01-14 Thread Sebastian Kuzminsky
On 1/14/14 06:05 , Marius Alksnys wrote:
> By the way, my corrected driver is attached. Maybe someone could check
> and probably include it in future versions of LinuxCNC?
>
> I made corrections to the driver for the numbers to appear exactly the
> same like in the usual UI - I added round functions.

This is your modified version of Frederic Rible's pendant driver?

Last time I spoke with Frederic about it, back in August, he said he was 
not ready to integrate the driver into the main line of LinuxCNC yet, 
and I haven't heard from him since.  I'll ping him again and see what 
his status is.


-- 
Sebastian Kuzminsky

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] XHC HB04 pendant stops updating its display

2014-01-14 Thread Marius Alksnys
Yes, it is. The pendant is used daily on one 4-axis CNC metal milling 
machine. I created quite complex hal file for it. I can say the driver 
could do more, but the current setup works quite good.

2014.01.14 17:42, Sebastian Kuzminsky rašė:
> This is your modified version of Frederic Rible's pendant driver?



--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2, MESA 5i25: pins toggle on startup

2014-01-14 Thread Marius Alksnys
I use this line:
CONFIG="num_encoders=2 sserial_port_0=00XX"

I tried changing 0 and X, but didn't succeed - GPIO still toggle at 
startup. Both 8i20 are found every time except for "".

5i25 P3 is connected to 7i85, where channel 0 and 1 are connected to 
8i20s. Encoders are connected to encoder channels 0 and 1. P2 is 
connected to optoisolator board.

On 01/12/2014 07:36 PM, Peter C. Wallace wrote:
> What I mean is that if any of the GPIO pins you are using have sserial as a
> secondary function, it must be specifically disabled in the sserial config
> string or the GPIO bit will toggle during device probe



--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] BBB 14: unexpected realtime delay on RT thread 1

2014-01-14 Thread Bas de Bruijn
I’m having an error resulting in missing steps so the layers I’m printing 
shift. The file I print is pretty big (17MB). But the error does not happen at 
the same hight. How can i find what’s happening? Do i need to switch off the 
screensaver for example? or is there something else i can check?

Thanks,
Bas
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2, MESA 5i25: pins toggle on startup

2014-01-14 Thread Peter C. Wallace
On Tue, 14 Jan 2014, Marius Alksnys wrote:

> Date: Tue, 14 Jan 2014 19:45:00 +0200
> From: Marius Alksnys 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] Hostmot2, MESA 5i25: pins toggle on startup
> 
> I use this line:
> CONFIG="num_encoders=2 sserial_port_0=00XX"
>
> I tried changing 0 and X, but didn't succeed - GPIO still toggle at
> startup. Both 8i20 are found every time except for "".
>
> 5i25 P3 is connected to 7i85, where channel 0 and 1 are connected to
> 8i20s. Encoders are connected to encoder channels 0 and 1. P2 is
> connected to optoisolator board.
>
> On 01/12/2014 07:36 PM, Peter C. Wallace wrote:
>> What I mean is that if any of the GPIO pins you are using have sserial as a
>> secondary function, it must be specifically disabled in the sserial config
>> string or the GPIO bit will toggle during device probe
>


What FPGA configuration are you using? This may be a bug in sserial.


>
>
> --
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.


--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] BBB 14: unexpected realtime delay on RT thread 1

2014-01-14 Thread Sebastian Kuzminsky
On 1/14/14 11:07 , Bas de Bruijn wrote:
> I’m having an error resulting in missing steps so the layers I’m printing 
> shift. The file I print is pretty big (17MB). But the error does not happen 
> at the same hight. How can i find what’s happening? Do i need to switch off 
> the screensaver for example? or is there something else i can check?

You're on the Beaglebone Black, running Xenomai?  I'm not sure exactly 
what the realtime performance and jitter on that platform should be 
expected to me.

Try running the latency measuring tool (it used to be called 
'latency-test', there's also latencyhistogram and latencyplot) and see 
if turning off the screensaver helps.


-- 
Sebastian Kuzminsky

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] BBB 14: unexpected realtime delay on RT thread 1

2014-01-14 Thread Bas de Bruijn
Yes, the BeagleBone Black,
the PRU is hat 10us step length and 1us step time.
The servo task period, in nano sec is 100.
When i run a latency test i get a jitter of approximately 56000 to 6 ns max 
Jitter

I’ll disable the screensaver to check.

On 14 Jan 2014, at 19:13, Sebastian Kuzminsky  wrote:

> On 1/14/14 11:07 , Bas de Bruijn wrote:
>> I’m having an error resulting in missing steps so the layers I’m printing 
>> shift. The file I print is pretty big (17MB). But the error does not happen 
>> at the same hight. How can i find what’s happening? Do i need to switch off 
>> the screensaver for example? or is there something else i can check?
> 
> You're on the Beaglebone Black, running Xenomai?  I'm not sure exactly 
> what the realtime performance and jitter on that platform should be 
> expected to me.
> 
> Try running the latency measuring tool (it used to be called 
> 'latency-test', there's also latencyhistogram and latencyplot) and see 
> if turning off the screensaver helps.
> 
> 
> -- 
> Sebastian Kuzminsky
> 
> --
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today. 
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] BBB 14: unexpected realtime delay on RT thread 1

2014-01-14 Thread Charles Steinkuehler
On 1/14/2014 12:21 PM, Bas de Bruijn wrote:
> Yes, the BeagleBone Black,
> the PRU is hat 10us step length and 1us step time.
> The servo task period, in nano sec is 100.
> When i run a latency test i get a jitter of approximately 56000 to 6 ns 
> max Jitter
> 
> I’ll disable the screensaver to check.

The latency you report is typical for the BeagleBone.  The "unexpected
realtime delay" is something I see occasionally on my systems.  I
haven't fully dug into the cause, but it seems like something in
LinuxCNC has hard-coded jitter numbers and doesn't like the BeagleBone
(which has higher IRQ jitter than a typical x86 system).  I've never had
it cause issues, however, and it is not correlated with a spike in
latency as measured by either the LinuxCNC latency-test or the xenomai
latency utility.

I also run with the screen saver and display power management enabled on
my BeagleBone and have not had any issues with "missed steps".

I suggest you review the current setting on your stepper drivers,
cooling on the stepper drivers, the mechanical system (make sure
everything moves freely and can't bind), and review your machine setup.

I did have to dial my acceleration down to around 2400 mm/s/s to avoid
missing steps with some Slic3r generated infill gcode, but that had
nothing to do with the BeagleBone, my steppers and drivers just weren't
up to the task when running off 12V.

-- 
Charles Steinkuehler
char...@steinkuehler.net



signature.asc
Description: OpenPGP digital signature
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] BBB 14: unexpected realtime delay on RT thread 1

2014-01-14 Thread Bas de Bruijn
Maybe the error generated has nothing to do with the missing steps per se, it 
just got me triggered. I have acceleration about 2000 and I’ll turn it down 
some more. Other parts got printed without problems. I’ll review the tension on 
my belts.

On the arduino clone I have approx 1000 mm/s^2 because the extruder on the 
effector introduces some vibrations. My new frame is very rigid so everything 
will be transferred directly to the motor etc. My new extruder will be half the 
weight so I expect i’ll be able to do a but faster acceleration (if needed).

The slic3r generated code (no arc although I have tried to generate with arc 
support) will slow down in the radii. but that’s to be expected. I’ll do some 
experimenting with G64 P0.02 Q0.02


On 14 Jan 2014, at 19:33, Charles Steinkuehler  wrote:

> On 1/14/2014 12:21 PM, Bas de Bruijn wrote:
>> Yes, the BeagleBone Black,
>> the PRU is hat 10us step length and 1us step time.
>> The servo task period, in nano sec is 100.
>> When i run a latency test i get a jitter of approximately 56000 to 6 ns 
>> max Jitter
>> 
>> I’ll disable the screensaver to check.
> 
> The latency you report is typical for the BeagleBone.  The "unexpected
> realtime delay" is something I see occasionally on my systems.  I
> haven't fully dug into the cause, but it seems like something in
> LinuxCNC has hard-coded jitter numbers and doesn't like the BeagleBone
> (which has higher IRQ jitter than a typical x86 system).  I've never had
> it cause issues, however, and it is not correlated with a spike in
> latency as measured by either the LinuxCNC latency-test or the xenomai
> latency utility.
> 
> I also run with the screen saver and display power management enabled on
> my BeagleBone and have not had any issues with "missed steps".
> 
> I suggest you review the current setting on your stepper drivers,
> cooling on the stepper drivers, the mechanical system (make sure
> everything moves freely and can't bind), and review your machine setup.
> 
> I did have to dial my acceleration down to around 2400 mm/s/s to avoid
> missing steps with some Slic3r generated infill gcode, but that had
> nothing to do with the BeagleBone, my steppers and drivers just weren't
> up to the task when running off 12V.
> 
> -- 
> Charles Steinkuehler
> char...@steinkuehler.net
> 
> --
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today. 
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] BBB 14: unexpected realtime delay on RT thread 1

2014-01-14 Thread Michael Haberler

Am 14.01.2014 um 19:33 schrieb Charles Steinkuehler :

> On 1/14/2014 12:21 PM, Bas de Bruijn wrote:
>> Yes, the BeagleBone Black,
>> the PRU is hat 10us step length and 1us step time.

The PRU code cannot cause an "unexpected realtime delay", since this is a 
message generated by the motion component. Since missing steps have no way to 
find their way back into HAL except if you are running a stepper servo loop 
with encoders (which you likely dont), this cannot be the source either.

The logic for "unexpected realtime delay" is here: 
https://github.com/mhaberler/linuxcnc/blob/unified-build-candidate-3/src/emc/motion/control.c#L249
 

What motion does is:
- observes its invocation interval over a window of samples,
- once the window is filled with samples, start checking:
- compare the current invocation time to all samples
- if the current interval is longer than 1.2 of any of the samples then 
generate an "unexpected realtime delay" message.

What you want to do is investigate the functions on the servo thread.

see the 'show thread' and 'show param' commands 
http://www.linuxcnc.org/docs/devel/html/hal/tutorial.html, in particular the 
'.time' and '.tmax' values, which might give a hint which thread function takes 
too long. 

It might be worth looking at motion execution times, see the PARAMETERS section 
of http://www.linuxcnc.org/docs/devel/html/man/man9/motion.9.html. 

- Michael

>> The servo task period, in nano sec is 100.
>> When i run a latency test i get a jitter of approximately 56000 to 6 ns 
>> max Jitter
>> 
>> I’ll disable the screensaver to check.
> 
> The latency you report is typical for the BeagleBone.  The "unexpected
> realtime delay" is something I see occasionally on my systems.  I
> haven't fully dug into the cause, but it seems like something in
> LinuxCNC has hard-coded jitter numbers and doesn't like the BeagleBone
> (which has higher IRQ jitter than a typical x86 system).  I've never had
> it cause issues, however, and it is not correlated with a spike in
> latency as measured by either the LinuxCNC latency-test or the xenomai
> latency utility.
> 
> I also run with the screen saver and display power management enabled on
> my BeagleBone and have not had any issues with "missed steps".
> 
> I suggest you review the current setting on your stepper drivers,
> cooling on the stepper drivers, the mechanical system (make sure
> everything moves freely and can't bind), and review your machine setup.
> 
> I did have to dial my acceleration down to around 2400 mm/s/s to avoid
> missing steps with some Slic3r generated infill gcode, but that had
> nothing to do with the BeagleBone, my steppers and drivers just weren't
> up to the task when running off 12V.
> 
> -- 
> Charles Steinkuehler
> char...@steinkuehler.net
> 
> --
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today. 
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] BBB 14: unexpected realtime delay on RT thread 1

2014-01-14 Thread Bas de Bruijn
I’ll start looking.
Thanks for the pointer

On 14 Jan 2014, at 19:57, Michael Haberler  wrote:

> 
> Am 14.01.2014 um 19:33 schrieb Charles Steinkuehler 
> :
> 
>> On 1/14/2014 12:21 PM, Bas de Bruijn wrote:
>>> Yes, the BeagleBone Black,
>>> the PRU is hat 10us step length and 1us step time.
> 
> The PRU code cannot cause an "unexpected realtime delay", since this is a 
> message generated by the motion component. Since missing steps have no way to 
> find their way back into HAL except if you are running a stepper servo loop 
> with encoders (which you likely dont), this cannot be the source either.
> 
> The logic for "unexpected realtime delay" is here: 
> https://github.com/mhaberler/linuxcnc/blob/unified-build-candidate-3/src/emc/motion/control.c#L249
>  
> 
> What motion does is:
> - observes its invocation interval over a window of samples,
> - once the window is filled with samples, start checking:
> - compare the current invocation time to all samples
> - if the current interval is longer than 1.2 of any of the samples then 
> generate an "unexpected realtime delay" message.
> 
> What you want to do is investigate the functions on the servo thread.
> 
> see the 'show thread' and 'show param' commands 
> http://www.linuxcnc.org/docs/devel/html/hal/tutorial.html, in particular the 
> '.time' and '.tmax' values, which might give a hint which thread function 
> takes too long. 
> 
> It might be worth looking at motion execution times, see the PARAMETERS 
> section ofhttp://www.linuxcnc.org/docs/devel/html/man/man9/motion.9.html. 
> 
> - Michael
> 
>>> The servo task period, in nano sec is 100.
>>> When i run a latency test i get a jitter of approximately 56000 to 6 ns 
>>> max Jitter
>>> 
>>> I’ll disable the screensaver to check.
>> 
>> The latency you report is typical for the BeagleBone.  The "unexpected
>> realtime delay" is something I see occasionally on my systems.  I
>> haven't fully dug into the cause, but it seems like something in
>> LinuxCNC has hard-coded jitter numbers and doesn't like the BeagleBone
>> (which has higher IRQ jitter than a typical x86 system).  I've never had
>> it cause issues, however, and it is not correlated with a spike in
>> latency as measured by either the LinuxCNC latency-test or the xenomai
>> latency utility.
>> 
>> I also run with the screen saver and display power management enabled on
>> my BeagleBone and have not had any issues with "missed steps".
>> 
>> I suggest you review the current setting on your stepper drivers,
>> cooling on the stepper drivers, the mechanical system (make sure
>> everything moves freely and can't bind), and review your machine setup.
>> 
>> I did have to dial my acceleration down to around 2400 mm/s/s to avoid
>> missing steps with some Slic3r generated infill gcode, but that had
>> nothing to do with the BeagleBone, my steppers and drivers just weren't
>> up to the task when running off 12V.
>> 
>> -- 
>> Charles Steinkuehler
>> char...@steinkuehler.net
>> 
>> --
>> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
>> Learn Why More Businesses Are Choosing CenturyLink Cloud For
>> Critical Workloads, Development Environments & Everything In Between.
>> Get a Quote or Start a Free Trial Today. 
>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> --
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today. 
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] added M106 and M109 for using fan and extruder waiting on temperature

2014-01-14 Thread Bas de Bruijn
I added rudimentary fan control and waiting in temperature control when using 
an extruder type machine.
Somebody might find it useful.

https://github.com/luminize/linuxcnc/commit/fe369d8883cc07e0d369ce4fc90bc77142bf999b

Bas
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2, MESA 5i25: pins toggle on startup

2014-01-14 Thread Marius Alksnys
What do you mean by "FPGA configuration"?
latest master branch

On 2014.01.14 20:08, Peter C. Wallace wrote:
> What FPGA configuration are you using? This may be a bug in sserial.



--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hostmot2, MESA 5i25: pins toggle on startup

2014-01-14 Thread Peter C. Wallace
On Tue, 14 Jan 2014, Marius Alksnys wrote:

> Date: Tue, 14 Jan 2014 22:17:38 +0200
> From: Marius Alksnys 
> Reply-To: "Enhanced Machine Controller (EMC)"
> 
> To: emc-users@lists.sourceforge.net
> Subject: Re: [Emc-users] Hostmot2, MESA 5i25: pins toggle on startup
> 
> What do you mean by "FPGA configuration"?
> latest master branch

What FPGA is in the 5I25?

>
> On 2014.01.14 20:08, Peter C. Wallace wrote:
>> What FPGA configuration are you using? This may be a bug in sserial.
>
>
>
> --
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.


--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] XHC HB04 pendant stops updating its display

2014-01-14 Thread Frederic RIBLE
Marius, thank you for the patch. I have few others to integrate also.
Yes, including it in LinuxCNC is on my todo list.
I will try to boost the priority for that task.

About the display, I have the same issue here. I believe it is link to 
some power saving feature.
I do not know if we can find a fix.
Somebody else has done nice work for this pendant here: 
http://forum.planet-cnc.com/viewtopic.php?f=12&t=1125

Frederic.

Le 2014-01-14 14:05, Marius Alksnys a écrit :
> I am writing this again with a new hope :)
>
> Problem with the pendant is that sometimes, when it is left untouched 
> for at least several seconds, it stops updating its display. For 
> example, when the program is running or machine is jogged by a 
> keyboard. And when you touch something on the pendant, the display 
> updates.
>
> Maybe somebody feels why this can happen?
>
>
> By the way, my corrected driver is attached. Maybe someone could check 
> and probably include it in future versions of LinuxCNC?
>
> I made corrections to the driver for the numbers to appear exactly the
> same like in the usual UI - I added round functions.
>
>
> --
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users