Re: [Emc-users] Homing with index and bldc in qi mode - a bug?

2014-04-30 Thread Marius Alksnys
It is index enable signal. But bldc.init stops its init sequence after axis.n.index-enable turns this signal low and it does this every single period! And I can think of more cases where index-enable could be used, but it would not be possible when it is connected to axis.n.index-enable. On

Re: [Emc-users] Homing with index and bldc in qi mode - a bug?

2014-04-30 Thread Marius Liebenberg
Are you saying that it goes high during the cycle somewhere and then low again after every sequence or Low - high-low after the sequence. You may have to do a comp to time that out or ignore it if some other conditions are still met. On 2014-04-30 09:39, Marius Alksnys wrote: It is index

Re: [Emc-users] Homing with index and bldc in qi mode - a bug?

2014-04-30 Thread andy pugh
On 30 April 2014 05:17, propcoder marius.alks...@gmail.com wrote: I think this is the line in src/emc/motion/control.c where bad thing happens: /* write to HAL pins */ *(joint_data-index_enable) = joint-index_enable; That _should_ be OK. Every servo cycle the motion controller

Re: [Emc-users] Homing with index and bldc in qi mode - a bug?

2014-04-30 Thread Marius Alksnys
This is the order: addf [HM2](BRD)read servo-thread ... addf motion-command-handler servo-thread addf motion-controller servo-thread addf pid.x.do-pid-calcs servo-thread addf pid.z.do-pid-calcs servo-thread addf bldc.0 servo-thread addf bldc.1

Re: [Emc-users] Homing with index and bldc in qi mode - a bug?

2014-04-30 Thread Marius Alksnys
What do you mean by cycle, sequence and comp? As I wrote earlier - when axis.n.index-enable is disconnected, and bldc.init takes place, motor start to spin, index-enable goes high, motor encoder reaches the index and then it goes low like it should be. But when axis.n.index-enable is

Re: [Emc-users] Homing with index and bldc in qi mode - a bug?

2014-04-29 Thread andy pugh
On 29 April 2014 21:43, Marius Alksnys marius.alks...@gmail.com wrote: I checked the code and found that axis.n.index-enable IO pin is set at every servo(?) period no matter it should be changed or not That's interesting. I can't see why that would be, as it would tend to mean that an encoder

Re: [Emc-users] Homing with index and bldc in qi mode - a bug?

2014-04-29 Thread propcoder
I think this is the line in src/emc/motion/control.c where bad thing happens: /* write to HAL pins */ *(joint_data-index_enable) = joint-index_enable; It writes to IO hal pin no matter what. I think it should check if joint-index_enable was changed and only then write / change HAL

Re: [Emc-users] Homing with index and bldc in qi mode - a bug?

2014-04-29 Thread Marius Liebenberg
It looks like it does as it is supposed to do. If that is only an enable signal it can be written all the time. If it was initialized correctly and then set by the hal config there should not be a problem with that line. On 2014-04-30 06:17, propcoder wrote: I think this is the line in