Pokeys

More
22 Oct 2023 11:50 - 22 Oct 2023 11:59 #283495 by glsys
Replied by glsys on topic Pokeys
Hi Zarfid,
i get errors trying to halcompile the latest main branch from git.
Kind Regards
Klaus

pokeys.comp:546:1: error: unknown type name ‘hal_pin_u32_t’; did you mean ‘hal_pin_dir_t’?
pokeys.comp:547:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘hal_pin_u32_t’
pokeys.comp:547:1: error: unknown type name ‘hal_pin_u32_t’; did you mean ‘hal_pin_dir_t’?
pokeys.comp: In function ‘Init_EasySensors’:
pokeys.comp:732:37: error: ‘EasySensors_sensorValue’ undeclared (first use in this function)
pokeys.comp:732:37: note: each undeclared identifier is reported only once for each function it appears in
pokeys.comp:735:37: error: ‘EasySensors_sensorType’ undeclared (first use in this function)
pokeys.comp:738:37: error: ‘EasySensors_sensorRefreshPeriod’ undeclared (first use in this function)
pokeys.comp:741:37: error: ‘EasySensors_sensorFailsafeConfig’ undeclared (first use in this function)
pokeys.comp:744:37: error: ‘EasySensors_sensorReadingID’ undeclared (first use in this function)
pokeys.comp: In function ‘user_mainloop’:
pokeys.comp:1039:8: error: ‘PoNet’ undeclared (first use in this function)
pokeys.comp:2646:6: warning: implicit declaration of function ‘EasySensors_sensorValue’ [-Wimplicit-function-declaration]
pokeys.comp:2646:33: error: lvalue required as left operand of assignment
pokeys.comp: At top level:
pokeys.comp:545:19: warning: array ‘EasySensors’ assumed to have one element
make: *** [Makefile:2: pokeys] Error 1
Last edit: 22 Oct 2023 11:59 by glsys.

Please Log in or Create an account to join the conversation.

More
29 Oct 2023 14:50 #284026 by glsys
Replied by glsys on topic Pokeys
Whe going back to commit 0b3c21ab4109f5e435bf101fb8143933bc3bcb7f
i can compile it, but get segfaults in dmesg:
[ 1586.465478] pokeys[7440]: segfault at 0 ip 000055fef1289c07 sp 00007fff566b7710 error 4 in pokeys[55fef1288000+8000] likely on CPU 3 (core 3, socket 0)
(and it`s not working)

Please Log in or Create an account to join the conversation.

More
29 Oct 2023 16:23 #284041 by zarfld
Replied by zarfld on topic Pokeys
Hi,

i did an updated comit now - basically i just removed, the easysesor parts,
where i started a try to createpins in a more generic way, as one of the main problems that i get because of consuming to many pins.

at least on my raspi the code is compiling, and i can startup AXIS.

as your message contains a hint "... likely on CPU 3 (core 3, socket 0)" i'm not sure if this is somehow related to your hardware - i'm not familliar with segfault

Please Log in or Create an account to join the conversation.

More
30 Oct 2023 19:44 #284139 by glsys
Replied by glsys on topic Pokeys
Got it working. Had to delete all the .h and .c files and then halcompile everything new.

Please Log in or Create an account to join the conversation.

More
18 Dec 2023 08:31 #288472 by Kapperi
Replied by Kapperi on topic Pokeys
Hi,

New with the linuxcnc. I have a router with pokeys57cnc and I have been tinkering with Mach3 with no success. What ever I do, Mach3 allways seems to lose pokeysconfigs.

Is this method with linuxcnc and pokeys usable for everyday use of the cnc router? I have vfd speed and direction attached and this cheap chinese pendant, so this are the needs for accessories to work.

Please Log in or Create an account to join the conversation.

More
18 Dec 2023 08:48 #288474 by zarfld
Replied by zarfld on topic Pokeys
Hi,

usage of inputs AIN, DIN, Counters, .. should be fine.

usage of that chinese pandant should also work in LinuxCnc -< linuxcnc.org/docs/html/man/man1/xhc-hb04.1.html

on my machine i can move axes/joints basically, but as this is not fully tested - and i did not get any feedback so far... i expect some issues there.

"homing" is still open - unfortunately i could not find the time for that.

BR
Dominik

Please Log in or Create an account to join the conversation.

More
18 Dec 2023 08:58 #288475 by Kapperi
Replied by Kapperi on topic Pokeys
Ok,

So with my expertise of linux and programming, I should avoid this choice. Then I´ll have to choose if I buy Mesa card or Mach4 license.

Please Log in or Create an account to join the conversation.

More
01 Mar 2024 13:12 #294843 by zarfld
Replied by zarfld on topic Pokeys

I can't help you with as I don't have the hardware. But I can put you on the right track!.
Homing is managed in Linuxcnc by homing.c
github.com/LinuxCNC/linuxcnc/blob/master.../emc/motion/homing.c

Master branch has recently released the homecomp.comp compoonent
linuxcnc.org/docs/devel/html/man/man9/homecomp.9.html
and the source file here github.com/LinuxCNC/linuxcnc/blob/master...onents/homecomp.comp
The purpose of homecomp is to give a method to override homing.c behaviour to build a custom homing behaivour

You should also look at Domminic Braun's ethercat cia402.comp and supporting hal file github.com/dbraun1981/hal-cia402
which predates homecomp and also attempts to deal with hardware which homes externally. He also deals with the conversion of motion units between Linuxcnc and external hardware. Look at how he uses read and write functions. This might be able to be done in halcomp as there are procedures that read all pins and writes all pins.
Your homecomp needs to be able to deal with following errors that will ocur when the extenral drives move without lcnc's knowledge. This can be done by equating the feedback position with current position during external homing.
There are a large number of homing states that can be skipped or ignored when external homing is done so you homecomp basically just needs to initiate homing and wait intil homing is completed ,Tell Linuxcnc you are homed, and then let Linuxcnc continue on.

God luck with this, its complex because in a homecomp, you need to deal with all joints at a time where a component like cia402.comp has a seperate instance of the component for each drive being homed...
 
 



some time left after that - but i continued working on that. firs a short update on current status:

-> for homing 2.9+ is necessary (took some time that i recognized that i was still on 2.8. on my raspberry)
-> on my Raspberry the user COMP does not work on 2.9.2 (first i tried the bookworm image of dec23, and also tried to run on Buster with manual install based on instruction and froum thread)
-> anyway my pokeys.comp seems to work fine on a laptop using the "linuxcnc_2.9.2-amd64.hybrid.iso"
-< for the problems due to not yet created pins when halfile tries to write on them, i created two dummy components that add some millisecond delay during loading of Hal (e.g. loadusr -W start_delay_5000), these use the extra_setup option during start to wait for 5000 ms or 3000 ms.

i created a first version of pokeys_homecomp.comp. As pokeys.comp itself is userspace and the homecomp is RT, as a first step the homecomp is a dummy, which receives the hal-commands and routes it to the pokeys.comp using pins and signals.
-> it seems to compile fine BUT when i try to load that in [EMCMOT]HOMEMOD=pokeys_homecomp i get a cyclic errors like "USRMOT: ERROR: command timeout", so i added some debugmessages in hope that it helps to find out which function is causing that.
-> so far no idea yet.

on a second path i try to get that poKeysLib usable in a RT. Currently it compiles and EMC was starting but it did not show up in HALMonitor. But since i added references & calls for PokeysLib i get a "undefined symbols" when i try to start a hal that contains that comp.
-> here i assume that pokeyslib is not yet ready to run on RT (i assume because lubusb1.0) so i started to create a copy of that H file which excludes that (using the #undef POKEYSLIB_USE_LIBUSB), but it seems that there's more work on that to do.

Please Log in or Create an account to join the conversation.

Time to create page: 0.119 seconds
Powered by Kunena Forum