03fjungclaus 07TRUNK * 10emc2/src/po/de_axis.po:
Some adjustments + adaptions according to the changes Florians did for
03fjungclaus 07TRUNK * 10emc2/src/po/de_axis.po: Typo fix + added some missing translations
03fjungclaus 07TRUNK * 10emc2/src/po/de_axis.po: Typo fix + shortning some texts for e.g. better fitting into button, ...
Anyone have any ideas on how to reverse engineer the pinout of a keyboard/mouse combo? I have eight wires that would connect to a ps/2 mouse and kybd ports.
I'd look up the PS/2 pinout, and assume that the extra two wires are clock and data for the mouse (with shared power and ground)
[01:06:03] <SWPadnos> http://www.bbdsoft.com/keyboard.html
SWPadnos: I checked continuity between all the pins, no common (not even GND or VCC)
actually, you don't need 8 wires - 2 are unused
you wouldn't get continuity between the 8 wires, only if you measure between the 6-pin connectors
SWPadnos VCC,GND,CLK,DATA = 4 * 2 (1 kybd, 1 mouse) = 8 wires
ie, pin 3 of each connector shuold be connected together
yep - that could certainly be the case
SWPadnos it's not
there are ZERO common wires.
ok. do you have 8 wires, or two 6-pin connectors?
let me back up a bit...
was this meant to be something installed in a kiosk or something (plugging into a header instead of DIN connectors)
SWPadnos correct. It actually plugged into a header on a mobo that I no longer have.
I'm trying to get a hal file work, with pyvcp. could anyone help? http://pastebin.ca/348256
are any of the wires red or black?
SWPadnos 8 black wires
that doesn't help :)
SWPadnos Yeah, I know. None of the wires are even common with the board gnd either.
owhite, that file has some things that seem weird to me - what actually happens when you run it?
SWPadnos: It is launched with halrun <filename>
Jymmmm, can you remember the brand or type of the mobo?
SWPadnos: I don't have a scope, so that doens't help either. But I could power up the board and try to see if there's CLK on two of the pins if I had a way to read it.
owhite, that's nice. I'm on my windows machine right now - so what happens? :)
and what I'm trying to do is have a radio button (chbutton) drive something on the parallel
SWPadnos no, i don't remember
it runs. but the radio button doesnt drive the parallel pin.
SWPadnos when I moved, i tossed all the manuals etc
Jymmmm, how about the manufacturer of the kbd/mouse combo?
owhite, are you checking that with a scope/meter, or using halcmd to check the signal state?
SWPadnos: This division is out of business. I know cause I used to work for them =)
and I mean a real scope or meter, not halscope/halmeter
Jymmmm, just thinking of ways of getting google search terms :)
*wince* well, I'm not too swift with halcmd, and never have used scope/meter.
SWPadnos NOthing will be on google, propritary hw here.
I'm asking you how you know the parallel port pin isn't being changed
Jymmmm, ah - then you're screwed :)
maybe you can bring it to ESC and use a nice Agilent or Tek scope :)
(but that's not until April 1)
SWPadnos: It can't be THAT hard... it's just rev eng a kybd/mouse... I just dont want to blow the thing up is all.
oh, last nightjmkasunich showed me how to drive the parallel pin, I have a relay board connected to it.
he showed me using halcmds that get launched after the window starts up.
SWPadnos can I see the clk with a resistor and a LED ?
owhite, ok, so you know that if you do something like "setp parport.0.pin-03-out true", it works ...
let me put something into pastebin....
and the relay doesn't turn on when you hold the button?
yeah - I'd like to see the pyvcp_demo.xml file as well
Jymmmm, I'm not sure you could see clk with an LED - the flicker would be very fast
can you take apart the keyboard?
I'll bet that the pin pattern is repeated for the two devices, so if you can figure out one half of the connector, you'll probably have the second half figured out as well
[01:17:40] <owhite> http://pastebin.ca/348273
can you paste the .xml file as well?
that was the set of commands I ran, using halcmd as an interpretter, and it worked. so I tried to put them into a .hal file, and its giving me trouble.
yeah. hang on...
you missed the start comand
so write never gets called
its okay to put start into the .hal file? I didnt see any other examples of that in configs/*/*hal files.
[01:19:51] <SWPadnos> http://pastebin.ca/348277
oops - take out the second reference to pyvcp.chbutton-sample
[01:20:51] <SWPadnos> http://pastebin.ca/348280
cutting and pasting...
yes - it's OK to put "start" in a .hal file. the examples probably don't need to because they run with emc, which starts threads for you
got it. I tried it a couple times for that reason...but hey.
you can also use what you had, but just type "start" at the halcmd prompt
hey you did it! straight out of the box.
now, when I _do_ combine it with launching something like tkemc.tcl, I would join it with base-thread?
...as in most of the examples in config/
well, the parport.write will already be somewhere (probably in the base thread)
and pyvcp doesn't need to be "started"
right. I mean I wouldnt use....
wait a sec - do you mean "along with EMC", or "along with something like tkemc" ...?
loadrt threads name1=foo period1=1000000
addf parport.0.write foo -1
it would probably be more like the other existing examples which do not use that...
right. all you would need would be the loadusr pyvcp ... and the net bit1 ... lines
threads, hal_parport, start, and the halcmd (and echo) aren't needed
okay. well this is great. I can start marking up my little .xml file with radio buttons and stuff, and then ask for help again :-) but I think i get the idea.
this stuff is just so darn great.
heh - yep
tomp -- you reading this? I saw you mentioned there is an image widget now.
that seemed like fun -- I'm looking for an example .xml file.
i got one, but it's not 'standard issue ' pyvcp_widgets, want the code, just paste it in
SWPadnos: The header on the board connect to a PIC16C (something)
tomp: no problem for now. I'm gonna mark up some xml and I can ask about it later.
G83 X0 Y0.5 Z-1 F10 R0.25 Q0.100 P250
^-- valid EMC code?
Twingy: looking at the manual, I don't see a P word for G83
P is for dwell
it's there in G82, but not G83
so no dwell in pecking?
do you have the RS274NGC manual?
I'd bet that if you added G4Pxx, it would do the entire peck cycle, then pause :)
ok. time to play some games. see you later
owhite: code fragment & xml http://pastebin.ca/348296
gifs for example xml http://imagebin.org/7224 http://imagebin.org/7223
whole panel snapshot http://imagebin.org/7209
jmkasunich_ is now known as jmkasunich
dat me ma name
Shit, bathroom sink was leaking underneith, thought it was the plumbing, the overflow is rusted through.
just spent 20 minutes patting it dry the best I could and siliconed the hellout of it. Will have to apply more silicon once this layer sets up in a few hours.
JBweld is a brand name , and they make a marine patch that can set up underwater, available in hdwr stores thru the midwest for near 5$ http://jbweld.net/products/water.php
tomp, hi. I've been learning a bit about apt360
i used it on boats and i used in on a car radiator, works great
DanielFalk: what did you do, i havent got it sussed yet
got everything installed and have been copying examples and just learning apt formatting
vapt is very nice
tomp JB weld is just two=part epoxy. But since there will NEVER be any pressure nor excessive heat, silicon will be perfect as I can even "bridge" over the dime sized rust hole.
both the authors of apt360 and vapt are machinists who are learning to program
DanielFalck: before i get to vapt, lemme get apt360 up and see what 'problem' i had
Jymmmm: mo betta for you, a smll problem :)
tomp Yeah, as long as I have gloves I'll be fine =)
DanielFalck: i had it run last nite... whats the calling format? i just tried 'apt360 examples/square.apt' and went into some mode that was waiting input... -f??
SWPadnos SWPLinux : I just found out that the DEVICE (mouse/kybd) generates the CLK signal, not the host. That should help in determining the pinout at least as only 3 pins ohm out to the PIC.
./apt /home/dan/apt360/examples/polarclamp.apt | ./vapt/vapt.py
I left the application in my home directory
wah , not apt360, just apt ( i no have vapt yet ) cd ~/apt360 apt examples/square.apt, yah 'works'
the pocket macro works and is kind of cool
DanielFalck: and you piped the output to vapt, how did you get vapt to build?
I did a symbolic link inside the apt360 directory to the vapt directory
I don't recall having to build vapt, seems it was all python
doh! yes it's python, dod you get a bundle from sourceforge or use cvs for vapt?
cvs -d:pserver:firstname.lastname@example.org:/cvsroot/vapt login
cvs -z3 -d:pserver:email@example.com:/cvsroot/vapt co -P vapt
cool, i'll try now, but 1st, i dont see gcode output from apt360, i get several files, but not gcode. same for you?
I'm getting the gcode to work
I had problems installing postp at first
had to install bison and flex
right, thats was the bugger, postp .... ooh bison & flex ( not yacc? :)
I didn't go looking for yacc and they seemed to work
I got the dxflib from the qcad site, but still can't get dxf output to work
i got a lot of catching up to do , but i did get some output from 'personal apt' last nite, running under 'dosbox' not wine
[03:39:11] <DanielFalck> http://www.ribbonsoft.com/dxflib_downloads.html
right, i gathered f2c and dxflib last nite also
ok, i gotta get the python up 1st...
I didn't have pyopengl on this box a couple nights ago, but I bet you already have it if you're running Axis
had to have it for vapt
yeh, got that bit
whoops, vapt is tiny, this python stuff is amazing
did you run the install script, or just use the copy in the build directory? mine got put into /usr/local/bin/apt (( from which apt ))
mine ended up in the original directory
no problem, mine is result of make install
I used the install script
make, make check, make install
sorry ...config first
k, either will work, just got tangled on where to do the symlink from & to
you're right - I have apt in two locations...
i need OpenGL
DanielFalck: where / how did you get OpenGL.GL ? ( i was surprised it was not OpenGL.py ), ah you said pyopengl...
oooh ooooh! (horshack 1983) this is wicked!
it spins , it rotates, it scales, cool
it resizes! very nice & very fast
ok, now that's displaying CL code ( i thought it would display gcode, thus my confused questions earlier )
yes, but you should be able to look at the *.tap files that it generates and run them in axis
ah, the TAP(e) files, it's been a long time :)
yep : )
I looking forward to running some full 4th axis stuff with this
not just postitioning
my tap files are null or binary...
it might have something to do with postp
try out case4axis.apt
ok, more catching up.... postp needed bison & flex... will try 4axis first...
what am i looking at? I see the '88' and the line in space outside...
and a load of construction lines
yep, too bad about the construction lines, but I'm looking at the curve starting at setpt
part of a fly fishing reel
but I'm just glad it's usable
right, that'd be 4axis. really like a pin reel?
"remark this represents the profile of a fly-fishing reel line guard"
I don't know anything about fly fishing
yes, i think like the thing you can snap over the reel so the line doesnt fall off/get tangled
I really want to start a GUI for generating apt code for this thing
I got a lot to learn about apt
right, i was just looking at what was missing... you're right... is it sort of an interaction with vapt? ( like in primitive way, draw 1 element, look at vapt, draw another look at vapt, erase that draw another , look at vapt.... like that for beginning? )
or even just something like Jon Elson's C routines for pocketing with a little tkinter GUI
but yea, drawing lines and circles and being able to select a start point
the thing I like about this is you can change the end mill size and regen your code
oh, Jepler has posted canned routines in python ( small apps to generate code given limited input )
03jepler 07TRUNK * 10emc2/src/emc/usr_intf/axis/scripts/scaragui.py: allow the scara table to be tilted two ways, giving a full 6 joints
is that still a scara?
I think the thing that most interests me about this is the pocketing and the rotary axis stuff
i gotta get postp up vapt is slightly annoyed "/usr/local/bin/callpost: line 31: postp: command not found"
I should put your tool in the right place
do you have a 4th axis? ( table or head )
yes I do
03jepler 07TRUNK * 10emc2/src/emc/kinematics/scarakins.c:
Fix radians vs degrees problem with C axis
extend kinematics to 6 axes: A and B move the table, C moves the stylus.
rotary table that came with my mill, it's pretty nice
SEM servo on it
I just want to play with it
like a bridgeport or a vmc or...
we have a bunch of Kitamura MyCenter 1 VMCs at work, but they only to 4th axis positioning
not full contouring
i used haas indexers on bp's but you have a servo drive, nice, SEM made good stuff
kind of a bummer when you want to do a nice cam
I should have said coordinated motion
you can integrate the 4 axis, not that move this indexer, then mill that , right coordinated
dunno if emc has an xyzb move ( i just took a guess that the rotary was around y )
I used EMC in 2000 to do some engraving on the outside diameter of a piece of round bar stock
it worked then
G1 or G2/G3 ?
lots of them
i bet :)
it's funny all the code you need to make a 'straight' line
I mean with true type fonts generated from my cam program then
It seemed like thousands of lines of code to do letters like 'T'
I am exagerating
cradek has published 'ttt' a python ( i think ) code to generate gcode from true type. oh yeah, lots of line to make the 't'
I really like ttt. I want to use it for some stuff in my home shop
engaving name plates
yes, single fluke cutter ( a little Peter Deckel cutter grinder and you bport... you got an engraving shop!) any way to use ttt on rounds?
I have done a lot of engraving with a B'port
need some spindle speed... use an air head?
I have to do a bunch of cub scout 'Arrow of Light' award plates this weekend
no, I just run a real slow feed rate
I sometimes use a laminate trimmer on my router table
I could make a clamp to put that in my B'port
I've used air spindles in the mill spindle in the past. They sure are nice
you have 3 phase?
small garage packed full of machines
mostly hobby machines
I like to do woodworking sometimes too
ah, i use single phase 230. and a basement with 2 small edms and a chinese 3in1 ( lathe mill drill )
are you the EMC edm guru?
no, I'm the emc edm wise-ass
ok, what kind of stuff do you do with the edms in the basement?
the border between wise-ass and guru is pretty fuzzy around here
I hope I can continue to be a wise-ass guru
tomp, what kind of edms? sinker or wire?
small jobs for friends, some gun work, tho I dont like it. some busted taps type work. They're supposed to be a test bed for emc edm someday, but emc is developed with speed feed for now, so not really made for dynamic control ( this is not the beginning of an argument... its just not suited to edm motion control ) all sink edm, tho i have access to wedm
cradek: only if you improve the wise-ass aspects, you've been slacking
I need a guru
maybe a swami actually
another gent mdynac (?) has made wedm work with emc
somebody who can close his eyes, say "mmmmmmmmmmmmm" and then tell me where I put my dial calipers
jmkasunich: You get a guy with a slide-rule or nutting at all!
jmkasunich: 1 foot to the right of whatever you measured last
jmkasunich they're under the pile on the right side.
* jmkasunich looks
rayh came up with an idea that was implemented , it reduced the forward velocity according to a process sample sample until a stabile process was maintained
I don't know anything about edm, but it is a nice process
I send some hardened tool steel out to have it wired
It's amazing how nice it is when it comes back
Jymmmm: nope, not on the right side
yes, it began as a way to automate work that was ground, and work that was built of several pieces, the wedm could make the work out of solid and gett surfaces near ground quality
jmkasunich, are they in the kitchen?
next to a jar of peanut butter?
DanielFalck: bison & flex?? getting them now
sure didn't take me long to crap this bench up again
I couldn't find yacc with synaptic and was too lazy to go looking for it
but it isn't so crapped that a 6" calipers should be able to hide on it
do you have big mouse machinists running around?
jmkasunich: got that web cam up yet? We'll help you look. ;)
maybe they took them to their machine on the other side of the wall
I think the webcam is somewhere on the bench
DanielFalck: now how to use postp? (where are the docs fothis stuff, or do you just poke around in source to figure this stuff out )
they got shoved under the monitor
now I can't remember why I wanted them
tomp, sorry I have just been using the "machin/pmill" statement but don't know much about it
I can't get dxf working
we need to get Brent Muller on IRC and ask him about a lot of this
ok, i see, the "machin/pmill" is in the apt 'src' file, along with the dxf directive... maybe why i got nulll tap files... trying again...
oooh got gcode!
i didnt pipe tho, wanted to see each bit by itself, just apt ~/apt360/examples/square.apt
look in your current directory and see if you have square.tap file
yep, thats now got gcode ( and some size )
what is sent to vapt? when it was piped from apt, wasnt vapt egtting the tap file?
I think it's looking at the cl file?
when I did a pocket macro, which puts out the gcode, it didn't show up in vapt
hmm, back to the pipe ( but we oughtta get a .cl file output from the processing of the .apt file... i think )
no cl files here
what about caseRing, dont you get CLF LST and pll files?
no, but maybe I don't have postp set up right
what's in the CLF file?
half binary half text.... i see the part number and a remark
cool. Brent is using his program at his place of work for 4th axis continuous moves on a production part
[05:02:51] <DanielFalck> http://aptos.sourceforge.net/CurrentStatus.html
and some visual tools for generating apt code
i ran without the pipe, expecting to see the result to stdout or to a file, thinking that was the 'src' for vapt. where did you read about that? at cvs
"visual tool that uses gtkmm and cairo to help in developing Apt programs." .... cairo allows svg :)
at the bottom of the code for vapt.py
Usage: apt APTFILE | vapt.py
so the .apt file
oh cool, you can watch a cutter moving
run the case4 file again and hit 's'
this is super cool
sorry, i chgd the last lines in vapt.py to make the screen bigger :)
watch an animation of an endmill running along a path
note to self: a 10 tpi jigsaw blade is not ideal for cutting 16GA steel
wow, used the 's'
I dunno what you guys are doing, but it sounds exciting
are you taking notes?
I have installation notes here
I can post them
after I play with this more : )
DanielFalck: the cutter didnt stay normal to the path (boohoo)
I'd like to be able to follow in your footsteps though, some days or weeks down the road
tomp, you're right it looked odd
jmkasunich: we'll try to put soemthing on the wiki, right now everything is new. i think jepler & cradek can do soemthing with this, and maybe we can invite the author to see emc
tomp, what's your email?
I'll forward some stuff
oops got the popup menu to go orphan on me, it's now on top of the irc client :-o
it's tear away ( a 'feature' ?)
run the spirograph code. he even shows the engraving cutter
i'm going to ask my bro for the personal apt manual this weekend, likely a good general ref to the language, and maybe we can come up with a post tailored to emc ( post, i suppose, lathe mill ... )
where's that pastebin site again?
pretty, fleur-de-lis esque pastebin.ca
wow, the engraving... my uddabrudda would want this for gunstocks...
did i say wow yet?
[05:27:34] <DanielFalck> http://imagebin.org/7229
the posting to gcode happens because of the machin/mill directive, which spirograph.apt has... where's the tap file?
somehow the shaft on the engraving bit got jaggy
if I run apt while in the /apt360/ directory, it ends up right there
how did you capture? alt printscreen? dunno where i was standing... try again
Applications Accessories Take Screenshot
then used Gimp to crop it
try alt-printscreen, it will take a 'window shot' rather than desktop, no need to gimp it (crop it )
I have a real bastard system here- apple keyboard running to a pc and a mac
can't find the right key
I'll keep mashing keys till something happens : )
wacky! alt on a mac keyboard = meta? apple?
option (with a small 'alt' above it)
can't find the prntscreen key
my own fault for keeping this thing
ya know we dont really need spline interpolation with the ability to script like this, the smal linear segment can be so close to the exact path that it'd be an immeasurable difference. we got all kinds of 2 & 3d curves ( just long files )
i liked the reference to wolfram research as a place to get formulae for all kindsa wacky geometry
check out 'slotarray.apt '
yeh, see the inter-slot moves! nice
wish list : turn construction lines on/off :)
[05:41:39] <DanielFalck> http://imagebin.org/7231
ooh not slots, curved slots , kidney beans, nice entry and exit tangential
i tried to run emc with spirograph.tap, doh! i had been working on pyvcp_widgets, so already had realtime installed. made a real dog's breakfast out of everything. now I cant start emc, and cant shut down realtime... this calls for drastic measure,, going super for a bit
[05:55:28] <tomp> http://imagebin.org/7232
spirograph running in Axis way cool
burned out, good nite all, thanks again :) (saved entire irc log to collect notes from)
SWPadnos SWPLinux are either of you awake?
ejholmgren_: thanks... removing APIC from kernel did the trick...
no lets see if ny Z drive explodes again
nope, it survived..
anonimasu; got new geckos?
I've got a encoder for the servo..
but no time to make a gearbox
anonimasu send us the geckos and servos
anonimasu send us the geckos and servos
anonimasu send us the geckos and servos
its just on Z
we want xyzabc
we want xyzabc
we want xyzabc
Ok, bbiab, gonna go see if I cna rev eng this kybd thingy with shorting out anything.
the mobo I dont care about (just a P 233), but the ISA card I do.
2.2K to the rescue
I hate machine oil.
I just realized it's satruday...
mmm emc won't start
it's complaining about parport
which I don't have...
anyone here have an idea of how similar python and java are?
some idea, yes
they can both be said to be bytecode-compiled, both have garbage-collection and both support OOP
but they have quite different syntax and java is static-typed while python is dynamic-typed
hmm, I see
any idea of how hard it would be to go from java to python?
hm easy.. probably
c++/c to python is dead easy..
my main issue was the forced indentation
the dynamic typing and speed might be an issue
anonimasu: i got used to that pretty fast actually
what's the link to the HAL api doc?
where's the hal reference manual?
maddash_ is now known as sudo_maddash
Just this once .. here's the log: http://www.linuxcnc.org/irc/irc.freenode.net:6667/emc/2007-02-10.txt
you might as well have referred me to google
the link to the hal_doc.pdf is broken,
no it's not..
your browser is.
[13:05:57] <anonimasu> http://www.linuxcnc.org/docs/HAL_Documentation.pd¨f
[13:06:00] <anonimasu> http://www.linuxcnc.org/docs/HAL_Documentation.pdf
erm why don't you chk the wiki
sudo_maddash__ is now known as sudo_maddash
well, that is the reference manual..
section 2 says hal reference..
sorry about being picky but you are the one that brought it up.
mm, but it may say that, but it's not what i was looking for.
[13:07:38] <anonimasu> http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl
the wiki works too..
isn't there some api that permits me to access the parport from userspace
i never said that the wiki didn't work
you can use hal to do that
there's a example somewhere..
via hal's api, no?
if you can use python, it's a easy way..
import hal or something..
where's the doc for that?
I dont think there is one..
I looked at axis when I tried it
sudo_maddash is now known as maddash
there probably is docs about the c api but im not familiar with that
cf the portion of the wiki that says " - The User Manual in pdf format.
 - The HAL Reference Manual in pdf format."
check of google indexes it..
you might be able to open a html of it
anonimasu: do you know the names of any hal api functions? "emc hal api" doesn't cut it...
well look at axis..
there's a sample python program too..
I cant check right now
need to take a walk
anyway, if you ever run into the same problem, just cf hal.h
maddash__ is now known as sudo_maddash
[13:26:07] <sudo_maddash_> http://linuxcnc.org/docs/2.1/html/
bytecolor is author of vapt
fenn, good morning
Anyone around know anything about pyVCP?
03lerman 07TRUNK * 10emc2/src/emc/rs274ngc/ (7 files):
Add support for error handling where error messages have variables in the text. Add automatic loading of
external files containing oword subroutines. Permit oword subroutines to be located later in the file from
the point where they are called.
how many degrees below zero is it there?
its only 10F now, but last night was the coldest i remember
(with wind-chill taken into accnt)
hmmm i'm getting a "error while loading shared libraries: libemchal.so: cannot open shared object file: No such file or directory" when i compile and run http://pastebin.ca/318591
any ideas? i didn't `make install` my emc; rather, i just enabled run-in-place...
hmm? i compiled fine...
it's just running that's becoming a problem
kinda funny, b/c emcsh (which also relies on libemchal) works fine
what if you do ldd on it?
ldd <your program>
shows where it looks for referenced libraries
hmm. "libemchal.so not found"
maddash________ is now known as maddash
where's jepler? this is his program, anyway...
hey people. I was on here before and someone had a suggestion for how to deal with the error: "Either the size is too big or the shared memory buffer already exists but is of the wrong size."
anyone know what it is?
I think maybe it was you that told me. it was a command with 1005 in it :-)
are jepler and cradek still asleep?
seems like people are snoozing.
steve_stallings is now known as steves_logging
it is saturday after all
I just updted and built: ./configure --enable-run-in-place --enable-simulator. It fails on startup: HAL config file /home.../sim/core_sim.hal failed. Anyone have any ideas?
rtapi_shmem_new failed, returned -4.
rayh, good morning
steves_logging is now known as steve_stallings
rayh, we really need to find Jim T a CNC router : )
DanielFalck, can you guys find me a free wireEDM? ;)
what would you do with it?
a-l-p-h-a, freeee wireEDM? : )
I don't know about wireEDM machines, but sometimes 'free' machines cost too much to move
vertical lathes that you can drive trucks on
the lathe is the foundation of the building around it :p
I have a friend who built a machine and then had to build a building around it
how do i link hal pins now that i've written my .hal file?
maddash_____ is now known as maddash
DanielFalck; what type of machine?
It was a large gantry bead blaster for Goodyear
I never saw it, but was told that it was very large
if a building is built around something like that, I can certainly imagine that
can anyone remind me of how to edit the wiki page?
DanielFalck: log in first..
DanielFalck: in there now adding a page for apt
blank, just adding a link to create the page... will report in a sec
anonimasu, so how do I get admin rights? password?
DanielFalck: look at the basic steps page
DanielFalck: rayh: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?AptProgrammingForEMC
rayh: remember APT? (circle/line/circle u/d/l/r ?)
rayh, url for basic steps?
[16:31:47] <SWPadnos> http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?BasicSteps
DanielFalck: what would you like it to say? only 1 cook to the pot, so I can let it rest or fiddle as you like.
bottom of page
I have notes
link for how-to
sorry, I'm dense. I found this url : http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?action=editprefs
is that where I log in?
Ok, now is the password supposed to be blank?
or do I make my own up
DanielFalck: at top of any page there's a 'preference' to click, enter there, your id, and blank for pwd
enter your name, then the administrator password password
no no no emc pwd
the password is emc
thanks, that was what I was missing
that was a "Paris in the the spring" thing :)
I tried blank, my own, and only had read only rights
did you read the first paragraph on the BasicSteps page?
you mean on this page? http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?EmcKnowledgeBase
no - I mean this: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?BasicSteps
ok thanks, I kept going to the front page of the wiki
at bottom of front page is the link to the page SWPadnos is speaking of
tomp, I'm going to add some notes to your page
sure, i just did that 90 secs ago, it's bare
cut copy paste from irc : )
DanielFalck: if you could add info on how to get it running, i'll try to get some infor on 'howto use apt'
where's the source for apt/apt360?
step 1 cvs -d:pserver:firstname.lastname@example.org:/cvsroot/aptos login when asked for pswd, just press enter
step2 cvs -z3 -d:pserver:email@example.com:/cvsroot/aptos co -P aptos
step3 cvs -z3 -d:pserver:firstname.lastname@example.org:/cvsroot/aptos co -P apt360
step4 cvs -z3 -d:pserver:email@example.com:/cvsroot/aptos co -P postp
DanielFalck: the pages are html-ish so you may want <pre> copied stuff </pre> so it doesnt just run and wrap
DanielFalck, CVS has been moved to cvs.linuxcnc.org
SWPadnos, these are for apt360
SWPadnos: not cvs for this project
oh - right :)
I suppose I should finish my coffee now
a cool CAM app we have been playing with
[16:43:08] <tomp> http://imagebin.org/7232
works with emc!
holy crap awesome origami... http://forum.programming-designs.com/viewtopic.php?pid=4526
DanielFalck: you got the exclusive on the page ( only 1 editor at a time ), i logged out
I just added a url
I will compile some more notes on usage offline and cut and paste later
can someone do me a fav. http://nawrockiarchitect.com/
does it show two enter buttons, or one?
damn. the DNS change hasn't propogated yet
damn that image fade in/out eats cpu
it's flash... don't blame me.
it's not my code.
no, the non-flash one
oh... the JS one?
lerman, got another one?
25% of my cpu (amd 3800+X2)
you bastard with your good compy.
mine's just an XP2800+
a-l-p-h-a, twp, one for Flash Enhanced, the other for HTML only
two, that was
but they're links, not buttons
one why it's taking so long to change over.
and the final > is missing on the second one
SWPadnos, again, that's the old server, not my code.
[16:54:23] <a-l-p-h-a> http://18.104.22.168/mn
<my local copy of the new code>
what's the nrew servers ip?
the new server's ip is... 22.214.171.124, but that's not gonna help, as it's shared hosting.
I added 126.96.36.199
I added "188.8.131.52 nawrockiarchitect.com" to my hosts file, and that'd work...
steve_stallings is now known as steves_logging
tomp, are you able to edit at the moment?
I hope that I'm not keeping you out of that wiki page
DanielFalck: np, i'm gone
Is it ok for me to edit?
yep,i'm not there now
DanielFalck: maybe info for a mail list?
tomp, it's rough but I think the info is there now
cool, i'll do some formatting, ok?
do I need to log out?
I'm not editing
uh, you just leave the page ( make the edit window disappear)
ok I'm out
if you go back to the page, and the edit window is gone, then thats the proof :)
03lerman 07TRUNK * 10emc2/src/emc/rs274ngc/rs274ngc_pre.cc: Debug logging code was accidently left turned on. Turn it off for the general consumer.
DanielFalck: plsz look at web page http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?AptProgrammingForEMC
tomp, maybe just add a note that the screenshot at bottom of page is from vapt
although the title in the window does say "Visual APT"
tomp, thanks, nice work
i'm making more screenshots, but, like the raw output from apt is too big to make meaningful
cradek: you need to get the information about your servo lathe online some time.
what I really need to do is finish building it...
it hasn't quite worked since I put in the pluto - the motion is much smoother, but the pluto is more sensitive to noise and the spindle encoder hasn't worked right yet
:) I just got an istant message from someone on cnczone... wanting to do what you did pretty much with a lathe
cradek; what's up with the encoder?
just noise I'm pretty sure
cradek: did you end up getting the parts for a line driver or what ever you where going to do?
skunkworks: no, I'll probably try plain RC filtering first, I'm too cheap
maybe a mic cable?
IIRC they have two conductors and a shield outside
or hell, why not just slaughter a shielded network cable
I bet there are all sorts of solutions, I just need to do one of them :-)
a network cable is cheap (probably free)
I don't have any shielded...
DanielFalck: got names so i can mention the authors?
cradek; just steal^W acquire one from somewhere
they are quite common
lerneaen_hydra: are you talking about token ring cable?
no, just standard cat5 cable with foil shielding
I've never seen that
* skunkworks had heard about it - but have never seen it.
just a thin shielding running between the signal cables and the outer insulation
I think it's even called UTP (unshielded twisted pair)
UTP is unshielded yes, there's also FTP and STP
IIRC it's called STP at least
what does it hook to? there's no shield or ground in the RJ connector
err, yes there is
[18:33:02] <lerneaen_hydra> http://www.firefold.com/images/products/C6-RJ45S-SLD.jpg
maybe this is a european thing?
ah cat5e for gigabit maybe?
no, cat5 also
lerneaen_hydra, no - STP cable won't work with transceivers meant for UTP (at least not over the full length spec)
and STP is much rarer than UTP
here in sweden at least shielded are more common than unshielded
shielded cables, or EMI shielded connectors?
lerneaen_hydra: I've never seen that connector
EMI shielding, nothing mechanical
afaik, you'd need differnt network cards to use STP cable
huh? uh, no
at least the PHY would need to be different
the pinout is identical, the only difference is the grounded/shielded contact and the EMI shielding running through the cable
the difference is the dielectric, which causes signal propagation to be different
the maximum signal distance is probably lower in an ideal environment
for low speed networks (with short runs), it probably doesn't matter much
I've got 1000T-base (cat5e) shielded cable, 20M lengths
this is interesting
newegg doesn't seem to have any shielded cable
I'm glad I'm not crazy
according to Cisco, STP is much more common in Europe :)
at the retialer I buy stuff off they have mostly unshielded, but some shielded cables
about 50% more expensive
hmm, scratch that idea then
two coax cables?
overkill, sure, but you should be able to find some for cheap
anyone know where the parport doc is located?
DanielFalck: done editing wiki for now
can i install emc on ubuntu 6.10
you can't (easily)
6.06 is best suited for emc
the wiki doesnt say anything about that
hmm, I think it does somewhere
[19:03:29] <lerneaen_hydra> http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Installing_EMC2#Why_aren_t_there_packages_for_Ubuntu_6_10_Edgy_Eft
then i have to reinstall the system :(
tomp, ok. I guess now we should come up with some instructions on apt syntax with examples
I'm afraid so :(
DanielFalck: right, so i was annotating the square & ... what are those 3 Maltese crosses? where do they come from ( meaning, i have to learn before i teach :)
tomp, same here. Lots of reading to do.
I have the pocket macro sort of figured out
what's a comment in an apt file look like? (for annotation)
working on a program right now
I think $$ works for comments too
yep both remark and $$ will comment out a line
yep, i just added 'driving instructions' to a comment, the idea that you made a bunch of lines, and 'drove' around on them (remembering a little bit)
later versions of the Machinist Handbook have a good section on APT in the CNC programming chapter
gotta check my version
is jepler around?
here's a link with a bit of instructions too:
[19:11:07] <DanielFalck> http://www.nfrpartners.com/nfraptlang.htm
thats a nice visual in the lower right about how apt is parametric
let me add that link to the wiki
* robin_sz wonders if there are any CAM systems thta actually use APT
lots do, just hidden
yes, I think lots of them use apt for the post processor stage
.cl is an apt file format right?
I think mastercam does also..
basically you define your toolpath
it's the output from apt prior to posting
and then you say CUT IT
and then they do apt->gcode or whatever as the postprocessor stage?
and just go to point..
instead of making real moves..
but how do you get rid of the "define the toolpath" step?
wow, this is frustrating to no end
fenn_gohan: that's the good thing with apt..
fenn_gohan: you do C1 = CIRCLE/ -0.75, 1.25, 0.5009 $$ Create a circle 'C1' centered at X = -0.75, Y = 1.25, radius of 0.5009
i just want the computer to think for me
fenn_gohan, not sure yet. Probably a lot of python code : )
then you do GO/ TO, C1 $$ Move tool to circle 'C1
making circles is easy enough in g-code
maddash, solve your ssh -X thing?
fenn_gohan: GOLFT/ C1, TO, L1 $$ Move around circle 'C1' until line 'L1' is hit, moving to the left from tool perspective
that's not as easy :)
robin_sz: hmmm, straddling #debian AND #emc?
yeah that's a nice feature
robin_sz: yes, i did
maddash, im always on #debian
maddash, good. what was it in the end? didnt have x running on your local machine?
you make a bunch of lines and circle, they're like streets, then you tell it how to 'drive' along those streets, turn left onto line1, go left circle 2 at the far intersection...
uh, usleep(10000) means sleep for 10 seconds, rah?
robin_sz: it was an xauth issue. i didn't give remote users access to :0.0
apt can do much more sophisticated things than just arcs, lines
can you do groups of features?
it can do 4th and 5th axis stuff
the slotarray.apt code shows an example of that
DanielFalck: yes, beginners guide... about the gui front end... we make a list in python of geometries and append to it, constantly updating vapt each time
tomp, sounds good
I could really get into that
i just uncomplicated the square example, as a demo, i removed the rotation and the multiple instances, easier to follow now
* fenn_gohan is still wondering where stl.h is and why it's missing
[19:32:39] <tomp> http://imagebin.org/7241
tomp; is apt text-based?
DanielFalck, I'm in NC so eastern time zone
DanielFalck: 's' will show the tool, 'r' retracts it :)
bytecolor ! glad to see you here
I see you guys are fscking with apt :)
lerneaen_hydra: for the meantime
bytecolor wrote vapt
tomp; hmm I see
bytecolor: hello, want to thank you for the great work on apt
hacked is a better word, maybe 'cobbled together'
very impressive stuff
it seems kind of silly to see several different CAM projects going on in the same IRC channel :/
check out http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?AptProgrammingForEMC
lerneaen_hydra: the more the better
hi all, anyone have screenshots of the new scaracins/visualization stuff?
seems like wasted effort
anyone here familiar with the kernel va <-> pa mechanism?
i've got two files: standard_pinout.hal (redacted version of the one in configs/stepper) and parporttest.c. cf http://parport.pastebin.co.uk/10223
respectively. now, when I `halcmd -f standard_pinout.hal`, i don't receive any errors. but when i compile and run parporttest, i don't see any voltage spikes in pin 14. why not?
lerneaen_hydra, the apt stuff has very good 50 year code in it already that is very capable of generating gcode for complicated parts
maddash, seems wierd, very wierd, because the connection was forwarded over your ssh tunnel, it should have been a local user as far as the system was concerned .. most very, very odd
lerneaen_hydra, turbines etc...
DanielFalck; hmm, I see, are there any graphical manipulation tools yet?
lerneaen_hydra, not yet. Looks like we have to build them
lerneaen_hydra, or incorporate them into already existing code that cradek and jepler have going
lerneaen_hydra, the apt stuff is another valuable tool
the latter sounds quite nice ;)
also, when i `halcmd show thread`, i'm not getting any active realtime threads. anyone have a clue?
vapt is just a feedback tool
it shows output of the apt code
DanielFalck, nice info page, although vapt doesn't require bison and flex, aptos does
my bad, fixing now
bytecolor: where should i look for stl.h? (from tree.h)
my notes were actually on a napkin
aptos is a separate project from apt360, in case anyone has the two somehow linked
wiki page better now?
now that i look in tree.h i dont see any reference to stl.h so i wonder why its complaining about it being missing
in other words you can use apt360 by its self
oh it's symtable.h
DanielFalck: i saved the irc session
DanielFalck, does Brent ever get in here?
no, but it would be good to talk to him here
I didn't ask to develop apt360, I just fixed the gconic statement in some asm and he added me
bytecolor: so you're the vapt author?
fenn_gohan, yes, and I've only made a single commit to apt360
awallin: Did you see the posting I just put on the developer's list? Can you help?
apt360's stdout is nasty, huh :) 40+ year old 132 column printout
I should start an #apt360, eh?
or just #cam
there are so few *good* cad/cam tools for linux
so few at all even
I was actuallly supposed to write documentation for emc at one time
but I got slack, and didn't follow through
two or three years ago, maybe? I remember talking to someone named Paul.
There is still a log of it somewhere on line.
better to just do it rather than promise to do something
that's why i'm not worried about there being a lot of different cam programs.. if people tried to work together nothing would get done
sounds odd but i've seen it happen a lot
it's difficult. DanielFalck has expressed interest in helping me, but I've told him I just dont know how to apply his skills
how apt construction lines relate code to graphics http://imagebin.org/7242
my skills are limited
plus I'm still kinda of stumbling around in the dark with vapt
I have good skills with BS
DanielFalck, that's a fine skill to have at times
but I did con you into showing up here : )
is that legible (enuf)?
kind of small text
ditto in the wee letters
yeh, but it'd be in a tutorial, real text outside
tomp: I just saw your name in pyvcp_widgets.py. Did *you* see my recent mail on the developers list and can you help?
lerman: which post are you referring to?
lerman: no ,but between awallin & myself, maybe we can help
Asking for a pyvcp widget to display scrolling text from the tail of a file (actually a named pipe).
it'd need to be added ,but may be simple to get the widget
It would require a separate thread (I think) -- although it could just poll the file.
but the piping maybe more complex
would the file be the one that is currently loaded into the emc interpreter ?
No. A named pipe is just a file. You open it, read it, etc.
The file would be written by the interpreter with error messages, traceback stuff, etc.
ah, I see
In someways, it would be neatest if it were just another tab in axis.
thats the thing about Linux .... EVERYTHING is a file ...
Yes. (about linux).
until now pyvcp has communicated with any other problems only through HAL, so including file access brakes this clean idea somewhat
Named pipes are like magic.
Yes. But adding stuff to the nml interface is a bear to do.
You need to create structures in shared memory, etc.
can this file be opened for reading and polled once in a while even though some other program is writing to it?
ok now I see your post
I could have then interpreter generating the stuff to a file in an hour or two.
The idea is that the gui starts first and opens the file for reading. Then when the interp starts, it opens the file for writing.
emc still using tcl/tk?
awallin: what do you think about adding widget 'text'
Anything written by the interp appears automagically.
bytecolor, yes and I think pyopengl
A nice thing about pyvcp is that we could have multiple file widgets -- each with a separate tab in a notebook.
I havent used it in a loong time
for Axis gui
tomp: by 'text' you mean lermans scrolling-text-from-file idea ?
DanielFalck: AXIS uses jeplers own OpenGL wrapper, minigl, not pyopengl
awallin: a new widget, but a std tkinter widget of type 'text'
Have any of you used 'Twisted'?
lerman, tomp: it's certainly doable, I can look at it now for a while and report back here if I get something going quickly
Looks like it supports async IO, nicely.
awallin: that would be great.
Software by committee -- it may look like a camel, but when you live in a desert, that's great.
jepler: cradek: plz #cam
jmkasunich: "QUICK! /join #cam"
anyone here do java?
Well, I got half the IR KYBD/Mouse working... kinda hard to test mouse from BIOS =)
Didn't get to bed till 4am working on figuring out the pinout.
03lerman 07TRUNK * 10emc2/src/emc/rs274ngc/ (interp_internal.hh rs274ngc.hh rs274ngc_pre.cc):
Some minor changes that permit the specification of interpret debugging file and logging levels in the
.ini file. The contents of the debugging file are meaningless drivel to anyone except a developer. Further
work will be required to make the levels useful.
lerneaen_hydra : Only the liquid kind.
Ok, out to go pintout an ISA bus =) Wish me luck!!!
bah, the vi key to undo what you just did is u, (like ctrlz in doze) .. whats redo in vi?
lerman: this would be a first quick-and-dirty implementation of a text display for pyvcp http://imagebin.org/7243
take a look and see if this would be good enough for a start. I'm now doing it with an actual file, is there a way I can test my code with a named pipe? I don't know how to do that
the code does the polling in the simples way possible: for each update (every 100ms): open the file, check the number of lines, if number of lines is larger than last stored value then update text, close file
one problem is that if the file is updated with more than one new line between polls, then only the last line gets displayed
so it would only work if the interp did not write new stuff to the file more often than every 100ms
robin_sz: I think it's u again - reverses the last change
lerman, tomp: here is the code for my test http://www.pastebin.ca/349542
this is a standalone program, but could quite easily be made into a pyvcp widget
jtr: nope .. u just keeps undoing more and more ...
jtr: its :red[o]
Oops. older version or bad memory - that's my excuse, and I'm stickin to it.
awallin: why are you polling the file at all?
If it can run in a separate thread, it could just read and display what it gets.
or it could do a non-blocking read (if adding a thread is messy)
An issue seems to be that you tell the master to hit you every 100 msec.
I hate polling like that. Twister would let you do a 'select' to be run when data became available.
I'm open to suggestions... but we first need to decide how the text to be displayed is stored. if it's in a file, some kind of polling is neccessary
I know enough about Twister to drop the name.
lerman: I agree that select is normally the way to go
but pyvcp normally is used to display the status of HAL pins
polling is the only way to go
(the underlying premise for most hal pins is that they are discrete time sampled signals, usually with a sample rate _far_ higher than the display rate
So, I understand.
my question: is pyvcp even the right place for this text thing?
you asked for a widget in your message
awallin assumed you meant a pyvcp widget
jmkasunich: I think a 'clean' gui window with everything that an advanced user would need in the same window would be a good goal
so in the future I would want: tool-table editor, offset (var-file) editor etc. all integrated into the gui
ok - today you can put pyvcp things into an axis window, or in a standalond window
hm, and auto tool length setting..
pyvcp is now one easy way to extend AXIS. and AXIS seems to be the preferred gui for a lot of people
Yes. I'm not sure what I wrote, but I was thinking pyvcp widget. I like the idea that it could be integrated.
I guess it depends on perspective
if you see pyvcp as "virtual controls for hal", then text doesn't belong
if you see it as "configurable gui builder that has hal widgets as well as other widgets" then it does belong
I see pyvcp as a way of modularly extending a gui.
how do you see it?
HAL is only part of it.
anyone around here able to read a kernel oops?
jmkasunich: I assume you are asking awallin .
yes, but emc is more than hal, so if you see puvcp as a control panel for emc, then perhaps NML/files etc. can be controlled/displayed from pyvcp
I'll always want the ability to run it stand-alone without any NML cruft, but thats a side note
if pyvcp is being extended to do more powerfull things, this is not the last time that polling is going to be a pain in the ass
it runs standalone now, and I don't see why it wouldn't in the future
most tkinter widgets are event driven, right?
but HAL isn't !
I'm just brainstorming here
ignoring the hal update issue for the moment
So... the real time part isn't event driven, but the non-real time part is. And that makes sense because...?
so, because HAL isn't event driven, each pyvcp widget has an update() method that is run every 100ms
is it possible to set up something so that "data is available for reading on file X" is an event and causes a callback?
...we got there because of history.
jmkasunich: probably, but then your function that generates the event would have to do polling?
lerman: nothing about pyvcp is realtime
awallin: I'm not communicating well
I know. I was thinking of the future where we 'fix' pyvcp.
So that pyvcp is event driven.
ignoring HAL for the moment ;-)
when you set up a widget that accepts mouse clicks, you don't have to poll for mouse clicks
tkinter handles that
Well, a 'simple' change to HAL so that it bumped a semaphore when it changed things would let us be more event driven.
for all I know, it does a select() on /dev/mouse or something
lerman: what "it"?
hal is changing things 1000 times a second
(or 50000 times a second, if you count the base thread)
Yeah 'it' is a problem. You could have multiple semaphores, one for each 'class' of things that HAL was diddling.
pyvcp is very much undersampling hal signals - so its sampling rate needs to be determined by it, not by hal
no, no, no.... it is perfectly reasonable for pyvcp to display (every 0.1 seconds) something that hal is changing every 0.001 seconds
HAL has a lot of signals, so it would be difficult to have one semaphore for each.
it would be evil and gross to even consider that
Also, right now, there can be many readers for a single writer.
Well, gross -- perhaps not evil.
some pyvcp widgets are just like halmeter - they are giving the user a slow look at something that is actually working at a high sampling rate
Evil is the idea that there can be many concurrent gui's controlling the same machine.
well, that goes back to nist
(and there are reasonable arguments in favor of it - like a main gui at the front of the machine, and another one around by the toolchanger for use when loading tools, or a cell level controller, etc)
I know. NIST is not perfect. But we have what we have and changes must be incremental.
but we digress
how are event loops usually implemneted?
the average GUI doesn't poll for mouse clicks or keyboard input
Yeah. They do a 'select' on multiple fd's. QT even allows you to add your own items.
Twister does, too (that's three times I've dropped the name -- without a bite).
I imagine that it does a select() call on /dev/keyboard (or stdin, or some equivalent) and /dev/mouse, and whatever else might generate an event, with a timeout if you have other stuff
I don't know anything about Twister, and have no desire to learn ;-)
All I know about Twister is a few minutes looking at the web page.
that is infintely more than I know
starting with "what is it?"
a language? a gui toolkit? both?
I have little desire to learn much about python, but I've pretty much decided that it might be the way to go for my GWiz project.
googling twister was unhelpful
found this tho: http://www.turdtwister.com/
Twister is more of a framework. There are multiple projects in it. It does protocol stuff. Built in html, tcp, etc.
[22:42:24] <lerman> http://twistedmatrix.com/projects/core/documentation/howto/book.pdf
is there a way to pass the errors/messages that lerman is thinking about via NML messages ?
The model is to use non-blocking system calls to handle all connections in one thread (from the intro).
the twisted model?
eww was my reaction. Adding NML messages would be a pain. If I were to do that, I would probably want to add a generic way of passing a stream of text out thru NML.
or did I get lost in a subject change
Yes that is the twisted model. They describe three possible models: handle each connectionas a separate OS process, handle each connection in a separate thread, and use a single thread to handle all connections.
just read that paragraph - I guess we're in sync
Since that happens to be my preferred way, I like twisted.
Even though I've never used it (and just heard about it yesterday).
It just lost me
1. it calls a connection function to connect to the remote server;
2. the connection function returns immediately, with the implication that the notify the email sending library will
be called when the connect has been made; and
3. once the connection is made, the connect mechanism notiﬁes the email sending function that the connection is
you call 1, and it returns
how does 3 happen?
if 1/2 returned execution to the caller, the callback must happen in another thread
or is the caller expected to eventually give up the thread so pending callbacks can happen?
Through a callback in the same thread. Yes, everything is a callback (more or less) and every callback returns My wife is calling me to (take her out to
) dinner. I'll be back in an hour. Sorry to run.
awallin: still here?
ignoring twisted for the moment
ok, I know nothing about it
we currently have two channels for information
HAL and NML
lerman is suggesting another - pipes
I guess the debate over whether that is a good thing should happen when he is around
but lets assume the debate is over, and we're worried about implementation
ok. I'm afraid I know very little about NML
normal event loop behavior is probably a select() call, waiting for activity on any of several file descriptors (keyboard, mouse, etc), with a timeout so periodic things can be handled
that is very efficient - the select suspends the process until something happens
our problem is that we want to add another file (the pipe) to that select call
but the call is buried somewhere inside tkinter
the question (from /me who knows zero about tkinter) is:
does tkinter supply an api to let you do that?
hmm - getting to be dinner time here too
I'm not sure I follow completely. You want an event to happen whenever the content of a file/pipe changes ?
whenever data becomes available for reading
(at which point, we read it all)
if that is generally available in other programming languages that handle text files, then I'm sure someones implemented it in python too
that usage of select is common
but I didn't find anything quickly, so I did the open, read, close loop thing
for instance, webservers do a select on their open port(s)
looks like tkinter has its own list of events
and files aren't part of it
tkinter events would be concerned with the gui widgets only
but it's possible to write your own event
so the tkinter event loop is inherently unable to deal with other kinds of events?
no I don't think so. If you write a piece of code that somehow senses when something should happen, it could generate an event
that won't work for us
and a tkinter widget that is bound to this event could react
(at least not without additional threads)
a plain old "read" call (C read, I dunno how file IO works in python) will suspend the current thread/process until data is available
very efficient (compared to polling) but you can't read() in the event loop, or you suspend the entire application
the readline etc. functions in Python just return an empty string if we have come to the end of the file
they don't block?
then we can poll
no, they always return something
"something" being an empty string if you are at end of file?
then you could put this in the update function for the text widget:
I wanted to do just one open(filename) in the beginning, then the read commands in the loop, and then a single close(filename) in the end. but I didn't get that to work (just tried quickly)
open when the widget is created
close on shutdown
in the update:
while ( readline(file) returns non-empty line ) : print what it returned
I think that is possible with some tweaking
is that more-or-less what you tried?
yes, I tried that. it runs fine the first time, but then i add some lines to the textfile and press save, but the new lines don't appear
what do you mean by press save?
so it seems open(filename) also somehow sets the length of the file
how are you modifying the textfile?
I was editing the textfile in gedit, and when pressing save the widget should update
using an editor won't work
when gedit saves the file, it actually creates a new one, writes the entire file to it, then does some renaming
the file you originally opened is _not_ the one that gedit writes to
ah, that makes sense then
I'd test it like this:
$ echo crap >foo
$ echo morecrap >foo
$ start the program
it should print crap; morecrap
then $ echo stillmorecrap >foo
>>, not >
you want to append to the existing file, not overwrite it
is foo an actual file, or this named-pipe thing?
in this example, foo is the file
but a named pipe works pretty much the same way
ok, I'll try that
yep, it works. echo some text >> foo now works, and the widget is updated with "some text"
Now I only open the file at the beginning of the program, and close it at the end.
still doing periodic polling of the number of lines in the file with a call to file.readlines() which reads all the lines in the file
I'm going to sleep now, might work on the text widget some more tomorrow if people think it's useful, and lerman makes some changes to the interp so I can test it.
python filehandling is incredibly borked
read() reads the whole stinking file
what if its 100 megabytes?
awallin: could you run "tail -f" ? The -f option tells it to output appended data as a file grows.
jtr: you mean the command line tail?
what we're trying to do is imitate exactly that behavior in a widget
yes. wondered if it would work with a named pipe.
seems like readline (not readlines) would be the right approach
lerman is back. (if anyone cares)
Hello. I've found that EMC's gcode interpreter is sensitive for LC_NUMERIC. environment variable. In my default ru_RU.UTF-8 locale the decimal delimiter is a comma, and the interpreter doesn't work with sample .nc files
was it addressed before?
it works only if I do "export LC_NUMERIC=POSIX"...
erDiZz: no idea...
it might assume american style numbers
EMC itself works with any locale settings
but I'm trying to use the interpreter alone
erDiZz: no idea...
lerman might know ;-)
grepping emc files for LOCALE, or for POSIX etc. gave nothing
The interp uses strtod to read real values. I assume that strtod cares about the locale.
yep, it does
erDiZz: beat me to it. yep it does :-)
I remember that glib has a special function that always use POSIX locale, "unlike strtod" the docs say
I thought that if EMC isn't sensitive to it (as it seems to be), then you've addressed that already :)
'man setlocale' tells me that there is a function that I could use to specify the locale. We could add something to the interp to forces appropriate handling.
yeah, but it'll break the locale as a whole
Using some newly acquired knowledge, we could add something to the .ini file.
I want commas in my UI, when it's in Russian
but you still want decimal points (periods) in the g-code?
Part of the issue is that you can't run the sample programs as they are distributed.
jmkasunich, I think I want both points and commas there
If you force recognition of commas.
I'll better replace strtod with something customized
On the other hand, we could make it so that either comma or dot was accepted as the decimal point. More precisely, convert all commas to dots (since commas are not legal in gcode) except in comments where we would leave them alone.
We already scan each line and convert UC to LC. Just add a conversion of comma to dot.
but then there's the locale which, I'd like to keep
well, I'll just replace strtod at this time
Someone who knows something about this should put a proposed functionality into the wiki for discussion. I'll implement whatever is needed (in the interpreter).
I think that the setlocale function just changes the behavior in the current executable. I doubt that it leaves it changed.
Whoops. Change that I think to I guess.
lerman, is "both commas and dots wanted, and independently of the current locale" a suitable formulation?
The man change does refer to the "processes locale"
process's locale should stay intact