{"payload":{"meta":{"Graph":{"@Type":"81297157","@Value":{"Guid":"(Guid)c4726b15-bda8-49fe-825c-b022913633b2","ParentGuid":"(Guid)74ccca2f-50e3-4d5a-9d7a-9fd420284f83","Name":"(string)atVFDGS3","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)//Extends atVFDBase\n//2024-11-28 ATM ported to GS3 from GS20\n\n//This needs to be called every scan for reliable counting\n//Read(3) 5 from 2100H\n//Write(16) 3 to 2000H\n\n\nreadHolding(\n\tclient := client,\n\tdata := mbsIn,\n\tin_startAddr := 8448,\n\tin_quantity := 8,\n\tin_interval := in_pollInterval,\n\tin_unitId := in_unitId,\n);\n\nwriteHolding(\n\tclient := client,\n\tdata := mbsOut,\n\tin_startAddr := 2330,\n\tin_quantity := 5,\n\tin_interval := in_pollInterval,\n\tin_unitId := in_unitId,\n);\n\n//Base class work\nSUPER^();\n\nIF in_simEn THEN\n\tRETURN;\nEND_IF\n\n//Copy status from modbus to variables\nout_run := (mbsIn[1] AND 3) = 3;\nout_uts := mbsIn[2] = mbsIn[3] AND out_run;\nout_speedActHz := WORD_TO_REAL(mbsIn[3]) / 100;\nout_current := WORD_TO_REAL(mbsIn[4]) / 10;\nout_dcBus := WORD_TO_REAL(mbsIn[5]) / 10;\nout_voltage := WORD_TO_REAL(mbsIn[6]) / 10;\n\n\n//Control words\nmbsOut[0] := REAL_TO_WORD(SpeedRefActive * 10);\nmbsOut[1].0 := out_fwdCmd OR out_revCmd;\nmbsOut[2].0 := out_revCmd;\nmbsOut[3].0 := extFaultTrig;\nmbsOut[4].0 := in_reset;\n\n//Copy speed reference to modbus\n\nIF mbsIn[0] = 4 THEN\n\t// Motor Overload\n\tintFaultVFDId := atVFDFaultCode.mtrOvld;\nELSIF mbsIn[0] = 5 THEN\n\t// Inverter Overload\n\tintFaultVFDId := atVFDFaultCode.invOvld;\nELSIF mbsIn[0] = 16 THEN\n\t// Under Volt\n\tintFaultVFDId := atVFDFaultCode.underVolt;\nELSIF mbsIn[0] = 2 THEN\n\t// Over Volt\n\tintFaultVFDId := atVFDFaultCode.overVolt;\nELSIF mbsIn[0] = 1 OR mbsIn[0] = 13 OR mbsIn[0] = 14 THEN\n\t// Over Current\n\tintFaultVFDId := atVFDFaultCode.overCur;\nELSIF mbsIn[0] = 15 THEN\n\t// Ground Fault\n\tintFaultVFDId := atVFDFaultCode.gndFlt;\nELSIF mbsIn[0] = 17 OR mbsIn[0] = 24 THEN\n\t// Power Loss\n\tintFaultVFDId := atVFDFaultCode.powerLoss;\nELSIF FALSE THEN\n\t// outPhaseLoss\n\tintFaultVFDId := atVFDFaultCode.outPhaseLoss;\nELSIF mbsIn[0] = 3 THEN\n\t// Overheat\n\tintFaultVFDId := atVFDFaultCode.overHeat;\nELSIF FALSE THEN\n\t// Internal Fault\n\tintFaultVFDId := atVFDFaultCode.internalFlt;\nELSIF mbsIn[0] = 7 THEN\n\t// External Fault\n\tintFaultVFDId := atVFDFaultCode.externalFlt;\nELSIF FALSE THEN\n\t// Comm Fault\n\tintFaultVFDId := atVFDFaultCode.commFlt;\nELSIF mbsIn[0] <> 0 THEN\n\t// Unknown Fault\n\tintFaultVFDId := atVFDFaultCode.unknown;\nEND_IF","LineInfoPersistence":"(string)c4726b15-bda8-49fe-825c-b022913633b2_Impl_LineIds"}}}},"Interface":{"@Type":"a9ed5b7e","@Value":{"TextDocument":{"@Type":"f3878285","@Value":{"TextBlobForSerialisation":"(string){attribute 'no_assign'}\nFUNCTION_BLOCK atVFDGS3 EXTENDS atVFDModbus\n\nVAR\n\t// Turn on to trigger external fault\n    {attribute 'symbol' := 'none'}\n\textFaultTrig: BOOL;\n\t// 5 words starting at 2100H\n    {attribute 'symbol' := 'none'}\n\tmbsIn: ARRAY[0..7] OF UINT;\n\t// 3 Words starting at 2000H\n    {attribute 'symbol' := 'none'}\n\tmbsOut: ARRAY[0..5] OF UINT;\nEND_VAR\n\n","LineInfoPersistence":"(string)c4726b15-bda8-49fe-825c-b022913633b2_Decl_LineIds"}}}},"UniqueIdGenerator":"(string)435","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"}