Next is to try and MAKE the S/N and var update themselves as each changes.
like I said in my earlier post, pop it in your PLC script...
Also, just curious but the one I showed you, is exactly what bodini showed you... except for UDRO20.... with the "Set" and "Get" property calls, you have to look at the "Properties" of the object and look very carefully at the property you wanting to do something with.
i.e. Value, and value are not the same.... etc.
further: tostring(), tonumber(), type(var), and the native lua string functions are your friends, it is worth learning about them.
glad you got it working, I knew you would!
Scott