#linuxcnc | Logs for 2013-10-02

Back
[03:10:32] <archivist> ska morning now
[05:46:46] <jthornton> it's morning now
[05:56:37] <DJ9DJ> tag
[06:12:27] <kengu> good afternoon
[06:14:28] <DJ9DJ> dito, good afternoon :)
[06:25:54] <EngEC> Hi there!
[06:26:27] <EngEC> Does anyone here know how to install an library in linuxcnc and use it in HAL?
[06:26:51] <EngEC> (its a C++ lib)
[06:27:05] <jthornton> in the source code?
[06:28:46] <EngEC> yep, its an open-source lib
[06:29:11] <jthornton> what does this library do?
[06:29:58] <EngEC> communication through the USB, it handles the protocol that is used between the software and the driver
[06:32:06] <jthornton> doesn't sound like something you would use with HAL
[06:32:06] <jthornton> what are you trying to do
[06:33:02] <EngEC> though so... send commands through the USB port
[06:33:56] <jthornton> what do these "commands" do?
[06:35:11] <archivist> and which direction
[06:35:18] <EngEC> its for my spindle driver, the 'commands' are send to set the desired spindle
[06:35:49] <EngEC> PC -> Spindle_Driver
[06:36:09] <EngEC> but was nice to make the transciever work XD
[06:36:32] <EngEC> (make it bidirectional)
[06:43:42] <EngEC> does anyone know how to help me?
[06:51:05] <jthornton> you might try the mailing list
[06:51:44] <EngEC> thx j ;)
[06:51:46] <jthornton> but it does not sound like some easy thing to do so be prepared to study the internals of LinuxCNC
[06:53:02] <EngEC> I've been studying it, but needed to ask to the community if anyone could help, that would be easier XD
[06:53:10] <jthornton> does your drive have a modbus input for control?
[06:53:10] <EngEC> nevertheless, thanks alot for your help
[06:53:23] <archivist> or see examples of the usb input devices that people have used and see if they can be extended
[06:53:32] <jthornton> it's always easier if someone else does the work
[06:54:12] <EngEC> arch, that was my idea, but couldnt find one
[06:54:13] <jthornton> all the usb are input only devices IIRC
[06:54:28] <EngEC> j, its not that, but the help is appreciated
[06:54:33] <EngEC> it doesnt use modbus
[06:54:40] <EngEC> its an SPI interface
[06:54:52] <EngEC> hal-input, I read
[06:54:56] <EngEC> I've*
[06:54:57] <jthornton> IIRC Mesa has a SPI card
[06:55:02] <archivist> spi...one of the mesa cards ?
[06:55:04] <EngEC> but that is the problem, I need outtake
[06:55:25] <jthornton> might try and catch pcw_home and ask him
[06:55:28] <EngEC> no, its another driver, one inside the driver
[06:55:38] <EngEC> but that gave me an Idea
[06:56:35] <jthornton> there is some talk on the forum about SPI
[06:56:56] <EngEC> thx, I'll ask him =D
[06:58:56] * jthornton heads out for some mountain bike riding
[06:59:27] <archivist> ew too much effort this time of day :)
[07:00:34] <EngEC> ahaha
[07:20:58] <Jymmm> jthornton: Look at ntop. It can show you all the traffic on the lan and from where and what; apt-get install ntop
[07:25:56] <Jymmm> jthornton: NOT 'ntopng', that is something new, not the original 'ntop' even though they are from the same place.
[08:58:05] <jdh> is it useful for anything other than job seeking?
[08:58:07] <jdh> <urk>
[09:03:20] <JT-Shop> Jymmm: Thanks, I'll have to look at it later, making parts...
[09:03:43] <Jymmm> jthornton: np, I just totallt forgot about it for monitoring traffic on a lan
[09:04:14] <JT-Shop> the netgear thing gives me what I need for now
[09:04:27] <JT-Shop> if the usage goes up I'll start looking for where
[09:04:49] <Jymmm> JT-Shop: NTOP is still neat, you can see who is using what.
[09:04:59] <Jymmm> JT-Shop: all web based
[09:05:44] <JT-Shop> looked like terminal to me, I installed it and did man ntop
[09:06:53] <Jymmm> it has it's it's own web server
[09:07:28] <Jymmm> http://www.elblogderigo.info/wp-content/uploads/2009/08/cacti_ntop1.jpg
[09:10:12] <JT-Shop> must need some setup or something
[09:12:00] <Jymmm> yeah, you have to start it =)
[09:15:27] <JT-Shop> it gives me an error :(
[09:26:48] <JT-Shop> lol you need to start is as sudo
[09:29:23] <jdh> libpcap requires r00t to put the adapter in promiscuous mode
[09:30:05] <jdh> assuming this uses pcap
[10:38:20] <Tom_itx> Jymmm how is ntop different than wireshark?
[12:32:19] <IchGuckLive> hi all B)
[12:39:38] <uw> HELLO
[12:40:16] <DJ9DJ> hi there
[12:40:51] <IchGuckLive> B)
[12:40:58] <IchGuckLive> tomorrow rest day in germany
[12:41:03] <DJ9DJ> indeed
[12:47:25] <IchGuckLive> someone has a moose dxf to cut on plasma
[12:48:56] <jthornton> there is a ton of that on the zone
[12:49:40] <IchGuckLive> i see but no moose
[13:07:25] <Loetmichel> IchGuckLive: sowas? http://www.cyrom.org/palbum/main.php?g2_itemId=8731
[13:07:58] <IchGuckLive> nein ein 3d aufsteler ich hab was
[13:09:07] <Loetmichel> ok
[13:13:06] <IchGuckLive> schönen feiertag BY folks
[13:13:19] <DJ9DJ> danke gleichfalls
[13:13:24] <DJ9DJ> hm, too fast 4 me
[13:15:21] <Loetmichel> grrr... day of german unity... forgot that completely... would have gone to the doc tomorrow... and would have been standing in front of a closed door :-(
[13:15:34] <Loetmichel> i hope he has open friday
[13:15:45] <Loetmichel> s/has/is
[13:26:22] <DJ9DJ> hmm, are you ill?
[13:41:42] <Jymmm> Tom_itx: wireshark is to atmel, as ntop is to ardunio... http://www.youtube.com/watch?v=glNZA9vpy8Y
[13:43:09] <Jymmm> Tom_itx: That's the best video I could find, but ntop shows more than that video so poorly shows
[13:43:59] <Jymmm> Tom_itx: Other than startup and password, theres really not much to know/configure, unless oyu want more specifics.
[13:45:00] <Jymmm> Tom_itx: wireshark gives you specifics, ntop gives you "the big picture"/overview.
[13:45:32] <ReadError> ntop is good
[13:46:12] <ReadError> you may want to put a transparent linux box between your modem/router
[13:46:17] <ReadError> then you can easily block stuff
[13:46:23] <ReadError> and do QOS
[13:52:17] <uw> Hi there DJ9DJ
[13:54:17] <Jymmm> JT-Shop: Basically, ntop will let you see instead of guess where all your traffic is coming from.
[13:55:02] <JT-Shop> ok, thanks
[14:09:01] <DJ9DJ> good evening uw
[14:31:48] <Tom_itx> ReadError, why not block it at the router?
[14:32:10] <Tom_itx> i'm trying to figure out how to set up rules for mine
[14:32:22] <ReadError> not all routers are that flexible
[14:32:34] <Tom_itx> this edgemax is
[14:32:48] <Tom_itx> it basically runs linux
[14:54:57] <ReadError> well yea but if he has 10GB per month to blow he probably doesnt have that ;)
[14:55:31] <ReadError> theres a linux router appliance OS
[14:55:37] <ReadError> forget the name ;/
[14:57:01] <jdh> several of them
[14:59:35] <ReadError> yea im sure theres more
[15:05:58] <jdh> RouterOS & EdgeMax, dd-wrt & tomato for some routers
[15:08:07] <ReadError> http://en.wikipedia.org/wiki/PfSense
[15:08:12] <ReadError> this is bsd based
[15:08:17] <ReadError> which is actually better for routers
[15:09:34] <jdh> BSD is just a fad, it will never last.
[15:10:57] <tjb1> What happened to r00t?
[15:10:58] <Loetmichel> wasnt there a big loophole in the dd-wrt code?
[15:11:18] <Loetmichel> i've read something about router-botnets discovered lately
[15:11:37] <ReadError> has ntop, proxy, etc
[15:11:40] <ReadError> good for what he needs
[15:14:21] <tjb1> Is there a bot in this channel that tracks users?
[15:14:30] <tjb1> Like, able to use a seen command?
[15:17:22] <jdh> !seen tjb1
[15:17:23] <the_wench> last seen in #linuxcnc 2013-10-02 20:59:19GMT 00:02:53 ago, saying Like, able to use a seen command?
[15:17:36] <jdh> looks like there is.
[15:18:41] <jdh> !seen the_wench
[15:18:41] <the_wench> last seen in #heekscad 2013-09-25 02:03:53GMT 186:59:38 ago, saying joined chan
[15:24:13] <tjb1> !seen r00t4rded
[15:24:13] <the_wench> Never heard of the entity r00t4rded you ask for
[15:24:27] <tjb1> hmm
[15:25:54] <tjb1> !seen r00t4rd3d
[15:25:54] <the_wench> last seen in #linuxcnc 2013-05-18 19:11:59GMT 838:59:59 ago, saying joined chan
[15:40:34] <andypugh> Well, I found what was wrong with my PSU (exactly what i thought was wrong with my PSU)
[15:40:35] <andypugh> https://plus.google.com/photos/108164504656404380542/albums/5930254306221907233
[15:41:20] <cradek> yuck
[15:42:31] <micges> andypugh: it was loud?
[15:42:33] <cradek> jmk always knows the right answer for this kind of thing, doesn't he
[15:42:58] <Loetmichel> hmmm
[15:43:01] <andypugh> Yes, though all his solutions are perfect, industrial-strength, and expensive.
[15:43:06] <cradek> haha
[15:43:09] <Loetmichel> what was that, andypugh? diodes or varistors?
[15:43:24] <andypugh> micges: It made me jump, but the smell was worse.
[15:43:28] <Connor> What was it >
[15:43:29] <Connor> ?
[15:43:41] <andypugh> Loetmichel: A normal power resistor!
[15:43:50] <Loetmichel> oh.
[15:44:00] <Loetmichel> softstart circuit?
[15:44:13] <andypugh> Crowbar circuit.
[15:44:32] <Loetmichel> ah, for the dc bus in the VFD?
[15:44:46] <andypugh> Perhaps living up to its name a bit too much.
[15:44:50] <Loetmichel> hrhr
[15:44:57] <andypugh> Loetmichel: DC bus for the 8i20 dirives.
[15:45:21] <Loetmichel> isnt a corbar normally made with a solid short and hoping the fuses in the input will blow?
[15:45:25] <Loetmichel> crowbar
[15:46:18] <andypugh> True, I guess this isn't technically a crowbar.
[15:47:33] <Loetmichel> more like a shunt regulator
[15:48:05] <andypugh> Well, it tries to regulate to zero...
[15:49:17] <andypugh> The purpose is to discharge the caps when the power goes off. I guess not bothering would be an entirely reasonable option, as long as I could guarantee to always remember what I had done...
[15:51:08] <Loetmichel> andypugh: i can assure you: you WILL remember it when you touch it ;-)
[15:51:27] <andypugh> My worry is that I won't remeber anything else ever again.
[15:51:39] <Loetmichel> harhar
[15:51:47] <Loetmichel> how much voltage on that dc bus?
[15:52:17] <andypugh> 300V
[15:52:35] <Loetmichel> the 80V from these were "awakening" to say the least: http://www.cyrom.org/palbum/main.php?g2_itemId=4760
[15:52:41] <Loetmichel> oh, ok, that could be bad
[15:52:46] <CaptHindsight> large bleeder resistor
[15:52:58] <Connor> Make a coil gun. :)
[15:53:00] <Loetmichel> CaptHindsight: will last a bit long
[15:53:04] <Loetmichel> ti discharge
[15:53:05] <andypugh> That _is_ my large bleeder resistor.
[15:53:28] <CaptHindsight> was, your bleeder resistor :)
[15:53:34] <Loetmichel> or will waste to much power when small enough for reasonable discharge times
[15:53:47] <Connor> stove element ?
[15:54:00] <Loetmichel> so the solution with a big resistor and a relais to switch it on the caps at poweroff is a good idea
[15:56:10] <andypugh> A permanently connected stove element would probably over-heat. Aren't they normally thermostatically controlled? And I would need to double the rating of all the parts.
[15:57:07] <Connor> Is this for continuous use ? I.E. not a spike ?
[15:57:29] <Connor> I know that people have used them for breaking resistors without issue..
[15:58:06] <andypugh> It is meant to discharge the caps when the machine is off.
[15:58:17] <Connor> Then it should be fine.
[15:58:25] <andypugh> Otherwise the 300V will hang about to surprise me when I am working on the machine.
[15:59:11] <Connor> the spike shouldn't last long enough to burn them out.
[15:59:27] <Loetmichel> andypugh: WIMP! ;)
[15:59:34] <andypugh> The 100W power resistor is 100% OK (so, it takes 1kW for 4seconds, it can handle that). It is only not OK when a relay fails and wires it permanently across the mains supply.
[15:59:47] <Loetmichel> (not serious!)
[16:00:15] <Connor> Why did the relay fail ?
[16:00:39] <Loetmichel> andypugh: i had the problem the other way round with a softstart for a 2.4kW stage Amplifier with primary SMPS
[16:02:19] <Loetmichel> the 16 caps with 1800µf 400V have killed a whole rack of amps in a fixed installation whre the amps were about 2meters (electrically) from a 250A Circutbreaker on tha mains power rails
[16:02:26] <Loetmichel> big rails that is
[16:02:38] <andypugh> Connor: I am not sure. I suspect a momentary power glitch. The relay is only supposed to close at 300V and not release until 0V. If it tries to release at 300V then (because it is DC) the contacts arc and weld. Then the other contacts in the relay make contact, and we have both the NC and NO contacts closed at the same time (which is not meant to happen)
[16:02:59] <Loetmichel> switched the breaker on: BIG bang, 10 amps spitting oput flames and debris in the front...
[16:03:19] <Loetmichel> and that were 4 times 10W ceramic Resistors in each amp
[16:03:27] <Loetmichel> simply disintegrated
[16:03:53] <CaptHindsight> I use relays with a delay for power transfer switches
[16:04:42] <andypugh> What I should be using is force-guided relays where it is physically impossible for one set of contacts to close if the other is welded.
[16:04:55] <PCW> andypugh: If i disable writes to the setup register the fanuc interface works
[16:05:31] <CaptHindsight> the problem is similar, power goes out, generator turns on, transfer switch moves to generator, power comes back up intermittently
[16:07:04] <CaptHindsight> if the contacts are welding then they aren't big enough
[16:09:19] <CaptHindsight> that will happen if you use the same relay with NC and NO contacts for switching
[16:09:44] <PCW> bugs:
[16:09:45] <PCW> 1: I had an error in the regmap file for the Fanuc aA64 (both count fields are 16 bit) so in the
[16:09:47] <PCW> AA64 format string, the 20 changes to 16 and the last pad changes from 3 to 7
[16:09:48] <PCW> 2. batt and valid bits are inverted
[16:09:50] <PCW> 3. CRC ends up as a scaled floating point number
[16:10:21] <CaptHindsight> PCW: I need an FPGA board with more than 144 IO
[16:11:30] <CaptHindsight> or a breakout board with another FPGA to do more demultiplexing
[16:11:41] <PCW> we had a customer that wanted ~400 I/O (288 scaler counters)
[16:12:19] <PCW> how fast are the signals?
[16:12:25] <CaptHindsight> I just have too many data and control lines
[16:12:59] <Connor> CaptHindsight: What in the world are you doing to need more that 144 I/O ?
[16:12:59] <CaptHindsight> the data is 3bits at 30MHz
[16:13:48] <CaptHindsight> Connor: really big printheads
[16:13:56] <PCW> how many channels of 3 bits at 30 MHz?
[16:13:59] <CaptHindsight> 1k-4k nozzles
[16:14:13] <CaptHindsight> 4 channels per head
[16:14:15] <Connor> ink or 3d printer ?
[16:14:20] <CaptHindsight> yes
[16:15:32] <CaptHindsight> plus they have 5 lines for an eprom and one design also requires a few bits for a 2MHz DAC
[16:16:29] <CaptHindsight> might just have to make a board myself
[16:16:41] <DJ9DJ> gn8
[16:17:08] <PCW> probably (use a zynq and Ethernet the data to the head)
[16:18:58] <CaptHindsight> PCW: ~15MBytes/sec just for nozzle data
[16:19:29] <CaptHindsight> per head and there might be 4->100 heads
[16:20:09] <CaptHindsight> maybe Parallela with lots more IO
[16:20:54] <CaptHindsight> using the 3x20 for now
[16:21:17] <CaptHindsight> the MB has 6 PCIe slots
[16:25:58] <CaptHindsight> I have some zedboards but they only have 68 single-ended I/O or 34 diff pairs
[16:26:53] <PCW> Yeah thats a lot of I/O
[16:27:29] <CaptHindsight> http://global.kyocera.com/prdct/printing-devices/inkjet-printheads/ these are even bigger, 100 million drops a second per printhead
[16:27:49] <CaptHindsight> some use LVDS, some don't
[16:28:57] <CaptHindsight> the ones that don't, you want to sit down with their engineering director and have a chat :)
[16:31:05] <CaptHindsight> http://global.kyocera.com/news/2012/0404_phhs.html 330 million drops per second from a head with 5,120 nozzles
[16:32:28] <andypugh> CaptHindsight: Transputer.
[16:32:54] <andypugh> (That was a joke, don't bother googling)
[16:33:12] <andypugh> We actually have systems at work that use transputers though.
[16:33:19] <CaptHindsight> from the 80's- early 90's
[16:34:19] <CaptHindsight> we're not doing much processing, just moving lots of data around
[16:34:39] <andypugh> Too fast for Smart Serial I guess?
[16:35:50] <andypugh> One of those wide printheads squirting binder into a powder-bed machine could make parts in minutes.
[16:36:05] <andypugh> (or, for that matter, sand moulds)
[16:36:13] <CaptHindsight> GbE and fiberchannel are the most popular
[16:36:22] <CaptHindsight> yeah, how it's done
[16:36:36] <andypugh> It might even be comparable with traditional wood-pattern production rates. That would be game-cganging.
[16:37:19] <CaptHindsight> I think ExONE uses Fuji heads or the Kyocera
[16:38:37] <CaptHindsight> you can also mix resin with the sand, and then just print and cure the outside walls, then bake the whole mold to make it solid
[16:39:03] <andypugh> I am trying to persuade a friend that he needs me to build him a sand mounld printer
[16:42:25] <CaptHindsight> andypugh: most of this is pretty straightforward to build except for obvious patents and inkjet tech being under really tight NDA
[16:43:53] <andypugh> This would not be commercial, just for making parts ofr his vintage vehicles.
[16:43:55] <CaptHindsight> printing sand molds is not difficult but the patent holders artificially keep the costs of doing so high
[16:44:50] <CaptHindsight> printheads are also expensive, so you're fuel injector approach will work
[16:45:05] <CaptHindsight> you're/your
[16:45:15] <CaptHindsight> bbl
[16:46:35] <Tom_itx> andypugh i put a few leds in the PSU to help drain my caps
[16:46:37] <Tom_itx> works rather well
[16:48:50] <Tom_itx> seen on the boards i made to mount the caps: http://tom-itx.dyndns.org:81/~webpage/cnc/psu/control1.jpg
[16:56:41] <andypugh> That's a lot of caps, how long does it take the LEDs to discharge them?
[16:57:46] <andypugh> As I keep pointing out, the voltage and capacitance I am talking about makes it a slightly different proposition.
[16:59:54] <andypugh> For a start the resistor to limit the current to 50mA at 300V would be dissipating 15W.
[17:05:23] <andypugh> I made a voltage-doubling supply a while ago. 2 caps, 2 diodes, 700VDC from the mains. That scared me.
[17:07:55] <Tom_itx> not very long
[17:08:08] <Tom_itx> i got them surplus, they're small but add up to what i needed
[17:09:18] <Tom_itx> they discharge in maybe 10-15 sec
[17:11:47] <andypugh> Tom_itx: What voltage are the caps at?
[17:12:35] <andypugh> PCW: The CRC ending up as a float is a consequence of Smart Serial making everything float. (which is typically more useful in HAL)
[17:12:40] <PCW> andypugh suggested AA64 string:
[17:12:42] <PCW> p%5pbatt_faill%1bp%2ppos_invalid%1bp%9plow%16lp%2pencoder%16hp%2pcomm%10up%7pcrc%5u
[17:13:20] <andypugh> I just removed the requirement to have a name, so p%p12 can just be %p12
[17:13:29] <PCW> OK
[17:13:57] <andypugh> But I will use your string, if it works for you.
[17:14:08] <PCW> we encoder non floats by having 0 scaling numbers
[17:14:17] <PCW> encode
[17:14:41] <PCW> but perhaps a intger type would be better
[17:14:48] <PCW> integer
[17:15:26] <PCW> I think its better without the extra P's
[17:15:32] <andypugh> Well, in HAL it is no problem, and CRC is useless at the moment. I would suggest that we would need to add a CRC "type"
[17:15:54] <PCW> or calculate it in the driver
[17:15:58] <andypugh> You can't do CRC in HAL, you don't have the bytes to CRC..
[17:16:33] <andypugh> Yes, exactly, CRC needs to be intercepted by the Smart Serial driver.
[17:17:06] <PCW> I have (fairly crufty) example code
[17:17:06] <andypugh> (I am thinking that UART and BSPI could come under this formatting convention too)
[17:17:08] <Tom_itx> andypugh, they're around 48-50v
[17:17:52] <PCW> Yeah its a much nicer to have those thing programmable
[17:17:59] <andypugh> PCW %16ogu = 16 bits of gray-coded unsigned output bits...
[17:19:05] <andypugh> Actually, that won't work, it would have to be uart_0_out=hello%34uworld%24f, uart_0_in=...."
[17:19:57] <andypugh> The trick is to add that without breaking the 7i65(?) driver.
[17:23:29] <PCW> as far as I know the 7I65 driver is broken anyway
[17:23:47] <andypugh> Oh
[17:23:55] <Jymmm> I blame the 7i65 mfg
[17:24:05] <Tom_itx> heh
[17:24:05] <andypugh> I blame the driver writers.
[17:24:07] <PCW> at some point it started segv-ing
[17:24:20] <andypugh> I thought we solved that?
[17:24:30] <Jymmm> andypugh: YEAH! They can't even spell COLOR correctly!!!
[17:24:32] <andypugh> I guess that is why you sent me one several months ago?
[17:25:00] <PCW> I was able to avoid the segv but it no longer worked at that point
[17:25:26] <andypugh> I need the mill back up to test. But I will put it on my list to test.
[17:26:19] <Tom_itx> just how big is that list?
[17:26:35] <PCW> Is the phase_error_us pin the scaled read of 7600?
[17:28:31] <Jymmm> WOW http://www.youtube.com/watch?v=FcifJkhXpMM
[17:28:52] <andypugh> PCW: It should be, though it is currently worryingly integer. If you set the plimit to 0 you will see that it oscillates between -500 and +500 uS. which sounds right.
[17:30:40] <PCW> Yes thats what you would expect if it cant lock
[17:31:11] <andypugh> Seems to indicate that the scaling it right?
[17:31:20] <PCW> Yes
[17:31:24] <Tom_itx> Jymmm, that's some crappy welding
[17:31:44] <andypugh> I have shoelaces that strong. But thinner.
[17:31:58] * Jymmm smacks the synthetic rope out of Tom_itx
[17:32:49] <andypugh> (Seriously, 4mm spectra shoelaces, 1000kg breaking strain, just in case)
[17:32:49] <Jymmm> 1/8 = 2500lbs avg strength
[17:32:50] <Tom_itx> you goin climbin with 3/4" rope?
[17:33:30] <andypugh> I have caved with 9mm rope. It looked too thin.
[17:33:50] <Jymmm> 1/4" = 8600lbs
[17:33:56] <Jymmm> avg
[17:34:01] <Tom_itx> i use 5/8 for tree work similar type rope
[17:34:30] <Jymmm> 1/2" = 34,000 lbs
[17:37:29] <andypugh> Tom_itx: 16mm rope? Is that a circumference?
[17:37:51] <Tom_itx> diameter
[17:38:06] <andypugh> That's pretty chunky rope
[17:38:17] <Tom_itx> i don't care to fall
[17:38:26] <Tom_itx> and it gets abused
[17:38:39] <andypugh> Cavers consider 12mm to be big (that would be 1/2")
[17:39:03] <andypugh> But I guess you don't have to drag your ropes a few miles through constricted passages.
[17:39:05] <Tom_itx> pretty sure this is 5/8.. it could be 1/2
[17:40:12] <andypugh> As I said, 9mm is perfectly OK, but it _looks_ wrong. (3/8')
[17:40:37] <andypugh> (Caving rope doesn't see dynamic loads)
[17:41:35] <Tom_itx> yeah, i've seen some of that thin stuff (1/8 or so) rated at unreal numbers
[17:41:40] <andypugh> The jammers are rated from 8mm to 13mm
[17:41:45] <Tom_itx> mostly used to carry equipment i suspect
[17:43:13] <andypugh> Yes, you would probably not hang yourself on 3mm string.
[17:44:05] <andypugh> Though the Russians devised an entire set of caving equipment based around 5mm(?) steel wire rope.
[17:44:51] <PCW> There is an issue with the DPLL there will be errors in modules that use it until its locked
[17:45:51] <PCW> there also seems to be a bug with the battery bit (and maybe other bits)
[17:45:53] <PCW> the battery status is only updated if the encoder count changes
[17:51:07] <andypugh> Is that them, you or me?
[17:51:48] <PCW> also data-incomplete seems to come from the wrong place (and encoder bit?)
[17:52:26] <PCW> Ill check the battery bit on winders
[17:55:19] <PCW> Must be a driver thing, the battery bit in the data stream is updated in real time
[17:57:12] <andypugh> data-incomplete is *0x1800 & 0x800, which sounds like the right register and bit?
[17:57:37] <andypugh> Cable fault seems to be wrong, mind.
[18:00:16] <andypugh> And data-incomplete was only being checked if there was a cable fault (oops)
[18:04:09] <PCW> cable fault is 0x1700 0x80000000
[18:04:25] <PCW> (high = fault)
[18:05:37] <PCW> data incomplete is now basically the busy bit in the global busy register
[18:07:15] <PCW> if anything is wrong (cable error, busy, no return data, stale data etc) the busy bit will be high
[18:07:29] <PCW> so probably no need to read 1800
[18:09:35] <andypugh> OK.
[18:10:30] <PCW> that much is basically working (if i pull the plug all the data goes to 0)
[18:12:00] <andypugh> How does this look?
[18:12:01] <andypugh> ct 2 23:56:28 dn2800 kernel: [93526.329815] hm2/hm2_5i25.0: Writing 0x00001280 to 0x1800
[18:12:01] <andypugh> Oct 2 23:56:28 dn2800 kernel: [93526.329823] hm2/hm2_5i25.0: Writing 0xF0007DD4 to 0x1900
[18:12:02] <andypugh> Oct 2 23:56:28 dn2800 kernel: [93526.329828] hm2/hm2_5i25.0: Writing 0x4C428000 to 0x1700
[18:12:03] <andypugh> Oct 2 23:56:28 dn2800 kernel: [93526.330775] hm2/hm2_5i25.0: Writing 0x00001200 to 0x1800
[18:17:37] <andypugh> 1024 kHz is 0x7DD4 or 0x1EB8420 ?
[18:23:05] <PCW> Let me check my calculyser
[18:24:47] <PCW> 0x7DD4 is what I get
[18:29:11] <andypugh> Great.
[18:29:31] <andypugh> That just leaves 0x1700
[18:30:59] <andypugh> The 4C looks right
[18:34:43] <PCW> 64 +8 +4
[18:34:49] <PCW> yep
[18:35:30] <andypugh> I still don't quite "get" the request length
[18:39:11] <PCW> the fanuc encoder needs a request pulse, it should be 8 usec long at 33.333 MHZ this is 10A (428 is 10A shr 2 so is correct)
[18:41:19] <andypugh> So, it seems that we correctly turn on writes, set the values and turn off writes?
[18:42:35] <andypugh> Currently the busy flag sensing is on the individual channel bits. Do you want me to push now, or wait until I have recongigured for the busy-bits-global version?
[18:43:58] <PCW> Look like it dont return the write enable state on reads but I should
[18:45:24] <PCW> Looks OK I would wait for the global busy check as its designed to save I/O cycles (no need to read anything but global busy and data regs for normal use)
[18:45:26] <andypugh> Does that matter?
[18:45:42] <PCW> only for debugging
[18:45:47] <andypugh> (write-enable, that is)
[18:46:40] <PCW> not really but it was assumed at the beginning that the defaults would be used (so they are protected)
[18:46:42] <andypugh> As it is just me and thee looking at this, there is no penalty in me pushing the current version to the dedicated branch.
[18:47:30] <PCW> sure and i can try my (cable error = stay busy) firmware
[18:49:01] <PCW> Also only the global busy bit has the gating with DAV so its really the authority on whether the data is any good or not
[18:50:23] <andypugh> Aye, I get that, but you have hours to go, and I have mere minutes
[18:50:58] <PCW> no hurry. its great to see it working as is.
[18:53:28] <andypugh> I used your config string. That does not appear to swap "valid" and "batt", curiously.
[18:53:34] <somenewguy> I have two dumb questions for you guys, I think I already know the answer to the first one tho
[18:54:02] <somenewguy> can something like this "variable transformer" be used to control motor speed of my 1/4 hp motor, or will an inductive load blow it up
[18:54:03] <andypugh> Typicallly the annswer is "It's a type of fish"
[18:54:03] <somenewguy> http://www.heatersplus.com/18tp.html
[18:54:25] <somenewguy> thats a heck of a poisson ratio...
[18:54:41] <PCW> they were not swapped, just had wrong names (batt should be batt_fail)
[18:54:47] <andypugh> it can control the _power_ of your AC motor.
[18:54:59] <somenewguy> i realize I would need feedback and all that jazz
[18:55:12] <PCW> (valid should be pos_invalid)
[18:55:18] <somenewguy> just wondering if it can happilly drive a motor, I know sometimes these things are not as simple as they appear
[18:55:30] <andypugh> How much does it cost?
[18:55:49] <somenewguy> I have one that has been orphaned, they are like 180
[18:56:04] <somenewguy> or 90, its been a while
[18:56:27] <somenewguy> $180
[18:56:34] <PCW> it might sort of drive a AC-DC motor
[18:57:23] <andypugh> You can buy a 3hp Variable Frequency Drive for that money
[18:57:55] <andypugh> http://www.ebay.com/itm/300652886556
[18:58:16] <andypugh> But I don't think that will drive a 1-phase motor
[18:58:43] <andypugh> If it was free, then try it.
[18:58:49] <somenewguy> well I already have the Payne transformer sitting infront of me on my desk
[18:59:07] <somenewguy> but I don't wanna blow it up, could serve a better use somewhere else
[18:59:23] <somenewguy> and it was paid for with money, so I don't wanna hook it up to somethign that will just kill it
[18:59:35] <somenewguy> wow that VFD si a lot chepaer than I would have expected one to be, of that size
[18:59:56] <somenewguy> my mill is a mini mill, so 1/4 hp is plenty, for the record
[19:00:03] <andypugh> I can see that with a Radio Control servo to twiddle the knob for you that it might work
[19:00:20] <somenewguy> which I also have sitting in a box
[19:00:40] <somenewguy> hence me going "hmmmm" when I noticed it on the shelf for the first time in a while
[19:00:58] <andypugh> Which Mini-Mill? They typically already have a variable speed drive.
[19:01:08] <somenewguy> drilling 1mm holes 25mm deep in acrylic had me wishing for a slightly slower low speed
[19:01:09] <somenewguy> taig
[19:01:34] <somenewguy> my friend has a chinese one w/ speed controll, I am trying to get him to let me breed em
[19:02:58] <andypugh> I grafted a proper 1hp 3-phase onto my Chinese mini-mill (actually I think mine is an Indian knock-off of a cheap Chinese knock-off of a cheap Emco)
[19:04:25] <somenewguy> haha
[19:04:26] <andypugh> Not likely to work on a Taig though: https://picasaweb.google.com/lh/photo/Dk3wsS9o7XJ-N2kfUnESDtMTjNZETYmyPJy0liipFm0?feat=directlink
[19:04:38] <somenewguy> the taig is a bit smaller than the chinise mill
[19:04:53] <somenewguy> woah
[19:04:58] <somenewguy> that's a lot of mooor
[19:05:33] <somenewguy> I am kinda hoping to have a treadmill fall into my lap, cause I have a few 24 volt/25 amp DC motor controllers, and I understand them a bit more
[19:05:43] <somenewguy> induction motors are sitll black magick as far as I am concerned
[19:06:01] <andypugh> That whole machine is now filed under "Error of judgement, sell to a fool"
[19:06:49] <andypugh> It is an OK lathe, but very narrow in the bed for the centre height and length.
[19:07:08] <andypugh> But it is a dreadful mill.
[19:07:31] <somenewguy> the proportions look a little, unique
[19:07:50] <somenewguy> oh speaking of unique, here was my second important question
[19:08:17] <somenewguy> I don't have a flat computer surface i work on for the mill, and likely never will so my trackball mouxe (shut up i ran out of laser/ir ones) is a pile
[19:08:26] <somenewguy> really hard to use on my dented little table
[19:08:47] <somenewguy> so I was wondering if anyone has ever used those ball mice (the onese with teh ball on top, not sure what they are called) in the shop, if it is convenient?
[19:08:57] <kwallace2> Unless I missed something, that heatersplus unit is for brushed motors... or heaters.
[19:09:01] <somenewguy> that way sufrace quality just doesn't matter, and Icould hold it as I walk around if needed
[19:09:29] <kwallace2> Oops, I scrolled to the wrong place.
[19:09:33] <somenewguy> kwallace2: the hearsplus thing is used for heaters a whole lot yes, I don't think it would work on a brushed motor
[19:09:35] <somenewguy> still AC
[19:09:56] <andypugh> The mill has been replaced by this: 1970 Harrison iron + 750W servos. http://www.youtube.com/watch?v=X0celdfZmkA
[19:10:21] <kwallace2> A brushed AC or "universal" motor.
[19:10:32] <somenewguy> the SECOND I have the floor space and a structural floor, I am selling the taig and gettting a real mill
[19:11:15] <somenewguy> moster motors
[19:11:30] <somenewguy> I am very jealous
[19:12:23] <andypugh> somenewguy: Well, really, what you want is a touchscreen, a jog-wheel, an axis-selet and the Touch (or Gscreen or GmoccaPy) interfaces
[19:12:26] <somenewguy> are brushless servos steppers with feedback?
[19:13:04] <somenewguy> I was thinking about a touch screen, but not too sure about spending the money, also would need to have a more finalized setup
[19:13:09] <andypugh> Techically, yes they are
[19:13:26] <somenewguy> also this is a hobby (that makes me money, but not much) so I need to TRY and be carefull how much I spend
[19:13:31] <somenewguy> that only goes so well of course...
[19:14:10] <andypugh> But they are a 2 or 4 or 6 step-per-rev stepper, but with a huge degree of (closed loop) microstepping
[19:16:28] <somenewguy> jog wheel and axis select?
[19:16:48] <somenewguy> so like a spinny encoder thing for traveling the axis? and dedicated buttons for selecting which one
[19:17:24] <andypugh> You can actually run a stepper as a brushless servo as long as you have more than 6x as many encoder counts as steps (at which point it looks like a very-high pole-count brushless + hall sensor motor)
[19:17:24] <somenewguy> aoh, google turned it up
[19:17:50] <kwallace2> Cheap MPG:
[19:17:53] <kwallace2> http://www.wallacecompany.com/machine_shop/Shizuoka/mpg_proto-1a.jpg
[19:17:57] <somenewguy> I acutally have encoders that probably fit the bill sitting unused in a box here, but they are too expensive and not mine to play with sadly
[19:18:10] <somenewguy> took me forever to figure out what MPG was all about in Mach3 lol
[19:23:16] <andypugh> If you look at my video again, (the first few seconds) there is a big bronze knob. (I had the material). That actually sits on one of these: http://www.ebay.co.uk/itm/160392668169
[19:23:51] <andypugh> For the front panel MPG cheap is fine.
[19:25:40] <somenewguy> oh cool
[19:25:50] <andypugh> You may miss steps at high speed, but are you counting?
[19:26:05] <kwallace2> The bronze knob is on one of those ebay encoders?
[19:26:09] <somenewguy> I mesed up my last newark order and need to get some more resistors, maybe I will see if there is a cheap encoder to nab
[19:26:20] <andypugh> kwallace2: Yes
[19:27:00] <Tom_itx> how many clicks per rev are those?
[19:27:21] <Tom_itx> i got similar from dk or mouser a while back
[19:27:31] <andypugh> (And, despite having a nice Mesa card, it is on a software encoder counter connected via GPIO, as my specific firmware is Resolver + Smart Serial.
[19:27:52] <Tom_itx> alps
[19:27:57] <andypugh> That one is 16 counts per turn
[19:27:58] <somenewguy> so you think the track ball mouse is a bad idea? I need to replace my mouse is the real issue, a regular ball mouse is uselss on a dented steel table
[19:29:05] <Tom_itx> http://www.mouser.com/ProductDetail/ALPS/EC11E15244B2/?qs=%2fha2pyFadugMG2RDp45gzKy3E%252bJw2bg9wyx%252blVW1GEpKn%2fqxa66ihw%3d%3d
[19:29:23] <andypugh> There is a specific HAL component to make low-count MPGs less annoying: http://www.linuxcnc.org/docs/html/man/man9/ilowpass.9.html
[19:29:41] <Tom_itx> what's it do?
[19:30:11] <Tom_itx> i used some element on mine i think, i forget what it was
[19:30:16] <andypugh> It pretneds that every count is 1000 counts and low-passes the result
[19:30:17] <Tom_itx> to smooth out the stepping
[19:30:25] <kwallace2> I prefer my shop made 100 counts per rev. encoder.
[19:30:31] <Tom_itx> maybe that was it...
[19:30:38] <Tom_itx> kwallace2, me too
[19:31:22] <andypugh> <top trumps> I have a spare Resolver I may use.
[19:32:24] <andypugh> But, in practical terms, the 16 counts per rev is _entirely_ OK, and I haven't even bothered with the ilowpass thing yet,
[19:33:10] <kwallace2> I have some resolvers left over from removing them from my HNC. They hold the self down pretty well :)
[19:33:30] <andypugh> A single click at low speed 0.1mm per click goes "tonk" but that's not a problem.
[19:33:51] <somenewguy> oh I guess I have one more good question left here
[19:34:16] <somenewguy> I was digging into linuxcnc on my computer hoooked up to the mill for the first time last night, and realized i was in way over my head on the configs. I read the manuals for HAL and kinda when "huh"
[19:34:24] <andypugh> kwallace2: Resovers really are the best of all encoders, you should put them back.
[19:34:30] <somenewguy> I need to learn all the terms and software pieces involved with linux cnc
[19:34:31] <Tom_itx> andypugh, the 100 count are handy when i'm setting tools. i know what each click will get me
[19:35:06] <somenewguy> is there a flow chart/block diagram somewhere that shows what are the key moduals in linux cnc, what they do? I don't fully grasp the level or number of discrete pieces of software at play
[19:35:09] <kwallace2> The 100 count MPG allows me to more easily dial in locations and distances.
[19:35:22] <Tom_itx> same here
[19:35:30] <andypugh> somenewguy: Don't fret it. You will absorb it.
[19:36:00] <somenewguy> I figure I will get it eventualy (or give up and move back to mach3 but on newer hardware)
[19:36:14] <somenewguy> is there a good overview of how linuxCNC works?
[19:36:58] <somenewguy> for example when trying to toggle pins, reading the manual it is unclear if HAL toggles for me, or if I ask HAL to do it, or if HAL is called by some other program to do it, or if HAL just maps stuff for everyone else to play with
[19:37:04] <somenewguy> TLDR, I have no idea how linuxCNC works
[19:37:05] <andypugh> Well, as a user: G-code->Magic->Hal->Hardware Magic.
[19:37:08] <somenewguy> and want to learn
[19:37:29] <somenewguy> but i am a mechanical engineer, so I need someone to hold my hand
[19:37:37] <somenewguy> is there a top down description on the web somewhere?
[19:37:55] <andypugh> That was not meant to be condescending.
[19:38:50] <andypugh> I write the Hardware Magic part, but the G-code->Hal magic is still a mystery to me
[19:40:31] <somenewguy> haha
[19:40:49] <somenewguy> then can you tell me how to do one simple task but in gory detail?
[19:41:48] <andypugh> As a system integrator you need to get HAL first. The Interpreter converts G-code into position commands in HAL. These update every 1mS. The velocity, accel, and kinematics cleverness is all done above this level. In HAL we have axis.N.motor-pos-cmd. Where N is from 0 (X) to 8(W)
[19:44:11] <andypugh> Then, in HAL, we decide if that value needs to go to a stepgen, or a PID (For a servo) or a modbus request, or perhaps the colour of an LED. G0 B255 could easily set your room lighting to white.
[19:44:50] <somenewguy> So g-code gets read by the inerperter and turns into a "I want to be here" command
[19:45:12] <somenewguy> which is passed to some other program that decides "How we get there from here"
[19:46:07] <somenewguy> which goes to HAL which translates "toggle SETTING" into "toggle PHYSICAL_DEVICE"
[19:46:36] <andypugh> Yes, pretty much
[19:47:36] <andypugh> http://www.linuxcnc.org/docs/html/man/man9/motion.9.html are the main things that the G-code sends to HAL
[19:48:14] <andypugh> Then there are also : http://www.linuxcnc.org/docs/html/man/man1/halui.1.html Which can be very useful,
[19:48:34] <andypugh> and also http://www.linuxcnc.org/docs/html/man/man1/iocontrol.1.html
[19:49:01] <andypugh> The latter of which I intend to delete :-)
[19:49:31] <PCW> Fanuc CRC calc: (slow bit at a time way)
[19:49:33] <PCW> for index := 0 to 75 do { CRC-5 ITU }
[19:49:35] <PCW> begin
[19:49:37] <PCW> crcreg[0] := bitarray[75-index] xor oldcrcreg[4]; { CRC calculated MSB first }
[19:49:39] <PCW> crcreg[1] := oldcrcreg[0];
[19:49:41] <PCW> crcreg[2] := oldcrcreg[1] xor bitarray[75-index] xor oldcrcreg[4];
[19:49:43] <PCW> crcreg[3] := oldcrcreg[2];
[19:49:45] <PCW> crcreg[4] := oldcrcreg[3] xor bitarray[75-index] xor oldcrcreg[4];
[19:49:47] <PCW> oldcrcreg := crcreg;
[19:49:49] <PCW> end;
[19:50:18] <andypugh> (Because there is a layer above called NML that is transparently in flux)
[19:50:43] <somenewguy> my braiiiiin
[19:51:47] <andypugh> somenewguy: It's not complicated if you start from "what does my machine need to know"
[19:52:37] <somenewguy> lets go with "its not impossible to undertand..."
[19:52:43] <somenewguy> I maintain it is complicated
[19:53:33] <andypugh> The simplest possible 3-axis machine just needs to link a stepgen to each of axis.0.motor-pos-cmd, axis.1.motor-pos-cmd and axis.2.motor-pos-cmd.
[19:54:54] <andypugh> (and there are wizards to do that, but who trusts wizards?)
[19:55:12] <Tom_itx> where's the fun in that?
[19:56:18] <andypugh> I have used stepgen and pncconf to create a skeleton, but I am a real fan of actually understanding HAL.
[19:57:44] <andypugh> It is curious to think that there was resistance to the addition of HAL. I think it has very much become the Jewel in thr Crown of LinuxCNC
[19:58:08] <somenewguy> the wizard settings did not make sense for my g540 driver
[19:58:22] <somenewguy> way wrong default setttings it seemed, but I hardly understood half of it, and wasn't looking to get it right at the time
[19:58:34] <andypugh> G540 really ought to "Just Work"
[19:58:35] <somenewguy> but it sucesffully joggged my axis (the wrong amounts tho...)
[19:58:47] <somenewguy> I would think , isn't it a super common controller
[19:59:02] <somenewguy> by wizard I mean stepgen
[19:59:07] <andypugh> Aye, that it be
[19:59:49] <andypugh> Stepconf + G540 ought to be too simple. What went wrong?
[20:00:00] <somenewguy> it defaulted to 2 microstepping
[20:00:07] <somenewguy> and I am like 70% sure it is 10
[20:00:43] <jdh> I'll give you an extra 30%
[20:00:53] <somenewguy> also (and don't quote me on this, I rushed thru and didn't really care at the time since I was just testing the machine) when I noticed jogging 2 inches was really jogging close to 1, I doubled teh steps per rev
[20:01:06] <somenewguy> and the distance travled did not seem to double
[20:01:11] <andypugh> OK, Stepconf has no real idea what you have connected. It really can't tell.
[20:01:11] <somenewguy> more like a 50% increase
[20:01:26] <somenewguy> I thought I selected stepconf from a dropdown list tho
[20:01:29] <somenewguy> err
[20:01:36] <somenewguy> selected G540 from a drop down list
[20:02:04] <andypugh> Can't help, I really dont
[20:02:10] <andypugh> 'use stepconf.
[20:02:21] <somenewguy> I will throw a new drive in the pc tomorrow and install linuxCNC and ACTUALLY try and set it up this time
[20:02:31] <somenewguy> I was running it off the live cd to try and toggle a dang pin and FAILLED
[20:02:37] <somenewguy> oh can you help me with that?
[20:02:47] <somenewguy> the ONLY thing I want to do
[20:02:54] <somenewguy> is toggle pin 17 on my paralel port
[20:02:57] <somenewguy> thats it
[20:02:59] <somenewguy> nothing more
[20:03:03] <andypugh> I guess that this time you will at least understand the questions.
[20:03:10] <somenewguy> I like to hope so
[20:03:46] <somenewguy> also bigjohn converted my mach3 config to stepconf, so that should streamline everything
[20:03:58] <andypugh> Do you know your parport base address?
[20:04:19] <somenewguy> 0?
[20:04:22] <somenewguy> or the hex address
[20:04:37] <somenewguy> the answer is yes, jsut not infront of me right now
[20:04:44] <andypugh> 0 may work, 0x378 is likely
[20:05:03] <somenewguy> linuxCNC was able to jog my axis around using the parallel prot based on what the stepgen spat out
[20:05:13] <somenewguy> so it was probably 0x378
[20:06:15] <andypugh> OK, so, if you only want to toggle a pin (and as a demonstration that you can use LinuxCNC in a modular way)
[20:06:53] <andypugh> Open a terminal and type halrun
[20:07:16] * somenewguy is actually booting a laptop into linuxCNC so he can follow along w/o a mill infront of him
[20:07:47] <andypugh> You are now in a HAL prompt, and all the commands you see in the HAL file are now valid
[20:08:14] <Tom_itx> andypugh is that similar to sim?
[20:08:42] <Tom_itx> i'm not sure i've ever used that
[20:09:38] <andypugh> Tom_itx: No, it works for real hardware. You can load a custom GUI and control a machine with no G-code, for example.
[20:09:53] <Tom_itx> ahh
[20:10:24] <andypugh> Or, just load the parport driver and toggle pins,
[20:10:43] <andypugh> somenewguy: Ye back yet?
[20:10:50] <somenewguy> yeap
[20:10:58] <somenewguy> surrounded by moniters and low ond desk space
[20:12:03] <andypugh> Can you open a second terminal and then tail -f /var/log/kern<tab>
[20:13:05] <andypugh> Because that will give a clue when my instructions are wrong, (I am sat at a Mac :-)
[20:13:20] <somenewguy> in the hal prompt?
[20:14:00] <andypugh> No, a separate bash terminal in a separate window
[20:15:11] <andypugh> You can skip that if you trust me to get it right, but even I don't
[20:15:46] <somenewguy> ok, rememer this is on a laptop, not the real machine
[20:15:54] <andypugh> That's fine.
[20:15:57] <somenewguy> ok
[20:16:06] <somenewguy> so it spat out a handfull of things
[20:16:25] <andypugh> does the lapdog acually have a parport?
[20:16:29] <somenewguy> and has a blinking cursor at the end, is it waiting for somethign?
[20:16:40] <somenewguy> derp
[20:16:42] <somenewguy> no
[20:16:46] <somenewguy> I have one that does have a parport
[20:16:51] <andypugh> That may not matter.
[20:17:16] <somenewguy> ... I keep typing int othe wrong keyboards
[20:18:25] <andypugh> Yeah, i only have one keyboard, but normally have about 3 machines open (VMs, SS-X and VNC) so make the inverse mistake
[20:18:48] <somenewguy> I immediatly regret not SSHing in
[20:18:56] <somenewguy> but anyways, did you need need something from the output of that?
[20:19:21] <somenewguy> and why is it blinking waiting for a return?
[20:19:55] <andypugh> loadrt hal_parport cfg="0"
[20:20:36] <andypugh> Any output?
[20:20:53] <somenewguy> command not found
[20:21:00] <somenewguy> loadrt
[20:21:13] <andypugh> exit
[20:21:39] <andypugh> uname -r
[20:22:30] <somenewguy> 2.6.32-122-rtai
[20:22:39] <somenewguy> i didn't type exit
[20:22:48] <andypugh> Hmm, odd,
[20:23:38] <andypugh> So, what happened when you typed "halrun" ?
[20:23:49] <somenewguy> got a hal prompt
[20:23:59] <somenewguy> seperate window, did i need to enter any of those commands into halprompt?
[20:24:24] <andypugh> Ah, I was unclear.
[20:24:57] <andypugh> Yes, from now on the tail -f window is loggging-only
[20:25:15] <andypugh> You need to type in the halrun window
[20:25:48] <andypugh> So, at the halrun prompt, loadrt hal_parport cfg="0"
[20:25:57] <somenewguy> oh ok
[20:26:42] <somenewguy> can't find module 'hal_parptport....
[20:26:45] <somenewguy> how did that t get in there
[20:26:56] <somenewguy> no such device error
[20:27:24] <andypugh> Well, so, as you said, you have no parport :-)
[20:27:47] <somenewguy> luckily I booted up laptop #2, which has a prallel port
[20:27:55] <somenewguy> let me retry those steps over there
[20:28:07] <andypugh> loadrt hal_parport cfg="0x378"
[20:28:36] <somenewguy> clicked thru happily
[20:29:06] <somenewguy> saw config string 0x378 in the other window (back on the machien that does NOT have a parllel port)
[20:29:09] <somenewguy> sorry, ADD over here on this end
[20:29:32] <somenewguy> failed to tell you the machine with the parallel port said "operation not permitted"
[20:30:02] <andypugh> Can I just stress that just because Linux + LinuxCNC lets you access your hardware from the command line, you really don't need to do it this way normally. But you can.
[20:30:37] <somenewguy> linux doesn't scare me , but that is good to know
[20:30:50] <somenewguy> I suck at linux, and general hardcore computer usage, but I do enjoy struggling at it
[20:31:01] <somenewguy> when something finally works it feels good, even if tis a fleeting victory
[20:31:38] <andypugh> Operation Not permitted is a puzzle.
[20:32:04] <andypugh> Are you still in the halcmd prompt?
[20:32:53] <somenewguy> yeah, should I just stick with the laptop without the lptport?
[20:33:19] <andypugh> Either should work.
[20:33:22] <somenewguy> come to think of it, I just remembered the laptop WITH the lptport actually failed at loading the latency test, so it may have a deep down issue w/ linuxcnc
[20:33:45] <andypugh> 'Tis possible.
[20:33:56] <somenewguy> so, back ot the original laptop with no lptport (running off a live cd)
[20:34:15] <somenewguy> it loaded 0x378 no problem
[20:34:45] <andypugh> Either should work with 0x378 ( but the output may not go to anywhere phyisical)
[20:36:12] <andypugh> Right, to toggle the parport but you don't have: setp parport.0.pin-17-out 1
[20:36:46] <andypugh> And then to reset it: setp parport.0.pin-17-out 0
[20:37:02] <somenewguy> man I got soooo (kinda) close trying to do that last night
[20:37:05] <somenewguy> but thats it?
[20:37:17] <somenewguy> no need to set pin 17 as output prior to that?
[20:37:17] <andypugh> (and, this is actually all that stepgen does, but faster)
[20:37:42] <somenewguy> thank you so much for the help
[20:38:00] <somenewguy> as I said, I tried to RTFM but it was a good bit of information overload
[20:38:08] <andypugh> No, parport pins are hard-wired input or output.
[20:38:41] <somenewguy> I saw some things about setting direction on pins, but had no real grasp of what it was trying to say, and if it applied at the hardware or abstraction level
[20:38:42] <andypugh> You _can_ switch the mode to alter the hard-wiring.
[20:39:15] <andypugh> http://www.linuxcnc.org/docs/html/hal/parallel_port.html
[20:39:50] <andypugh> The parport can be "in" or "out"
[20:42:03] <andypugh> And _some_ parports can be "x" where if you set the output high, you can read it as an input. Or, you can kill the port, so that is semi-undocumented
[20:42:37] <somenewguy> hahaha wheee grey areas
[20:42:42] <somenewguy> like the proper spelling of gray
[20:43:14] <somenewguy> so to understand what I just did
[20:43:31] <somenewguy> I started up an interface with HAL
[20:43:49] <andypugh> The Mesa and Pico cards allow pins to have their directions individually set
[20:44:00] <somenewguy> loaded the driver for my parallel port at the address 0x378
[20:44:26] <somenewguy> then used HAL to set a pin, specifically the one on parport 0, pin 17, and set it high to 1
[20:44:30] <andypugh> "halrun" actually starts the whole reatime system
[20:44:47] <somenewguy> so I turned on HAL?
[20:44:56] <somenewguy> or is hal part of the "reatime system"
[20:45:50] <andypugh> I don't actually know how to answer that question.
[20:45:55] <somenewguy> oh Ididn't load the driver for my port
[20:46:04] <somenewguy> i loaded the HAL controls for said port
[20:46:06] <somenewguy> methinks
[20:46:10] <andypugh> Oh, you loaded a driver
[20:46:15] <somenewguy> I don't konw how to ask it
[20:48:00] <somenewguy> but just knowing how to ACTUALLY type in these command, and where, makes reading the manual a good 10x more likely to yield usefull info for me
[20:48:46] <andypugh> Halrun starts the realtime environment. That could be RTAI (in your case it _will_ be RTAI) or it could be Xenomai or RT_PREEMPT or Posix. This depends on your kernel (if this is a LiveCD load it will be RTAI)
[20:49:52] <andypugh> I did actually forget a most crucial step in the commands
[20:50:26] <somenewguy> sacraficial chicken?
[20:51:18] <andypugh> A HAL driver is a realtime component. What this means is that it needs to be called at a fixed interval by a realtime thread.
[20:51:47] <andypugh> And we didn't start any threads
[20:52:39] <andypugh> (A thread is just a list of functions that are called _very_ regularly.
[20:53:25] <somenewguy> so if I issued those commands on the pc actually connected to my g540, the pin would not have toggled?
[20:54:28] <andypugh> When I say "regularly" this is not McDonalds "Regular", the meaning of which is "what we prefer not to sell", I mean at a very fixed frequency
[20:55:03] <somenewguy> I follow your meaning
[20:55:18] <somenewguy> what it means in application is a little fuzzier
[20:55:29] <andypugh> Indeed, the pin would not have toggled because I fotrgot stuff.
[20:56:41] <andypugh> In a typical HAL file you will see "loadrt motmod" which loads the motion planner and starts some thread.
[20:57:00] <andypugh> You don't need that.
[20:57:29] <andypugh> A complete hal session to toggle a pin is:
[20:57:33] <andypugh> halrun
[20:57:42] <andypugh> loadrt threads
[20:58:20] <andypugh> loadrt hal_parport cfg="0x378"
[20:59:40] <andypugh> addf parport.0.read thread1
[21:00:02] <andypugh> (actuallly, to toggle an output you can skip that)
[21:01:06] <andypugh> addf parport.0.write thread1
[21:01:18] <andypugh> But you do need that
[21:02:13] <andypugh> You have now linked your read and write "functions" to a thread each. (thread1, the defaut(
[21:02:34] <andypugh> But nothing will happen until:]
[21:02:40] <andypugh> start
[21:02:58] <andypugh> Which starts the realtime threads
[21:04:45] <andypugh> So, it is a lot like what we first did, with the extra complication fo saying exactly _when_ we wanted to do it.
[21:05:42] <somenewguy> when we say "toggle" do we mean flip the pin state continuosly, or just set it high?
[21:05:58] <somenewguy> I don't quite understand what command in there sets the pin state
[21:06:22] <somenewguy> addf parport.0.write thread1 makes parport0 whatever state it should be
[21:06:24] <andypugh> setp <pin name> 1 sets it high
[21:06:40] <andypugh> setp <pin name> 0 sets it low
[21:06:44] <somenewguy> ok
[21:06:53] <somenewguy> so the above commands
[21:07:06] <somenewguy> allow me to THEN LATER use the setp function to set pin states
[21:07:08] <somenewguy> at will
[21:07:33] <somenewguy> the other commands setup the magick in the background to listen to me send out those setp commands
[21:07:58] <andypugh> the "addf" tells the system how often you want to update the parport. By default thread1 runs every 1mS
[21:10:11] <somenewguy> ok
[21:10:15] <somenewguy> this is a huge step forwards in understanding
[21:10:36] <somenewguy> so setp sets the desired state of the pin to what I want
[21:10:58] <somenewguy> and then the next time thread1 runs (which will be soon lol) it will take care of the nitty gritty of actually making that pin as desired
[21:11:04] <andypugh> In a typical software stepping system you don't have "thread1" you have "base-thread" which runs every 25uS to 100uS depending on how you set it up, and "servo-thread" which is every 1mS (but _will_ be interupted by the fast thread. Not that you will notice)
[21:11:59] <andypugh> And yes, you have it
[21:13:15] <somenewguy> hot dog
[21:13:25] <somenewguy> thank you for taking the time to explain it to the luddites here
[21:13:35] <andypugh> Except "setp" is only one way to set the value of a pin. You can (and often will) link it to a "signal" in HAL (think of that as a unique wire colour for the time being)
[21:14:01] <somenewguy> the signal thing I noticed a lot of trying to use the actual machien control in linuxCNC
[21:14:26] <somenewguy> the concept was clear by the end of all the reading, but again the implementation was completly lost on me, but I suspect taht will be obvious once I actually have a config file infront of me
[21:15:35] <Tom_itx> here's a set i use on my sherline: http://tom-itx.dyndns.org:81/~webpage/cnc/configs/sherline/
[21:16:10] <andypugh> So, net blue => parport.0.pin-17-out will set the value of the pin to follow the "blue" signal. You can call it after your wife if you want. The first word after "net" is your choice
[21:17:04] <andypugh> But, the "pins" that follow have to exist.
[21:18:34] <andypugh> (you can add <= and => and <=> to show signal flow if you want, they make for a clearer HAL file but are _only_ for human consumption, they mean nothing to the machine)
[21:19:26] <somenewguy> so if parport0.pin-17-out got set low, blue would update?
[21:19:31] <somenewguy> or is it left to right heirachy
[21:19:49] <somenewguy> update meaning blue would also become low
[21:20:17] <andypugh> That is the right question :-)
[21:21:05] <andypugh> Any "net" with a signal name can have one "writer" and any number of readers.
[21:23:22] <andypugh> So, if pin 17 is an input pin in to HAL (ie a "writer) (and, to be honest, I have no idea about parports any more) then every other pin in that net has to be a HAL "in" pin (ie, a "reader")
[21:23:50] <andypugh> That wasn't very clear
[21:25:50] <andypugh> If pin 17 supplies a value then every other pin in that net has to be a "reader". If it takes a value it can be one of many readers, bit will no change value unless there is a "writer" in the net
[21:27:04] <andypugh> "Setp" is a one-time thing, either at system-start when the HAL file is read, or at the instant you type the commabd
[21:27:18] <somenewguy> so we have a bunch or only one of followers, and then a highlander of a writer
[21:27:38] <andypugh> Aye, that works
[21:27:53] <somenewguy> and the first one is the writer I assume
[21:27:59] <somenewguy> and then you could stack a list after it of readers
[21:28:16] <somenewguy> or do they need to be defined on seperate lines
[21:28:27] <somenewguy> also si reader and writer technical terms, or just what you call them?
[21:28:35] <andypugh> No, the "writer" is the "out" pin in the net. There can be only one :-
[21:29:35] <andypugh> If you look at the mpdules in the docs, the pins have specified directions.
[21:30:48] <andypugh> A typical manpage: http://www.linuxcnc.org/docs/html/man/man9/encoder.9.html
[21:31:31] <andypugh> You will see how the pins are "out" or "in"
[21:31:43] <somenewguy> ah ok, so by thier nature pins are readers or writers
[21:31:49] <andypugh> Yes.
[21:32:12] <somenewguy> so assigning them to a net has zero bearing on that
[21:32:14] <somenewguy> got it
[21:33:01] <somenewguy> ok now for a much simpler top level question, just need a name to google and not all the details
[21:33:17] <andypugh> Parport input pins are of course, outputs (they write to HAL) and output pins are inputs (they take a value from HAL and send it to the world)
[21:33:42] <somenewguy> and pins that have both directions?
[21:33:46] <somenewguy> they have seperate
[21:33:58] <somenewguy> they have seperate "pins" in hal by different names, which map to the same physical pin?
[21:33:59] <PCW> andypugh: I notice positive timer-us values are early and negative are late
[21:34:26] <andypugh> PCW: yes. I can switch if you prefer
[21:35:12] <andypugh> No, i/o pins are awkward creatures.
[21:35:23] <somenewguy> haha ok
[21:35:28] <somenewguy> maybe I should stop here for now
[21:35:32] <somenewguy> while I still have a sense of reality
[21:35:42] <somenewguy> play with the software a bit more and then I can pick your brain a bit more
[21:35:46] <andypugh> The best example of an io
[21:36:40] <PCW> Not sure I have a preference
[21:37:02] <andypugh> pin is "index-enable" to an encoder, where the system sets the pin high to say "I am waiting for index" and the encoder sets it low to say "there it was"
[21:38:43] <andypugh> But many other pins are i/o pins because the expectation is that you will set then with a "setp" but might, possibly, want to dislay them in a GUI.
[21:40:52] <andypugh> PCW: To me minus means early and plus means late. That is how we time engines. Except the 50% of the time we do it the other way with a different wet-side supplier. So I have no preference either.
[21:41:34] <somenewguy> ok so here is a simple question
[21:41:51] <somenewguy> i was surprised at how bare the linuxCNC gui was when i opened it
[21:41:54] <andypugh> But - for early and + for late feels a little more logical. (ie, the reverse of the current scaling)
[21:41:59] <somenewguy> and hten i paused and thought for a second and it made sense
[21:42:22] <somenewguy> if I want to look online for a more pre-made or populated interface, does it exist? is there a project name I should google and find more info for?
[21:43:00] <andypugh> Which GUI were you using? We have a choice of many.
[21:43:31] <andypugh> http://www.linuxcnc.org/docs/html/gui/axis.html
[21:43:45] <andypugh> http://www.linuxcnc.org/docs/html/gui/touchy.html
[21:44:08] <andypugh> http://www.linuxcnc.org/docs/html/gui/tklinuxcnc.html
[21:44:23] <andypugh> http://www.linuxcnc.org/docs/html/gui/mini.html
[21:44:37] <andypugh> http://www.linuxcnc.org/docs/html/gui/keystick.html
[21:45:06] <andypugh> (Keystick is arguably not a GUI, just a UI)
[21:45:50] <somenewguy> well then
[21:46:44] <Tom_itx> you can populate the GUI as you like
[21:46:55] <somenewguy> 4 axis mill, no touch screen, hopefully to have coolant soon
[21:47:08] <somenewguy> tom, yes that is the beauty of linux, and I can and will modify them in the future
[21:47:29] <somenewguy> but i find for me atleast it is better to start with something that works so I can 'take it apart' and understand it and then mod it
[21:47:34] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/cnc/screenshot.png
[21:47:35] <andypugh> I am guessing you were in Axis. You can add to Axis: This is how Axis looks on my lathe:
[21:47:36] <andypugh> http://www.linuxcnc.org/index.php/english/forum/41-guis/26550-lathe-macros#34357
[21:47:40] <somenewguy> this stuff doesn't exactly come natural to me so Ineed the help
[21:47:41] <Tom_itx> that's got a few things added to it
[21:48:00] <somenewguy> mine looked like whatever tom just posted
[21:48:10] <somenewguy> without the speedo on the right
[21:48:12] <Tom_itx> you can add those
[21:48:34] <Tom_itx> all that is in the config i posted earlier
[21:48:37] <somenewguy> ok so what you posted is axis
[21:48:43] <Tom_itx> yes
[21:48:47] <somenewguy> which I duitifully downloaded for later analysis
[21:49:08] <somenewguy> FWIW when you launch axis in linuxCNC it looks like you are launching "linuxCNC" so I was confused
[21:49:25] <andypugh> Then there are fully-editable GUIs like gscreen: http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Gscreen
[21:49:33] <somenewguy> I notice the axis.ngc in the top bar now
[21:49:54] <andypugh> One variant of which is http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Gmoccapy
[21:50:28] <somenewguy> any which are easiest to use, or most popular and thefore easier to find answers for?
[21:50:46] <somenewguy> man every answer you guys give me just leads to 4 more questions
[21:51:01] <somenewguy> here is a big one I keep forgetting about, and I am sure I will figureo ut soon enough
[21:51:15] <somenewguy> how many discrete config files are there to run a machine using linuxCNC?
[21:51:23] <andypugh> There is actually not a lot wrong with Axis.
[21:51:28] <somenewguy> in a typical setup I guess I should say
[21:51:38] <somenewguy> then I will stick with axis since I already have it
[21:52:39] <Tom_itx> it works for me
[21:52:47] <andypugh> It actually mainly does everything you want. it's not great in a touch-screen. Touchy is good on a touch-sceen but hurts during the machine dev stage
[21:53:07] <somenewguy> fine by me, no touch screen and unlikly to get one
[21:53:16] <somenewguy> I just need to be up and running as fast as possible
[21:53:36] <somenewguy> also it sounds like all the config files are lumped into one folder
[21:53:37] <andypugh> There are an infinite number of configs.
[21:53:39] <somenewguy> is that true?
[21:53:43] <somenewguy> or are there a few stragglers
[21:54:04] <somenewguy> seeing as how "linuxCNC" isn't really a program but a big ole pile of em
[21:54:54] <somenewguy> I guess I could sum up the question, I see a few key pieces of functionality to a CNC computer, maybe you can tell me how many config files are involved
[21:55:11] <somenewguy> I have to be able to controll my steppers, so I need to konw what pins are involved, and max min speeds etc
[21:55:36] <somenewguy> I need to know how fast I can pulse those drivers, I need to know the dimensions and soft limits for my mill
[21:55:43] <somenewguy> I need to konw waht all the buttons in the gui do
[21:55:50] <Tom_itx> you can get by with the .ini and .hal but if you want to add stuff you need a few more
[21:56:04] <somenewguy> phew
[21:56:13] <somenewguy> consolidated configurations is a godsend
[21:56:19] <andypugh> Both of my machines run three configs each, for example. The mill/lathe can be started as a lathe or a mill (the axes change names) Or it can be a gear hobber ( a different mapping between axes(
[21:56:47] <somenewguy> and all that good stuff comes out of the .ini and .hal files
[21:56:55] <somenewguy> that is music to my ears
[21:57:18] <Tom_itx> it's where you mate the software to the hardware
[21:57:30] <andypugh> The INI is the "config" you see in the config picker.
[21:58:04] <somenewguy> I think you guys just knocked 2 weeks off of me learning how to use my machine
[21:58:15] <somenewguy> winblows can go die in a fire after what it did to me thismorning
[21:58:16] <andypugh> The ini loads one or more HAL files, and (optionally) passes data to them.
[21:58:30] <somenewguy> makes sense
[21:59:52] <andypugh> So the HAL file can say stepgen.0.scale - 100 or it can say stepgen.0.scale = [AXIS_0]STEPGEN_SCALE
[22:01:21] <andypugh> (I actually prefer the first, and I edit my HAL files. But I think most folk edit the INI file. You just have to check that the HAL file is actually "looking")
[22:03:37] <somenewguy> so one hal file can be generic for a single computer and i/o, but work with multiple machines based on .ini selection
[22:03:43] <somenewguy> vs having an ini and hal for each machine
[22:04:57] <andypugh> Yes.
[22:05:20] <somenewguy> cool
[22:05:38] <somenewguy> also ur thread cutting stuff deffinatly has a pretty interface!
[22:06:55] <somenewguy> so assuming that tool you have shown on the page you linked to me is typical of a linuxcnc macro
[22:07:17] <somenewguy> do you put in values into those boxes and hit play and it does the turning operation you coded it to?
[22:07:23] <andypugh> The other lathe ops look the same, bit the underlying graphic is specific to the operation. It works for me and one-offs, but is embedded as a tab in Axis, so I have the conventional GUI if and when I want it.
[22:07:30] <somenewguy> or does it spit g-code into the window below to do the operation?
[22:08:48] <andypugh> Yes, that is exactly how it works. But if I load a G-code file in Axis and press the menu-bar play button it runs the Gcode just like any other machine
[22:10:00] <somenewguy> so it actually just does it
[22:10:11] <somenewguy> obviously tomorrow I just need to go out and actually try to use it for the first time
[22:10:29] <somenewguy> and I will sound like less of an idiot, but just trying to sort out how things work now
[22:10:31] <somenewguy> whee
[22:11:03] <somenewguy> I hate hate hate the way mach3 handles "wizards" and g-code, and how hard it is to concatonate things intelligently, but that is more me not understanding how to implemnt subroutines
[22:11:05] <somenewguy> stupid syntax
[22:11:15] <somenewguy> I look forward to trying this out tomoorow
[22:11:23] <andypugh> My system runs a subroutine. But, if you _want_ to spit G-code into the window, and optionally concatente and combine G-code routines, then we can do that too: http://linuxcnc.org/docs/html/gui/ngcgui.html
[22:11:47] <somenewguy> I came across this, I think you linked me to it yesterday
[22:11:54] <somenewguy> which will be all manner of awesome
[22:12:23] <somenewguy> currently I keep makine a whole lot of "exactly" the same part with very minor tweaks, so being able to avoid duplicating effort every time will be a huge step forward
[22:13:55] <somenewguy> it says there is a demo ngcgui available on the install
[22:13:58] <andypugh> This is Open Source software. Most of the things you think might be nice have been thought nice by someone else, and implemented, if not very well documented.
[22:14:56] <somenewguy> so the demo ngcui is a lie?
[22:15:01] <somenewguy> just not seeing it on 10.04
[22:15:26] <somenewguy> and yeah, I have that same love/hate/hate relationship w/ Os for a long time now
[22:15:37] <somenewguy> its why I keep coming back
[22:15:44] <somenewguy> its like an abusive relationship w/ a beautiful woman
[22:15:59] <andypugh> 10,04 is a Ubuntu version. What is your LinuxCNC version?
[22:16:47] * Tom_itx heads to sleep
[22:17:41] <somenewguy> gnight and thanks!
[22:18:03] <andypugh> One example of the obscure stuff: http://linuxcnc.org/docs/html/man/man1/linuxcncrsh.1.html
[22:18:07] <somenewguy> uh the released live cd w/ 10.04, just got it recently
[22:18:23] <somenewguy> OH found the demo of ngcgui, was hiding under sim
[22:18:32] <somenewguy> now I finally know what everyone talks about when they say "sim"
[22:19:00] <somenewguy> hahaha axis wont opeon on either laptop
[22:19:13] <somenewguy> "real time system did not load"
[22:20:37] <andypugh> 0400 here, and work in a few hours (yikes). I hope someone else helps you with that. :-)
[22:20:37] <somenewguy> sounds like I should go ahead and get back to doing work now
[22:20:48] <somenewguy> haha yeah