- Posts: 10
- Thank you received: 0
Pokeys_homecomp EncoderSearch / Encoder Arm Topic: Pos_Fb Following errors
9 years 6 months ago #90915
by jbunch
Thank you for the information.
I was able to setup and use in 2.8.pre you do have to install the -dev version as well so you can compile the halfile.
It also works with the matrix keyboard inside of pokeys as well as the pins. Very handy for your interface.
Jim
I was able to setup and use in 2.8.pre you do have to install the -dev version as well so you can compile the halfile.
It also works with the matrix keyboard inside of pokeys as well as the pins. Very handy for your interface.
Jim
Please Log in to join the conversation.
- juanelo1221
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
9 years 2 months ago #97135
by juanelo1221
Replied by juanelo1221 on topic Pokeys
Hi, my name is Juan and I have some troubles follow the Fixer steps.
I'm new using HAL and some configurations on LINUX, I can't compile linuxcnc pokeys component with: sudo halcompile ./pokeys.comp the terminal send me an error "halcompile: command not found."
I run the sudo apt-get install linuxcnc-dev to install the HAL components but that don't solve the problem.
And I have a doubt in this part:
"These will also install the library in /usr/lib folder and copy the header file to /usr/include. Sudo is required to gain write access to these two folders"
I have to copy the library installed in /usr/lib and paste it in /usr/include? And the file is libPokeys.so?
Sorry but really I don't undestand.
Thank you so much for your time and patience.
I'm new using HAL and some configurations on LINUX, I can't compile linuxcnc pokeys component with: sudo halcompile ./pokeys.comp the terminal send me an error "halcompile: command not found."
I run the sudo apt-get install linuxcnc-dev to install the HAL components but that don't solve the problem.
And I have a doubt in this part:
"These will also install the library in /usr/lib folder and copy the header file to /usr/include. Sudo is required to gain write access to these two folders"
I have to copy the library installed in /usr/lib and paste it in /usr/include? And the file is libPokeys.so?
Sorry but really I don't undestand.
Thank you so much for your time and patience.
Please Log in to join the conversation.
- juanelo1221
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
9 years 2 months ago #97141
by juanelo1221
Replied by juanelo1221 on topic Pokeys
Thank you andypugh.
Now the terminalshowme this:
gcc -Os -g -I. -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 /tmp/tmpyQnOT4/pokeys.c -Wl,-rpath,/lib -L/lib -llinuxcnchal
/tmp/ccukRjQY.o: In function `user_mainloop':
/tmp/tmpyQnOT4/pokeys.comp:27: undefined reference to `PK_ConnectToDeviceWSerial'
/tmp/tmpyQnOT4/pokeys.comp:31: undefined reference to `PK_DigitalIOGet'
/tmp/tmpyQnOT4/pokeys.comp:31: undefined reference to `PK_AnalogIOGet'
/tmp/tmpyQnOT4/pokeys.comp:37: undefined reference to `PK_DisconnectDevice'
collect2: error: ld returned 1 exit status
make: *** [pokeys] Error 1
why send me an error?
Thank you
Now the terminalshowme this:
gcc -Os -g -I. -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 /tmp/tmpyQnOT4/pokeys.c -Wl,-rpath,/lib -L/lib -llinuxcnchal
/tmp/ccukRjQY.o: In function `user_mainloop':
/tmp/tmpyQnOT4/pokeys.comp:27: undefined reference to `PK_ConnectToDeviceWSerial'
/tmp/tmpyQnOT4/pokeys.comp:31: undefined reference to `PK_DigitalIOGet'
/tmp/tmpyQnOT4/pokeys.comp:31: undefined reference to `PK_AnalogIOGet'
/tmp/tmpyQnOT4/pokeys.comp:37: undefined reference to `PK_DisconnectDevice'
collect2: error: ld returned 1 exit status
make: *** [pokeys] Error 1
why send me an error?
Thank you
Please Log in to join the conversation.
- juanelo1221
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
9 years 2 months ago #97144
by juanelo1221
Replied by juanelo1221 on topic Pokeys
In the files downloaded from pokeyslib I have this file PoKeysLib.h, do I have to move it to a specific address?
Thank you
Thank you
Please Log in to join the conversation.
- juanelo1221
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
9 years 2 months ago #97150
by juanelo1221
Replied by juanelo1221 on topic Pokeys
Yes, I first installed:
sudo apt-get install libusb-1.0-0
sudo apt-get install libusb-1.0-0-dev
Then in the folder downloaded I ran the "sudo make -f Makefile.noqmake install"
and the terminal show me
cp libPokeys.so/usr/lib
cp PokeysLib.h /usr/include
then I tray to compile pokeys.comp
I created the file pokeys.comp with the code posted by FIXER in the first post:
In the same folder where I have the downloaded files, is this correct?
Thank you.
sudo apt-get install libusb-1.0-0
sudo apt-get install libusb-1.0-0-dev
Then in the folder downloaded I ran the "sudo make -f Makefile.noqmake install"
and the terminal show me
cp libPokeys.so/usr/lib
cp PokeysLib.h /usr/include
then I tray to compile pokeys.comp
I created the file pokeys.comp with the code posted by FIXER in the first post:
Code:
component pokeys "PoKeys IO driver, by Mit Zot";
option userspace yes;
pin out bit in-# [55];
pin out unsigned ain-# [3];
pin out bit err;
pin in unsigned devSerial;
pin out bit alive;
license "GPL";
;;
#include "PoKeysLib.h"
#include <unistd.h> /* UNIX standard function definitions */
sPoKeysDevice * dev=0;
int i=0;
void user_mainloop(void)
{
while(0xb){
FOR_ALL_INSTS() {
while(dev == NULL)dev = PK_ConnectToDeviceWSerial(devSerial, 2000); //waits for usb device
alive=1;
if ((PK_DigitalIOGet(dev) == PK_OK) && (PK_AnalogIOGet(dev) == PK_OK)){ //gets IO data and checks return value
err=0;
for(i=0;i<54;i++)in(i)=!dev->Pins[i].DigitalValueGet; //just transfers values
for(i=0;i<3;i++)ain(i)=dev->Pins[i+44].AnalogValue;
}
else{ //on connection error
PK_DisconnectDevice(dev);
dev=NULL; //tries to reconnect
err=1;
for(i=0;i<54;i++)in(i)=0;
for(i=0;i<3;i++)ain(i)=0;
}
alive=0;
usleep(40000);
}
}
exit(0);
}
Thank you.
Please Log in to join the conversation.
Time to create page: 0.379 seconds
