{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)adcffe24-1554-42e0-b3ca-9385f2506700","ParentGuid":"(Guid)74ccca2f-50e3-4d5a-9d7a-9fd420284f83","Name":"(string)atVFDAutoReset","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)901027e0-f38f-49f6-b3d3-9419cc4298a5"}]}}}}]},"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)//This is meant to automatically reset a vfd after it faults.\n//After each reset the delay time before the next reset is doubled\n//Only the specified[default 3] number of resets will be attempted\n//After a preset running time with no fault[10 min] the reset delay time is reset back to the default[1  min]\n\n//2025-01-06 CWD Initial create\n\n//Generate 1 second pulse\nsecPulse(period := T#1S);\n\n//Set reset delay to minimum value\nIF resetDelay = 0 THEN\n\tresetDelay := resetDelayMin;\nEND_IF\n\n//Calculate TSF - Time Since Fault\nIF secPulse.oneShot AND fault THEN \n\tTSF := TSF + 1;\nEND_IF\nIF NOT fault THEN\n\tTSF := 0;\nEND_IF\n\n//Do reset\nresetTrig(CLK := TSF > resetDelay AND resetCount < maxResets);\nIF resetTrig.Q THEN\n\tresetOS := TRUE; //Trigger a reset\n\tresetDelay := ResetDelay * 2; //Double the time until the next reset\n\tresetCount := resetCount + 1; //Increment reset counts\n\tresetTotal := resetTotal + 1;\n\tTRSLAR := 0;\nELSE\n\tresetOS := FALSE;\nEND_IF\n\n//Calculate TRSLAR - Time running since last auto reset\nIF secPulse.oneShot AND runStat THEN\n\tTRSLAR := TRSLAR + 1;\nEND_IF\n\n//If no faults for 10 minutes of run time then reset delays\nIF TRSLAR > noFaultResetDelay THEN\n\tresetDelay := 0; //This gets update above to default reset delay\n\tresetCount := 0;\nEND_IF","LineInfoPersistence":"(string)adcffe24-1554-42e0-b3ca-9385f2506700_Impl_LineIds"}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextBlobForSerialisation":"(string)//Generates an auto reset pulse\nFUNCTION_BLOCK atVFDAutoReset\n\nVAR_INPUT\n\tfault: BOOL; //VFD is faulted\n\trunStat: BOOL; //VFD is running\n\tmaxResets: INT := 3; //Maximum number or resets to attempt\n\tresetDelayMin: DINT := 60; //Minimum delay [sec]\n\tnoFaultResetDelay: DINT :=600; //Resets delays and counts after this much run time with no fault [sec]\nEND_VAR\n\nVAR_OUTPUT\n\tresetOS: BOOL; //Reset vfd one shot\nEND_VAR\n\nVAR\n\tTRSLAR: DINT; //Time Running Since Last Auto Reset\n\tTSF: DINT; //Time Since Fault in seconds\n\tresetDelay: DINT; //Delay until auto reset in seconds\n\tsecPulse: atPulseGenerator; //1 second pulse\n\tresetCount: INT; //number of resets since reset\n\tresetTotal: DINT; //total number of resets done, not retentive\n\tresetTrig: R_TRIG; //reset trigger\nEND_VAR\n","LineInfoPersistence":"(string)adcffe24-1554-42e0-b3ca-9385f2506700_Decl_LineIds"}}}},"UniqueIdGenerator":"(string)181","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"}