[Emc-developers] userspace comp frequency

2024-01-16 Thread Thomas J Powderly

Problem is fixed:

The cause was use of reserved words 'min' and 'max'

Fixing was simply renaming pins ( and thus the variables ) to 'mymin' , 
'mymax' .


Now the states are as expected, near 1mS,

not 1 second  as with names 'min', 'max' .


I'd think use of reserved words should be mentioned

or warned or dis-allowed by halcompile .


Thanks for all the help

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


[Emc-developers] userspace comp frequency

2024-01-15 Thread Thomas J Powderly

hello
(sorry if double posted, i thinik orig dud not go thru)
I wrote a userspace .comp file to drive a pyvcp bar widget

I expected it to update every 1mS ( usleep(1000) )

But what I see is close to 1 hz 

I use a rip of linuxcmc 2.9.1  on debian 12

It compiles ok with the followiung cmd...

tomp@D12emc291:~/linuxcnc-barwidgets/configs/tomp$ halcompile --install 
--userspace rand9.comp
gcc -I/home/tomp/linuxcnc-barwidgets/configs/tomp 
-I/home/tomp/linuxcnc-barwidgets/include -I/usr/include/linuxcnc -URTAPI 
-U__MODULE__ -DULAPI -Os  -o rand9 /tmp/tmp49hdcnk5/rand9.c 
-Wl,-rpath,/home/tomp/linuxcnc-barwidgets/lib 
-L/home/tomp/linuxcnc-barwidgets/lib -llinuxcnchal


halrun

loadusr rand9

loadusr halmeter

   choose   rand9.0.out

note the near 1hz change rate

any idea why its so slow?

thx

TomP
component rand9;
// hd lost all superblocks, no parftial filles recovered for this comp
// had to rebuilt
// works but but updates at 1hz   why??
//
// to build in rip
// halcompile --install --userspace rand9.comp
//  will create file  rand9  in ~/yourRipDir/bin
//
// to test after aboive
// cd; cd ripdir; . scripts/rip-environment
// halrun
// loadusr rand9
// loadusr halmeter
//select ranf9.0.out
// note the changes are ~ 1hz   NOT the 1000uS of uSleep() call
//

option userspace;

// default min max , user can setp later as wanted
pin in  float   min=0;
pin in  float   max=100;

pin out float out;

license "GPL";
;;
#include 
#include 
#include 
#include 

// from 
https://stackoverflow.com/questions/5289613/generate-random-float-between-two-floats
float RandomFloat(float a, float b) {
  float random = ((float) rand()) / (float) RAND_MAX;
  float diff = b - a;
  float r = random * diff;
  return a + r;
}

void user_mainloop(void) {
while(1) {
usleep(1000);// thats 1000uSecs = 1mS but i see chgs every 1.0 secs ( 
100uSecs) why?
srand(time(NULL));
FOR_ALL_INSTS() out = RandomFloat(min,max);
}
}
___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


[Emc-developers] userspace comp update frequency

2024-01-13 Thread Thomas J Powderly

hello

I wrote a userspace .comp file to drive a pyvcp bar widget

I expected it to update every 1mS ( usleep(1) )

But what I see is close to 1 hz :-(

I use a rip of linuxcmc 2.9.1

It compiles ok

tomp@D12emc291:~/linuxcnc-barwidgets/configs/tomp$ halcompile --install 
--userspace rand9.comp
gcc -I/home/tomp/linuxcnc-barwidgets/configs/tomp 
-I/home/tomp/linuxcnc-barwidgets/include -I/usr/include/linuxcnc -URTAPI 
-U__MODULE__ -DULAPI -Os  -o rand9 /tmp/tmp49hdcnk5/rand9.c 
-Wl,-rpath,/home/tomp/linuxcnc-barwidgets/lib 
-L/home/tomp/linuxcnc-barwidgets/lib -llinuxcnchal


halrun

loadusr rand9

loadusr halmeter

   choose   rand9.0.out

note the near 1hz change rate


any idea why its so slow?


( a previous version ran fast

but since that time,

I lost the superblock on my hd

and had  rewrite this part of the project

so, i do not have the previous source )

thx

TomP
component rand9;
// hd lost all superblocks, no parftial filles recovered for this comp
// had to rebuilt
// works but but updates at 1hz   why??
//
// to build in rip
// halcompile --install --userspace rand9.comp
//  will create file  rand9  in ~/yourRipDir/bin
//
// to test after aboive
// cd; cd ripdir; . scripts/rip-environment
// halrun
// loadusr rand9
// loadusr halmeter
//select ranf9.0.out
// note the changes are ~ 1hz   NOT the 1000uS of uSleep() call
//

option userspace;

// default min max , user can setp later as wanted
pin in  float   min=0;
pin in  float   max=100;

pin out float out;

license "GPL";
;;
#include 
#include 
#include 
#include 

// from 
https://stackoverflow.com/questions/5289613/generate-random-float-between-two-floats
float RandomFloat(float a, float b) {
  float random = ((float) rand()) / (float) RAND_MAX;
  float diff = b - a;
  float r = random * diff;
  return a + r;
}

void user_mainloop(void) {
while(1) {
usleep(1000);// thats 1000uSecs = 1mS but i see chgs every 1.0 secs ( 
100uSecs) why?
srand(time(NULL));
FOR_ALL_INSTS() out = RandomFloat(min,max);
}
}
___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] removed subdor in tests on linuxcnc branch linuxcnc-barwidget

2023-11-29 Thread Thomas J Powderly

Thanks Andy

On 11/30/23 00:42, andy pugh wrote:


On Mon, 27 Nov 2023 at 06:59, Thomas J Powderly  wrote:

That breaks build , so I removed tests/pyvcp-bar ( git rm ...)
You could have added an empty file called "skip" to the test folder: 
See: https://linuxcnc.org/docs/2.9/html/code/writing-tests.html


thanks for the skip trick,

still, I removed , entries from githun tests/ dir ( git rm ... )

Now my branch builds with no errs and all runtests are ok

( I dloaded a fresh copy, built it,d ran rintests, and my own tests all ok)


Also, don't get too hung-up on your test branch failing to build,
that's what test branches are for.


I am creating my own 'runtestsg' ( graphic)

following the runstest format.

I want to test  if  a screenshot of the widget under test (wut? :-)

is byte for byte same as 'expected.png'

Thats considered a sucessful test,

and needs no human interbention,

tho it does need a display.

So far, tests are  only only for outrput widgets,

and dont tackle input widgets yet.

tho pyautogui couild click btns, move sliders and dials...


--
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-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


thanks tomp

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


[Emc-developers] automating test for guis

2023-11-27 Thread Thomas J Powderly

If anyone is looking to automate gui tests ( similar to  scripts/runtests),

I found library 'pyautogui' to be very interesting.


It can generate key stokes ( alt ctrl shift combos too)
It can generate mouse movement in the gui.
It can _find_ buttons and click them.

It helped me send keystrokes to my xfce4-terminal to clear it...
 pyautogui.hotkey('alt', 't') ; pyautogui.typewrite([ 'c'])

https://pyautogui.readthedocs.io/en/latest/index.html

hth
tomp


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


[Emc-developers] removed subdor in tests on linuxcnc branch linuxcnc-barwidget

2023-11-26 Thread Thomas J Powderly
in branch *linuxcnc-barwidgets 
 *


I mistakenly tried to use scripts/runtests with .hal files requiring DISPLAY

That breaks build , so  I removed tests/pyvcp-bar ( git rm ...)

Now, *linuxcnc-barwidgets 
 * branch should not fail 
build due to tests/pyvcp-bar


thx

tomp

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


Re: [Emc-developers] pull requestproduced ' Build CI: Some jobs were not successful'

2023-11-26 Thread Thomas J Powderly

Stefen

thank you very much

On 11/26/23 21:08, Steffen Möller wrote:
> Hi Thomas,
>
>> Gesendet: Samstag, 25. November 2023 um 14:22 Uhr
>> Von: "Thomas J Powderly" 
>> An: emc-developers@lists.sourceforge.net
>> Betreff: [Emc-developers] pull requestproduced ' Build CI: Some jobs 
were not successful'

>>
>> Hello new to Git
>
> It is all a bit much. But thank you for nibbling through that jungle. 
I am not so sure if LinuxCNC should describe GitHub in too much detail, 
but if you see that the one or other reference to some of the many 
tutorials of GitHub would have helped then please send another PR to 
improve the documentation :)

>
>> I made a fork
>
> good!
>
>> made some changes did a 'push to master'
>
You mean to the master branch of your fork. That is technically fine, 
preferably though you would have committed to a new branch of yours 
(basically giving your changes a name) and then pushed that new branch 
to your forked repository. This way you can have several developments at 
the same time.

>
I was following
https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-push-an-existing-project-to-GitHub

and i did ( wow i can go waaay back in the terminal history!)
git push --set-upstream origin barWidgets

long story shorter
i pushed to 'origin' which is my repo on github linuxcnc-barwidgets

i say so because   ~/.git/config    says
    [remote "origin"]
    url = https://github.com/tjtr33/linuxcnc-barwidgets.git

>> did a pull request ( I think that's the procedure)
>
> good!
>
>> then got email that I
>> don't understand 1st error in message is in 'Built Rip & test' message
>> is Bar widgets #9519
>
> That is the automated builds and testing that kicks in with every PR, 
so issues are caught as early as possible.

>
>> pull request waspull request #2756 
<https://github.com/LinuxCNC/linuxcnc/pull/2756>

>>
>> line 23ERROR: ld.so: object 'libeatmydata.so' from LD_PRELOAD cannot be
>> preloaded (cannot open shared object file): ignored.
>>
>> really? lib eat my data? not eat my shorts?
>
> That is a library accelerating I/O by not waiting for the hard drive. 
The LD_PRELOAD is a trick to override what the C library would normally do.

thanks, i found the library libeatmyfata and code on github
>
>> Is the error is caused by my code?
>
> This is not the error that caused the trouble. It is a test that 
failed, look at

>
> 
https://github.com/LinuxCNC/linuxcnc/actions/runs/6939722284/job/18877492636?pr=2756

> Look at line 9385
>
> Running test: /home/runner/work/linuxcnc/linuxcnc/tests/twopass
> Running test: 
/home/runner/work/linuxcnc/linuxcnc/tests/uspace/spawnv-root

> Runtest: 260 tests run, 259 successful, 1 failed + 0 expected, 4 skipped
> Failed:
>     /home/runner/work/linuxcnc/linuxcnc/tests/pyvcp-bar
> Error: Process completed with exit code 1.
>
> and then scrolling up to line 9310:
>
> Running test: /home/runner/work/linuxcnc/linuxcnc/tests/pyvcp-bar
> *** /home/runner/work/linuxcnc/linuxcnc/tests/pyvcp-bar: XFAIL: test 
run exited with 1

> ** result:
> ** stderr:
> Traceback (most recent call last):
>   File "/home/runner/work/linuxcnc/linuxcnc/bin/pyvcp", line 
101, in 

> main()
>   File "/home/runner/work/linuxcnc/linuxcnc/bin/pyvcp", line 
83, in main

> Skipping disabled test: /home/runner/work/linuxcnc/linuxcnc/tests/raster
> pyvcp0 = Tk()
>   File "/usr/lib/python3.8/tkinter/__init__.py", line 2270, 
in __init__
> self.tk = _tkinter.create(screenName, baseName, 
className, interactive, wantobjects, useTk, sync, use)
> _tkinter.TclError: no display name and no $DISPLAY 
environment variable

> test.hal:4: waitpid failed pyvcp fred
> test.hal:4: pyvcp exited without becoming ready
> Note: Using POSIX non-realtime
> **
> Running test: /home/runner/work/linuxcnc/linuxcnc/tests/realtime-math
>
>
> What this means is that the test routine wants to open a window but 
cannot do so since it has no window system, so it complains about the 
DISPLAY variable not being set, which typically helps with a redirection 
of the display across machines, like when you are logged in remotely. 
There are tricks to circumvent this with Xnest but I do not feel 
competent to suggest how this should be introduced - I admittedly 
thought this would have been integrated already.



ah!! i was told that the DISPLAY env var was turned off
in the script 'rumtests'.

I now need to remove the tests/pyvcp-bar
locally(DONE) and remotely(on GitHub  TBD)

In will study how to clean up the  'tests' dir in 

[Emc-developers] pull requestproduced ' Build CI: Some jobs were not successful'

2023-11-25 Thread Thomas J Powderly
Hello new to Git I made a fork made some changes did a 'push to master 
did a pull request ( I think that's the procedure) then got email that I 
don't understand 1st error in message is in 'Built Rip & test' message 
is Bar widgets #9519


pull request waspull request #2756 


line 23ERROR: ld.so: object 'libeatmydata.so' from LD_PRELOAD cannot be 
preloaded (cannot open shared object file): ignored.


really? lib eat my data? not eat my shorts?

Is the error is caused by my code?

Is the notification to all developers? or just to me & due to my coed?

I have made more changes since then and want to push again

but caution says ask 1st

thanks

tomp

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


Re: [Emc-developers] noobie reuntest display err

2023-11-20 Thread Thomas J Powderly

Hello

I cannot use scripts/runtests on tests/mydir/test.hal  with .xml 
containing a pyvcp widget


I get error saying "no display name and no $DISPLAY

but:

'printenv' and 'echo $DISPLAY'  show DISPLAY=:0.0


So, I reduced the test.hal to only loadusr the .xml file and 'start'

and reduced the .xml file to s simple label widget


Afterwards, I get the same error with 'scripts/runtests'

and no error with 'halrun -v -g tests.hal


so i guess its  a bug



I am guessing that the DISPLAY in the error

is not the display for X

and the message is poor ( like AI relationships)

I guess the DISPLAY is from a .ini file, meaning AXIS or such

I guess this from the list of questions for the biug repoirt:

those questions keep asking about linuxcnc user gui

rather than the simple harun -f test.hal idea/ ( no gui )

just a guess :-)

thnak tomp



	
		 
	"I am Groot"
		
	

###
# 20nob test file lbl.hal
# #
loadusr -Wn fred pyvcp -c fred lbl.xml
start
___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers


Re: [Emc-developers] noobie reuntest display err

2023-11-19 Thread Thomas J Powderly

Hi Chris

I submitted bug report 2755

when i saw  much simpler /hal and .xml

produce same errs

(1 line hal and simplest label XML )

thanks

tomp



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


Re: [Emc-developers] noobie reuntest display err

2023-11-19 Thread Thomas J Powderly

Hello

yes, printenv shows

DISPLAY=:0.0

and

tomp@ThaiTowerD10:~$ echo $DISPLAY
:0.0

UPDATE: I replaced my pyvcp-widgets with one from master

and get same err

so I think the err is misleading

and caused by my test.hal or .xml

thanks TomP

On 11/19/23 20:37, Chad Woitas via Emc-developers wrote:

If you run "printenv" do you have a display in there ?
Or "echo $DISPLAY".


Chad Woitas | Automation Developer

[cid:image001.png@01D7F7D7.6E1AFA10]

RMD Engineering Inc.<http://www.rmd-engineering.com/> | Saskatoon Machine Works 
Ltd.<http://www.smw.sk.ca/> | Scientific Instrumentation Ltd.<http://www.sil.sk.ca/>

Facility Offices | #1 Cory Place | East Cory Industrial Park | Saskatoon | 
Saskatchewan | S7K 3J7

Mailing Address | P.O. Box 26096 | Saskatoon | Saskatchewan | S7K 8C1

Direct Line: 306-934-8791 | RMD Office: 306-934-7637 | Fax: 306-652-7633

The information contained in this message is confidential or protected by law.
If you are not the intended recipient, please contact the sender and delete 
this message.
Any unauthorized copying of this message or unauthorized distribution of the 
information contained herein is prohibited.

________
From: Thomas J Powderly 
Sent: Sunday, November 19, 2023 1:12:03 AM
To: emc-developers@lists.sourceforge.net 
Subject: [Emc-developers] noobie reuntest display err

Hello
I have problems writing tests for my code.
  LINUXCNC - 2.10.0~pre0
I created in my RIP dir
  ripdir/tests/pyvcpbar
and files
  test.hal pbar01.xnl expected
and quick tested with
  cd ripdir/tests/pyvcpbar
  halrun -I -f test.hal
  or
  halrun -f test.hal
those run fine
the terminal showed
  tomp@ThaiTowerD10:~/linuxcnc-barwidgets/tests/pyvcp-bar$ halrun -f
test.hal
  Note: Using POSIX realtime
  Note: Using POSIX realtime
  tomp@ThaiTowerD10:
but
  cd ../..   to root of rip
then run auto tests limited to new dir
  tomp@ThaiTowerD10:~/linuxcnc-barwidgets$ scripts/runtests -v
tests/pyvcp-bar
  Running test: tests/pyvcp-bar
  Traceback (most recent call last):
  File "/home/tomp/linuxcnc-barwidgets/bin/pyvcp", line 101, in 
  main()
  File "/home/tomp/linuxcnc-barwidgets/bin/pyvcp", line 83, in main
  pyvcp0 = Tk()
  File "/usr/lib/python3.7/tkinter/__init__.py", line 2023, in __init__
  self.tk = _tkinter.create(screenName, baseName, className,
interactive, wantobjects, useTk, sync, use)
  _tkinter.TclError: no display name and no $DISPLAY environment variable
  test.hal:6: waitpid failed pyvcp pbar01
  test.hal:6: pyvcp exited without becoming ready
  Note: Using POSIX realtime
  *** tests/pyvcp-bar: XFAIL: test run exited with 1
  Runtest: 1 tests run, 0 successful, 1 failed + 0 expected, 0 skipped
  Failed:
  tests/pyvcp-bar

Why "no display name and no $DISPLAY  ?"
Why an error if it ran   halrun -f test.hal ?

thanks
tomp


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



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


[Emc-developers] adding library requirement to pyvcp_widgets

2023-10-22 Thread Thomas J Powderly

Hello

I am working on pyvcp_widgets, esp the bar widget.

I added a 'style' that is extreme simplistic,

its just a single line with a user defined 'thumb'

( thumb is old school for the indicator that moves along the length of the bar )

Anyways, rather than try to guess what shapes to allow,

I added a tag to the xml 'dwgf'

( dwgf for the drawing file, a tkinter polygon designed by user)
for example "emptyDiamond.py"https://lists.sourceforge.net/lists/listinfo/emc-developers


[Emc-developers] double type & stupid pet tricks

2023-10-14 Thread Thomas J Powderly

a casual look saw a _lot_ of bits in a double

so i thought ' how many 7 bit ascii chars could be encoded'?

allowing short messages to be sent

like this:

# encode 9 chars into 64bit container
str="WakeuNnow"
n= 0
for c in str:
    n = n | (ord(c) & 0x7f)
    n = n << 7

print(bin(n))
0b101011110100010110101010011101101110111000
nsav = n

# get the 9 chars back
n = nsav
l = len(str)
for byt in range(l+1):
    c=n&0x7f
    cl[l-byt] = chr(c)
    n=n>>7

# display the chars retrieved
cl
['W', 'a', 'k', 'e', 'U', 'p', 'N', 'o', 'w', '\x00']


just for s

tomp



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


[Emc-developers] lost file or mind?

2023-10-06 Thread Thomas J Powderly

Hello,

I cannot find a file used in my .ini /
But the .ini runs fine from picker

the 'lost' file from the iniT ...

EMBED_TAB_COMMAND = pyvcp bars.xml


After a lot of searching, and failing to find the file,

( searching ~/linuxcnc and all branches of #PATH )

I used the 'find' command on the _entire_ filesystem

tomp@ThaiTowerD10:/$ cd /
tomp@ThaiTowerD10:/$ find . pyvcp_bars.xml
... after a long time  I see:
find: 'pyvcp_bars.xml': No such file or directory

How am I missing it ?
yet, linuxcnc finds and uses it ?

Also I have copied the .ini to fred.ini

It still ran. So the file I thought I was running was no 
better/different from the copy


I edited fred.ini file to mangle the xml file name

and got 'file not found' err, so the copy was being used

so the file exists but nowhere I can think of

any ideas?

tomp




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


Re: [Emc-developers] 5-axis video at Tormach meet up

2023-05-01 Thread Thomas J Powderly

Thanks for the links

and for FFox, it can ask

save

or

open with

(some  app to view the .wmv)

So I just  open with VLC

likely MPV and Parole can view wmv also

tomp

thx Jogn Jon and Stuart



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


Re: [Emc-developers] April 2023 LinuxCNC meeting at Tormach headquarters

2023-04-24 Thread Thomas J Powderly

Hi

are there any record/reports about the meet-up?

tomp



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


Re: [Emc-developers] Your comment editor for the forums sucks for posting commands

2022-12-01 Thread Thomas J Powderly

hahaha was that rhetorical or suppository? :-/

tomp

On 11/30/22 04:27, Alec Ari via Emc-developers wrote:

Subject


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



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


Re: [Emc-developers] LinuxCNC + LXRT (RTAI) results

2022-10-09 Thread Thomas J Powderly

Thx Alec

I was just prodding you, don't worry about it.

i don't know how to build using the info you posted

since my bench if full

I'll wait for a howto

( at best i found out that hansu was not Chinese :-)

tomp

On 10/9/22 2:30 PM, Alec Ari via Emc-developers wrote:

I can do more extensive testing. I wasn't sure what the problem was before that 
people were having but it at least runs for me.


Alec






On Sunday, October 9, 2022 at 12:08:51 AM CDT, Thomas J Powderly 
 wrote:





wow

but 61 secs?

from missouri

:-)

still impressive

tomp

On 10/9/22 11:32 AM, Alec Ari via Emc-developers wrote:

Note: Using LXRT realtime

Pic attached (not sure if mailing list accepts pictures, CC'ing to Bari to post 
on forums if necessary)

Alec


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

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


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



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


Re: [Emc-developers] LinuxCNC + LXRT (RTAI) results

2022-10-08 Thread Thomas J Powderly

wow

but 61 secs?

from missouri

:-)

still impressive

tomp

On 10/9/22 11:32 AM, Alec Ari via Emc-developers wrote:

Note: Using LXRT realtime

Pic attached (not sure if mailing list accepts pictures, CC'ing to Bari to post 
on forums if necessary)

Alec


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


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


Re: [Emc-developers] 2.8.4 install problems setting up network

2022-10-03 Thread Thomas J Powderly

EDIT:

both 2.8.2 and 2.8.4 iso's burned to sd (when running live)

find and use the Ethernet w/o problems, w/o keystrokes, w/o clicking.

just works!

Is there an Install method from the live desktop?


Would having the Ethernet working when 'Install' was commanded,

would that capture/remember how the device was set up?


thx tomp



On 10/3/22 12:34 PM, Thomas J Powderly wrote:
Ive been trying to install linuxcnc2.8.4 iso burned to sd card in usb 
shell



the (gui/tui either) install gets to
configuring network
and hangs
"Oct 3 04:44:46 dhclient6108] XMT: info-request on enp5s0, interval 
126520ms."

(theres many pages of this, it cranked all night )

and maybe of interest:
theres special HDT tools on boot menu
Hardware Detection Tools
and I thought i might see a hint in there
choosing PCI devices
i see
"The pci.ids file is missing
PCI device names cant be computed
Please put one in same dir as hdt.
---
unknown:unknown (repeated 24 times)

the ethernet device is listed as pci 3 when i use sudo lshw

"""

    *-pci:3
 description: PCI bridge
 product: 82801I (ICH9 Family) PCI Express Port 6
 vendor: Intel Corporation
 physical id: 1c.5
 bus info:pci@:00:1c.5
 version: 03
 width: 32 bits
 clock: 33MHz
 capabilities: pci pciexpress msi pm normal_decode
bus_master cap_list
 configuration: driver=pcieport
 resources: irq:16 ioport:8000(size=4096)
memory:ff10-ff1f ioport:fa90(size=1048576)
   *-network
    description: Ethernet interface
    product: RTL8111/8168/8411 PCI Express Gigabit
Ethernet Controller
    vendor: Realtek Semiconductor Co., Ltd.
    physical id: 0
    bus info:pci@:05:00.0
    logical name: enp5s0
    version: 03
    serial: e8:9d:87:dc:39:23
    size: 1Gbit/s
    capacity: 1Gbit/s
    width: 64 bits
    clock: 33MHz
    capabilities: pm msi pciexpress msix vpd bus_master
cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd
1000bt 1000bt-fd autonegotiation
    configuration: autonegotiation=on broadcast=yes
driver=r8169 driverversion=5.19.0-2-rt-amd64 duplex=full
firmware=rtl_nic/rtl8168d-1.fw ip=192.168.1.7 latency=0 link=yes
multicast=yes port=twisted pair speed=1Gbit/s
    resources: irq:17 ioport:8e00(size=256)
memory:fa9ff000-fa9f memory:fa9f8000-fa9fbfff
memory:ff1e-ff1f
"""
btw deb11xfce iso ran fine, no networking problems with ethernet 
connection.


it seems a catch 22 ,
as i read something has to be downloaded when installed
and the internet/network is broken.

what to do?

thanks
tomp




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


[Emc-developers] 2.8.4 install problems setting up network

2022-10-02 Thread Thomas J Powderly

Ive been trying to install linuxcnc2.8.4 iso burned to sd card in usb shell


the (gui/tui either) install gets to
configuring network
and hangs
"Oct 3 04:44:46 dhclient6108] XMT: info-request on enp5s0, interval 
126520ms."

(theres many pages of this, it cranked all night )

and maybe of interest:
theres special HDT tools on boot menu
Hardware Detection Tools
and I thought i might see a hint in there
choosing PCI devices
i see
"The pci.ids file is missing
PCI device names cant be computed
Please put one in same dir as hdt.
---
unknown:unknown (repeated 24 times)

the ethernet device is listed as pci 3 when i use sudo lshw

"""

*-pci:3
 description: PCI bridge
 product: 82801I (ICH9 Family) PCI Express Port 6
 vendor: Intel Corporation
 physical id: 1c.5
 bus info:pci@:00:1c.5
 version: 03
 width: 32 bits
 clock: 33MHz
 capabilities: pci pciexpress msi pm normal_decode
bus_master cap_list
 configuration: driver=pcieport
 resources: irq:16 ioport:8000(size=4096)
memory:ff10-ff1f ioport:fa90(size=1048576)
   *-network
description: Ethernet interface
product: RTL8111/8168/8411 PCI Express Gigabit
Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info:pci@:05:00.0
logical name: enp5s0
version: 03
serial: e8:9d:87:dc:39:23
size: 1Gbit/s
capacity: 1Gbit/s
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master
cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd
1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes
driver=r8169 driverversion=5.19.0-2-rt-amd64 duplex=full
firmware=rtl_nic/rtl8168d-1.fw ip=192.168.1.7 latency=0 link=yes
multicast=yes port=twisted pair speed=1Gbit/s
resources: irq:17 ioport:8e00(size=256)
memory:fa9ff000-fa9f memory:fa9f8000-fa9fbfff
memory:ff1e-ff1f
"""
btw deb11xfce iso ran fine, no networking problems with ethernet connection.

it seems a catch 22 ,
as i read something has to be downloaded when installed
and the internet/network is broken.

what to do?

thanks
tomp



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


[Emc-developers] 2.8.4 md5sum

2022-10-02 Thread Thomas J Powderly

please edit
http://linuxcnc.org/docs/html/getting-started/getting-linuxcnc.html
to reflect correct md5sum of file
http://www.linuxcnc.org/iso/linuxcnc-2.8.4-buster.iso
to read like this
jjf@f1:/CD-DVD/Linux/EMC$ md5sum linuxcnc-2.8.4-buster.iso
8a6e6abd2c792c3e06fbee0ed049ed41  linuxcnc-2.8.4-buster.iso
thanks tomp



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


Re: [Emc-developers] RTAI build broken on Debian?

2022-09-09 Thread Thomas J Powderly

Thanks for all this work

tomp

On 9/10/22 7:37 AM, Alec Ari via Emc-developers wrote:

Just wanted to let everyone know that this is now fixed. RTAI on Debian 
Bullseye/11 will be pretty easy now.

Alec


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



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


Re: [Emc-developers] sudo make setuid -> cannot gain I/O privileges

2022-07-24 Thread Thomas J Powderly

Hi Alec, understood ( forgetabout ARM RTAI)


I can put Gentoo on an unused partition of my AMD box

becuz its more inmyface and would get more attention


Good to hear the permissions problem is fixed & understood.


thanks again

tomp




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


Re: [Emc-developers] sudo make setuid -> cannot gain I/O privileges

2022-07-24 Thread Thomas J Powderly

Hi Alec

I am trying to follow your work...

I think it is to make an RTAI for LinuxCNC to work in, with a better 
environment/system than Debian/Ubuntu.


correct so far?

I think your custom kernel is built on

5.18.2-1~bpo11+1

which I could try on this box ( Pentium(R) Dual-Core  CPU  E6300  @ 2.80GHz)

using kernel from package linux-image-5.18.0-0.bpo.1-amd64.

correct?

(maybe this box is a poor/weak environment but it's what i gots )


I hope the result could move to opi/rpi/bbb in future.

I see Gentoo wiki sez all 3 are possible.

My aim is stepper based LinuxCNC using native hardware.
(yeah, thats vague but I'll know it when I taste it)

Anyways

thanks for all the fish

tomp



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


Re: [Emc-developers] Over-enthusiastic translation

2021-10-14 Thread Thomas J Powderly

Hi Andy

like the paper that comes with any appliance, all folded up,

with chinese english japanese french spanish german italian ?

Is that a benefit to handling the docs ? ( single doc multi language )

tomp

On 10/14/21 6:38 AM, andy pugh wrote:

This file: 
https://github.com/LinuxCNC/linuxcnc/blob/2.7-buster/docs/rtfaults.txt
Is now: https://github.com/LinuxCNC/linuxcnc/blob/2.8/docs/rtfaults.txt

Now, I am not going to say that any one language has precedence over
another, but in that case perhaps both versions could be in the same
file. It's a file that is important to no more than dozens of folk,
only those writing realtime modules.




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


[Emc-developers] 3D print graphite 97% pure Rice Uni.

2021-06-24 Thread Thomas J Powderly

Alec, hello

This maybe of interest...

https://3dprintingindustry.com/news/scientists-successful-in-3d-printing-complex-graphite-parts-with-97-purity-191867/

and

https://arxiv.org/pdf/2012.00995.pdf

maybe useful for micro edm, esp with ability to make multiple copies

but filters and lubrication are also applications

tomp




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


[Emc-developers] 43" kiosk touch screen

2021-06-19 Thread Thomas J Powderly

today my freezer died and i had to replace it.

The store where I do business had several kiosks on the floor

no brand name but a sticker showed

Model US-TH430PLS

which is easily googled.

The salesman was using swipes and multi touch zooms to navigate

Its as tall as me (6'4" American.

Super thin with slight;y thicker lower section which seems to house 
computer.


It had wifi and networking.

It just begged to become a cnc front end.

May not really be a candidate but this is just a heads up to say thingys 
like this are coming and already almost affordable.


Alibaba is talking 800 to 600 USD prices in onesies.

just FYI

tomp

https://www.alibaba.com/product-detail/43-inch-lcd-advertising-media-player_880773405.html




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


Re: [Emc-developers] esp32 stepgen

2021-05-02 Thread Thomas J Powderly

Hi Gene

On 5/1/21 8:32 PM, Gene Heskett wrote:


On Saturday 01 May 2021 09:12:41 Thomas J Powderly wrote:


Hello
here is an esp32 stepgen for linuxcnc

this snuck under my radar, i missed it by a few months

it maybe of use

The example setup was

laptop > eth > w5500 module > esp32 > stepper drives > stepper motors

the video shows the linuxCNC logo running and a single closed loop
stepper

https://www.youtube.com/watch?v=_Goi4YVU0js

the github has the code

https://github.com/Deotti-cl/linuxcnc-esp32

i haven't looked hard yet

but i think the comms are really spi

and so it might hookup to a pi with a very short cable.

tomp


Looking at the driver, no, its udp over ethernet.


you have to how he solved his problem.

He used udp, true, but the info flows from a laptop to an ethernet port to a 
w5500

which connects to the esp32 thru spi.

So the ethernet and udp is not needed if a raspberry pi replaces his laptop,

and spi is used to the esp32.

Yes his driver uses udp, and his hdwr converts the packets to spi.

I think the system can be simplified with a new driver.


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


Cheers, Gene Heskett


on another note:

MXMaster has re-written the arisc driver (stepgen) for orangepi

I am running it now with great video, AXIS, and 6meters/minute,

And I have just gotten (same as  you) the servo-steppers

"""

Three-phase 57 Series LC57H380+LCDA357H nema 23 closed loop stepper motor and 
drive

"""

They were a great deal off alibaba at 50 bucks each with 21$ shipping each.

So, I can bench test these crazy fast steprates.
  


take care & stay safe

tomp


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


[Emc-developers] esp32 stepgen

2021-05-01 Thread Thomas J Powderly

Hello
here is an esp32 stepgen for linuxcnc

this snuck under my radar, i missed it by a few months

it maybe of use

The example setup was

laptop > eth > w5500 module > esp32 > stepper drives > stepper motors

the video shows the linuxCNC logo running and a single closed loop stepper

https://www.youtube.com/watch?v=_Goi4YVU0js

the github has the code

https://github.com/Deotti-cl/linuxcnc-esp32

i haven't looked hard yet

but i think the comms are really spi

and so it might hookup to a pi with a very short cable.

tomp


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


Re: [Emc-developers] chart of arrays

2021-04-28 Thread Thomas J Powderly

Hello Stuart

Crystal Flow and Crystal Revs do look good.

There's a free trial, could you exercise it?


How could it be used by the Linuxcnc Programmers as a group?

I'd gladly put a 100$ in the pot if it make a tool that demystified the 
hairball of emc.


Tho, I cant see what would be purchased, given the pages of variants.


Hello devs, please discuss if you want this.


Maybe

if it is wanted

then someone who understands these legalities and needs

might contact SVGSARC and ask

how can an open source non-commercial group could use it?

( a cloud based graph server?)


also please look at

egypt        http://www.gson.org/egypt/

SourceTrail https://github.com/CoatiSoftware/Sourcetrail/releases

codeviz https://github.com/petersenna/codeviz


the yearning for a c/c++ visualization reminds me of the hal attempts  
(geda eagle rockhopper  ;-)



tomp



On 4/29/21 9:20 AM, Stuart Stevenson wrote:

This looks like what I (think) I want. It is not free but not terribly
expensive if it is usable on this project.

https://www.sgvsarc.com/demo.htm

thanks
Stuart


On Wed, Apr 28, 2021 at 3:39 PM Matt Shaver  wrote:


On Wed, 28 Apr 2021 10:19:21 -0500
Jon Elson  wrote:


This would be a great tool, maybe somebody has written such
a tool.

  I haven't looked in a long time, but before 'egypt' was about the
  closest thing I ever saw. But a long time has passed...

Thanks,
Matt


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






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


Re: [Emc-developers] newest iso install, sshfs can't connect

2021-04-18 Thread Thomas J Powderly

Hi Gene

On 4/18/21 7:51 PM, Gene Heskett wrote:

On Sunday 18 April 2021 06:13:38 you wrote:

I put this on the dev list too, just in case someone knows the reason.
This is the second time it bit me

Hi Gene

it worked here as user tomp connecting to user pi on raspberry pi 4

i have kdoren's 5.10 kernel


Where can I get that? My 4.19-rt yadda kernel I built a year ago, stopped
supporting screens greater than 1366x768 about 90 days back, no clues
anyplace in the logs. As far as Xorg.0.log is concerned its running a
1920x1080 screen but thats not what I'm getting. Looks fuggly.


goto

https://github.com/kdoren/linux/releases

near nottom of page is a link 
"linux-image-5.10.25-rt35-v7l+_5.10.25-1_armhf.deb 
"


rt clk, save as, then ...

scroll to "To install from deb packages, as root:"

and follow instructions


i never used sshfs before

Beats any version of NSF like a white mouthed mule, TomP.  When it works,
it always works, where NSF, CIFS, etc always seem to flip a coin to see
if they are going to work today.


yes its very nice, like a file server w/o all the mess

but i have to remember to mount ny archive 4T on the system that i sshfs 
'to'



and failed 1st time whenb i used 'sudo sshfs pi@192.168.1.5'

yeh, better

sshfs pi@192.168.1.5: nameofmountpoint


Thats an incomplete command line in several ways.

My script that mounts those that work:
#!/bin/bash
# usr and path to mount /mount/point
sshfs gene@sixty40://sshnet/sixty40
sshfs gene@lathe:/  /sshnet/lathe
sshfs gene@GO704:/  /sshnet/GO704
sshfs pi@rpi4:/ /sshnet/rpi4
sshfs gene@TLM://sshnet/TLM
#sshfs gene@3dprint://sshnet/3dprint
sshfs gene@dddprint:/   /sshnet/dddprint

But I think I recall why, just haven't had enough coffee to go fix it
yet.

I recall I wasn't able to make sixty40 work when it was named 6040.
Something apparently doesn't like hostnames starting with a nummber.
I'll rename it dddprint. Thats 3d's isn't it? ;o)

I went to it, changed its hostname in tghat file and address in the e/n/i
file & fixed the /etc/hosts file on both ends of the cable. rebooted it.

Came back to this machine and fixed the script by adding the last line
and creating that mountpoint. Works as requested.  It works as dddprint,
but doesn't as 3dprint.  I think I'll ask debian if there is a valid
reason.  Anyway, problem solved!

Point to remember, do NOT start a hostname with a number.

Thanks TomP. Take care and stay well now.

Cheers, Gene Heskett

tomp

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


Re: [Emc-developers] Distance-coded scales.

2021-04-16 Thread Thomas J Powderly

For people not familiar with this linear scale 'trick'

https://resources.renishaw.com/download.aspx?lang=en=49228=1


My old company used Heidenhain LSNNNc scales because the 2 to 5 meter 
travelss with top speeds of 1 meter per minute made homing tedious.


I remember the marks were every cm so homing (referencing) could be done 
quickly anywhere in the work volume.


I forget how the data was stored on the scalem , and  how it was read.


This was very handy on big machines,

because you were always less than 2cm from restoring reference.


tomp




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


[Emc-developers] software stepgen

2021-04-09 Thread Thomas J Powderly

I have been studying the stepgen.c code.

I intend to implement it for the orange pi arisc especially, but rpi and 
bpi and bbb and ilk not so specificly.


Anyway I see some interesting things in the code.

It allows for the steplen and stepspace and dirhold and dirsetup to change.

"""

    if ( stepgen->step_len != stepgen->old_step_len ) {

...

    if ( stepgen->step_space != stepgen->old_step_space ) {

...

    if ( stepgen->dir_setup != stepgen->old_dir_setup ) {

...

    if ( stepgen->dir_hold_dly != stepgen->old_dir_hold_dly ) {

"""

Has that ever been tested?

How? I suppose in a halcmd scenario...

I didnt think those elements were r/w..

just checked, yes they are r/w!

Even the scale can be changed,

"""

    if (stepgen->pos_scale != stepgen->old_scale) {

"""

Was there thought of gear shifting transmissions for stepper motors?

And the thread period can be changed

"""

if (periodns != old_periodns) {

"""

Was the r/w attribute for these params used in some tuning software? All 
these tests are performed every thread period.


Leave in or strip out?

tomp


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


Re: [Emc-developers] Beagle Bone / PRU support ?

2021-04-02 Thread Thomas J Powderly

Thx andy, Mr Nelson has done a lot of work on this.

but I see last entries dated mid May 2020.

So, not really old, but not the every 2 week images that were the norm.

see:

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#BBW.2FBBB_.28All_Revs.29_Machinekit


this tidbit maybe of interest

"""The 3.8 kernel version image is recommended as a starting point.
bone-debian-8.7-machinekit-armhf-2017-02-12-4gb.img.xz
This uses a xenomai kernel and is pretty much guaranteed to work without 
any adjustment of configs etc.


""" there are newer non-xenomai at the above url


Yet, for all the interest in BBx and the poor video of same,

I never saw the holy grail that seperates gui and rt-control.

did I miss it?


In any case, thanks to Michael, Charles, Robert and MXmaster, all who 
worked hard for cnc for the masses.



thx

tomp

On 4/1/21 9:51 PM, Jon Elson wrote:

Beagle Bone, Robert C. Nelson



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


Re: [Emc-developers] Another itch I'd like tp scratch.

2021-02-26 Thread Thomas J Powderly

Hi Gene

wouldn't it be easier to control the power to the camera,

rather than the  power to the usb port?


Like a simple relay interupting the 5V out, controlled by hal and a gpio 
pin?



Like a dongle between the camera's plug and the usb port?

tomp

On 2/26/21 1:57 PM, Gene Heskett wrote:

Greetings all;

Is it possible to identify the usb port this new camera is plugged into
on this newer Dell, and hook it up somehow in hal, or pyvcp, to turn
port power to just that usb socket off if motion is not enabled?

Thanks for any good hints.

Cheers, Gene Heskett



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


Re: [Emc-developers] rpi 5.10 rt preempt

2021-02-23 Thread Thomas J Powderly

Hi Andy


On 2/23/21 6:59 PM, andy pugh wrote:

On Tue, 23 Feb 2021 at 09:42, Thomas J Powderly  wrote:

is the kernel img in the vmlinuz or zImage file?

The useful test is the deb


It doesnt seem very useful to me

I used   sudo dpkg -i on the 3 debs

onto a fresh sd image using "image_2021-01-20-linuxcnc-pi4-3G"

and the instructions at 
https://github.com/kdoren/linux/releases/tag/5.10.16-rt30


fails

it drops into busybox when booted

the errors are

"raspberrypi-firmware:soc:firmware gpio failed to get GPIO 0"

repeated for GPIO 0 thru 7

ymmv

TomP



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


Re: [Emc-developers] rpi 5.10 rt preempt

2021-02-23 Thread Thomas J Powderly

is the kernel img in the vmlinuz or zImage file?

agh!

i discounted that as its 1.7meg vs the 6.8meg i had previously booted with.

argh++

tomp



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


Re: [Emc-developers] rpi 5.10 rt preempt

2021-02-22 Thread Thomas J Powderly
RPi rt5.10 builds ok (on the rpi4) and is running latency-histogram 
--base 8 --servo 100 now


( in my tests for stepper cfgs those parms seem to work reliably for days )


Long story short, build had no problems,

but at end when i wanted to copy the new kernel7l-blah.img to /boot

I couldnt find it


I searched entire fs for it using different tools, no joy, no file near 
the 6.8Meg of kdoren's .img...


so, i just got the tgz of kdorens pre-compiled files nad installed that.


The kernel booted fine with usb and mouse and keyboard support and with 
no reduction of my 4g mem.


ooh just noticed 300+ fps w 4 glx gears :-)

tomp


On 2/21/21 9:18 PM, Thomas J Powderly wrote:

maybe of interest

https://github.com/kdoren/linux

NB: wear fireproof pants

tomp





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


[Emc-developers] rpi 5.10 rt preempt

2021-02-21 Thread Thomas J Powderly

maybe of interest

https://github.com/kdoren/linux

NB: wear fireproof pants

tomp




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


[Emc-developers] hal_pi_gpio man page

2021-02-16 Thread Thomas J Powderly

The hal_pi_gpio component seems to be beta stage
meaning I don't see anything wrong.
When I programmed full-time this was when I had to hand it over to 
others to peer.


Where do I look for howto write a man page?

About the comp -
Written in old-school c
For rpi's only
( so far anyway, the scheme is flexible for similar, opi bpi maybe bbb 
bbw bbg )


It's real-time ( well it starts with  loadrt under userspace linuxcnc 
tested on rpi33 )

It only needs 1 thread and has re-settable pins
( and has a setp'able param reset_time ,
  set in integer of nS units (up to 1/4 thread period))
It has inputs and in-nots
It has outputs and out-inverts and out-resets
It uses a man readable config format ( a teeny language to describe each 
pin , see end of msg)

It reads switches and blinks leds
( an old boss assured me more blinky lights was a good thing )

I can send a copy to anyone wanting to try, hell its text, see attachment.

How to build in a rip installation:-
I compile it by backing up the hal_pi_gpio.c in my rip directory
  ~/linuxcnc-dev/src/hal/drivers/hal_pi_gpio.c  (move to another dir, 
don't just rename it)
then copying my file into there using the same name as the pi gpio.c 
file that was there before.


Then touch it (to insure it is changed so make will notice and rebuild it )
 type   touch hal_pi_gpio.c   in the src/hal.driver dir

Then make modules   from the ~/linuxcnc/src   dir
(this trickery is due to the .c file
 needing other .c files in that dir,
 and a simple gcc command is beyond my ken )
I get no errors no notes no warnings, its a clean make here

Once it makes, you use it with halrun like this

halrun
loadrt hal_pi_gpio pi_pins={03,<,+,x}{05,>,1,Y}{07,>,0,}{40,>,1,Y}
loadrt threads name1=slow period1=15
addf hal_pi_gpio.read slow
add hal_pi_gpio.write slow
addf hal_pi_gpio.reset slow
setp hal_pi_gpio.reset_time 3 (easier to see than my 2000)
start


Then use show pin and show param to watch things work
(and halmeter and halscope too)

You'll need a scope to catch the reset pins.

They change inside one thread period so halscope cant see 'em.

Hook up a bread board and switches and leds ( 3.3V i/o here!!)

( as simple as hooking up an output to an input will show you something )

About the pi_pins config 
line--

It's simple but strict rules
Each pin is described by a 'quad' ( a 4 param thingy )
Each quad has the format _like_
{03,>,0,N}
This describes the rpi header pin#3
 and is an output ( the '>' is used for out )
 and has an initial power on value of 0 ( zero )
 and does NOT have a reset feature
{05,>,1,Y}
    describes header pin 5
    which is an output '>'
    and has intial value of 1
    and has the reset feature ( requires set hal_pi_gpio.reset_time 
2000 for 2us example)

{07,<,+,x}
    describes header pin 7
    which is an input
    and has an in-not pin due to '+'
    and the last param is meaningless, tested lightly with a few single 
chars in that place

{12,<,-,x}
   describes header pin 12
   which is an input
   and does not get an in-not pin , due to '-'
   and last parm is meaningless


hokay
I am sure i didn't write near 1000 lines w/o mistakes
lemmeno
tomp

/
* 15feb2021 
* compiles clean  no errs not notes no warnings 
* 
* resets seems to work need scope trap to be sure
*  scope can see 2uS pulse on step pins but halscope cannot
* 
* i now have a param hal_pi_gpio.reset_time  and i can setp it 
* ( halrun show param shows in hex but ok its alive)
* TODO i can setp it but i suppose a default is good ideA
* 
*/
#include "rtapi.h"		/* RTAPI realtime OS API */
#include "rtapi_bitops.h"
#include "rtapi_app.h"		/* RTAPI realtime module decls */
/* this also includes config.h */
#include "hal.h"		/* HAL public API decls */
#include "bcm2835.h"
#include "cpuinfo.h"

#define BCM2708_PERI_BASE   0x2000
#define BCM2708_GPIO_BASE   (BCM2708_PERI_BASE + 0x20)
#define BCM2709_PERI_BASE   0x3F00
#define BCM2709_GPIO_BASE   (BCM2709_PERI_BASE + 0x20)

//#define RTAPI
#define RTAPI_BIT(nr)   (1UL << (nr))

#include 
#include 
#include 
#include/* for printf key chars*/
#include 
#include 
#include 
#include 
#include 
#include 


/*---*/
/*--beg-new arrays --*/
// i use an array witj entries for npiuns+1  0 thru and includiong npins   like 0thru26 for old pi's and 0thru41 for 'new'er pis
 these  arrays can be used to lookup gpionum for rpi2 using hdrpinnum as index, a value of 0 means the pin is NOT available for gpio
// Rev 1 Raspberry:  only 26 hdr pins for rpi rev2
static unsigned char nurev1_gpios[] = 
  {0, 0, 0, 0, 0, 1, 0, 4,14, 0,15,17,18,21, 

Re: [Emc-developers] hal_pi_gpio config string

2021-02-09 Thread Thomas J Powderly

Hi Andy,


On 2/9/21 9:35 PM, andy pugh wrote:

On Tue, 9 Feb 2021 at 13:28, Thomas J Powderly  wrote:


loadrt hal_pi_gpio pi_pins={,,,}{,,,}{,,,}
each 'quad' consists of braces enclosed data

I think that the modparam handling struggles with embedded commas
inside a single element.

I would suggest:

loadrt hal_gpio config=12or0,1i,23i,...


 compared to...

  loadrt hal_gpio config={03,>,0,Y}(05,>,0,Y}

wellm I can pick out each pin description easily

and < and > are handy for in and out


the stilted format is dumb but works

I have no problem with the commas or braces

its all hardcoded  cp += sizeof(blah)


ie, don't force the format too hard, but work on leading numbers

leading numbers?

specify a header number,


I use pin header numbers, thats the first 2 chars inside the left brace

the user talks about number he has in his hands ( not wiring pi or gpio 
or BCM numbers)



  other code letters (in any order) modify the
behaviour.


the user can input the 'quads' in any order

CAVEAT: i do take the last definition found for a pin though,

  so a whole page of quads redefining the same pin only makes one pin ( 
with the last quad)



Maybe R for reset high and r for reset low?


hmm thats 2 ideas in 1 char...  idea 1= I want a reset pin and   idea 2 
=  the value i want it to reset to


the current scheme allows seperation of the 2 ideas

so the pin can have an 'initial' value but not neccesarily have a reset 
function


IF the pin has the reset feature then the 'initial' value becomes the 
value AFTER the reset too.


The user may want an intial conditon without having the reset feature.

I'm thinking devices that need a high or low when first powered on.


FWIW a parser like this exists in mux_generic.
https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/mux_generic.c#L105
(note how each successive digit multiples the current number
(initially 0) by 10, and adds the new value, so 1, 01, 001 all mean 1)


uhm, i can look at it, ( thats several days usually ;-)

because i first re indent it

then comment it a lot

then write several test pgms trying the ideas found...

( I have several commented drivers here now, esp the very hairy 
hal_parport, did you see the size of that structure?)


I think the existing parsing is really minimal because it is so strict

( my notes reiterate my old ideas of "user-hostile interfaces" (TM tjp))

BTW i have invert pins working now


Thx Andy

TomP



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


[Emc-developers] hal_pi_gpio config string

2021-02-09 Thread Thomas J Powderly

I have been working on a new version of hal_pi_gpio.
It uses an array of structures to hold the features for each pin.
struct pinfo
{
    hal_bit_t pval;    // the last read value for inputs, the 
desired output value for outputs

    char pnum;   // the rpi header pin number
    char gpionum;  // the gpio number for said pin number
    hal_bit_t pdir;    // input or output
    hal_bit_t pinv;   // wether inverted pin is wanted ( inputs only )
    hal_bit_t pres;  // wether reset feature is wanted (outputs only )
};
I have not implemented the invert or reset pins yet,
but want opinion on a single big change..
the change is about how you enter the config string.
The format I propose is simple:
the config string is a list of 'quad's as follows:
loadrt hal_pi_gpio pi_pins={,,,}{,,,}{,,,}
each 'quad' consists of braces enclosed data
 1st  pnum  a 2 char string representing the rpi header pin number.
 2nd is '>' or '<' representing input or output
 3rd depends on input or output
   if input '+' or '-' declare an inverted pin is wanted or not
   if output 0 or 1 declare the initial state , and the state returned 
to if 'reset' feature is designed

 4th also depends on input or output
   if input, this 4th fiel;d is not used, i suggest 'x' used to fill 
the need for a single ignored char
   if output, the 4th field is 'Y' or 'N' declaring the reset feature 
is wanted or not
This way of describing the config string is more intuitive that the 
current method

eg: dir=78855 exclude=32918520

So, what is the opinion about the config string format?

example run---
pi@raspberrypi:~/linuxcnc-dev/src $ halrun
halcmd: loadrt hal_pi_gpio pi_pins={03,>.0.Y}{05,>,0,Y}\
halcmd+: {07,>,0,Y}{11,<,+,x}{12,<,+,x}\
halcmd+: {13,<.+,x}{15,>,1,N}{16,>,1,N}\
halcmd+: {18,>,1,N}{19,>,1,N}{21,>,1,N}
Note: Using POSIX realtime
halcmd: show pin
Component Pins:
Owner   Type  Dir Value  Name
 4  bit   IN  FALSE  hal_pi_gpio.pin-03-out
 4  bit   IN  FALSE  hal_pi_gpio.pin-05-out
 4  bit   IN  FALSE  hal_pi_gpio.pin-07-out
 4  bit   OUT FALSE  hal_pi_gpio.pin-11-in
 4  bit   OUT FALSE  hal_pi_gpio.pin-12-in
 4  bit   OUT FALSE  hal_pi_gpio.pin-13-in
 4  bit   IN  FALSE  hal_pi_gpio.pin-15-out
 4  bit   IN  FALSE  hal_pi_gpio.pin-16-out
 4  bit   IN  FALSE  hal_pi_gpio.pin-18-out
 4  bit   IN  FALSE  hal_pi_gpio.pin-19-out
 4  bit   IN  FALSE  hal_pi_gpio.pin-21-out
 4  s32   OUT 0  hal_pi_gpio.read.time
 4  s32   OUT 0  hal_pi_gpio.write.time

halcmd: setp hal_pi_gpio.pin-21-out 1
halcmd: setp hal_pi_gpio.pin-15-out 1
halcmd: show pin
Component Pins:
Owner   Type  Dir Value  Name
 4  bit   IN  FALSE  hal_pi_gpio.pin-03-out
 4  bit   IN  FALSE  hal_pi_gpio.pin-05-out
 4  bit   IN  FALSE  hal_pi_gpio.pin-07-out
 4  bit   OUT FALSE  hal_pi_gpio.pin-11-in
 4  bit   OUT FALSE  hal_pi_gpio.pin-12-in
 4  bit   OUT FALSE  hal_pi_gpio.pin-13-in
 4  bit   IN   TRUE  hal_pi_gpio.pin-15-out
 4  bit   IN  FALSE  hal_pi_gpio.pin-16-out
 4  bit   IN  FALSE  hal_pi_gpio.pin-18-out
 4  bit   IN  FALSE  hal_pi_gpio.pin-19-out
 4  bit   IN   TRUE  hal_pi_gpio.pin-21-out
 4  s32   OUT 0  hal_pi_gpio.read.time
 4  s32   OUT 0  hal_pi_gpio.write.time

halcmd:

thx
tomp



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


[Emc-developers] Fwd: Withdraw Pi support?

2021-01-19 Thread Thomas J Powderly

Update to RPi4 linuxcnc built on buster-lite, choked to 3Gig memory.


4 times now I have run a loop of 3Dchips ( o-word loop of 100 iterations )

Each time, after the program ended,

I got UnexpectedRealTimeDelay

Not immediately but within a few minutes of sitting idle.

Nothing else is running.


The last time I watched it, there was no UXRTdelay for about 5 minutes

and it seemed different.

Then a dialog showing progress of some upgrade

( I never granted auto-upgrades )

then a reboot occured

and when I signed in,

I notice a small noise from the HDMI tv monitor


Something had turned on speech-dispatcher


I killed all the espeak amd speechd and orca processes ( sudo killall blah )

Then used synaptic to find all related packages and removed them.


I tried to find why any autoupgrade occurred but see nothing in 
/var/log/syslog that suggests what was just installed


( the progress bar for the upgrade ran for about 2 minutes , so it had 
time enuf )



I have NO idea why this happened,

I'm not looking for conspiracy theories, but I'm putting up a small flag 
noting this occurred.



Also I am pulling back on the 'PI4 is a useful stepper platform',

I'm agin it for now,

and retreating to my Pi3B on OPipluse2e's


TomP



Sorry Matt for posting to you instead of list
 Forwarded Message 
Subject:Re: [Emc-developers] Withdraw Pi support?
Date:   Tue, 19 Jan 2021 21:37:00 +0700
From:   Thomas J Powderly 
To: Matt Shaver 



I just built (19jan2021) on an RPi4 4G

beginning with a raspian server

http://ftp.jaist.ac.jp/pub/raspberrypi/raspbian_lite/images/raspbian_lite-2020-02-14/2020-02-13-raspbian-buster-lite.zip 
<http://ftp.jaist.ac.jp/pub/raspberrypi/raspbian_lite/images/raspbian_lite-2020-02-14/2020-02-13-raspbian-buster-lite.zip>


adding RPD desktop(lxde)

https://www.raspberrypi.org/forums/viewtopic.php?t=133691

the adding the debs according to

http://linuxcnc.org/docs/2.8/html/getting-started/getting-linuxcnc.html#_installing_on_raspbian_10


and it ran latency histogram --base 75000 --servo 100 with 4 
glxgears for 3 hrs 20 min


base -40 +37  servo -50 +50


I edited for  isocpus=1,2,3 idle=poll, and total_mem=3072 (for usb),    
and made no changes to video



Then I changed the testing to: running Linuxcnc, looking for UXRTdelays,

using a looped 3Dchips ( runs 100 times, printing out a debug count each 
pass )


runs well so far , Ill let it cook overnight.


I ran all the updates and upgrades in those instructions,

and I'd guess that'd obliterate the initial setup.

so I dont know why this works better


I'm just saying the Pi4 will work ok for stepper systems with largish 
steps (.0005" or my .0075mm)


( I get .6 steps per second and dont have reset pins, so no 
doublestep )



I belive the Pi team will fix the usb memory size issue

Its neccesary for them to fix, or eat a lot of merchandise.


thx

TomP


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


[Emc-developers] RRPi3B revision fail

2021-01-14 Thread Thomas J Powderly

Hello

I just built Buster and preempt and linuxcnc on an RPi3B ( not B+)

I could not loadrt hal_pi_gpio.

I got error Unrecognized revision.

I see there is an error in code to identify revision.

The file cpuinfo.c searches for the text "Raspberry" in the file 
/proc/cpuinfo.


It doesnt exist for my RPi3B

(the output of   cat /proc/cpuinfo  is attached )

So I hacked the cpuinfo.c

:::--code

   int  rpi_found = 0;

   if ((fp = fopen("/proc/cpuinfo", "r")) == NULL)
  return 0;

   while(!feof(fp)) {
  if (fgets(buffer, sizeof(buffer) , fp)){
  sscanf(buffer, "Model   : %s", model);
  if (strncmp(model, "Raspberry",9) == 0)
 rpi_found = 1;
  sscanf(buffer, "Revision  : %s", revision);
  }
   }
   fclose(fp);

   /* force value so module loads */
   /* the text Raspberry never appears in my 3B /proc/cpuinfo so 
rpi_found stays FALSE and module wont load */

   rpi_found=1;
  /* end force  */

:::--- end code

after the hack, and   make modules,  I can load the module and use the pins

:::

halrun

loadrt hal_pi_gpio dir=78855 exclude=32918520

show pin

:::

The validation code must be changed

but we may need many /proc/cpuinfo dumos for all the different Rpi models

thx

TomP

/*
Copyright (c) 2012 Ben Croston

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

#include 
#include 

char *get_cpuinfo_revision(char *revision)
{
   FILE *fp;
   char buffer[1024];
   char model[1024];
   int  rpi_found = 0;

   if ((fp = fopen("/proc/cpuinfo", "r")) == NULL)
  return 0;

   while(!feof(fp)) {
  if (fgets(buffer, sizeof(buffer) , fp)){
  sscanf(buffer, "Model   : %s", model);
  if (strncmp(model, "Raspberry",9) == 0)
 rpi_found = 1;
  sscanf(buffer, "Revision  : %s", revision);
  }
   }
   fclose(fp);

   /* force value so module loads */
   /* the text Raspberry never appears in my 3B /proc/cpuinfo   so rpi_found stays FALSE and module wont load */
   rpi_found=1;
  /* end force  */

   if (!rpi_found)
  revision = NULL;
   return revision;
}


int get_rpi_revision(void)
{
   char revision[1024] = {'\0'};

   if (get_cpuinfo_revision(revision) == NULL)
   return -1;

   if ((strcmp(revision, "0002") == 0) ||
   (strcmp(revision, "102") == 0 ) ||
   (strcmp(revision, "0003") == 0) ||
   (strcmp(revision, "103") == 0 ))
  return 1;
   else if ((strcmp(revision, "0004") == 0) ||
(strcmp(revision, "104") == 0 ) ||
(strcmp(revision, "0005") == 0) ||
(strcmp(revision, "105") == 0 ) ||
(strcmp(revision, "0006") == 0) ||
(strcmp(revision, "106") == 0 ))
  return 2;
   else if ((strcmp(revision, "a01041") == 0) ||
(strcmp(revision, "a21041") == 0) ||
(strcmp(revision, "a22042") == 0))
  return 3;
   else if ((strcmp(revision, "a22082") == 0) ||
(strcmp(revision, "a02082") == 0) ||
(strcmp(revision, "a32082") == 0) ||
(strcmp(revision, "a020d3") == 0))
  return 4;
   else if ((strcmp(revision, "a03111") == 0) ||
(strcmp(revision, "b03111") == 0) ||
(strcmp(revision, "b03112") == 0) ||
(strcmp(revision, "c03111") == 0) ||
(strcmp(revision, "c03112") == 0) ||
(strcmp(revision, "d03114") == 0))
  return 5;
   else // assume rev 6
  return 6;
}
processor   : 0
model name  : ARMv7 Processor rev 4 (v7l)
BogoMIPS: 38.40
Features: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
vfpd32 lpae evtstrm crc32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part: 0xd03
CPU revision: 4

processor   : 1
model name  : ARMv7 Processor rev 4 (v7l)
BogoMIPS: 38.40
Features: half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt 
vfpd32 lpae evtstrm crc32 
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part: 0xd03
CPU 

[Emc-developers] RPi users LCNC

2020-11-26 Thread Thomas J Powderly

For Gene and others interested in RPi for LCNC

https://www.youtube.com/watch?v=qL530kJUmII

TomP



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


[Emc-developers] spindle speed hall sensor magnet

2020-11-06 Thread Thomas J Powderly
I'm having trouble securing a magnet onto a trim router spindle shaft 
for hall sensor rpm.


I tried a 3m 2 part glue and a loctite kneadble epoxy putty,

both blew up as i approached the 35000 rpm of the trim router.

The control scheme works ( arduino with pid, pyvcp speed set and rpm 
meter, zero cross detector opto triac ... )


Does anyone have suggestion for securing the magnet on the shaft?

Is glue a solution?

This is all manual work, no machine available.

Magnet is 5mm dia x 3mm high neodynium on a 10 mm shaft, between end 
bearing and brush.


tia

thx tomp




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


[Emc-developers] Gecko_540B4 config missing 4th axis

2020-07-28 Thread Thomas J Powderly

Hello

the config files for

.../configs/by_interface/parport/gecko/Gecko_540B4/

are not 4 axis, but should be (xyza )


I was looking for how the old reprap stuff managed to use an axis or joint

to feed material according to linear travel,

without twisting the path off the workplane.

( which happens if A axis is used ).

eg: a ring gear on XY plane twisted into a ZX hairy toroid


tomp



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


Re: [Emc-developers] 2.8 Situation

2020-06-10 Thread Thomas J Powderly

Thanks Alec, I know its hard work and your work _is_ appreciated

tomp

On 6/10/20 2:56 AM, Alec Ari via Emc-developers wrote:

I want what I want because I'm five and I want it now. I spent 6 years working 
my ass off on RTAI and none of you could give a fuck less.


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



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


Re: [Emc-developers] Third-Party GUIs.

2020-05-02 Thread Thomas J Powderly

re the original post:



From: andy pugh 
Sent: May 1, 2020 12:17 PM
To: EMC developers 
Subject: [Emc-developers] Third-Party GUIs.

I wonder if the docs should mention the GUIs that are made for
LinuxCNC but are not part of LinuxCNC?

I am thinking of
http://www.qtpyvcp.com/showcase/mill_vcps.html
And
https://github.com/DjangoReinhard/JCNCScreen

And maybe also PathPilot.

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


after reading several comments

i would include in the docs

one url to a description of the communication between a ui and linuxcnc

and one more url on the wiki where the many interfaces could be listed ( 
user maintained )


I'd hope the wiki would keep dates of last update.

Small and simple, 2 urls, no advocacy, no discussion,  just 
possibilities for the reader to investigate.


tomp




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


Re: [Emc-developers] [Emc-users] linuxcnc openlung ventilators

2020-03-24 Thread Thomas J Powderly

Thanks Dave

On 3/24/20 10:02 PM, dave engvall wrote:

Implications?

Gleaned from a medical  site.

"Coronavirus is enveloped, meaning the virus has coating on the 
outside of it. As it happens, the envelope means that the virus 
doesn’t survive well outside of the body—they usually can’t last 
longer than 24 hours outside of the body and usually only last less 
than 12. This is a good thing in terms of containing an outbreak. It 
also means coronavirus can be killed by hand sanitizer and soaps, 

oh yes, wash your hands a lot, and use bar soap. The lather is important
which isn’t the case with other types of viruses (most notoriously 
norovirus), so your biggest defense against coronavirus is washing 
your hands. The problem with viral envelopes is that they allow the 
virus to more easily evade your immune system. So, the enveloped virus 
has a disadvantage outside of a person, but once it gets in, the 
envelope gives it a dangerous edge. Enveloped viruses (which include 
influenza) tend to cause longer, more problematic infections for this 
reason and are more difficult to develop a vaccine for because of the 
envelope".


Yes, it makes me think that parts of any mechanical device used must be 
one-use only.


Please look at https://e-vent.mit.edu/ ( there's quite a few efforts 
around the world but this one has been submitted for approval or at 
least review )


I'm thinking of ordering those parts just to get familiar with the concepts.

Maybe I could repair or build units of similar design.

The MedCram videos seem to be good ( i watched and understood the 1st 2 
do far )


https://www.youtube.com/watch?v=i6hmGVBbIJk


Remember, FDA regs are meant to be all encompassing not just virus 
specific.  A virus is an obligate intracellular parasite. They are not 
very tough extracellular.  I think this makes the sterility barrier 
much lower. However, a damp warm environment is just perfect for 
bacterial and fungal growth. Still having a sub micron filter in line 
screens a lot of junk.


hmmm sub micron thats easy to breath thru, well its not on that path 
neccesarily, its on the exhaust.
Changing subjects slightly I read an unconfirmed note that one of the 
early symptoms of corona virus infection was a loss of smell. 
Interesting but single  source.


I've heard it on DW and AlJazirah and Thai PBS, both taste and smell are 
affected.




Dave



Thx Dave stay well

TomP



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


Re: [Emc-developers] framebuffer xmotion

2020-03-24 Thread Thomas J Powderly

Chris

you are more a developer than I


On 3/24/20 3:04 PM, Chris Morley wrote:

If I make dbus libraries optional, does this mean linuxcnc's qtvcp would work 
for you?
Chris


I dunno, but i hope to try qt scripting soon

I have no idea how dbus is involved ( maybe qtvcp requires dbus but is 
not really neccesary?)


I 'think' qt scripting is related to qtvcp

I 'THINK' qtvcp is only used forLinuxCNC  while qt scripting is more 
general , so


I 'THINK' trying the general case is a good idea before trying the more 
specialized tool qtvcp.


But i just hacks l-) glad to hear any suggestions

tomp



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


Re: [Emc-developers] framebuffer xmotion

2020-03-24 Thread Thomas J Powderly

Hello

On 3/23/20 12:49 PM, theman whosoldtheworld wrote:

qt 12 OR 14?
"""the latest version of Qt is 5.14 from 12 December 2019. 5.12 LTS,"""


i see, 5.12 5.14  ok

btw

i can build now on the rpi4 using qtcreator.

and the app runs fine on framebuffer.

it does NOT need the sudo as did the intel machine, i dont know why.

I will imitate a known lcnc gui next just to see how it looks/feels.

I am not using a special monitor, just a hdmi tv, so its BIG.

And no touch screen either ( yet )

tomp



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


Re: [Emc-developers] emc-developers] correct F code status message - opinions

2020-03-24 Thread Thomas J Powderly

interesting

if I understand correctly...

the THC uses voltage drop gap sensing,

so if the velocity slows down,

the sensor sees the slot more than the stock

correct?

so the control loop lowers the hean trying to get to the target voltage. 
(oops!)



we have similar problems in simple hole drill edm

( similar because velocity is a result of process, not an input to process )

when the tool breaks thru, the drop in sensed voltage pushes the tool 
forward quickly


leaving a correct size hole body but undersized exit diameter ( like an 
inverted burr )



the edm solution was to change velocity from gap control to feed control 
once the


breakthru pattern was sensed.


The rule set for when to change and how fast to go should be programmable.

At least until experience shows some static response is good.


thanks

tomp


On 3/24/20 1:37 PM, Rod Webster wrote:

Anyway, I compiled Chris's branch and did a fair bit of testing of this on
my machine and it all seems to work as expected.
There were no side effects. or breakages I could find.

I can't see any reason why this can't be pushed to Master branch. Just my
vote.

It will take some time to incorporate it into Plasmac so it can do
something useful because there has been some very messy work arounds in
Plasmac because this data has not been available.

Just to refresh, Plasma cutters need to monitor the current velocity and if
it falls too far below the original cut velocity, the reduced velocity
results in an increased torch voltage. The Torch Height Controller (THC)
responds by lowering the torch to reduce the voltage and that can result in
a crash. The solution is to disable the THC if current velocity falls below
say 90% of the original feedrate. So this is pretty crucial parameter for
plasma control.

Thanks Chris for tackling it.

Rod Webster
*1300 896 832*
+61 435 765 611
VMN®
www.vmn.com.au



On Tue, 24 Mar 2020 at 13:06, Rod Webster  wrote:


Oops, sorry I fell into an old trap. So long since I worried about this.
That will just be for that segment.
I did not notice you were referring to a test branch. I'll check it out.
Rod Webster
*1300 896 832*
+61 435 765 611
VMN®
www.vmn.com.au



On Tue, 24 Mar 2020 at 12:51, Chris Morley 
wrote:


My work is not in master - confirmed.
requested-vel pin has been there for a long time and is not the Fcode
number - though is related to it.
The pin I added is called (badly named)  base-feedrate and is the actual
Fcode number from gcode.

But the good news is if requested-vel works for you then it's available
now!
But I would check that it is in sync with the program.

Chris


From: Rod Webster 
Sent: March 23, 2020 11:56 PM
To: EMC developers 
Subject: Re: [Emc-developers] correct F code status message - opinions

Chris, look again. It is there on a run in place compile of master branch.
And the HTML man page is updated for it too. Keep it there please!

Rod Webster
*1300 896 832*
+61 435 765 611
VMN®
www.vmn.com.au



On Tue, 24 Mar 2020 at 09:29, Chris Morley 
wrote:


Rod
Sorry I didn't make that clear - it's not in master yet and if it does

it

will probably change a bit, but thank you for testing.
I did think about you guys hence the HAL pin.

Chris

From: Rod Webster 
Sent: March 23, 2020 10:52 PM
To: EMC developers 
Subject: Re: [Emc-developers] correct F code status message - opinions

Great work Chris, Confirmed as working here now on V 2.9 on my machine
Its interesting to watch motion.current_vel and your new
motion.requested-vel pins in halshow while running a job.
This will be very handy for plasma cutting.

And yes, state tags beckons if you feel the urge now you got this far.

Rod Webster
*1300 896 832*
+61 435 765 611
VMN®
www.vmn.com.au



On Mon, 23 Mar 2020 at 22:20, Amit Goradia 

wrote:

On Mon, 23 Mar, 2020, 1:25 pm Chris Morley, <

chrisinnana...@hotmail.com>

wrote:


I have been delving deeper into linuxcnc to see if I could correct

the

status of F code.
For those who don't know the Fcode status report in AXIS (or any

gui)

is

actually the status of the interpreter rather then the current

Fcode.

If

you have a long program that changes the fcode lat in the program

you

will

see that f code before you should.

I have code that works; it reports through status the current F

code,

and

it outputs a HAL pin of current F code.
I'm not sure I've done it right of course.

It does this by sending a new NML message to motion each time the F

code

changes.
When that message gets to Motion, it updates status and the HAL pin.
Since it's read from the interpreted list, it is in sync with the

actual

F

code.

Currently the message is called feedrate or base_feedrate which

needs

to

be changed probably to F_code.
Then I was thinking S code should probably be updated in sync too.
Rather then having a message per code I could call the message

sync_code

and add other 

Re: [Emc-developers] framebuffer xmotion

2020-03-22 Thread Thomas J Powderly

    Hello

a video ( when youtube finally approves it )

about QT using framebuffer (no X )

hopefully for a low cpu load gui fpr LinuxCNC


maybe Xmotion can really run ( personally I never got any visuals )

or

https://github.com/leonpk82/cnc_touch


the vid just shows framebuffer, svg, mouse, buttons, zooming

https://youtu.be/owfEK-CgZok

tomp

tjtr33




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


Re: [Emc-developers] framebuffer xmotion

2020-03-22 Thread Thomas J Powderly

@ Frank Tkalcevic
Hello

Could you tell more about how you got QT to output to /dev/fb0?


I installed Qt Creator

(Qt Creator 4.2.0 Based on Qt 5.7.1 (GCC 6.3.0 20170415, 64 bit)
and followed tutorial to produce a small app,
it has a window, 3 buttons and an icon .


Code moves the icon into the rect clicked on. ( its the built in tuorial 
example ).



It runs find on Desktop

but fails on /dev/fb0( I try to run as you stated  appname -platform 
linuxfb:/dev/fb0 )



how to reproduce:
I open console 1 (^altF1) and login, then execute
cd
cd build-qtquickcontrolsapplication-Desktop-Release
./qtquickcontrolsapplication -platform linuxfb:/dev/fb0
and it fails, badly, keyboard is dead ( cant change numlock )
text on console is frozen

have to reboot
without the command line option, it fails immediately
QXcbConnection: Could not connect to display
Aborted
at least i dont have to reboot.


I'm sure the error is becasue its a built for desktop
but in qt creator, ALL projects are "supported platform: Desktop"  only



how'd you do that?
thanks tomp


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


[Emc-developers] framebuffer xmotion

2020-03-02 Thread Thomas J Powderly

Hello,

There was a mention of a framebuffer gui called 'Xmotion'

It has not been touched for a while, tho the dev is active on another 
front ( a JS frontend for it )


My question:

Will using the framebuffer (instead of X) make a better environment for 
LinuxCNC?


apologies for the term 'better' but I couldnt think how to ask it ... 
well, better ;-)


TomP


( I am ankle deep in FB programming now and wondering if I should get in 
deeper or head for higher ground )


This is very interesting but very hard to understand his voice 
https://fosdem.org/2020/schedule/event/fbdev/




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


[Emc-developers] hal_parport.c read_all write_all

2020-02-20 Thread Thomas J Powderly

Does any one use the read_all or write_all functions of hal_parport?

from my copy of hal_parport.c

"""

// TJP i dont see parport.read_all or write_all used in ANY supplied 
parport hal cfgs
// TJP it seems parport.read_all and write_all were intended for a 
single pport

// TJP and parport.n.read_port. parport.b.write_port  were for multiple
// TJP confirmed, read_all and write_all not used in supplied cfgs
// TJP i think they can be removed without harm
static void read_all(void *arg, long period);
static void write_all(void *arg, long period);
"""

tomp



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


Re: [Emc-developers] hal_pi_gpio.c rpi4 revision c03112

2020-02-16 Thread Thomas J Powderly
I now have linuxcnc 2.9 with a good hal_pi_gpio.(doesnt break on newest 
Pi revision code c03112 )


The driven pins scope out clean when running.

These pins controlled by software stepgen.

To do this , I installed a rip ( so I could make new .c components ).

I edited hal_pi_gpio.c , adding a case to rtapi_app_main()

int rtapi_app_main(void)
{
int n, retval = 0;
int rev, ncores, pinno;
char *endptr;

if ((rev = get_rpi_revision()) < 0) {
  rtapi_print_msg(RTAPI_MSG_ERR,
  "unrecognized Raspberry revision, see /proc/cpuinfo\n");
  return -EINVAL;
}
ncores = number_of_cores();
rtapi_print_msg(RTAPI_MSG_INFO, "%d cores rev %d", ncores, rev);

switch (rev) {
// adding this vv
case 6:
  rtapi_print_msg(RTAPI_MSG_INFO, "Raspberry4ver1.2\n");
  pins = rpi2_pins;
  gpios = rpi2_gpios;
  npins = sizeof(rpi2_pins);
  break;
// end additions ^^
case 5:
  rtapi_print_msg(RTAPI_MSG_INFO, "Raspberry4\n");
  pins = rpi2_pins;
  gpios = rpi2_gpios;
  npins = sizeof(rpi2_pins);
  break;

Then I touched one dependancy ( cpuinfo.c) and ran make, then sudo make 
setuid, then tested.


It took me a lng time to discover that halcompile wasnt enough, due 
to the dependancy cpuinfo.c


If i had known that, I'd be hours ahead.

NB: the RIP works , the installed linuxcnc will still fail "board 
revision 6 not supported"


HTH

tomp



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


[Emc-developers] hal_pi_gpio.c rpi4 revision c03112

2020-02-15 Thread Thomas J Powderly

Hello
I have a raspberry pi 4, 4G
/proc/cpuinfo shows

Hardware    : BCM2835
Revision    : c03112                      << THIS IS A PROBLEM
Serial        : 10007ef4bf9c
Model        : Raspberry Pi 4 Model B Rev 1.2
and those values will fail trying to load the hal_pi_gpio module.

When I tried to use hal_pi_gpio,
I got this error.

pi@raspberrypi:~ $ linuxcnc
LINUXCNC - 2.8.0~pre1
Machine configuration directory is 
'/home/pi/linuxcnc/configs/NEW-rpi4-2250vel-nohome'

Machine configuration file is 'rpi4-2250vel-nohome.ini'
Starting LinuxCNC...
Found file(REL): ./rpi4-2250vel-nohome.hal
Note: Using POSIX realtime

HAL_PI_GPIO: ERROR: board revision 6 not supported
hal_pi_gpio: rtapi_app_main: Invalid argument (-22)
...

so i looked why rev 6 is not allowed

in hal_pi_gpio.c I read...

int rtapi_app_main(void)
{
    int n, retval = 0;
    int rev, ncores, pinno;
    char *endptr;

    if ((rev = get_rpi_revision()) < 0) {
  rtapi_print_msg(RTAPI_MSG_ERR,
  "unrecognized Raspberry revision, see 
/proc/cpuinfo\n");

  return -EINVAL;
    }
    ncores = number_of_cores();
    rtapi_print_msg(RTAPI_MSG_INFO, "%d cores rev %d", ncores, rev);

    switch (rev) {
    case 5:
  rtapi_print_msg(RTAPI_MSG_INFO, "Raspberry4\n");
  pins = rpi2_pins;
  gpios = rpi2_gpios;
  npins = sizeof(rpi2_pins);
  break;

... NOTE 6 IS NOT A VALID CASE

    default:

    rtapi_print_msg(RTAPI_MSG_ERR,
    "HAL_PI_GPIO: ERROR: board revision %d not 
supported\n", rev);

    return -EINVAL;
...
}

well, I think the value 'rev' will return 6 for my hdwr
because
cpuinfo.c has

int get_revision(void){
...
    else if ((strcmp(revision, "a03111") == 0) ||
    (strcmp(revision, "b03111") == 0) ||
    (strcmp(revision, "c03111") == 0))  // tjp note NOT "c031112"
  return 5;
   else // assume rev 5
  return 6; //tjp 6 is what mine 
returns

}

now my /proc/cpuinfo shows
Hardware    : BCM2835
Revision    : c03112
Serial        : 10007ef4bf9c
Model        : Raspberry Pi 4 Model B Rev 1.2

so my board falls into default '6'
and 6 fails

If i am correct ,
then the fix seems to be in the detection by cpuinfo ( reurning 6 )
or
in the action taken by hal_pi_gpio.c rtapi_app_main where it has no rev 
6 case


what to do?

thanks tomp



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


Re: [Emc-developers] announcement OpenCN, a new fork of LinuxCNC

2020-01-12 Thread Thomas J Powderly

I think the missing file belongs to the source code for linux, not linuxcnc.

try looking at 
https://github.com/torvalds/linux/blob/master/include/asm-generic/asm-offsets.h


you may need both bodies of code avaialable to compile OpenCN

I do not see that file in my local builds ( run-in-place builds) of 
linuxcnc.


HTH TomP

On 1/12/20 7:55 PM, s.alex15 via Emc-developers wrote:

Dear OpenCN developers,

Could you please help with OpenCN build problems.
First steps have done without issues:
$ cd opencn/rootfs $ make opencn_x86_defconfig $ make
but after that I have got an error:

root@OpenCN-2:~/opencn/rootfs# cd ../usr/
root@OpenCN-2:~/opencn/usr# ./build.sh
Starting Release build
-- The C compiler identification is GNU 6.4.0
-- The CXX compiler identification is GNU 6.4.0
-- Check for working C compiler: 
/root/opencn/rootfs/host/bin/x86_64-buildroot-linux-gnu-gcc
-- Check for working C compiler: 
/root/opencn/rootfs/host/bin/x86_64-buildroot-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: 
/root/opencn/rootfs/host/bin/x86_64-buildroot-linux-gnu-g++
-- Check for working CXX compiler: 
/root/opencn/rootfs/host/bin/x86_64-buildroot-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /root/opencn/rootfs/host/bin/pkg-config (found version 
"0.28")
-- Found GSL: /root/opencn/rootfs/host/x86_64-buildroot-linux-gnu/sysroot/usr/include 
(found version "2.3")
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: 
/root/opencn/rootfs/host/x86_64-buildroot-linux-gnu/sysroot/usr/lib/libopenblas.so
-- Configuring done
-- Generating done
-- Build files have been written to: /root/opencn/usr/build
Scanning dependencies of target opencn
Scanning dependencies of target proof-of-concept
Scanning dependencies of target logfile
Scanning dependencies of target cpu23_try
[ 0%] Building CXX object 
proof_of_concept/CMakeFiles/proof-of-concept.dir/test.cpp.o
[ 0%] Building C object core/CMakeFiles/logfile.dir/logfile.c.o
[ 0%] Building C object proof_of_concept/CMakeFiles/cpu23_try.dir/cpu23_try.c.o
[ 0%] Building C object lib/CMakeFiles/opencn.dir/ux.c.o
[ 1%] Building C object lib/CMakeFiles/opencn.dir/shr.c.o
[ 2%] Building C object lib/CMakeFiles/opencn.dir/rtapi.c.o
[ 3%] Building C object lib/CMakeFiles/opencn.dir/aflib.c.o
[ 4%] Building C object lib/CMakeFiles/opencn.dir/debug.c.o
[ 4%] Building C object lib/CMakeFiles/opencn.dir/bw.c.o
[ 4%] Building C object lib/CMakeFiles/opencn.dir/cmdline.c.o
[ 4%] Building C object lib/CMakeFiles/opencn.dir/pipes.c.o
/root/opencn/usr/lib/aflib.c:19:41: fatal error: linux/generated/asm-offsets.h: 
No such file or directory
#include 


HERE you need a file from the source for linux itself

try this 
https://github.com/torvalds/linux/blob/master/include/asm-generic/asm-offsets.h



^
compilation terminated.
make[2]: *** [lib/CMakeFiles/opencn.dir/build.make:63: 
lib/CMakeFiles/opencn.dir/aflib.c.o] Error 1
make[2]: *** Waiting for unfinished jobs
[ 4%] Linking C executable logfile
[ 4%] Linking C executable cpu23_try
[ 4%] Built target logfile
[ 4%] Built target cpu23_try
make[1]: *** [CMakeFiles/Makefile2:91: lib/CMakeFiles/opencn.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs
[ 5%] Linking CXX executable proof-of-concept
[ 5%] Built target proof-of-concept
make: *** [Makefile:84: all] Error 2
/root/opencn/usr
Installing build/core/logfile
Installing components/lcec/example
Installing components/sampler/example/one-drive-sampler.hal
Installing components/streamer/example/SetPoints_fast.txt
Installing components/streamer/example/cmd.hal
Installing build/proof_of_concept/proof-of-concept
Installing build/proof_of_concept/cpu23_try
Installing proof_of_concept/rate.hal

Tried to build on both fresh installed Debian 9.4.0-amd64 and 10.2.0-amd64 with 
same result.

Best regards,
Alex

[s.alex15 - Chat @ 
Spike](https://spikenow.com/r/a/?ref=spike-organic-signature&_ts=bz6y5)  [bz6y5]
___
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers



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