Can I use a C shell script for my PLC stuff?
You can declare variables in the usual way after the ;; but they will be shared between all instances. (probably not a problem here)
Please Log in or Create an account to join the conversation.
root@jr1050-desktop:/usr/realtime-2.6.32-122-rtai/modules/emc2# comp --install buttonlogic.comp
Traceback (most recent call last):
File "/usr/bin/comp", line 1321, in <module>
main()
File "/usr/bin/comp", line 1290, in main
process(f, mode, outfile)
File "/usr/bin/comp", line 1164, in process
a, b = parse(filename)
File "/usr/bin/comp", line 404, in parse
a, b = f.split("\n;;\n", 1)
ValueError: need more than 1 value to unpack
they seem to be Python errors,comp appears to be written in python.....
Please Log in or Create an account to join the conversation.
File "/usr/bin/comp", line 1321, in <module>
main()
they seem to be Python errors,comp appears to be written in python.....
Yes, comp is a Python program which preprocesses .comp files into C files, and then compiles them.
It is sometimes helpful to do only the preprocessing step and to look at the resulting C code to see what has gone wrong.
However, if your problem is with the code listed earlier, then I have already explained that it is not a valid .comp, so you need to at least fix those problems first.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
how do I run the pre processer?
The according to:
www.linuxcnc.org/docview/html/hal_comp.h...-realtime-components
if you run comp without any of the flags, that is what it does, it creates a c file from the comp file, and leaves it in the current directory.
Normally you comp --install, but that deletes the intermediate C-code after it has compiled it.
Please Log in or Create an account to join the conversation.
So for the dumb question,how do I run the pre processer?I didnt see any reference to it in the comp section of the manual.....Thanks again
Plenty of examples of how to run comp in the manual...
linuxcnc.org/docview/2.5/html/hal/comp.h...s_in_the_source_tree
John
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
oot@jr1050-desktop:/usr/realtime-2.6.32-122-rtai/modules/emc2# comp constant.comp
Traceback (most recent call last):
File "/usr/bin/comp", line 1321, in <module>
main()
File "/usr/bin/comp", line 1290, in main
process(f, mode, outfile)
File "/usr/bin/comp", line 1164, in process
a, b = parse(filename)
File "/usr/bin/comp", line 404, in parse
a, b = f.split("\n;;\n", 1)
ValueError: need more than 1 value to unpack
The same thing.The only file I could get to rum thru comp is an example file for an orac tool changer.What simple thing am i missing?What is this value error thing and what is the meaning of line 404 and its associated code.This shouldnt be this hard....
Please Log in or Create an account to join the conversation.
DUHHHH
Please Log in or Create an account to join the conversation.