Urgent help required with EMC please

More
16 Aug 2016 12:46 #78840 by sxyuklad
When I opened synaptic, the dev was already checked... So is it installed already??? See screenshot.

If it is, then why cant I install comp? I have shared the errors screenshots I am getting
Attachments:

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

More
16 Aug 2016 12:48 #78841 by sxyuklad
I do not know Todd but I think dev is installed already, can you look at the screenshots I have shared?

If it is already installed, why cannot I still install a comp??? See all the screenshots, you will see what I am typing and what errors I am getting...
Attachments:

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

More
16 Aug 2016 12:53 #78842 by andypugh

If it is, then why cant I install comp? I have shared the errors screenshots I am getting


Everything is installed that you need to compile a custom HAL component.

Your current problem is with the actual .comp code.
.comp uses C syntax, which means that program lines typically need to end with a ";" character.

The error codes point at line 33, which is
int oldtool = currenttoolnumber
As you can see, neither that line, nor the following 7 lines end with ";".Try changing that.

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

More
16 Aug 2016 12:55 #78844 by sxyuklad
Latest I got this error now.

I think there is something wrong with my comp file. Syntex or something... Can someone please go through my comp file quickly and fix errors and attach it again or point out the errors please.
Attachments:

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

More
16 Aug 2016 12:58 #78845 by sxyuklad
I added that semicolon syntex error. I should have noticed that before... It will still not install... see my previous post and it points out the errors... I cant understand... what are the errors now?

Attaching latest comp file and screenshot
Attachments:

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

More
16 Aug 2016 13:32 #78848 by andypugh
One thing that might be causing problems is the capitalisation of While, If and Else.
It doesn't like the initialisations of some variables to other variables. Typically initiialsation of variables needs to be to a constant value.

Be aware that a .comp file is pre-processed to a .c file, then compiled. It can sometimes be useful to halcompile --preprocess to create the C file (and not delete it) to see what is being produced. This pre-processing is where the variables that you are being accused of not using correctly are coming from.

It might be best to go back to the original, unmodified, .comp file to make sure that that compiles and installs, then make your changes in steps, checking that it compiles at each stage.

There is quite a bit of output even with a successful compile. if you see a "cp mycomp.ko /usr/bin/....." at the end, then it has worked.

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

More
16 Aug 2016 13:44 #78849 by sxyuklad
ok I tried compiling the original comp and it did install.

Now my question is if I open that comp file and make changes by hand, do I need to reinstall the comp or the changes done inside the file will automatically take effect?

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

More
16 Aug 2016 13:52 #78851 by andypugh

Now my question is if I open that comp file and make changes by hand, do I need to reinstall the comp or the changes done inside the file will automatically take effect?


You need to recompile / reinstall after every change (and you can even delete the .comp file when done, though I wouldn't recommend it).

I have developed a lot of the HAL components, and my process is a lot like;

edit...edit
sudo comp --install mycomp.comp
failure
edit...edit
sudo comp --install mycomp.comp
success
halrun
loadrt mycomp
show pin
exit

The halrun / loadrt / show pin tests that the new component loads properly and makes the pins.

You can test it, too, but that needs a bit more interactive HAL

halrun
loadrt mycomp
loadrt threads
addf mycomp.0 thread1
start
setp mycomp.input1 1234.567
show pin
setp mycomp.input2 -100
show pin

and so on

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

More
16 Aug 2016 14:27 #78858 by sxyuklad
I do not know what to do. It would be wonderful if someone who knows the language can go through my altered file and make corrections otherwise, I am not going to be able to understand all this. I want my ATC working but no one if helping out on the coding side. I guess I may have to go back to Mach3 but it will be very disappointing to quit here because that is the last step before I have fully functional lathe with linuxcnc :(

cncbasher: I checked Orac ATC but it will still need some altering... It has 3 sensors truth table. When I only have 2 sensors and I need to build a counter based on one of these inputs. Also, please check the comp file... It says I also need to install timerdelay2.comp but I do not know where that is, obviously I can only install if I have it. If the coding for that comp file is in the same file which I need to copy, can you point it out for me please because as far as I can see, there is one section for hal file and the other is oracchanger.comp itself. Confused :(
Attachments:

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

More
16 Aug 2016 14:34 #78862 by andypugh
The following user(s) said Thank You: sxyuklad

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

Time to create page: 0.116 seconds
Powered by Kunena Forum