#linuxcnc-devel Logs
Oct 04 2017
#linuxcnc-devel Calendar
05:07 AM jthornton- is now known as jthornton
10:00 AM jepler: geez they're still chasing the nasty flaky wifi problem on dragonboard 410c https://discuss.96boards.org/t/inconsistent-wifi/2119/60
02:42 PM seb_kuzminsky: this PR is so confusing
03:17 PM jepler: renew, like an overdue hardback from the library?
03:29 PM andypugh: seb_kuzminsky: I just asked Jasen to pop in here, it should be more efficient
03:29 PM jasen: hi
03:29 PM seb_kuzminsky: hi!
03:29 PM jasen: hi seb
03:30 PM andypugh: copy-pasteā¦
03:30 PM andypugh: SebKuzminsky commented on issue #339: @jasenk2 can you explain the purpose of this comp? It reads a struct from a unix domain socket and sets HAL pins accordingly, and writes a struct of HAL pin values to the unix domain socket?... https://github.com/LinuxCNC/linuxcnc/pull/339#issuecomment-334270599
03:31 PM seb_kuzminsky: jasen: it looks to me like a "hal-pins-to-unix-domain-socket" comp, am i reading that right?
03:31 PM jasen: yes
03:31 PM jasen: i need it to be able to transfer pins
03:32 PM jasen: betwen hal and socket
03:32 PM seb_kuzminsky: what's on the other side of the unix domain socket?
03:32 PM andypugh: I once did something similar for the 7i43 matrix keyboard, sending key events to Linux, but that was in the realtime layer and made not-known-to-be-thread-safe calls
03:32 PM andypugh: So was abandoned.
03:32 PM seb_kuzminsky: andypugh: this component is non-realtime, so it doesn't have that issue
03:32 PM jasen: the reason was that i have sserial keyboard , that i dont want to scan it
03:33 PM jasen: 64 keys and 64 leds
03:33 PM seb_kuzminsky: jasen: so you have a scanner program that looks in the unix domain socket instead of looking at the sserial pins in hal?
03:33 PM jasen: too heavy
03:33 PM jasen: it works with fifo buffer
03:34 PM seb_kuzminsky: by "fifo buffer" you mean the socket?
03:34 PM jasen: reading the buffer decrement the fifo
03:34 PM jasen: yes
03:34 PM jasen: so no need to scan it at servo tread
03:35 PM seb_kuzminsky: the hal2ui_issy_intf component is marked "option userspace yes", so it doesn't run in the servo thread
03:35 PM seb_kuzminsky: it runs as its own process, like all "userspace" components
03:35 PM jasen: thats was the idea not to run it there
03:36 PM jasen: but to be able to read a kbd without loosing keys evan if you read it once per several seconds
03:36 PM seb_kuzminsky: so instead of one userspace process to read the keyboard you have two? i dont see how that makes anything better
03:38 PM jasen: it was made to be used for any type of scan devices that cant run on servo tread or you dont want to use it for some reason
03:38 PM jasen: generaly this is the way all matrix keyboards are implemented in fanuc and siemens machines
03:39 PM seb_kuzminsky: but you don't need two processes and a socket to run your scan code outside of the servo thread
03:39 PM jasen: by socket , no priority
03:39 PM jasen: no
03:39 PM seb_kuzminsky: you can just have a userspace (ie, non-realtime) component do the scanning
03:39 PM jasen: the scan is not done by the component
03:39 PM jasen: its done by the kbd cpu
03:39 PM seb_kuzminsky: non-realtime stuff runs in its own thread (as a userspace process), not in the servo thread
03:40 PM jasen: the component translate the socket only
03:40 PM seb_kuzminsky: right, i understand that your comp doesn't do the scanning
03:40 PM seb_kuzminsky: i'm saying i think it should
03:40 PM seb_kuzminsky: think of it this way: the code you have now that does the scanning based on what your comp wrote to the socket, that scanning process could just connect to the hal pins that your comp connects to and do the same thing it currently does, without the complexity of an additional process and a socket
03:41 PM jasen: you have the cpu on the kbd anyway. as it control the keys , the leds , and some other functions
03:42 PM seb_kuzminsky: i guess i dont understand your system architecture, and how the hal2ui_issy_intf comp enables it
03:42 PM jasen: yea , but you cant use it for other interfaces in case of need , rs or usb
03:42 PM jasen: this is universal for any speed and interface
03:43 PM andypugh: The fact that we are so confused suggests to me that it is under-documented.
03:43 PM jasen: i will push the description with coments haw it works , probably that will help
03:43 PM jasen: yes it is not documented. i have to fix that
03:43 PM seb_kuzminsky: well no, it won't work for any speed. it's limited to the loop period of the hal2ui_issy_intf thread, which you initially set to 20 ms
03:44 PM jasen: yes , because it is what i needed
03:45 PM seb_kuzminsky: can you explain what the program that isn't part of the PR, the one that reads from the socket, does?
03:45 PM seb_kuzminsky: this comp is of no use without that companion program, as far as i can see
03:46 PM jasen: yes , i will push the whole set , i have to do it evan the rest is on github
03:46 PM jasen: https://github.com/rene-dev/stmio/tree/kbd
03:47 PM jasen: it is a part of the stmio project
03:47 PM seb_kuzminsky: i'd be happy to look at your code, but can you help me navigate and understand it by explaining in words what it does, how it works, and how it fits in with linuxcnc?
03:48 PM seb_kuzminsky: this repo that you linked runs on the sserial device, not on the linuxcnc pc?
03:48 PM jasen: yea , shure , but tomorow , as i am at home and here is night
03:48 PM seb_kuzminsky: ok
03:50 PM jasen: meantime we are ready with the full digital (sserial) machine controler
03:50 PM jasen: the servos are pushed , whole drawings and firmware
03:51 PM jasen: the main controler is passed the tests and now works
03:51 PM jasen: will be oushed in 2-3 days as well
03:54 PM jasen: https://drive.google.com/file/d/0Bz4enxQY0AQLTWF4TFVVaThkNWM/view?usp=sharing
03:56 PM seb_kuzminsky: i get an empty one-page pdf when i click on that
03:56 PM hazzy: Same here
03:56 PM jasen: strange. google..
03:56 PM jasen: let me do it as picture
04:00 PM jasen: https://drive.google.com/file/d/0Bz4enxQY0AQLcTZPb2lBeTdLblk/view?usp=sharing
04:00 PM jasen: ok.
04:01 PM jasen: only digital chanels
04:02 PM jasen: sserial and modbus for vfd
05:42 PM -!- #linuxcnc-devel mode set to +v by ChanServ
11:05 PM Skofyx: Anyone know the standard method/algo for regulating motor speed, like PID is used for motor position?
11:13 PM seb_kuzminsky: Skofyx: i'd use a pid loop
11:15 PM Skofyx: But how? I've tried using actual speed/wanted speed instead of position/command, but its proved to be squirrelly.
11:21 PM pcw_home: velocity (in/out) loops will have quite different tuning than position loops (mainly FF0)
11:23 PM Skofyx: Thanks! I'll try that.
11:32 PM pcw_home: Also tuning is very dependent on the drive type (torque/velocity) and whether you have four quadrant control or just two quadrant (two quadrant cannot apply reverse torque)
11:34 PM Skofyx: Thanks for the tips, that put me on the right track!
11:34 PM Skofyx: https://forum.linuxcnc.org/24-hal-components/23787-spindle-pwb-with-pid-and-encoder#23793