First Time Help

More
11 Jul 2011 12:54 #11394 by Todd Zuercher
Replied by Todd Zuercher on topic Re:First Time Help
Yes I would be willing to test it.

If you are wanting to fully flesh out a driver for this card. It also has some timing capibilitys (that we are not taking advantage of). The card came with a DVD that has some driver programing examples for dos in Borland C. I could send you a copy of these if you think they would be useful to you in any way.

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

More
11 Jul 2011 13:10 #11396 by andypugh
Replied by andypugh on topic Re:First Time Help
I looked at the timers, but I couldn't immediately see how to integrate them into EMC2, or how much use they would be.

If you can think if a use for them, and a way to use them with a HAL "pin" interface then I can look into it.

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

More
11 Jul 2011 14:48 #11410 by PCW
Replied by PCW on topic Re:First Time Help
Its likely in a DOS environment that the counter timers were used with interrupts for periodic operations
(what EMC does with threads) They might be useful on one-shot mode as step pulse generators (avoiding the reset operation), but it looks like the stepmotors were originally driven by GPIO instead

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

More
16 Jul 2011 01:18 #11560 by andypugh
Replied by andypugh on topic Re:First Time Help
Todd Zuercher wrote:

Yes I would be willing to test it.

Excellent
Well, first of all I think it makes sense to move your good, working, pcl720.ko file from
/usr/realtime-2.6.32-122-rtai/modules/emc2/pcl720.ko
to a safe place, so you can put it back to get the machine running again.

Then make a copy of your current ~/emc2/configs/{whatever} directory under a new name (router_experimental for example), and then start working in that directory. When EMC2 starts up you should see the new config as an option, along with the safe, known-good old config)
Then copy the attached file to somewhere convenient, go to where it is and comp --install pcl720.comp, as you did a few weeks ago.
Then see if it works with the existing config (it should, but I have changed a few things).
Then edit the INI file in the experiment directory to set step_space to 0 on each axis. (This tells the stepen that "reset" is active.
add a line to the HAL file: setp pcl720.0.reset-time 5000 (or whatever suits your drives, that is the step time in nanoseconds, or thousandths of microseconds)
Also add a line: setp pcl2720.0.pin-NN-reset true
for any pin that is a step pulse pin (but not, really not, for anything else)
Then, after all the other "addf" lines in HAL file, add:
addf pcl720.0.reset
Then start emc2 and see what happens. I would be astonished if it worked at all.

File Attachment:

File Name: pcl720-bd8...edc.comp
File Size:4 KB
Attachments:

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

More
20 Jul 2011 02:36 - 20 Jul 2011 02:45 #11673 by Todd Zuercher
Replied by Todd Zuercher on topic Re:First Time Help
I have been really busy trying to catch up with all my other work that has not been getting done while I worked on this machine. Meanwhile the machine is working on it's own backlog. I am under orders not to futz with it during 1st shift for a while until it (and myself) catch up on a few things. Maybe I can give the new driver a try later in the week.

I only have one more thing that I really need to get set up on this machine, and a few other want to dos. I need to set up the amp fault signals from the drives. I know what bits they are on the card, but I am having a lot of trouble finding an example of how to set them up in hal. I found something in the manual about axis.N.amp-fault-in but what I've tried so far didn't work. What I need is for all motion to stop when one of these pins change from true to false, and I would like to have some indication on screen of which drive is faulted.

pcl720.0.pin-26-in is the X indicator
pcl720.0.pin-24-in is the Y indicator
pcl720.0.pin-02-in is the Z indicator

The bit from these pins is true when the drives are working and false when the drive is faulted. Should the lines in hal look something like this? (but with a bit inverter that I don't know how to add)

net Xfault pcl720.0.pin-26-in => axis.0.amp-fault-in

The machine also has a hard wired drive enable switch it seems to be connected to two input pins.
pcl720.0.pin-00-in is false when drives are enabled (true when disabled)
pcl720.0.pin-15-in is true when drives are enabled (false when disabled)
I would also like to add some form of onscreen indication of this switches position, disable movement when off and maybe even require re-homing (un-home all axis if enable is turned off).

One of the other bigger want to dos, is to add some form of cycle timer, to indicate the run time of a file. Also is there a simple way to make the estimated runtime even remotely accurate? Right now the esimated 2.5 minute run isn't even remotely close to the actual 30 min reality.
Last edit: 20 Jul 2011 02:45 by Todd Zuercher. Reason: bad grammar

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

More
20 Jul 2011 10:01 #11677 by andypugh
Replied by andypugh on topic Re:First Time Help
Todd Zuercher wrote:
[quote I found something in the manual about axis.N.amp-fault-in but what I've tried so far didn't work. What I need is for all motion to stop when one of these pins change from true to false, and I would like to have some indication on screen of which drive is faulted.[/quote]

The onscreen LEDs would need to be added as a PyVCP panel (or, rather nicer, but still not in 2.4, I don't think, GladeVCP)
www.linuxcnc.org/docs/2.4/html/hal_pyvcp.html
www.linuxcnc.org/docview/devel/html/gui/gladevcp.html

The bit from these pins is true when the drives are working and false when the drive is faulted. Should the lines in hal look something like this? (but with a bit inverter that I don't know how to add)

net Xfault pcl720.0.pin-26-in => axis.0.amp-fault-in


Yes, that looks correct. I am not at all sure what the amp-fault pin does though, I might need to experiment.
The new driver has an inverted version of each input pin for exactly this sort of situation, So you don't need the example below if the new driver version works, But to add a standalone inverter for three pins in the HAL file you would have:
loadrt invert count=3
...
addf invert.0 servo-thread
addf invert.1 servo-thread
addf invert.2 servo-thread 
...
net Xfault-in pcl720.0.pin-26-in => invert.0.in
net Xfault invert.0.out => axis.0.amp-fault-in
net Xfault-in pcl720.0.pin-24-in => invert.1.in
net Xfault invert.1.out => axis.1.amp-fault-in
net Xfault-in pcl720.0.pin-02-in => invert.2.in
net Xfault invert.2.out => axis.2.amp-fault-in

I would also like to add some form of onscreen indication of this switches position, disable movement when off and maybe even require re-homing (un-home all axis if enable is turned off).

The former would be another job for PyVCP or GladeVCP. The latter point is controlled with the VOLATILE_HOME .ini-file setting.
linuxcnc.org/docs/html/config_ini_config...b:%5BAXIS%5D-section section 2.2.9.1

One of the other bigger want to dos, is to add some form of cycle timer, to indicate the run time of a file.

Sorry to keep doing this:
Current release:http://wiki.linuxcnc.org/emcinfo.pl?SimpleCycleTimer
Develepment version: www.linuxcnc.org/docview/devel/html/man/man9/time.9.html

Also is there a simple way to make the estimated runtime even remotely accurate? Right now the esimated 2.5 minute run isn't even remotely close to the actual 30 min reality.

I don't think that there is even a complicated way to make it accurate. I don't think that preview takes any account of axis accelleration times.
However, if there is such a big difference I suspect that you have G-code files made up of many short linear moves? You probably want to fiddle with G64 settings, you might even find that by relaxing the path tolerance you can move the cycle time closer to the estimate, rather than move the estimate closer to the cycle time...
www.linuxcnc.org/docview/html/common_User_Concepts.html

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

More
20 Jul 2011 13:18 #11689 by Todd Zuercher
Replied by Todd Zuercher on topic Re:First Time Help
andypugh wrote:

I don't think that there is even a complicated way to make it accurate. I don't think that preview takes any account of axis accelleration times.
However, if there is such a big difference I suspect that you have G-code files made up of many short linear moves? You probably want to fiddle with G64 settings, you might even find that by relaxing the path tolerance you can move the cycle time closer to the estimate, rather than move the estimate closer to the cycle time...
www.linuxcnc.org/docview/html/common_User_Concepts.html


This machine is used for relitively fine 2 1/2-D V-groove carving/engravine, so almost all of the cutting movements are very small with average segement lengths often less than 0.01 inches. This combined with the relatively low acceleration rates I have had to use to get a nice cut., leave me with max feed rates less than 20 ipm durring most of the cutting (I have the feed rate set to F100). I currently have G64 set to P0.005 Does this mean that the max deviation from programmed to commanded path would be 0.005 inches? If that is the case then I don't think I want to set it much looser because nice crisp corners are pretty important to this work.

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

More
20 Jul 2011 14:46 #11693 by andypugh
Replied by andypugh on topic Re:First Time Help
Todd Zuercher wrote:

I currently have G64 set to P0.005 Does this mean that the max deviation from programmed to commanded path would be 0.005 inches? If that is the case then I don't think I want to set it much looser because nice crisp corners are pretty important to this work.


Can you run a sample to see how much difference it makes? It seems to me that you don't actually want to follow the 0.01" straight-line segments, you want to follow the smooth curves from the original artwork that those straight lines are a bad approximation to...

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

More
20 Jul 2011 21:14 #11695 by Todd Zuercher
Replied by Todd Zuercher on topic Re:First Time Help
Well invert didn't work. Apparently that is only for float signals. But I was able to use your example framework as an example of how to use the not command.

This is what I used:
# Enable Switches

loadrt not count=3

addf not.0 servo-thread
addf not.1 servo-thread
addf not.2 servo-thread

net Xfault-in pcl720.0.pin-26-in => not.0.in
net Xfault not.0.out => axis.0.amp-fault-in

net Yfault-in pcl720.0.pin-24-in => not.1.in
net Yfault not.1.out => axis.1.amp-fault-in

net Zfault-in pcl720.0.pin-02-in => not.2.in
net Zfault not.2.out => axis.2.amp-fault-in

When the am-fault-in pin is triggered EMC sets an alarm for the join infolved, and tuns the sofware to "machine off". This should be good enough for me (at least for now)

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

More
20 Jul 2011 21:41 #11696 by andypugh
Replied by andypugh on topic Re:First Time Help
Todd Zuercher wrote:

Well invert didn't work. Apparently that is only for float signals. But I was able to use your example framework as an example of how to use the not command.

Sorry about that, that is what happens when I try to write HAL code without access to an EMC2 machine.

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

Time to create page: 0.115 seconds
Powered by Kunena Forum