Hello Guest it is May 22, 2024, 08:35:26 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - abarry54

Pages: 1
1
Mach4 General Discussion / Custom DRO script
« on: June 22, 2015, 04:46:59 PM »
Hi all,

I am looking for a way to create a custom output on a DRO. For instance, I have a bar puller that has two fixed drills attached to it, I would like to display the position of the bar puller (calling it the X Axis) and then on a separate DRO, display the position of the drill relative to the bar puller.

This should be a simple addition on each update: X Axis Position + Drill position relative to X axis 0 (which should never change so it can be hard-coded) but I am having trouble writing this value to the DRO. I was thinking it might be easier to make a few false axis' and do a mcGetAxisPos and then write it to the next axis (Y, Z and A that aren't being used) but I can't seem to get that to work either.

I am also assuming that this code would need to be placed in the DRO update script location, is this the correct place?

I have tried searching the forums and the API with no luck and I am still trying to get a handle on LUA script so any advice would be greatly appreciated!

Thanks!

- Adam


Pages: 1