Pokeys

More
02 Dec 2018 22:05 #121730 by andypugh
Replied by andypugh on topic Pokeys
Whatever else is wrong, you definitely need to loadusr the component before you try to set any of its pins. The pins won't exist until it is loaded.

-W should mean that the loadusr command waits for the component to be ready before continuing.

When you say "Didn't work" what error message do you see?
More
04 Dec 2018 09:52 - 04 Dec 2018 10:02 #121802 by Erikcnc
Replied by Erikcnc on topic Pokeys
This is what i got now.


in my_mill.hal file
loadusr -W pokeys

net all-home pokeys.0.in-2 => halui.home-all


in postgui_call_list.hal file
setp pokeys.0.devSerial 38163

If i use terminal with:
halrun
halcmd: loadusr -W pokeys
halcmd: setp pokeys.0.devSerial 38163
halshow

Pokeys response to the switches i installed before. Check, pokeys works.

I close terminal.

I start Linuxcnc (Gmoccapy)

Emergency butten ---> Machine Enable.
Go to settings ---> button Halshow

I go to watch en selecting the pins from the pokeys.

No response from my pre installed buttons.

Eny one got an example how it should look like?
Last edit: 04 Dec 2018 10:02 by Erikcnc.
More
04 Dec 2018 10:26 #121803 by andypugh
Replied by andypugh on topic Pokeys
Why do you have a different order of execution in your "real" HAL than when testing?

Where did you get the pokeys HAL driver from?
More
04 Dec 2018 14:35 - 04 Dec 2018 15:11 #121807 by Erikcnc
Replied by Erikcnc on topic Pokeys
I followed the installation from this topic (page 1)

After i continued reading this topic, on page 5 i read this:



juanelo1221 wrote: Ok,I think I've got it!
Yesterday I was testing the system. thinking first in the update I moved my debian wheezy to debian jessi and afterwards tried to update linuxcnc.Everything seemed right until I tried to open my-mill then a linuxcnc error appeared. I thought the issue was because I had created the file in the older version so I created a new one but had no success. Desperate and a little upset I made an afresh installation of debian wheezy, I updated cnclinux and was able to open up the file.
I went back to do all the steps Fixer stated from page 1 and connected the Pokeys in windows to know the serial number. In the file my-mill.hall I wrote loadusr pokeys, ran the linuxcnc and was now able to see the pins. I shut down linuxcnc and now in my-mill.hall I wrote pokeys.0.devSerial 66258 save file and try to open linuxcnc send me an error:

Debug file information:
.
./my-mill.hal:7: parameter or pin 'pokeys.0.devSerial' not found

I change the code loadusr pokeys and pokeys.0.devSerial to custom.hal and show me an error, if I put the loadusr pokeys in my-mill.hal and pokeys.0.devSerial66258 in custom.hal linuxcnc run fine, and pokeys.0.err are false and pokeys.0.alive start blinking. Is this procedure correct?

I tried to use estop with pokeys to test but i did not get it work, in custom.hal I wrote net estop-ext <= pokeys.0.in-52 it dont send me errors and in HAL configuration the pin 52 show :
Owner Type Dir Value Name
7 bit OUT FALSE pokeys.0.in-52 ==>estop-ext


Thank you so much for your help, have a nice day.
[/size]

[/u]

My apologizes for my lack of language. I try my best to explain my issue. I really hope to get it to work.


Erik
Last edit: 04 Dec 2018 15:11 by Erikcnc.
More
04 Dec 2018 14:49 #121808 by andypugh
Replied by andypugh on topic Pokeys
Is it possible that you need to recompile linked to a different RTAI system?
From the starting post:
gcc -Wall  -Os -g -I. -I/usr/include/libusb-1.0 -I/usr/include -L/usr/lib/ -L/usr/lib/arm-linux-gnueabihf/ -lPoKeys -lusb-1.0 -I/usr/realtime-3.4-9-rtai-686-pae/include -I. -I/usr/realtime-3.4-9-rtai-686-pae/include -I/usr/include/i386-linux-gnu -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-math-errno -funsafe-math-optimizations -fno-rounding-math -fno-signaling-nans -fcx-limited-range -mhard-float -DRTAI=3 -fno-fast-math -mieee-fp -fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime -D__MODULE__ -I/usr/include/linuxcnc -Wframe-larger-than=2560 -URTAPI -U__MODULE__ -DULAPI -Os  -o pokeys ./pokeys.c -Wl,-rpath,/lib -L/lib -llinuxcnchal

There are quite a number of explicit references to a specific RTAI path in there.
More
04 Dec 2018 14:53 #121809 by andypugh
Replied by andypugh on topic Pokeys

andypugh wrote: Is it possible that you need to recompile linked to a different RTAI system?

[/strike]
No, forget that, it has already been shown to work on your current system.

Try adding
show pin
after the "loadusr pokeys" line in the HAL.

Also, start linuxcnc from the command-line (command "linuxcnc") and paste all the output here.
More
04 Dec 2018 15:14 #121810 by Erikcnc
Replied by Erikcnc on topic Pokeys

andypugh wrote:

andypugh wrote: Is it possible that you need to recompile linked to a different RTAI system?

[/strike]
No, forget that, it has already been shown to work on your current system.

Try adding
show pin
after the "loadusr pokeys" line in the HAL.

Also, start linuxcnc from the command-line (command "linuxcnc") and paste all the output here.



Oke thanks!
I will try this evening.
More
06 Dec 2018 08:30 - 06 Dec 2018 08:33 #121931 by Erikcnc
Replied by Erikcnc on topic Pokeys
Works like a charm!

Thank you so much for the support!

A overview how it works for me.

in my_mill.hal file
loadusr -W pokeys

show pin

# --- HOME-ALL ---

net all-home pokeys.0.in-2 <= halui.home-all

# ---CYCLE START ---

net program.run pokeys.0.in-0 <= halui.program.run

# ---CYCLE STOP ---

net program.stom pokeys.0.in-3 <= halui.program.stop

Home-all works also without going to the home tab.

in postgui_call_list.hal file
setp pokeys.0.devSerial 38163


i got also three 10K potetiometer to use as feed, maxvelocity and spindle override.
How could i get this to work though?
Last edit: 06 Dec 2018 08:33 by Erikcnc.
More
06 Dec 2018 10:35 #121940 by andypugh
Replied by andypugh on topic Pokeys
Well, that's weird.

"show pin" was only meant as a way to get some output to check if the pin existed. It wasn't meant to fix the problem.
Does the problem un-fix if you take the "show pin" back out again?

I don't see any reason for "setp pokets.0.devSerial" to need to be in the postgui call list.

It looks like some sort of race condition, which is odd as the -W should wait for completion.

Do you have the potentiometer values appearing and changing in HAL?
More
07 Dec 2018 11:06 #122000 by Erikcnc
Replied by Erikcnc on topic Pokeys

andypugh wrote: Well, that's weird.

"show pin" was only meant as a way to get some output to check if the pin existed. It wasn't meant to fix the problem.
Does the problem un-fix if you take the "show pin" back out again?

I don't see any reason for "setp pokets.0.devSerial" to need to be in the postgui call list.

It looks like some sort of race condition, which is odd as the -W should wait for completion.

Do you have the potentiometer values appearing and changing in HAL?



I could try to remove 'show pin' and check if its realy that issue.
Another thing, those arrows are they have a function? Does it make a difirents how you insert them? ( <= or => )

About those potentiometers, i set them as analog input with the pokeys software.
I have to check how i can see values insted of I/0 dots.
Time to create page: 0.091 seconds
Powered by Kunena Forum