× Forum Header

Please help, I need some addvise

More
21 Apr 2013 04:12 #32951 by allenwg2005
Todd, I have Linixcnc 8.04 loaded, this solved my latency problem.

I've been reading some of the tutorials/links that have been sent and I have not been able to access the information we are after as yet, the following seemed like a good example of what I get, so let me know what I'm doing wrong and I'll try again.

I typed in halrun and got the halcmd prompt. From that I typed:

halcmd: loadrt hal_parport cfg=”<config-string>”
insmod: error inserting '/user/realtime-2.6.24-16-rti/modules/Linux/hal_parport.ko': -1Device or resource busy
<stdin>:1: exit value: 1
<stdin>:1: insmod failed, returned-1
See the output of 'dmesg' for more information

I've tried different things and got “bash:” complaints or just a “ >” with a flashing cursor.

What am I doing wrong?

Thanks

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

More
21 Apr 2013 04:58 #32952 by allenwg2005
I should also ask how to do the suggestion to “rename the ptestx files” & “copy to the same directory”.

"Also you have to remember to rename the file ptestx.txt to ptestx.xml. (It had to be renamed because the forum wouldn't let me upoad an xml)"

Where are the ptestx files?
What directory should they be copied to?
Renaming should be straight forward, (I hope).

"You also need to remember that LinuxCNC requires a kernal modified for real time to run properly. If you are using something else you had before it won't work."

I have not had this machine running on this PC, the only program on the new PC is Linuxcnc 8.04.
Do I have to concern myself with the kernal/realtime issue in this case?

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

More
21 Apr 2013 10:35 #32956 by Todd Zuercher
The ptestx files were saved as links in some of the referenced messages linked to earlier in this thread. They are a short hal file and an xml file that open a small pyvcp screen that lets you test a parallel port on your computer to see if it will work in Xmode for use with linuxcnc. Here I am attaching a zip file that has both files. You can save this zip file then extract the two files to some directory on your computer. You then need to know what the address is for the parallel port you want to test is. Open the file ptestx.hal with a text editor. The second line in the file is
loadrt hal_parport cfg="0x378 X"
The 0x378 is the address, change this to what ever address is used by the port you want to test. The X sets the parallel port driver to Xmode.
Then open a terminal and go to the directory that contains these two files and type the command "halrun -I -f ptestx.hal" then press enter then a small screen like the one I posted a picture of earlier in the thread should pop open. If you have the port plugged into your machine and you toggle one of one of the limits connected to that port, you should see one of the red or green circles change color. If nothing happens then the port isn't compatible with x-mode or you did something wrong (like put in the wrong port address.

I am not sure what else you might be doing wrong, but I still consider myself a novice. Maybe someone else with more experience coaching newbies can help.
Attachments:
The following user(s) said Thank You: allenwg2005

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

More
22 Apr 2013 19:21 #32993 by andypugh

I typed in halrun and got the halcmd prompt. From that I typed:
halcmd: loadrt hal_parport cfg=”<config-string>”

Is that _exactly_ what you typed, or did you replace the <config-string> text with an actual config string?

insmod: error inserting '/user/realtime-2.6.24-16-rti/modules/Linux/hal_parport.ko': -1Device or resource busy

This may be a result of not specifying an actual config string, or it may actually be true that the parallel port has been grabbed by another process.
At the command-line if you type
lsmod
you will get a list of loaded modules. I think you want to _not_ see the "lp" module there. If it is, then I think you can unload it with
modprobe lp
Though that might fail if something else thinks it is using "lp". ("lp" is the line-printer module)
The following user(s) said Thank You: allenwg2005

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

More
22 Apr 2013 21:51 #33005 by allenwg2005
Todd, this helps greatly.
I see what you mean now, I'll try this as soon as I have some time. (Perhaps later today).

Andy, I be-leave that was the way I typed it.
All of this has become a blur, I can't say exactly what I did or were I got the idea to try it to be completely honest.

This is what I'm doing in light of the situation I find myself in.
I have purchased a book on Unix and Linux. (I'm reading it now).
I think my lack of knowledge about the file hierarchy, nomenclature, and basic OS functions is causing the bulk of the problems here.

More important than getting help from you folks is the responsibility to help myself!
There is a difference between asking for help with directions and expecting someone to pick you up and carry you were you need to go. It's my responsibility to do the walking!

As I read through this book I am working my way through the HAL Manual and getting good results.
I will post the results of this ongoing adventure here as soon as I have more questions, or I get the machine to work properly.
(My money is on more questions, but you never know I might get it working, we'll see).

Thanks, Allen

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

More
23 Apr 2013 02:02 #33018 by arvidb

... you will get a list of loaded modules. I think you want to _not_ see the "lp" module there. If it is, then I think you can unload it with
modprobe lp
Though that might fail if something else thinks it is using "lp". ("lp" is the line-printer module)

That command would load the lp module. To unload do
# modprobe -r lp
(Observe the "-r"!)
The following user(s) said Thank You: allenwg2005

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

More
25 Apr 2013 08:37 #33176 by allenwg2005
Todd, I have been able to bring up the test screen you sent me, I just need to confirm I have the correct address(s).

Can anyone tell me if there is a command line to locate a parallel port address?

I have three PCI I/O boards loaded on the PC and I need to locate addresses for them.

I have tried "dmesglgrep parport" and got [command not found]. (Ran it from a prompt at boot up).

I tried "/proc/ioports" and got [permission denied], (I'm sure I have missed part of the command on this one).

What little brains I have are cooked going through the HAL Manual, it's been a trip.
It will take a while for all of it to sink in.

Any further advise going forward is appreciated.

Thanx

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

More
25 Apr 2013 15:04 - 25 Apr 2013 15:10 #33183 by ArcEye
Hi

You need to be precise about terminal commands, spacing and spelling

I have tried "dmesglgrep parport" and got [command not found].


The line should be dmesg | grep parport - but even that will not work

Since dmesg is not in the PATH env string, the system has no idea where to look for it.
Also it is a log file, not an executable, so invoking its name does nothing.
An easy way to view the contents of a file to stdout (the screen) is cat

The command cat /var/log/dmesg | grep parport
will output the contents of that file through a pipe (that is what the bar | is) to grep which will search for the string 'parport'

Likewise /proc/ioports is a location of a psuedo file not a command
cat /proc/ioports will get what you wanted

regards
Last edit: 25 Apr 2013 15:10 by ArcEye.

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

More
25 Apr 2013 20:35 - 25 Apr 2013 20:36 #33195 by bjames28

Hi



The line should be dmesg | grep parport - but even that will not work

Since dmesg is not in the PATH env string, the system has no idea where to look for it.
Also it is a log file, not an executable, so invoking its name does nothing.


regards


Hi,

I think
dmesg | grep parport
should work, because dmesg is a command existing in most Linux distributions.
Or did I misunderstand something?

Best regards:
James
Last edit: 25 Apr 2013 20:36 by bjames28.

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

More
25 Apr 2013 20:41 #33196 by andypugh

Also it is a log file, not an executable, so invoking its name does nothing.

I think dmesg is an executable, one that prints the contents of /var/log/kern.log

The command cat /var/log/dmesg | grep parport

Maybe cat /var/log/kern.log | grep parport

But I tend to prefer cat /proc/ioport or lspci for finding the parport address.

_none_ of these should be necessary, you can just use 0 for the first parport, 1 for the second parport, etc.

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

Time to create page: 0.547 seconds
Powered by Kunena Forum