Hi Scott,
some of the stuff I read has actually stuck....shame I didn't think or remember berfore I opened
my gob!
Look in the 'help docs', easiest access is the 'help docs?' button on the M4 screen.
Open the scripting manual pdf, section 4 is about registers and 4.4 and 4.5 about
saving and retrieving them.
Also have a look in the Mach4 Toolbox child board of this board and find poppabears
post on enums.....I took a little chunk so you could see:
Fixture offsets, G54, 55, 56 etc. have a Gap of 20 between them.
fixture offset values start with G54 at #5221
G54 X = #5221
G54 Y = #5222
G54 Z = #5223
G54 A = #5224
G54 B = #5225
G54 C = #5226
--20 point gap between G54 and G55, i.e. 522x to 524x
G55 X = #5241
G55 Y = #5242
G55 Z = #5243
G55 A = #5244
G55 B = #5245
G55 C = #5246
So the basic process is in the screen unload script:
Save those registers that you want, say
#5221, #5222, #5223, the xyz of G54
And in the first run of the PLC script:
restore #5221, #5222, #5223
Sorry I don't know enuf about coding to give any more but the luaexamples in the
Mach4 folder will no doubt have some examples to follow.
Craig