#linuxcnc-devel Logs

Apr 14 2018

#linuxcnc-devel Calendar

12:07 AM memfrob: http://dpaste.com/3CM2YN3 -- if anyone has any ideas.
12:09 AM memfrob: latency-histogram should be able to load/unload modules by itself, but I keep getting errprs.
12:09 AM memfrob: *errors
06:37 AM andypugh: memfrob: Any chance you have booted into the wrong kernel?
09:31 AM Roguish: pcw_home: pcw_mesa: jepler: andypuch:
09:31 AM Roguish: electronics question please. I have a small dc motor drive to try. has 3 type inputs. IN1, IN2, PWM. has a simple logic table for direction, brake, etc. The inputs are either 1, 0, or 'dangling'. I get the 1 and 0, but I'm not sure what the 'dangling' is, either electronically, or how to handle it physically in Lcnc, with a Mesa card. It seems to me that the 'dangling' is like a...
09:31 AM Roguish: ...no-connect. but I'm not sure and I don't want to smoke anything. Any advice or help is appreciated......thanks
09:32 AM Roguish: andypugh; [sorry for previous misspelling]
09:39 AM andypugh: https://en.wikipedia.org/wiki/Three-state_logic
09:41 AM andypugh: You would need pcw to answer about how to manage that in Mesa cards. There is an is_opendrain param which might be relevant.
09:42 AM andypugh: (In that article look for “open collector”)
09:45 AM Roguish: andypugh: the opendrain is what I have been thinking, but i'm not sure. and i'm concerned about magic smoke.....
10:21 AM pcw_home: "dangling" might be a translation of "open circuit"
10:22 AM pcw_home: the FPGA cards can have open drain output but they are never really open circuit because they have pullup resistors
10:26 AM andypugh: Mechanical relays can dangle...
10:27 AM andypugh: Ooh look, a surface-mount reed relay: https://uk.rs-online.com/web/c/relays/reed-relays/reed-relays/?applied-dimensions=4294763557
01:31 PM rene-dev: Roguish: don’t run them open, with the motor connected. Always control both states, otherwise there will be current in the body Diodes, and the fets might blow.
01:32 PM rene-dev: I have seen a lot of h bridges blown because people made this mistake
01:44 PM Roguish: rene-dev: so here's the table https://imgur.com/a/RlCiY
01:44 PM Roguish: pcw_home: https://imgur.com/a/RlCiY
01:47 PM rene-dev: use the last 2
01:50 PM Roguish: yes, that's what i will do, but I would like to also 'brake' the motor...which requires the PWM to be what? nothing? no connected?
01:51 PM Roguish: or maybe with in1 and in2 being high, pwm just doesn't matter. or maybe 0 (low)
02:00 PM pcw_home: Yeah PWM is dont care if in1=in2
02:02 PM pcw_home: both low = short motor=brake (or maybe break if there's no current limit), both high = open circuit motor = coast
02:08 PM rene-dev: you can brake with pwm
02:11 PM Roguish: pcw_home: any problem hooking this directly to the 5i22 or 5i24?
02:14 PM pcw_home: You have to be careful connecting any power device directly to a logic device, due to ground bumping and coupled switching noise
02:15 PM pcw_home: at the minimum I would insert say a 220 ohm resistor in the FPGA outputs to guarantee they dont get pulled negative > -.5V
02:16 PM pcw_home: This is a common way people kill Logic I/O pins
02:17 PM pcw_home: all you have to do is ground a parallel port or FPGA pin to noisy frame ground on a piece of CNC equipment
02:18 PM pcw_home: this frame ground may have 1V of HF AC noise and the negative swings (with unlimited current) will damage the input clamp diodes
04:02 PM Roguish: yeah, people like me !!!
04:03 PM Tom_L: pcw_home, not sure you saw but those files worked fine now
04:18 PM jepler: I'll be travelling for a couple of weeks. Hopefully everything remains on an even keel. I'll try to pop in on IRC now and then.
04:20 PM cradek: jepler: Enjoy! I hope your weather is better than this.
04:20 PM jepler: thanks cradek
04:21 PM jepler: I hope this current weather doesn't affect my flight out of omaha tonight!
04:24 PM cradek: maybe you should head up now?
04:25 PM cradek: it might affect getting to omaha
04:26 PM cradek: huh I-80 is already closed west of Grand Island already
04:27 PM cradek: https://hb.511.nebraska.gov shows just a little patch of "normal" between lincoln and omaha
05:08 PM KimK_: Roguish: I think "dangling" might be a Chinglish version of "coasting" or "freewheeling". It seems to be a selected operating mode rather than an input. The way I read it, IN 1 is Forward, IN 2 is reverse, PWM is pwm, 1=100%. Neither forward nor reverse is stop/brake, and both forward and reverse is "dangling", which I read as coast/freewheel.
05:09 PM KimK_: Do let us know what you find out.
05:10 PM KimK_: Dangling might also work as "coast to stop"?
05:21 PM Roguish: thanks, i will post back. gotta find a few 220 resistors.....then hook 'er up.
05:34 PM memfrob: Shouldn't $ make setuid set the permissions so the user can load and unload kernel modules?
05:38 PM memfrob: For some reason, linuxcnc is trying to only load it's own modules, not the RTAI ones.
05:40 PM memfrob: hence the missing symbols in modules, the modules that rtapi.ko are not loaded, yet they insmod fine manually.
05:54 PM TurBoss1: Hello
05:54 PM TurBoss1: I'm trying to continue with the python3 port
05:54 PM TurBoss1: make gives me this output
05:54 PM TurBoss1: http://dpaste.com/2DKKYHX
05:54 PM TurBoss1: rene-dev you arround?
05:55 PM rene-dev: TurBoss1: yes
05:55 PM TurBoss1: have you hit this error?
05:55 PM TurBoss1: I'm at your branch
05:55 PM rene-dev: yes, I hit the same
05:55 PM TurBoss1: :|
05:56 PM TurBoss1: okay
05:56 PM TurBoss1: I managed to use a virtualenv as python interpreter
05:56 PM rene-dev: https://stackoverflow.com/questions/22487780/what-do-i-use-instead-of-pystring-asstring-when-loading-a-python-module-in-3-3
05:56 PM rene-dev: thats one of the stuff that changed with python3, strings are unicode, so if you need 8 bit, you need to use byte stuff, not strings
05:57 PM rene-dev: and do the conversion properly
05:57 PM TurBoss1: ok
06:03 PM * TurBoss1 is reading this :https://docs.python.org/2/howto/cporting.html
06:05 PM rene-dev: pcw_mesa: whats the best way to connect npn switches to mesa cards?
06:05 PM rene-dev: my pullup resistor approach worked fine for about 2 years, and now crashed the toolchanger :/
06:07 PM rene-dev: measured 12-14v which is probably explains the problem :D
06:10 PM rene-dev: TurBoss1: yeah, I found that, but then ran out of time. I think some stuff in my branch needs to be changed, as jepler found a better way of fixing some issues.
06:10 PM rene-dev: so probably best to pick whats usable, and start a new branch...
06:10 PM TurBoss1: ok
06:11 PM TurBoss1: where is jepler working ?
06:11 PM TurBoss1: on a branch or master?
06:14 PM TurBoss1: so I pick master and try to apply your changes to the configure.ac?
06:20 PM memfrob: TurBoss1, just at a quick glance I saw you're working on a python3 port, have you dug into python2to3 ?
06:21 PM memfrob: (i believe it'
06:21 PM memfrob: s called that) -- this keyboard, sorry...
06:21 PM TurBoss1: the problem is not the python code
06:21 PM TurBoss1: the other code it is
06:21 PM TurBoss1: well not a problem really
06:23 PM KimK: rene-dev: what mesa card do you want to connect NPN/sinks to?
06:25 PM pcw_home: If you have NPN sensors (and 24V) I would use a 2K 1W pullup resistor
06:26 PM pcw_home: that should get you to about 22V high
06:27 PM pcw_home: input threshold at 24V is ~14.4V going high and ~9.6V going low
06:28 PM pcw_home: unless you use the ext threshold firmware
06:28 PM pcw_home: (currently only released for 7I84)
06:29 PM pcw_home: there you can set the thresholds with a pin
06:32 PM KimK: pcw_home: Oh, did rene-dev by switches mean prox switches (inputs)? I took him to mean he wanted to drive a sinking switch of some kind? This is good info because I have to prep for Mesa input cards and 2-wire proxes. Smart Serial seems to offer a lot of inputs (48 was it?). Is there a handy current sourcing circuit to power them and maybe show their state externally from HAL?
06:33 PM KimK: Advice and suggestions appreciated.
06:39 PM KimK: Oops, now I have to go, please post and I'll scroll back. Thanks!
06:41 PM pcw_home: If you are using new switches with our sserial input devices its better to choose PNP Proxes and they connect without any other components needed
06:41 PM pcw_home: s/and they/as they/
07:04 PM rene-dev: pcw_home: its a 7i76. Can’t change the switch, as its inside the atc spindle
07:05 PM rene-dev: Apparently npn is More popular in asia. Its a Chinese sk30 atc spindle.
07:06 PM rene-dev: Is that Firma available for the 7i76? I used the analog ins before to sense a 5v input. But changing the threshold would be even better.
07:13 PM pcw_home: Not yet but soon need to test quite thoroughly
07:15 PM pcw_home: Last time we worked on this was months ago but I will look into it on Monday
07:18 PM rene-dev: Ok, thanks :)
07:19 PM rene-dev: Willst there be thresholds for each pin? Looks like they are all read analog anyway
07:37 PM pcw_home: No, 2 thresholds for 0..15 and 16..31
07:40 PM rene-dev: Uh, that’s not very good
07:40 PM rene-dev: I only need 2 that are different for the atc
07:41 PM rene-dev: There is no limit on parameters
08:01 PM pcw_home: Well readin all the parameters is already bad on some setups (can take a long time to start on complex setups)
08:24 PM rene-dev: But that only happens on startup
08:25 PM pcw_home: yeah but it can get pretty annoying if you have a lot of parameters and cards
08:27 PM pcw_home: I think there should at least be the option to disable the parameter scan