{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)f38cb138-f45f-406a-adb5-582ac1077400","ParentGuid":"(Guid)74ccca2f-50e3-4d5a-9d7a-9fd420284f83","Name":"(string)atDI","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)ce35a08c-93dc-4524-982d-09bb1b8e0531"}]}}}}]},"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)//Does debounce and alarms for an digital input\n//2024-09-30 CWD Add an alarm that is based on the digital input value\n//2024-11-15 ATM Update to new in_ out_ schema\n\nIF in_invert THEN\n\traw := NOT in_raw;\nELSE\n\traw := in_raw;\nEND_IF\n\n\n//Calculate faults\nfaults(\n\tin_reset := in_reset,\n\tin_simEn := in_simEn,\n);\n\n//Only process input if the raw is marked as ready. Used to handle delaying processing value until remote I/O has responded with a value\nIF in_ready THEN\n\t//Copy in to out\n\tIF in_simEn THEN\n\t\tout_raw := in_simIn;\n\tELSE\n\t\tout_raw := raw;\n\tEND_IF\n\t\n\t//Debounce\n\tdebounce(\n\t\tin_raw := out_raw,\n\t);\n\tout_val := debounce.out_val;\n\t\n\tout_ready := TRUE;\n\t\nEND_IF\n\n//Do alarm logic\nalm(\n\tin_raw := out_val,\n\tin_reset:= in_reset);\n\n","LineInfoPersistence":"(string)f38cb138-f45f-406a-adb5-582ac1077400_Impl_LineIds"}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextBlobForSerialisation":"(string){attribute 'no_assign'}\nFUNCTION_BLOCK atDI\nVAR_INPUT\n\tin_raw: BOOL; //Raw input\n\t{attribute 'symbol' := 'none'}\n\tin_simIn: BOOL; //Simulator Input\n\t{attribute 'symbol' := 'none'}\n\tin_simEn: BOOL;\n\tin_reset: BOOL; //Alarm reset\n\tin_ready: BOOL := TRUE; //Indicates the the value at raw is now valid. Used at startup to delay updates until remote I/O has replied\n\tfaults: atDIFault; //fault\n\talm: atAlarm; // input used as an alarm\n\tdebounce: atDebounce;\n\tin_invert: BOOL := FALSE; \t//Invert Function Defaults to False\n\tin_name: STRING;\nEND_VAR\nVAR_OUTPUT\n\tout_raw: BOOL; //Raw input value\n\tout_val: BOOL; //Debounced Input\n\tout_ready: BOOL; //Output is valid. Used to delay using the value until startup overhead is complete, like waiting for remote I/O to respond\nEND_VAR\nVAR\n\traw: BOOL;\nEND_VAR\n","LineInfoPersistence":"(string)f38cb138-f45f-406a-adb5-582ac1077400_Decl_LineIds"}}}},"UniqueIdGenerator":"(string)1972","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"}