Diff of /trunk/json/json-pac/Data Types/JSONVAR/VarName/Set/svnobj [r7] .. [r8]  Maximize  Restore

Switch to side-by-side view

--- a/trunk/json/json-pac/Data Types/JSONVAR/VarName/Set/svnobj
+++ b/trunk/json/json-pac/Data Types/JSONVAR/VarName/Set/svnobj
@@ -1,5 +1,5 @@
-Gx_l™!0…jüoã¼U9ùŽÕÞ€ÂSystem.StringL{792f2eb6-721e-4e64-ba20-bc98351056db}ImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocumentL{f3878285-8e4f-490b-bb1b-9acbb7eb04db}TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}	Id
-longTagText
Ò(*=======================================================================================================(JSONVAR.SetVarName()VAuthor: Tim Van Meppelen, Pro Electric Inc.(timv@proelectric.com&Date: Sept 16, 2019ÚManually set JSON variable name to something other than it's automatically generated name.  This should only Úbe used when the JSON string could have a changing variable name at runtime, ie. the variable name is a date ¨or a counter.  Normally, the JSON variable name is the same as the PLC variable nameÒNOTE:  this cannot change the number of levels of a nested object, it is assumed that the basic structurebremains the same, and only the names are changing6example created by FB_Init:†_VarNameFull   'Test_M241.Application.TestJSON_PRG.TestStruct.var1'‚_VarNameArray                 [4]        [3]          [2]     [1]_ParentVar = 2:example after runtime changes@_VarNameFull   'TestStruct.var1'<_VarNameArray      [2]     [1]Jset as a string ie. 'TestStruct.var1' teach object inside another object must be changed manually!ˆhigher level object names must be changed in each lower level object"Ðprogram level and above are not manually adjustable at runtime ie. 'Test_M241.Application.TestJSON_PRG.'#Ô========================================================================================================*)$’Levels:= SPLIT_VARNAME(VarNameArray:= _VarNameArray, StringIn:= VarName);%TFOR i:= UINT_TO_INT(Levels) TO 1 BY -1 DO &<//recreate the var name string'@	IF (i=UINT_TO_INT(Levels)) THEN(f		_VarNameFull:= CONCAT(_VarNameArray[i].Name,'.');)"	ELSIF (i=1) THEN*z		_VarNameFull:= CONCAT(_VarNameFull, _VarNameArray[i].Name);+
+Gx_l§!0…jüoñ^9³…ŽÕÞ€ÂSystem.StringL{792f2eb6-721e-4e64-ba20-bc98351056db}ImplementationL{3b83b776-fb25-43b8-99f2-3c507c9143fc}TextDocumentL{f3878285-8e4f-490b-bb1b-9acbb7eb04db}TextLinesL{a5de0b0b-1cb5-4913-ac21-9d70293ec00d}	Id
+longTagText
Ò(*=======================================================================================================(JSONVAR.SetVarName()VAuthor: Tim Van Meppelen, Pro Electric Inc.(timv@proelectric.com&Date: Sept 16, 2019ÚManually set JSON variable name to something other than it's automatically generated name.  This should only Úbe used when the JSON string could have a changing variable name at runtime, ie. the variable name is a date ¨or a counter.  Normally, the JSON variable name is the same as the PLC variable nameÒNOTE:  this cannot change the number of levels of a nested object, it is assumed that the basic structurebremains the same, and only the names are changing6example created by FB_Init:†_VarNameFull   'Test_M241.Application.TestJSON_PRG.TestStruct.var1'‚_VarNameArray                 [4]        [3]          [2]     [1]*_ApplicationLevel = 2:example after runtime changes@_VarNameFull   'TestStruct.var1'<_VarNameArray      [2]     [1]Jset as a string ie. 'TestStruct.var1' teach object inside another object must be changed manually!ˆhigher level object names must be changed in each lower level object"Ðprogram level and above are not manually adjustable at runtime ie. 'Test_M241.Application.TestJSON_PRG.'#Ô========================================================================================================*)$’Levels:= SPLIT_VARNAME(VarNameArray:= _VarNameArray, StringIn:= VarName);%TFOR i:= UINT_TO_INT(Levels) TO 1 BY -1 DO &<//recreate the var name string'@	IF (i=UINT_TO_INT(Levels)) THEN(f		_VarNameFull:= CONCAT(_VarNameArray[i].Name,'.');)"	ELSIF (i=1) THEN*z		_VarNameFull:= CONCAT(_VarNameFull, _VarNameArray[i].Name);+
 	ELSE,V		_VarNameFull:= CONCAT(_VarNameFull, '.');-	END_IF.END_FOR/Interface0L{a9ed5b7e-75c5-4651-af16-d2c27e98cb94}1VAR2 	Levels:			UINT;3	i:				INT;4END_VAR5
 IsGet6boolÐÐÐE*ÐÐ	
 ­‹ÚÐ-
ÐÐ