Re: [Emc-users] Feed/Rapid override physical knob selection

2018-10-25 Thread Tomaz T .
I would prefere to have potentiometer style of knobs where I can include scale 
from 0-120%


Like on this picture:

https://www.dropbox.com/s/tc315af7ayee3gk/Rotary_switch.jpg?dl=0


Are for this used potentiometer or encoder?

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] need something like rockhopper, but faster

2018-10-25 Thread Jon Elson

On 10/25/2018 05:59 PM, andy pugh wrote:

On Thu, 25 Oct 2018 at 20:48, Kenneth Lerman  wrote:


At any rate, Gene brings up a real problem should be solvable with a simple
tool.

One fly in the ointment is that I don't think anything knows which
function reads inputs and which writes outputs for each component.

MOST hal components do it all in one shot.  Generally, only 
the ones related to complicated I/O devices like Pico 
Systems and Mesa boards have a separate read and write 
functions that require TWO ADDF lines.  (The software 
encoder has two functions that are typically run in separate 
THREADS, that's another whole complication.)  At least for 
the Pico PPMC devices, you do the read function as the VERY 
first thing in the thread, and the write as the last.


Jon


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] need something like rockhopper, but faster

2018-10-25 Thread Gene Heskett
On Thursday 25 October 2018 18:59:36 andy pugh wrote:

> On Thu, 25 Oct 2018 at 20:48, Kenneth Lerman 
 wrote:
> > At any rate, Gene brings up a real problem should be solvable with a
> > simple tool.
>
> One fly in the ointment is that I don't think anything knows which
> function reads inputs and which writes outputs for each component.

Could that be borrowed from rockhopper? Or is this something different?

Thanks Andy.

-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] need something like rockhopper, but faster

2018-10-25 Thread andy pugh
On Thu, 25 Oct 2018 at 20:48, Kenneth Lerman  wrote:

> At any rate, Gene brings up a real problem should be solvable with a simple
> tool.

One fly in the ointment is that I don't think anything knows which
function reads inputs and which writes outputs for each 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


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] need something like rockhopper, but faster

2018-10-25 Thread Gene Heskett
On Thursday 25 October 2018 15:45:37 Kenneth Lerman wrote:

> I believe that issue Gene thinks needs addressing is the following:
> Consider component A (say Jon's board) reads the hardware and produces
> a signal Sa.
> Component B reads Sa and produces Sb
> Component C reads Sb and produces Sc
> Component A (Jon's board again) reads Sc and writes to the hardware.
> This can all take place in one servo cycle.
>
> However, what happens if the components are added (addf) in the order:
> Component C, component B, Component A.
>
> In that case:
> (cycle 1): Component C reads Sb (no value stored there yet) and
> produces Sc-1.
> Component B reads Sa (no value stored there yet) and
> produces Sb-1.
> Component A reads hardware and produces Sa-1. It reads
> Sc-1 and writes the hardware.
> (cycle 2): Component C reads Sb-1 and produces Sc-2
> Component B reads Sa-1 and produces Sb-2
>Component A reads hardware and produces Sa-2. It read
> Sc-1 and writes the hardware.
> (cycle 3): Component C reads Sb-2 and produces Sc-3
>Component B reads Sa-2 and produces Sb-3
>Component A reads hardware and produces Sa-3. It reads
> Sc-2 and writes the hardware.
>
> Look at where the value written to the hardware came from. Sc-2 was
> generated in cycle 2 from Sb-1.
> Sb-1 was generated in cycle 1 from no value store there, but call it
> cycle 0.
>
> So the value that is output in cycle 3 is essentially three cycles
> old.
>
> If instead, the components were addf'd in the order A, B, C, the delay
> would be
> determined strictly by the processing time.
>
> I first saw this problem in the 1960s in the context of generating a
> PERT chart. I later found out that solving it requires doing a
> topological sort. There's a slight complication in that topological
> sorts are done in DAGs (directed acyclic graphs) and our graph has
> cycles where a single component can be both an input and an output. A
> straightforward solution might be to arbitrarily break those
> components into two parts.
>
> At any rate, Gene brings up a real problem should be solvable with a
> simple tool.
>
> Ken
>

I'm not so sure I'd call it simple, Ken, but we definitely do need such a 
tool. I don't think it would be fast, at least not on a hal file with 
100 lines of addf's or more, and 2, maybe 3 threads. My Sheldon, running 
from a pi, has two threads, servo and jog, with jog running at only 200 
hertz. I need to move all the slow threads to the bottom of the list, 
then re-sort each list to firmly achieve the correct, it all falls thru 
in one thread cycle order, and if it was carefully analyzed, theres 
likely a few items/modules that could be moved to the slower thread. The 
G0704 is all running on the 1KHz servo thread, but thats a much faster 
Intel dual core cpu, which isn't showing its overworked, yet...  Its 
about to get independent homing switches which will add a few lines to 
the hal file as soon as I get good eyesight back. 2, maybe 3 weeks yet 
to new glasses.

Now getting into the killing frost time of the year, snow by the foot or 
so, so some of this will slow down.  The garage is very well insulated, 
heats all winter with a 1500 watt heater. but the shop only has a layer 
of T-111 between the weather and occupants like me. Been thinking of 
tearing it down and making a bigger one that can be insulated as its 
built, now that a damaged back in 2010 50 foot pine has been taken down 
at the other end of the yard. All I have to do is last long enough to do 
it. ;-)

Thanks Ken.

-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] need something like rockhopper, but faster

2018-10-25 Thread Kenneth Lerman
I believe that issue Gene thinks needs addressing is the following:
Consider component A (say Jon's board) reads the hardware and produces a
signal Sa.
Component B reads Sa and produces Sb
Component C reads Sb and produces Sc
Component A (Jon's board again) reads Sc and writes to the hardware.
This can all take place in one servo cycle.

However, what happens if the components are added (addf) in the order:
Component C, component B, Component A.

In that case:
(cycle 1): Component C reads Sb (no value stored there yet) and produces
Sc-1.
Component B reads Sa (no value stored there yet) and
produces Sb-1.
Component A reads hardware and produces Sa-1. It reads Sc-1
and writes the hardware.
(cycle 2): Component C reads Sb-1 and produces Sc-2
Component B reads Sa-1 and produces Sb-2
   Component A reads hardware and produces Sa-2. It read Sc-1
and writes the hardware.
(cycle 3): Component C reads Sb-2 and produces Sc-3
   Component B reads Sa-2 and produces Sb-3
   Component A reads hardware and produces Sa-3. It reads Sc-2
and writes the hardware.

Look at where the value written to the hardware came from. Sc-2 was
generated in cycle 2 from Sb-1.
Sb-1 was generated in cycle 1 from no value store there, but call it cycle
0.

So the value that is output in cycle 3 is essentially three cycles old.

If instead, the components were addf'd in the order A, B, C, the delay
would be
determined strictly by the processing time.

I first saw this problem in the 1960s in the context of generating a PERT
chart. I later found out that solving it requires doing a topological sort.
There's a slight complication in that topological sorts are done in DAGs
(directed acyclic graphs) and our graph has cycles where a single component
can be both an input and an output. A straightforward solution might be to
arbitrarily break those components into two parts.

At any rate, Gene brings up a real problem should be solvable with a simple
tool.

Ken



On Tue, Oct 23, 2018 at 12:52 AM Nicklas Karlsson <
nicklas.karlsso...@gmail.com> wrote:

> > ...
> > So, this makes sure that the encoders for ALL axes are
> > sampled simultaneously, and then the DACs are updated
> > simultaneously on the next servo cycle.  Thus, there is no
> > variable delay between encoder sampling and DAC update, it
> > is always equal to the servo thread period +/- the jitter at
> > the start of the thread, which is typically less than 10
> > us.  (Much less on a machine with good latency jitter numbers.)
> >
> > Jon
>
> Even though there are jitter on servo thread this jitter make no
> difference, anywhere within period is equally good because signals are
> latched/updated by hardware at period.
>
> Ideally in a good real time operating system there should be a list of all
> real time processes and worst case execution time. Then these exuction
> times and worst case execution of a new thread is known it is possible to
> calculate if enough execution time will be available. It might be hard to
> get an exact number but an upper bound is enough.
>
>
> Nicklas Karlsson
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Feed/Rapid override physical knob selection

2018-10-25 Thread Gene Heskett
On Thursday 25 October 2018 10:53:44 Przemek Klosowski wrote:

> On Wed, Oct 24, 2018 at 4:00 PM andy pugh  wrote:
> > I assume this one is waterproof when installed, but not inherently:
> > https://www.ebay.co.uk/itm/253300957997
>
> MPJA still has a $20 handwheel, nicely done:
>
> http://www.mpja.com/Handwheel-Digital-Encoder-100PPR-5VDC/productinfo/
>33106+MI
>
That is what I'm using as a single ended ABX but I've nothing on th 
X(index) terminals.  Just +A and +B. These are jog wheels, for XZ, not 
for spindles which does need the X for g33.1 and g76 type stuffs.

> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Feed/Rapid override physical knob selection

2018-10-25 Thread Jon Elson

On 10/25/2018 09:53 AM, Przemek Klosowski wrote:

On Wed, Oct 24, 2018 at 4:00 PM andy pugh  wrote:


I assume this one is waterproof when installed, but not inherently:
https://www.ebay.co.uk/itm/253300957997


MPJA still has a $20 handwheel, nicely done:

http://www.mpja.com/Handwheel-Digital-Encoder-100PPR-5VDC/productinfo/33106+MI

___

I used one of these to do an MPG pendant for my mill, it has 
worked quite well.
See  http://pico-systems.com/pendant.html  for some pictures 
(bottom pic is a similar encoder on a different machine, 
essentially identical to the MPJA encoder except for the 
label)  and info on how I wired it up and interfaced it 
through Hal.


Jon


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] config ... emcStatus buffer line entry??

2018-10-25 Thread theman whosoldtheworld
In these piece of code I write directly the infile path that I use in these
moment, because from qt actually for my is not possible read the name of
inifile 
In these way the compile operation is good  the program start, but when
launch these void ... these simple piece of code :

 const char *c2 =
"/home/mypc/linuxcnc-dev/configs/sim/axis/axis_mm.ini";


const char *nmlfile = c2;
RCS_STAT_CHANNEL *stat = new RCS_STAT_CHANNEL(emcFormat,
"emcStatus", "xemc", nmlfile);


if((stat->peek() == EMC_STAT_TYPE) || (stat->valid()))
{
corri = false;
corriPlus = false;
sendPosition(Error, Error, Error);
}
else
{
//EMC_STAT *emcStatus =
reinterpret_cast(stat->get_address());
EMC_STAT *emcStatus =
static_cast(stat->get_address());
//&emcStatus = static_cast>(stat->get_address());

/*std::cout << emcStatus->motion.traj.position.tran.x
<< " "
<<
emcStatus->motion.traj.position.tran.y << " "
<<
emcStatus->motion.traj.position.tran.z << "\n";*/

X =
QString(QChar::fromLatin1(emcStatus->motion.traj.position.tran.x ));
Y =
QString(QChar::fromLatin1(emcStatus->motion.traj.position.tran.y )) ;
Z =
QString(QChar::fromLatin1(emcStatus->motion.traj.position.tran.z )) ;


qDebug() << " position x:   " <<  X ;
qDebug() << " position y:   " <<  Y;
qDebug() << " position z:   " <<  Z;

emit sendPosition(X, Y ,Z);


}


send to my debugger these error:


##

Starting /home/mypc/linuxcnc-dev/scripts/QtDro...
entro in run
libnml/cms/cms_cfg.cc 496: No buffer-line entry found for buffer emcStatus
in config file /home/mypc/linuxcnc-dev/configs/sim/axis/axis_mm.ini.
libnml/nml/nml.cc 370: NML: cms_config returned -1.

**
* Current Directory = /home/mypc/linuxcnc-dev/scripts
*
**
* BufferName = emcStatus
* ProcessName = xemc
* Config File = /home/mypc/linuxcnc-dev/configs/sim/axis/axis_mm.ini
* error_type = 0 (NML_NO_ERROR)


libnml/nml/nml.cc 1343: NML::peek: CMS not configured.
The program has unexpectedly finished.
/home/mypc/linuxcnc-dev/scripts/QtDro crashed.

##


in these config No buffer-line entry found for buffer emcStatus in config
file /home/mypc/linuxcnc-dev/configs/sim/axis/axis_mm.ini. whese I must put
the buffer line entry??

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Feed/Rapid override physical knob selection

2018-10-25 Thread Przemek Klosowski
On Wed, Oct 24, 2018 at 4:00 PM andy pugh  wrote:

> I assume this one is waterproof when installed, but not inherently:
> https://www.ebay.co.uk/itm/253300957997


MPJA still has a $20 handwheel, nicely done:

http://www.mpja.com/Handwheel-Digital-Encoder-100PPR-5VDC/productinfo/33106+MI

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Feed/Rapid override physical knob selection

2018-10-25 Thread Gene Heskett
On Thursday 25 October 2018 02:29:19 Tomaz T. wrote:

> >I cut too much. These are just examples, not recommendations.
> >
> >https://www.ebay.co.uk/itm/183476117151 >3476117151>
> > https://www.ebay.co.uk/itm/152204137441 >52204137441>
>
> I think in my case this kind of controls would be more suitable:
>
> https://1drv.ms/u/s!AsTjVWm3v2FThmzyEF6CuxRtAAHF
> [https://kwpsdg.by.files.1drv.com/y4mvNUYn0J1_Po5_E9pCsr5sdu_eqlnxvKoU
>RXOFew01q1EJ6w3fv25bXu1Wy6unrI0VoZC0i_VkpoA4HIIZAyLTy4ZCB1ZvIWoGBu96YUB
>B954msM6a8Erin6UY-A58P1d]
> 
> [https://kwpsdg.by.files.1drv.com/y4mvNUYn0J1_Po5_E9pCsr5sdu_eqlnxvKoU
>RXOFew01q1EJ6w3fv25bXu1Wy6unrI0VoZC0i_VkpoA4HIIZAyLTy4ZCB1ZvIWoGBu96YUB
>B954msM6a8Erin6UY-A58P1d] Do I need to look for "10 position rotary
> switch" or "Rotary encoder"?
>
I'd go for a rotary encoder, quadrature encoding, which is an industry 
standard. Proper decoding gives the direction its turned in one passing 
edge. That way I can dial in the size to .0001", better than the machine 
itself can do in most cases.

> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Feed/Rapid override physical knob selection

2018-10-25 Thread andy pugh
On Thu, 25 Oct 2018 at 07:30, Tomaz T.  wrote:

> Do I need to look for "10 position rotary switch" or "Rotary encoder"?

That depends on whether you want a 10 position rotary switch or a
rotary encoder...

A 10 position switch will need 4 IO pins (you would need to get a BCD
coded switch rather than a 10-pin one)  whereas an encoder will need
2.

-- 
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


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users