- Posts: 596
- Thank you received: 0
Arduino I/O with Linuxcnc
6 years 3 weeks ago #185595
by zz912
Replied by zz912 on topic Arduino I/O with Linuxcnc
Hello,
I am trying use your code, but I can not compile it:
Could you help me somebody please? I am programmer beginner.
Thank you
I am trying use your code, but I can not compile it:
Code:
cnc@LinuxCNC:/usr/share/linuxcnc/src/hal/components$ halcompile --compile serialreceive.comp
gcc -I/usr/include -I/usr/include/linuxcnc -URTAPI -U__MODULE__ -DULAPI -Os -o serialreceive /tmp/tmpT2HXKd/serialreceive.c -Wl,-rpath,/lib -L/lib -llinuxcnchal
/tmp/tmpT2HXKd/serialreceive.c: In function ‘__comp_parse_count’:
/tmp/tmpT2HXKd/serialreceive.c:79:13: error: ‘count’ undeclared (first use in this function)
count = strtoul(&argv[i][6], NULL, 0);
^~~~~
/tmp/tmpT2HXKd/serialreceive.c:79:13: note: each undeclared identifier is reported only once for each function it appears in
/tmp/tmpT2HXKd/serialreceive.c: In function ‘__comp_parse_names’:
/tmp/tmpT2HXKd/serialreceive.c:106:17: error: ‘names’ undeclared (first use in this function)
names[j] = strtok(p, ",");
^~~~~
Makefile:2: návod pro cíl „serialreceive“ selhal
make: *** [serialreceive] Chyba 1
Could you help me somebody please? I am programmer beginner.
Thank you
Attachment not found
Attachment not found
Please Log in to join the conversation.
6 years 3 weeks ago #185604
by andypugh
Replied by andypugh on topic Arduino I/O with Linuxcnc
This is a very old thread, much of it is likely to be out of date.
This is just as old, but might work better: emergent.unpythonic.net/01198594294
This is just as old, but might work better: emergent.unpythonic.net/01198594294
Please Log in to join the conversation.
6 years 3 weeks ago #185606
by zz912
Replied by zz912 on topic Arduino I/O with Linuxcnc
Thank you for link, but I am not friend with Python. I want use ArcEye's code for a template. I would like make own code for Arduino and own component for LinuxCNC.
Please Log in to join the conversation.
5 years 9 months ago #194947
by bondglen
Replied by bondglen on topic Arduino I/O with Linuxcnc
I am having the same problem. My code will compile fine with an older system, but when I upgraded it no longer compiles. I still have an old system to compare to.
I think this is a compiler problem that is not related to hal or linuxCNC.
If anybody has any suggestions, I would like to hear them.
Thanks
I think this is a compiler problem that is not related to hal or linuxCNC.
If anybody has any suggestions, I would like to hear them.
Thanks
Please Log in to join the conversation.
5 years 9 months ago #194953
by zz912
Replied by zz912 on topic Arduino I/O with Linuxcnc
You should try remove "option singleton yes;" from source code.
Please Log in to join the conversation.
5 years 9 months ago #195163
by bondglen
Replied by bondglen on topic Arduino I/O with Linuxcnc
That did the trick.
It compiles fine now.
I hope there are no problems caused by removing that line.
Thanks.
It compiles fine now.
I hope there are no problems caused by removing that line.
Thanks.
Please Log in to join the conversation.
5 years 9 months ago #195193
by zz912
Replied by zz912 on topic Arduino I/O with Linuxcnc
You do not have to worryI hope there are no problems caused by removing that line.
Source: Mex: forum.strojirenstvi.cz/viewtopic.php?t=3...ingleton+yes#p384233Singleton means that only one component can run. Otherwise, it is generally possible to load components in multiple instances.
The singleton then has no instance number in the signal name, because it is the only one possible.
So a normal component has eg serialreceive.0.bit-14,
singleton should eg serialreceive.bit-14.
Please Log in to join the conversation.
Time to create page: 0.058 seconds
