#linuxcnc-devel Logs
Dec 14 2019
#linuxcnc-devel Calendar
10:16 AM burklefoo: Nice home-made pendant using smart-serial: https://www.youtube.com/watch?v=Y1_VYIPNtuk&feature=youtu.be
11:10 AM jepler: I'm trying to get "sbuild" going in cross compiling mode, so I can build raspbian packages on my nice fast desktop. These instructions are the ones I'm following: https://i2p.rocks/blog/building-sbuild-environment-for-cross-building-raspbian-packages-on-amd64i386-machines.html
11:11 AM jepler: probably I should start with a smaller package than "linux" for testing it though
11:23 AM burklefoo: That would be nice to speed things up
11:24 AM jepler: package "hello" built, including installing a bunch of packages and running lintian, in 4 minutes. It's not clear that's a win compared to 1:36s for building ONLY on a real pi4. but hello doesn't really have much code in it. I hope that having 16 threads + lots of RAM makes the compiling itself whiz by...
11:24 AM jepler: (and real HDDs etc)
11:25 AM jepler: OTOH it has to run all the software via binary emulation (qemu-arm-static) and that's going to have a penalty.
11:25 AM burklefoo: Yeah especially a real SSD
11:25 AM jepler: yeah ssd sure
11:25 AM jepler: ATA-9: Samsung SSD 850 EVO 500GB
11:28 AM jepler: I've also been reading this, they're building an app on pi and talk a lot about stuff like making the images... https://www.enricozini.org/blog/2019/himblick/
11:28 AM burklefoo: BTW I updated newmesa.zip with a BISS pin name fix (and dropped some pins from the hal pin section in pins.c since I finally figured out what they were doing)
11:31 AM burklefoo: Yeah the PI is a different world than X86, all the startup stuff is weird
11:31 AM jepler: OK, I'll put it on my list to add that to the PR. did you see that micges stated he thinks some of the pin names are wrong on a particular board?
11:33 AM burklefoo: No I had not noticed
11:33 AM burklefoo: A forum member found the BISS name issue
11:34 AM burklefoo: BISS (and probably SISS and FANUC) all have a precision issue (probably single precision at some point)
11:35 AM burklefoo: single precision runs out of gas pretty quick with 1M count/turn encoders
11:40 AM jepler: > I think port names and numbering is wrong on 7i95 code in hm2_eth.c
11:41 AM burklefoo: the latest one in newmesa.zip?
11:41 AM jepler: you attached a newmesa.zip to an e-mail a couple of weeks ago
11:41 AM jepler: I can check the newest newmesa
11:42 AM jepler: by the way, is the intent for this to go in 2.8 or master? is mozmck acting as 2.8 release manager?
11:42 AM burklefoo: yeah I happen to have a 7i95 running right now, let me take a look
11:42 AM jepler: you send me a 97, not a 95, so I couldn't verify
11:43 AM burklefoo: Master might be safer (though I have been running most of this for a couple months without issue)
11:44 AM jepler: okay
11:44 AM jepler: you removed inmux and inm from hm2_get_pin_secondary_hal_name ?
11:44 AM jepler: and added it for BISS ?
11:44 AM jepler: was the removal of aliases for inmux/inm intentional?
11:45 AM burklefoo: Yes
11:45 AM jepler: okay
11:45 AM burklefoo: no need for aliases that provide no real functionality
11:46 AM burklefoo: (Inmux address aliases would allow you to scramble input pins for example)
11:46 AM jepler: is BISS protocol anything I can fake up locally with a microcontroller? Or, how would I test it? I did some searches for places where it would end up with float precision but didn't find it right away.
11:48 AM burklefoo: I suspect its related to Andys cleverness in re-purposing the sserial code
11:49 AM burklefoo: I can send a BISS encoder but its kind of a pain since it attached to a motor and needs power for a brake release to test
11:49 AM burklefoo: (31 bits 19 bits/turn, 12 bit turn count)
11:51 AM burklefoo: I suspect you could emulate BISS at low speeds with a ucontroller, its pretty simple (similar to SSI not a lot more than a shift register)
11:53 AM burklefoo: (reset if no clock for x usecs, start shifting data when you get a clock)
11:53 AM jepler: "speedgoat" hee hee https://www.speedgoat.com/products/simulink-programmable-fpgas-fpga-code-module-biss-encoder
11:54 AM jepler: seems like having a BISS emulator would have some value then, vs shipping a motor around the country.
11:55 AM jepler: http://www.ti.com/lit/ug/tidu410/tidu410.pdf
11:55 AM jepler: burklefoo: how about I put 4-6 hours into making a BISS emulator for some common microcontroller, maybe it powers on at 0x12345678 counts and counts up 1000/s or something..
12:00 PM burklefoo: Probably cheaper for us to ship the motor, unless there's some lasting value in the emulator :-(
12:01 PM jepler: maybe so
12:01 PM jepler: would it be simpler for me to look whether the same problem is in SSI?
12:01 PM burklefoo: It just sitting in a box here after I updated the driver to work work the current firmware
12:01 PM jepler: yay all my CPU bars are full and my fan is going like a hair dryer
12:02 PM burklefoo: Yes I have a loose SSI encoder I can send
12:02 PM jepler: it must have finally gotten past the non-parallel part of the kernel build. What did it take, an hour? 45 minutes? to get to that point
12:02 PM burklefoo: or Fanuc
12:02 PM jepler: the problem with non-absolute being that you have to get it past 2^24 counts
12:02 PM jepler: .. yes?
12:04 PM burklefoo: the problem with the BISS absolute encoder (and probably the others) is the the encoder count (at a scale of 1) doesn't match the position
12:04 PM burklefoo: after a couple turns so count in the millions
12:05 PM burklefoo: so at 100 turns on my BISS 19B/turn encoder the count is correct but the position only changes every 50 counts or so
12:08 PM jepler: that does sound like a precision problem
12:08 PM burklefoo: Wonder if this is possibly a display issue
12:08 PM burklefoo: (formatting precision)
12:08 PM burklefoo: maybe its not a real problem
12:09 PM jepler: do they act like they have "index" for threading? you could verify that by setting index-enable and giving it a full revolution
12:10 PM jepler: (maybe not?)
12:10 PM jepler: well, maybe it wouldn't be a good test
12:10 PM burklefoo: I think The driver does a simulated index
12:11 PM jepler: if it does index in integer counts it doesn't prove anything
12:11 PM jepler: you are looking at 'halcmd show' or similar?
12:11 PM burklefoo: halcmd watch
12:12 PM burklefoo: Sorry not halcmd, the watch function in Axis
12:12 PM jepler: okay
12:13 PM jepler: machine > hal meter ?
12:13 PM burklefoo: I can try (unfortunately I don't have any of that stuff at home)
12:14 PM jepler: I mean, I don't see a menu item called "watch", just trying to figure out which one you mean
12:14 PM jepler: there's machine -> hal meter, hal scope, and show linuxcnc status
12:15 PM burklefoo: machine --> show hal configuration --> watch
12:18 PM jepler: halcmd: sets AA 100000.512345
12:18 PM jepler: halcmd: show sig AA
12:18 PM jepler: Signals:
12:18 PM jepler: Type Value Name (linked to)
12:18 PM jepler: float 100000.5 AA
12:18 PM jepler: but in Python you can see the full precision:
12:18 PM jepler: >>> hal.get_value('AA')
12:18 PM jepler: 100000.512345
12:18 PM jepler: halcmd: sets AA 1234567890.1234567
12:18 PM jepler: float 1.234568e+09 AA
12:18 PM burklefoo: OK so sorry, false alarm...
12:18 PM jepler: >>> hal.get_value('AA')
12:18 PM jepler: 1234567890.1234567
12:19 PM jepler: I haven't proven anything, however, I think you may be able to verfiy it is working by checking via Python
12:19 PM burklefoo: I should have thought about the display precision bounding for formatting
12:19 PM jepler: $ . scripts/rip-environment
12:19 PM jepler: $ python
12:19 PM jepler: >>> import hal
12:19 PM jepler: >>> c = hal.component("python")
12:19 PM jepler: >>> hal.get_value('parameter name')
12:19 PM jepler: 1234567890.1234567
12:20 PM jepler: and then maybe it becomes a bug against halcmd that it could do something better? Its number formatting was *PROBABLY* chosen back when hal floats really were 32-bit values
12:21 PM burklefoo: In a real situation you would not have a encoder scale of 1
12:21 PM jepler: when python prints a floating point value interactively like that (by expression, not by print(expression)) it shows a decimal number that captures all the significant bits of the true binary number
12:22 PM jepler: when you get a chance to test via python, let me know, it would be nice to just cross it off
12:22 PM burklefoo: Yeah I will test this on Monday, thanks for the python scheme
12:23 PM jepler: you're welcome
12:23 PM jepler: hmm by mistake I'm not building the raspbian kernel. well, the outcome will still tell us SOMETHING right? I'm going to walk away and just let it finish
12:24 PM burklefoo: the 7I95 pins I see look OK (but I don't have everything enabled)
12:25 PM Tom_L: burklefoo, is 'vitus' what xilinx went to when webpack was eol?
12:26 PM burklefoo: I always think Avocado
12:26 PM burklefoo: but its Vivado
12:27 PM Tom_L: ahh yeah that's it
12:27 PM Tom_L: spartan7 etc
12:28 PM Tom_L: do you know of any linux platform webpack will work on?
12:28 PM Tom_L: impact in particular
12:28 PM burklefoo: Yeah no earlier chip support AFAIK
12:29 PM burklefoo: webpack runs on most anything, the programming stuff probably Windows only
12:29 PM Tom_L: right, up to spartan6 is under webpack
12:30 PM Tom_L: i've been trying to get impact to work under linux with no success
12:30 PM burklefoo: Probably starting some Artix stuff next year so will need Vivado
12:31 PM Tom_L: does it have a free crippled version?
12:31 PM burklefoo: Not sure
12:31 PM burklefoo: We had an actual ISE license at one time
12:32 PM Tom_L: you have a backup config on most of your boards right?
12:33 PM Tom_L: how do you determine where they load when you flash them first time?
12:33 PM burklefoo: Theres a free Vivado version
12:33 PM Tom_L: ahh ok
12:33 PM Tom_L: was looking but hadn't gotten that far yet
12:34 PM burklefoo: all of the SP6 boards have a fallback configuration
12:35 PM burklefoo: its placement is very crude right now
12:37 PM Tom_L: have you used vivado yet?
12:39 PM burklefoo: The first flash sector is for "boot" the next sectors are for the fallback configuration, the user configuration starts at 1/2 of flash size
12:40 PM Tom_L: jumper select iirc
12:40 PM jepler: okay, for some reason most raspbian packages are at archive.raspbian.org, but the kernel source is at archive.raspberrypi.org.
12:40 PM burklefoo: I have not used Vivado yet (no Artix SP7 cards yet...)
12:41 PM burklefoo: jepler: that's nice
12:41 PM burklefoo: The fallback select is automatic (on user config crc error)
12:42 PM Tom_L: ahh
01:07 PM jepler: small steps, but now my pi4 is mounted to the 7c80 and powered
01:08 PM jepler: need a slightly longer standoff, the video connectors aren't clearing the screw terminals
01:22 PM jepler: jepler@eric:/home/builder$ tar tavf raspberrypi-firmware_1.20190925+1.orig.tar.gz | grep kernel7
01:22 PM jepler: -rw-rw-r-- root/root 5310624 2019-10-11 07:50 raspberrypi-firmware-1.20190925+1/boot/kernel7.img
01:23 PM jepler: sigh, this package does not build the kernel, it copies the kernel from some build process that is separate from the debian package building process.
01:42 PM burklefoo: Yeah on the 7C80 you either need a tall standoff or one of those flat cable right angle micro HDMI doohickeys
04:40 PM skunkworks: I am running stretch and the mouse click speed in the settings doesn't seem to effect the mouse double click speed in axis..
04:40 PM skunkworks: (it is really fast...)
04:48 PM skunkworks: jepler: have you seen the directions from jt? https://gnipsel.com/linuxcnc/uspace/rpi4-rt.html
04:49 PM skunkworks: might be a good reference.
04:50 PM burklefoo: I had a similar weird thing happen when my old desktop died and I replace Ubuntu 18.04 with Mint 19.3 ( my trackball scroll ring reversed! )
05:26 PM jepler: skunkworks: yes, but again it is not instructions to make a debian package from kernel source. that's my goal.
05:26 PM jepler: skunkworks: yes axis is way too dumb to know about double click settings, that's per toolkit and in the days of Tk nobody added the ability to configure it at all
05:30 PM CaptHindsight: jepler: http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Building_RTAI_5.2_Packages
05:35 PM CaptHindsight: how RTAI debs are built
05:37 PM CaptHindsight: 8.10.4. Compiling and Building the Package https://debian-handbook.info/browse/stable/sect.kernel-compilation.html
05:43 PM jepler: thanks
05:46 PM CaptHindsight: If I knew what I was doing I'd probably write some script to auto generate packages
05:58 PM jepler: ugh temporary files are stored on the SD card by default. That sure is not good for performance of a build, gcc uses lots of temporary files
06:00 PM jepler: now with external usb drive + export TMPDIR=/dev/shm it's going substantially faster
06:00 PM jepler: idle 0% wait 0%
06:01 PM jepler: (only ~/src is on usb drive)
06:05 PM * jthornton thinks jepler is having fun again...
06:37 PM skunkworks: jepler: sorry - I didn't read back far enough
09:26 PM jepler: skunkworks: np, I don't read thoroughly either
11:37 PM Tom_itx is now known as Tom_L