We just finished an unsuccessful attempt to run an EIA program as a subroutine from a mazatrol main program. Here's our problem and what we've attempted so far... All help is appreciated greatly.
Our original plan was to use the Offset command in mazatrol to set the work coordinates(this is how we handle everything else. WPC is the center of our pallet and the offset locates the actual part) and just not call up a G54 type command in the EIA program. Unfortunately after seeing that it didn't work we looked in the manual and sure enough "Offset data is invalid". Ugh.
Our biggest concern is that we need to dynamically rely on the WPC numbers because if the machine takes a hit, those numbers will change... we also have 4 (relatively)machines we like to be able to move jobs between.
We tried using the variables #5341 through #5343 in a G10 line along with numbers identical to our offset numbers ex:
G10 L20 P10 X#5341+3.5 Y#5342 Z#5343+5.4612
Unfortunately when we looked up G54.1 P10 ot showed X as 3.5, Y as 0 and Z as 5.4612.
Unfortunately we ran out of time today because the mill programmer had a load of gravel coming so he had to jet.
I believe your variables are incorrect, (pg 12-91 of your EIA manual)
X = #5041 ( workpiece co-ordinate )
Y = #5042
Z = #5043
G10 L20 P10 X[#5041+3.5] Y[#5042] Z[#5043+5.4612]
I would also add the brackets, not sure if it matters but i always have them.
Give that a try