Current X and Y Position using System Variables

Submit any comments, issues or requests relating to the use of VR Milling Version 5 and 2

Moderators: Martin, Steve, Mr Magoo

Post Reply
drb
Posts: 9
Joined: Sat 24 Feb , 2007 22:51 pm

Current X and Y Position using System Variables

Post by drb » Wed 04 Apr , 2007 23:03 pm

I am writing a subprogram using variables in absolute mode and inches. I am checking where the machine is currently positioned in X and Y using the sytem variables #4101 and #4102. The system variables return values that appear to be metric and also possibly based on machine coordinates.

Is there a way that I can retrieve the XY position in the same units I am working in?

User avatar
Denford Admin
Site Admin
Posts: 3649
Joined: Fri 10 Feb , 2006 12:40 pm
Hardware/Software: Go to User Control Panel > Profile
Enter as much information about your CNC hardware and software as you can - it makes it easier for everyone to know what you're talking about then.
Location: Sunny Brighouse
Contact:

Post by Denford Admin » Thu 05 Apr , 2007 9:12 am

Hi,

Which control have you ? - I have #5041 for current X axis position on a Fanuc OM-A

I'm 99% certain that the Fanuc (?) will only ever return values in its default setup units (metric or inch)
So you will just have to convert to your own units and store in another variable, eg:
#501 = #5041/25.4

I'm also pretty sure that you won't be able to find a variable with the current actual position (taking into account offsets), but you will be able to read the position, read the tool offsets, read the work offsets and add them all up.

Think about it this way - the control gives you access to all its major values / registers, what you do with them is up to you !
The list of registers would get out of hand if it were to provide all possible combinations of axes positions (Absolute, Relative, Actual, Actual without wear, Actual with wear etc....)

Post Reply