not able to create the example userspace python component in 14.14

More
07 Apr 2022 11:00 #239527 by vraniel
hey. 
first timer with his first problem. help very appreciated :)

when i create a userspace component like shown in 14.14,  even just copy paste, it does not create the pins, that i defined...

halcmd: loadusr test       works fine and opens the script
halcmd: show pin       also works, but does not return any pins.
halcmd: setp test.in 3.14    => this pin does not exist

also, if i rename the script passthrough instead of test, like suggested by the docs, halrun doesent even find the script.

dont know, what information you might need to help debugging. so please feel freee to ask!

thanks
             vraniel


 

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

More
07 Apr 2022 12:22 #239533 by vraniel
i think i solved my issue.

i thought $PATH refers to my setup folder, where all the hals and inis are.
thats why i cant open anything thats not named test.  which leads me to think, there is a test.py somewhere already that i opened all the time.

sry for bothering :)
The following user(s) said Thank You: tommylight

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

More
08 Apr 2022 11:37 #239653 by vraniel
for those enjoying watiching a noob, struggeling with a task he well underestimated, a little update:   
it works!
somehow at least.:(

//inside already running linuxcnc, through hal-config page:
loadusr arduthc     // working flawless
show pin | grep arduino     //shows all the pins with the arduino analog values attached
net net1 arduino.xxx-xxx   // works fine and shows values on my gui        does everything its supposed to at this point
//but:
loadusr -W arduthc  // hanging up. i assume linuxcnc is waiting for the infinite loop thats polling the values from the arduino...

//inside hal file:
loadusr arduthc  // working aswell
net net1 arduino.xxx-xxx  // error => arduino.xxx-xxx does not exist // if i do this in hal config afterwards, it works. so i assume its a timing issue.





 

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

More
09 Apr 2022 22:17 #239779 by andypugh

loadusr -W arduthc  // hanging up. i assume linuxcnc is waiting for the infinite loop 
 

It is waiting (-W) for a halcomponent called "arduthc" to report readiness. 

So, are you calling the "ready" function, and does the HAL component name match? A common cause of trouble here is a component name that does not match the file name. 
The following user(s) said Thank You: vraniel

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

More
11 Apr 2022 09:44 #239910 by vraniel
wow, i would have never tried that for debugging! they are indeed named differently. i will try right away when i get home. really hope thats it! thanks!

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

Time to create page: 0.082 seconds
Powered by Kunena Forum