Hi,
you could write a Lua program to read the encoder values, I presume they are pound variables,  and put them
into a file.
You can use this API to get a pound variable:
LUA Syntax: 
value, rc = mc.mcCntlGetPoundVar(
		number mInst, 
		number param)
Description:
Get the value of a system variable (pound variable). 
I would suggest you use m400 and m401 as examples of how to open a data file, add data to it and then close it.
m400 and m401 are in Mach4Hobby/LuaExamples/ProbeToFile.
Craig