[Emc-users] unpluggable axis controls

2021-02-15 Thread Gene Heskett
Greetings all;

Trying to figure out out how to disable an axis thsat reports its plugged 
in status if its not plugged in.

That, and since its the y axis that is the long axix on a 6040 gantry it 
will be used in the "B" position 95% of the time.  Since this effects 
the planner for combined motions, or IMO should, I would like to add 
both A & B to the kins, with a pyvcp button to enable/disable each 
relationship from the axis gui, on a mutually exclusive basis, both of 
which would be removed from the gui, if its unplugged.

So if its plugged in it will be joint_3 for its control path, but Joint_3 
will be associated with the gui chosen A or B directions in the TP.

I figure on disabling the A or B controls by a couple mux2's so the if 
unlugged, the pid_a comand input is grounded by one mux2, and that pid_a 
disabled by shutting off its enable with another mux2, both driven from 
the net b_prsnt signal from this stanza of .hal code:

#*
# A or B axis stuff
#*
# here I need a pullup to field power, say about 10k to 22k to give
# a true reading when unplugged.
net   b-prsnt <= hm2_5i25.0.7i76.0.0.input-09 # high if not plugged in?
# so first, go add that resistor.

I have, as can be seen, plans to disable it, but not how to dynamically 
make it axis A or axis B from the pyvcp facilities.  Can that even be 
done?

The last thing I want to do is to have to maintain 2 seperate 
configurations in sync with each other, but doing this without an 
IF/ELSE/ENDIF in the .ini seems impossible without adding a postgui.ini 
that repeats the ini files original statements:

[TRAJ]
AXES = 4
COORDINATES = X Y Z A
MAX_ANGULAR_VELOCITY = 360.00
DEFAULT_ANGULAR_VELOCITY = 45.00
LINEAR_UNITS = inch
ANGULAR_UNITS = degree
#CYCLE_TIME = 0.010
DEFAULT_LINEAR_VELOCITY = 3.25
MAX_LINEAR_VELOCITY = 4.00
POSITION_FILE = position.txt
#NO_FORCE_HOMING = 1

For A or B depending on pycvp button enabled after start up in a 3 axis 
mode. by changing the COORDINATES to X Y Z B. And it may be that there 
should be 2 separate Aposition.txt and Bposition.txt files to prevent 
that cross-coupling.

How should I proceed?

Thanks all.

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


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


Re: [Emc-users] unpluggable axis controls

2021-02-17 Thread andy pugh
On Tue, 16 Feb 2021 at 01:23, Gene Heskett  wrote:

> How should I proceed?

Is it really too hard to just reboot from a different INI file?

Most of the HAL can stay the same with the right splitting up of the
HAL files, and much of the INI can be common too, using #INCLUDE in
the master INI file for each config.
http://linuxcnc.org/docs/2.8/html/config/ini-config.html#_include_files

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


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


Re: [Emc-users] unpluggable axis controls

2021-02-17 Thread Gene Heskett
On Wednesday 17 February 2021 04:25:57 andy pugh wrote:

> On Tue, 16 Feb 2021 at 01:23, Gene Heskett  
wrote:
> > How should I proceed?
>
> Is it really too hard to just reboot from a different INI file?
>
> Most of the HAL can stay the same with the right splitting up of the
> HAL files, and much of the INI can be common too, using #INCLUDE in
> the master INI file for each config.
> http://linuxcnc.org/docs/2.8/html/config/ini-config.html#_include_files

That would work, but still leaves me trying to keep 2 or more ini files 
synchronized, because there is no way to make one master file call in 
the correct .inc's for each config. However, inverting the idea might 
work, have each custom file call the same master.inc for all the common 
stuffs but different hal files. Lots of editing ensues either way.

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


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


Re: [Emc-users] unpluggable axis controls

2021-02-17 Thread Gene Heskett
On Wednesday 17 February 2021 12:27:58 Gene Heskett wrote:

> On Wednesday 17 February 2021 04:25:57 andy pugh wrote:
> > On Tue, 16 Feb 2021 at 01:23, Gene Heskett 
>
> wrote:
> > > How should I proceed?
> >
> > Is it really too hard to just reboot from a different INI file?
> >
> > Most of the HAL can stay the same with the right splitting up of the
> > HAL files, and much of the INI can be common too, using #INCLUDE in
> > the master INI file for each config.
> > http://linuxcnc.org/docs/2.8/html/config/ini-config.html#_include_fi
> >les
>
> That would work, but still leaves me trying to keep 2 or more ini
> files synchronized, because there is no way to make one master file
> call in the correct .inc's for each config. However, inverting the
> idea might work, have each custom file call the same master.inc for
> all the common stuffs but different hal files. Lots of editing ensues
> either way.
>
> Thanks Andy
>
> Cheers, Gene Heskett

Trying to get my thoughts organized, raises a couple questions.

1. Are the AXIS_X or JOINT_N labels used for anything but a search anchor 
when hal is looking for a param whose value is set in an ini file?

And that brings up a 2nd related question:

2. Are the params whose value is set in an .inc file still available to 
hal by the usual syntax?

What I have in mind is to use JOINT_3 for all three axis variaions since 
it is the exact same hardware, although its tipable in that any of them 
can become C if its turned straight up. but just connect it to look like 
an A or a B or a C in the event its tipped up. Yet another possibility 
might be for a secont joint_3.inc file, but that one describes the 4th 
axis that came with the 6040 and which I am in the process of making a 
set of timing sprockets to gear it down by a factor of 3 or so for 
increased holding power.

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)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 


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