forked from machinekit/machinekit
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request LinuxCNC#2756 from tjtr33/barWidgets
Bar widgets
- Loading branch information
Showing
17 changed files
with
4,664 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
to run a config using the new pyvcp bar widgets | ||
is like othe configs | ||
|
||
you will create an .ini, a custon.hal, and xnl | ||
and | ||
uf you want graphical thumbs ( the marker that moves aloong the bar) | ||
you will need to create a small python tkinter .py file that draws the marker | ||
( and set the tag' dwgf to that file spec ) | ||
or creates/copy a suitible png file | ||
( and set the tag 'imgf' to that file spec ) | ||
|
||
i used a full file spec for imgf | ||
i placed my .dwg file alomgside pyvcp_widgets.py | ||
which is in /lib/python3/dist_packages/ for NON RIP | ||
and is in ~/linuxcnc-dev/configs/tomp/NuPyvcpBars/ for me ( ymmv) | ||
|
||
my test .imi is pyTktab04.ini | ||
the .ini will use AXIS gui and create a pyvcp tab with many aniumated bars | ||
the ini expects local file bars.xml ( same dir as .ini) | ||
the .ini's PROGRAM_PREFIX must be adapted to your situation | ||
the .ini [FILTER} section was chamghed to py - python3 izzat necc/good? | ||
the .ini [HAL] section has POSTGUI_HALFILE = custom4.hal | ||
|
||
place bars.xml in same dir as .ini | ||
|
||
place custom4.hal in same dir as .ini | ||
|
||
custom4.gal requires rand9 | ||
a python hal comp that is a random number generator | ||
used to to drive bar widgets | ||
so ramd9 must be with the other hal comps | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
to test the pyvcp bars | ||
|
||
edit bars1.xml to change tag values | ||
use <!--tag?value</tag--> to hide trials | ||
|
||
edit bars1.hal to change driver propetries | ||
the drive for the bardemo is a siggen | ||
the amplitude and offset must agree with the xml min and max | ||
for example in min is 0 and max is 100 | ||
then the siggen sin amplitude is *max-min)/2 = 60 | ||
and the offset would be - | ||
for example, if min is -125 and max is -32 | ||
then the amplitude is (-32 - -125)/2 = 45.5 | ||
and the offset will be ( -32 - 42/.5 ) = -74.5 | ||
( the sinus will oscillate about -74.5, | ||
rising towards Min od -32 | ||
and falling towards -125 | ||
You can adjust the freq as desired but note | ||
there seems to be a beat freq on my system, | ||
you mayt experience it too, | ||
so use freqs od 10 20 30 40 50 60 etc | ||
It maybe my monitor or the thread speed or both. oi dunno | ||
It is not an error of the program | ||
|
||
to run your test on a RIP | ||
cd | ||
cd path/to/your/linuxcncdev/dir | ||
mine is ~/linuxcnc-barwidgets/configs/tomp/nuPyvcpBars$ | ||
yours will be something like the following | ||
cd ~/linuxcnc-dev/configs/<dirwhere you have your test .xml and .hal > | ||
|
||
halrun -I -f bars1.hal | ||
|
||
have fun | ||
tomp | ||
|
||
|
Oops, something went wrong.