#linuxcnc-devel Logs
Jan 08 2023
#linuxcnc-devel Calendar
01:50 AM pere: is there a way to get access to the linuxcnc stats from within a user space component?
04:05 AM andypugh: pere: You can in a Python component, if you are asking the question I think you are asking.
04:47 AM pere: andypugh: I try, but only get an empty string when asking for the ini_filename value.
04:48 AM andypugh: Did you s.poll()
04:48 AM pere: andypugh: <URL: https://github.com/LinuxCNC/linuxcnc/compare/master...petterreinholdtsen:linuxcnc:comp-mqtt-client?expand=1 > is the code in question.
04:49 AM pere: Try "cd tests/mqtt; ./test.sh" to reproduce the issue.
04:49 AM pere: I commented out the problematic code and marked it with FIXME
04:50 AM pere: at the moment I get this failure:
04:50 AM pere: info: Turning machine on
04:50 AM pere: Waiting for component 'inihal' to become ready.....................USRMOT: ERROR: command timeout
04:50 AM pere: emcMotionInit: emcTrajInit failed
04:50 AM pere: .................................................USRMOT: ERROR: command timeout
04:52 AM andypugh: Hmm, well, that has me puzzled too.
04:53 AM andypugh: Clearly the INI is being used as otherwise the HAL file wouldn’t be loading the component. And you do poll.
04:54 AM pere: any clue about the usrmot error?
04:56 AM pere: andypugh: TurBoss tested yesterday, and he also got an empty string.
04:58 AM andypugh: ini_filename isn’t mentioned in the docs? https://linuxcnc.org/docs/stable/html/config/python-interface.html#_reading_ini_file_values_a_id_python_reading_ini_values_a
04:59 AM andypugh: Not in the 2.8 docs anyway, it appears in 2.9
05:00 AM andypugh: Added just less than a year ago: https://github.com/LinuxCNC/linuxcnc/commit/f16a0b00bcd220f18d7980ce213b8aed88cae9c7
05:01 AM andypugh: I suspect this is a timing issue, the data might only be updated once task is running?
05:02 AM pere: is there some better way to find out the machine name?
05:02 AM pere: I just want to pass on the machine name in the mqtt message.
05:03 AM andypugh: I don’t know. I really only know my way around HAL :-)
05:03 AM pere: any clue what the USRMOT error is?
05:04 AM pere: is the machine name available in HAL?
05:14 AM pere: seb_kuzminsky: do you have any clue here?
05:15 AM pere: andypugh: once the mqtt component is working, I hope to set up a REST api component to allow external programs to query various parts of linuxcnc.
07:48 AM pere: andypugh: tried adding time.sleep(1) before looking for ini_filename, but still empty.
07:49 AM andypugh: MAybe task only starts after that component is loaded?
08:01 AM pere: or perhaps it do not start at all? what starts it?
08:16 AM andypugh: https://linuxcnc.org/docs/stable/html/config/ini-config.html#_task_section
08:16 AM andypugh: Do you see anything in top ?
09:20 AM pere: andypugh: there are processes in top. what am I looking for?
09:41 AM andypugh: milltask
09:41 AM pere: millitask is running.
09:41 AM pere: andypugh: was it not when you tested?
09:42 AM andypugh: I haven’t tested, sorry. I have been otherwise occupied.
10:16 AM roguish[m]: hey all. did dewey's little oops get resolved?
10:23 AM pere: believe I managed to find the error. failed to add functions in hal.
10:24 AM pere: roguish[m]: not sure. Saw a lot of activity and did not want to make it more complicated and took a step back.
10:24 AM pere: andypugh: is there a common pin type used for timestamps?
10:25 AM andypugh: I don’t know of anything currently in HAL which passes around a timestamp.
10:31 AM andypugh: But if I needed one I think I would keep an internal S64 in each component using the timestamp and use an S23 pin to pass around the lower part. (stepgen and encoder counters do this. If you see the S32 pin value _decrease_ then you add 2^32 to the S64,
10:35 AM pere: perhaps time to introduce 64 bits HAL types if that is the workaround...
10:36 AM pcw-home: I think LinuxCNC can have a absolute timestamp each servo thread invocation because of the way the threads are generated
10:36 AM pcw-home: (allowing unconnected instances to be synchronized)
10:44 AM pere: hopefully working branch pushed.
10:46 AM pere: <URL: https://github.com/LinuxCNC/linuxcnc/pull/2253 >
10:47 AM pere: Would very much like feedback on the default set of pins published.
10:48 AM linuxcnc-build2: Build [#134](http://buildbot2.highlab.com/buildbot/#builders/12/builds/134) of `10-rip.debian-07-wheezy-amd64` 3completed successfully.
10:48 AM linuxcnc-build2: Build [#134](http://buildbot2.highlab.com/buildbot/#builders/19/builds/134) of `10-rip.debian-08-jessie-i386` 3completed successfully.
10:48 AM linuxcnc-build2: Build [#134](http://buildbot2.highlab.com/buildbot/#builders/22/builds/134) of `10-rip.debian-09-stretch-rtpreempt-i386` 3completed successfully.
10:49 AM Tom_L: wow 3 green in a row!
11:20 AM linuxcnc-build2: Build [#147](http://buildbot2.highlab.com/buildbot/#builders/13/builds/147) of `00-checkin` 3completed successfully.
12:08 PM linuxcnc-build2: Build [#110](http://buildbot2.highlab.com/buildbot/#builders/2/builds/110) of `50-deb-uspace.debian-12-bookworm-amd64` 4failed.
12:18 PM linuxcnc-build2: Build [#115](http://buildbot2.highlab.com/buildbot/#builders/23/builds/115) of `50-deb-uspace.debian-11-bullseye-amd64` 4failed.
12:23 PM linuxcnc-build2: Build [#122](http://buildbot2.highlab.com/buildbot/#builders/3/builds/122) of `50-deb-uspace.debian-10-buster-amd64` 4failed.
12:35 PM pere: <URL: https://people.skolelinux.org/pere/blog/LinuxCNC_MQTT_publisher_component.html > :)
04:55 PM pere: seb_kuzminsky: around?
05:28 PM CaptHindsight[m]: https://github.com/auto-mation-assist/LinuxCnc-OpenDDS-Work maybe time to start thinking about how DDS and MQTT should be used with HAL
05:29 PM pere: DDS?
05:31 PM CaptHindsight[m]: pere: https://opendds.org/
05:33 PM CaptHindsight[m]: https://www.dds-foundation.org/sites/default/files/RTILunchAddressOMG2014v2.pdf
05:42 PM pere: CaptHindsight[m]: it seem to solve a different problem than the one I am addressing.
05:44 PM pere: CaptHindsight[m]: any idea how OpenDDS is different from CORBA?
05:47 PM CaptHindsight[m]: pere: http://www.dre.vanderbilt.edu/~schmidt/DDS/CORBA-DDS.pdf
05:53 PM linuxcnc-build: build #6169 of 1510.rip-jessie-rtpreempt-i386 is complete: Failure [4failed configure-debian-control] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1510.rip-jessie-rtpreempt-i386/builds/6169 blamelist: andypugh <andy@bodgesoc.org>
05:57 PM CaptHindsight[m]: https://www.rti.com/blog/mqtt-dds-m2m-protocol-internet-of-things/
06:20 PM linuxcnc-build2: Build [#112](http://buildbot2.highlab.com/buildbot/#builders/2/builds/112) of `50-deb-uspace.debian-12-bookworm-amd64` 8completed with warnings.
06:30 PM linuxcnc-build2: Build [#117](http://buildbot2.highlab.com/buildbot/#builders/23/builds/117) of `50-deb-uspace.debian-11-bullseye-amd64` 8completed with warnings.
06:32 PM linuxcnc-build2: Build [#124](http://buildbot2.highlab.com/buildbot/#builders/3/builds/124) of `50-deb-uspace.debian-10-buster-amd64` 8completed with warnings.
06:36 PM linuxcnc-build: build #9581 of 0000.checkin is complete: Failure [4failed] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/0000.checkin/builds/9581 blamelist: andypugh <andy@bodgesoc.org>
06:38 PM linuxcnc-build: build #6170 of 1510.rip-jessie-rtpreempt-i386 is complete: Failure [4failed configure-debian-control] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1510.rip-jessie-rtpreempt-i386/builds/6170 blamelist: andypugh <andy@bodgesoc.org>
07:01 PM -!- #linuxcnc-devel mode set to +v by ChanServ
07:17 PM linuxcnc-build: build #9582 of 0000.checkin is complete: Failure [4failed] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/0000.checkin/builds/9582 blamelist: andypugh <andy@bodgesoc.org>
07:19 PM linuxcnc-build: build #6171 of 1510.rip-jessie-rtpreempt-i386 is complete: Failure [4failed configure-debian-control] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/1510.rip-jessie-rtpreempt-i386/builds/6171 blamelist: andypugh <andy@bodgesoc.org>
07:58 PM linuxcnc-build: build #9583 of 0000.checkin is complete: Failure [4failed] Build details are at http://buildbot.linuxcnc.org/buildbot/builders/0000.checkin/builds/9583 blamelist: andypugh <andy@bodgesoc.org>