Log string or integer for PID-controller mode
Is it possible to log a single aspect for all controller modes?
It's a AC800 PID01A controller.
I'm thinking either a string or an integer which translates to modes, i.e., Auto, Man, E1 etc. I've found a varaible InitMode (dINT) in the PID01A_InPar datatypes which has the properties I'm looking for: 5 = Man ; 6 = Auto ; 7 = E1 ; 8 = E2 ; 9 = E3.
However, I'm not able to locate this particular variable in the "new property log" list for the controller in question.
I know I can log boolean values for activation of each mode, but it would be easier if there was a common variable.
Anyone who can help me?
Voted best answer
You cannot log strings in 800xA History ( which means you can't log a BatchID, but thats another issue entirely ) Anyway ....
Use a property translations aspect. For PID01 and PIDA01. Add it to the Object Type Library and Inherit to all instances.
Expression = ExtPar.OutMode + 1
Gives Bal=0, Man=1,Auto=2,E1=3,E2=4,E3=5,ManFd=6
You can log the property "ControlMode"
(InitPars dont work because theyre only used once when the Function Block is Initialized)