Pokeys_homecomp EncoderSearch / Encoder Arm Topic: Pos_Fb Following errors

More
3 years 8 months ago #264762 by LAUSCH
Replied by LAUSCH on topic Pokeys
Hi Dominik,

Thank you for the quick response. 
Is it okay to use your component  github.com/zarfld/LinuxCnc_PokeysLibComp after installing the library from mbosnak?
And is halcompile sufficient for your component or do I need to use the pokeyslib.h file from zarfld / LinuxCnc_PokeysLibComp ?
Your component seems to be quite advanced and to implement all the features of the pokeys board which is why I want to use it.
Or is there any other comp-file which I am missing so far?

Cheers

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

More
3 years 8 months ago #264763 by zarfld
Replied by zarfld on topic Pokeys
Hi LAUSCH

the LinuxCNC_PokeysLibComp is based on the pokeyslib of MBosnak. This does provide its own pokeyslib.h (i think mine anyway was just a copy of it).

just to prevent further confusion i now removed my branch of pokeyslib which is obsolete anyway.

BR
Dominik
The following user(s) said Thank You: LAUSCH

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

More
3 years 8 months ago #264769 by LAUSCH
Replied by LAUSCH on topic Pokeys
Hi Dominik,

Thanks for the clarification. When I use your simple comp file from  page 14  it works and I can see the Inputs when 5V is applied on the board.
When I use the comp file from  github.com/zarfld/LinuxCnc_PokeysLibComp , which is much more complex I get the blinking alive bit, no error and see all the features of the board but when 5V is applied to the inputs there is nothing happening.
When I had a look to the comp file I found that two lines related to Input and Output are commented. When uncommenting them and re-compiling the inputs are working...
Is this comp file still a working copy or should it work as it is?
Code:
line 343: //pin out bit Pins.#.DigitalValueGet [55]; line 347: //pin in bit Pins.#.DigitalValueSet [55];

Please apologize for my lack in understanding. I still try to understand how the pokeys stuff is working. Up to now I only worked with linuxcnc ethercat which is also quite nice once established though much more expensive. 

Cheers
 

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

More
3 years 8 months ago #264772 by zarfld
Replied by zarfld on topic Pokeys
Hi,

no need to apologize. 

on these Channels i just changed the naming.

they are now named like

pokeys.[DevID].digin.[PinID].in bit State of the hardware input
pokeys.[DevID].digin.[PinID].in-not bit Inverted state of the input.

or 

pokeys.[DevID].digout.[PinID].out

if you just comment the these two lines then only the pins are being created

pokeys.[DevID].Pins.[PinID].DigitalValueGet
pokeys.[DevID].Pins.[PinID].DigitalValueSet

but the bit digitalIn or digital out are not read. (you would need to uncomment the lines 2319 and 2325 to get the digitalinputs updated)

if (DigitalIOGet = true) { if (dev->Pins.DigitalValueGet == 0) { //Pins_DigitalValueGet(i)=false; digin_in(i) = false; digin_in_not(i) = true; } else { //Pins_DigitalValueGet(i)=true; digin_in(i) = true; digin_in_not(i) = false; } }

but i would suggest just to use the newly named digital inputs in your HAL-File


(as the COMP was growing and complexity increased i tried to follow linuxcnc.org/docs/2.6/html/hal/canonical..._id_sec_canondigin_a , and hope my interpretation was right so far)

BR
Dominik

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

More
3 years 3 weeks ago #282661 by dibor
Replied by dibor on topic Pokeys
Hello guys.
I am a new in LinuxCNC.
Here latest LinuxCNC version.
Trying to compile pokeyslib but got errors :(
Code:
PoKeysLibDevicePoKeys57Industrial.c: In function ‘PK57i_SearchDevice’: PoKeysLibDevicePoKeys57Industrial.c:221:12: warning: implicit declaration of function ‘GetBroadcastAddresses’ [-Wimplicit-function-declaration]      addr = GetBroadcastAddresses();             ^~~~~~~~~~~~~~~~~~~~~ PoKeysLibDevicePoKeys57Industrial.c:221:10: warning: assignment to ‘uint32_t *’ {aka ‘unsigned int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]      addr = GetBroadcastAddresses();           ^ PoKeysLibDevicePoKeys57Industrial.c:233:51: error: ‘SOCKADDR’ undeclared (first use in this function); did you mean ‘SOCK_RDM’?          if (sendto(txSocket, SendBuf, BufLen, 0, (SOCKADDR *)&remoteEP, sizeof(remoteEP)) == -1)                                                    ^~~~~~~~                                                    SOCK_RDM PoKeysLibDevicePoKeys57Industrial.c:233:51: note: each undeclared identifier is reported only once for each function it appears in PoKeysLibDevicePoKeys57Industrial.c:233:61: error: expected expression before ‘)’ token          if (sendto(txSocket, SendBuf, BufLen, 0, (SOCKADDR *)&remoteEP, sizeof(remoteEP)) == -1)                                                              ^ PoKeysLibDevicePoKeys57Industrial.c:233:13: error: too few arguments to function ‘sendto’          if (sendto(txSocket, SendBuf, BufLen, 0, (SOCKADDR *)&remoteEP, sizeof(remoteEP)) == -1)              ^~~~~~ In file included from PoKeysLibDevicePoKeys57Industrial.c:32: /usr/include/x86_64-linux-gnu/sys/socket.h:152:16: note: declared here  extern ssize_t sendto (int __fd, const void *__buf, size_t __n,                 ^~~~~~ make: *** [<builtin>: PoKeysLibDevicePoKeys57Industrial.o] Error 1
What I should to do ?

Thank you.

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

More
3 years 3 weeks ago #282682 by zarfld
Replied by zarfld on topic Pokeys
Hi,

i had the same proble some time ago, and i reported that to Matevz at polabs.

i got following answer:

Thank you for contacting me. The file PoKeysLibDevicePoKeys57Industrial.c was added in the last published version, but it was only used in a Windows environment. You can ommit this file during compile for now (remove it from the Makefile).


BR
Dominik
 
The following user(s) said Thank You: dibor

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

Time to create page: 0.166 seconds
Powered by Kunena Forum