Pokeys_homecomp EncoderSearch / Encoder Arm Topic: Pos_Fb Following errors

More
6 years 6 months ago #162794 by KRAD-AT
Thank you,

I tried it again.
Code:
cnc@cnc:~/projects$ sudo halcompile --compile pokeys.comp gcc -Os -g -I. -I/build/linuxcnc-2.9.0~pre0.1350.gb0a0416d3/src/include -DUSPACE -fno-fast-math -mieee-fp -fno-unsafe-math-optimizations -DRTAPI -D_GNU_SOURCE -Drealtime -D__MODULE__ -I/usr/include/linuxcnc -Wframe-larger-than=2560 -DSIM -fPIC -URTAPI -U__MODULE__ -DULAPI -Os -o pokeys /tmp/tmpUe9hf9/pokeys.c -Wl,-rpath,/lib -L/lib -llinuxcnchal /tmp/ccOrG51x.o: In Funktion »user_mainloop«: /tmp/tmpUe9hf9/pokeys.comp:28: Warnung: undefinierter Verweis auf »PK_ConnectToDeviceWSerial« /tmp/tmpUe9hf9/pokeys.comp:32: Warnung: undefinierter Verweis auf »PK_DigitalIOGet« /tmp/tmpUe9hf9/pokeys.comp:32: Warnung: undefinierter Verweis auf »PK_AnalogIOGet« /tmp/tmpUe9hf9/pokeys.comp:38: Warnung: undefinierter Verweis auf »PK_DisconnectDevice« collect2: error: ld returned 1 exit status Makefile:2: recipe for target 'pokeys' failed make: *** [pokeys] Error 1

This is all I get.

As far as I found out there must be a problem with the linking of the library.
But I don't know how to solve this.

Maybe someone has an Idea.

Thank you.

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

More
6 years 6 months ago #162817 by tommylight
On the second picture you have mv ./pokeys ..............
it can not have a dot in front of /

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

More
6 years 6 months ago - 6 years 6 months ago #162951 by andypugh
Replied by andypugh on topic PoKeys HAL Driver
In trying to test this for myself I found that the latest version of LinuxCNC had lost the ability to compile userspace components with halcompile, and it took some time to track down the problem.

Anyway, I think I have a solution to your problem.

Edit the pokeys.comp file to look like this
Code:
pin out bit in-# [55]; pin out unsigned ain-# [3]; pin out bit err; pin in unsigned devSerial; pin out bit alive; license "GPL"; option extra_link_args "-lPoKeys"; ;; #include <unistd.h> /* UNIX standard function definitions */ #include "PoKeysLib.h" sPoKeysDevice * dev=0; int i=0;

Note the new "option extra_link_args" line.
(and, to be clear, that's a minus and lower-case L)

Then you should be able to compile and install in one step:
Code:
sudo halcompile --install pokeys.comp
Last edit: 6 years 6 months ago by andypugh.

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

More
6 years 6 months ago - 6 years 6 months ago #162953 by andypugh
Replied by andypugh on topic PoKeys HAL Driver
Updated Install Instructions

This driver uses the PoKeys driver from here . It scans at about 15hz, fast enough for UI keys and knobs. I had problems with hidcomp, taking too much resources on my rather slow computer i use for my mill, so I wrote that. With this, i dont get any significant slow down on performance and key presses get detected 100%.
It needs device serial pin to be set in HAL file with proper value.
Set your IO pin function with standard windows software that comes with the board.

1) Install dependencies
Code:
sudo apt-get install git build-essential libusb-1.0-0 libusb-1.0-0-dev
2) Download the code to a git repository
Code:
git clone https://bitbucket.org/mbosnak/pokeyslib.git
3) Compile and install the driver
Code:
cd pokeyslib sudo make -f Makefile.noqmake install
4) Create the LinuxCNC HAL driver, Download the pokeys.comp file attached to this post then compile and install with halcompile.
Code:
sudo halcompile --install pokeys.comp
5) To enable RW permission for USB device, you also need to set "udev" rules in linux:
Create a new file in the
Code:
/etc/udev/rules.d
named
Code:
90-usb-pokeys.rules
with the following contents:
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="1dc3", ATTRS{idProduct}=="1001", GROUP="plugdev", MODE="664"
Save the file, then execute
Code:
udevadm control --reload-rules

And that is it, now you can include the driver in your hal file with:
Code:
loadusr pokeys
and after you set yours board serial with:
Code:
setp pokeys.0.devSerial 12345
pokeys.0.err should become False and pokeys.0.alive start blinking with approx 10hz.
Last edit: 6 years 6 months ago by andypugh.
The following user(s) said Thank You: Maik, LAUSCH

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

More
6 years 4 months ago #170262 by Pamkkkkk
Replied by Pamkkkkk on topic PoKeys HAL Driver
found another pokeys.com here
gist.github.com/KurtJacobson/10e4bbff7b2af4366496e876b107a506

A quick compare seems that only row 11 differs.

>> pin out bit alive;

Which pokeys.comp file is to use?

I am totally new to CNC stuff!

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

More
6 years 3 months ago #175200 by charlieLedezma
Replied by charlieLedezma on topic PoKeys HAL Driver
Hi everyone, hi @andypugh, could you (or anyone) help me please ?. I'm retrofitting my bridgeport308 cnc machine, I bought a pokeys57cnc and read the whole post about it here, but I'm pretty confused.
I did the complete procedure wrote by you, but some questions arised up: is necessary change its port configurations from windows, using the Polabs software ? How can I use the dedicated motor ports (8 in total) ?
Could you share your code file configuration with me ?

In the pokey.comp, one piece of code said:

<<
pin out bit in-# [55];
pin out float ain-# [3];
pin out bit err;
pin in float analog-scale-# [3];
pin in unsigned devSerial;
pin out bit alive;
>>

The question about it was, the sentence: "pin in float [X] " became the port [X] in a input into the pokeys57cnc ?
Thanks in advance....!!

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

Time to create page: 0.193 seconds
Powered by Kunena Forum