{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)414f368b-428d-445e-9ffd-ccbbb12cf839","ParentGuid":"(Guid)74ccca2f-50e3-4d5a-9d7a-9fd420284f83","Name":"(string)atFilter","Properties":{"@Type":"2c41fa04:IDictionary","@Value":[{"@Key":"(Guid)829a18f2-c514-4f6e-9634-1df173429203","@Value":{"@Type":"829a18f2","@Value":{"ParentObjects":{"@Type":"fa2ee218:IDictionary","@Value":[{"@Key":"(Guid)d9b2b2cc-ea99-4c3b-aa42-1e5c49e65b84","@Value":"(Guid)4db58afa-24a6-4c51-a6bd-bb2a90f6ae15"}]}}}}]},"TypeGuid":"(Guid)6f9dac99-8de1-4efc-8465-68ac443b7d08","EmbeddedTypeGuids":{"@Type":"[Guid]","@Value":["(Guid)a9ed5b7e-75c5-4651-af16-d2c27e98cb94","(Guid)3b83b776-fb25-43b8-99f2-3c507c9143fc"]}}},"TypeInfos":{"2c41fa04":"{2c41fa04-1834-41c1-816e-303c7aa2c05b}","81297157":"{81297157-7ec9-45ce-845e-84cab2b88ade}","829a18f2":"{829a18f2-c514-4f6e-9634-1df173429203}","fa2ee218":"{fa2ee218-a39b-4b6d-b249-49dbddbd168a}","Guid":"System.Guid","string":"System.String"}},"object":{"Graph":{"@Type":"6f9dac99","@Value":{"SpecialFunc":{"@Type":"0db3d7bb:Enum","@Value":"None"},"Implementation":{"@Type":"3b83b776","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextBlobForSerialisation":"(string)//Standard filter\n//2024-07-31 CWD Add on first scan filt = cv\n//2024-11-15 ATM Update to new in_ out_ schema\n\nIF (in_tau = T#0MS) THEN\n\tout_filt := in_cv;\n\tRETURN;\nEND_IF;\n\n//Scan time in seconds\nscan();\nscanTime := scan.scanTime;\n\n//If tau is less than scan time, use scan time\nIF (scanTime > in_tau) THEN\n\ttauInternal := scanTime;\nELSE\n\ttauInternal := in_tau;\nEND_IF;\n\n//First Order Filter\nIF firstScan THEN\n\tout_filt := in_cv;\nELSE\n\tout_filt := ((in_cv - pv) * (0.63/TIME_TO_REAL(tauInternal)) * 1.5 * TIME_TO_REAL(scanTime)) + pv;\t\nEND_IF\npv := out_filt;\n\n//set to zero if close\nIF (out_filt <= 0.0000007 ) AND (out_filt >= -0.0000007) THEN\n\tout_filt := 0.0;\nEND_IF;\n\nfirstScan := FALSE;\n\n","LineInfoPersistence":"(string)414f368b-428d-445e-9ffd-ccbbb12cf839_Impl_LineIds"}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextBlobForSerialisation":"(string)FUNCTION_BLOCK atFilter\nVAR_INPUT\n\t// current value in\n\tin_cv: REAL;\nEND_VAR\nVAR_INPUT\n\t// filter time in seconds\n\tin_tau: TIME := T#500MS;\nEND_VAR\nVAR_OUTPUT\n\t// filtered value\n\tout_filt: REAL;\nEND_VAR\nVAR\n\t// scanTime function\n\t{attribute 'symbol' := 'none'}\n\tscan: atScanTime;\n\t// previous value\n\t{attribute 'symbol' := 'none'}\n\tpv: REAL;\n\t// scan time in seconds\n\t{attribute 'symbol' := 'none'}\n\tscanTime: TIME;\n\t{attribute 'symbol' := 'none'}\n\ttauInternal: TIME;\n\t{attribute 'symbol' := 'none'}\n\tfirstScan: BOOL := TRUE;\nEND_VAR\n","LineInfoPersistence":"(string)414f368b-428d-445e-9ffd-ccbbb12cf839_Decl_LineIds"}}}},"UniqueIdGenerator":"(string)824","POULevel":{"@Type":"8e575c5b:Enum","@Value":"Standard"},"ChildObjectGuids":{"@Type":"ArrayList:IList","@Value":[]},"AddAttributeSubsequent":"(bool)False"}},"TypeInfos":{"0db3d7bb":"{0db3d7bb-cde0-4416-9a7b-ce49a0124323}","3b83b776":"{3b83b776-fb25-43b8-99f2-3c507c9143fc}","6f9dac99":"{6f9dac99-8de1-4efc-8465-68ac443b7d08}","8e575c5b":"{8e575c5b-1d37-49c6-941b-5c0ec7874787}","a9ed5b7e":"{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}","ArrayList":"System.Collections.ArrayList","bool":"System.Boolean","f3878285":"{f3878285-8e4f-490b-bb1b-9acbb7eb04db}","string":"System.String"}}},"FormatVersion":"1.0"}