Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
isamiBDSPX
310 Views, 3 Replies

Post processor help: How to get WCS origin's X, Y and Z values

Hi everyone! 

I'm having a little bit of trouble getting my post processor to write a simple line of code like:

G10 L2 P1 X0. Y0. Z-381.926 (G54 WCS)

That line, on a Fanuc control will set the G54 WCS.

 

In the part I'm working right now, the WCS origin on my setup is set at (X=0, Y=0, Z=-381.926)

 

When I dump the information I can get this:

 

currentSection.fcsOrigin=(1.7859e-13, 1.10939e-13, 381.926)

 

which are the X, Y and Z values that I'm looking for, well sort of.

 

I have three problems:

 1. I don't know how to access the individual values.

 2. Even though my WCS origin is at X=0 and Y=0, I get a scientific notation of a number that's very close to zero but not exactly zero (X= 1.7859e-13, Y= 1.10939e-13). 

 3. I always get the values inverted. What I mean is that they are presented as if they are multiplied by -1. Why?

 

Any ideas on how to get my post to write this line of code?

G10 L2 P1 X0. Y0. Z-381.926

 

G10 L2 P1 will always be the same, but the X, Y and Z coordinates will change whenever I change the WCS origin.

Thanks in advance.

 

Best,

Isami