ScriptName "define memory" ScriptAuthor "(dA)" ScriptVersion "[18]" SetErrorHandler ( :AddressLable1 ) ; var vb_error : Byte ; // V1.0 17.07.02 create example //MoveConst ( Variable=v1 , Const Value="*" ) ; //This command define the Variable with a given value. // Path: unsorted commands -> define memory // MoveConst ( v1 , "*" ) ; // Fieldbus -> yes // RS 232 -> yes // min value = 0 // max value = length of variable // Possible return code for an error, please see notice below // No error return. : start ; // Example 1 //VAR V1 : BYTE ; // Before: ( V1 = 0 ) //MoveConst ( v1 , "FF" ) ; // ( V1 = 255 ) // This Script define the memory of var1 to "FF" beginning at the LSB. //Example 2 //VAR V1 : WORD ; // Before: ( V1 = 0 ) //MoveConst ( v1 , 0x3E8 ) ; // ( V1 = 1000 ) //Example 3 VAR V1 : LONG ; // Before: ( V1 = 0 ) MoveConst ( v1 , 0x12345678 ) ; // ( V1 = 305419896 ) //Example 4 //VAR V1 : BUFFER[9] ; // Before: ( V1[0] = 0,V1[1] = 0, V1[2] = 0, V1[3] = 0, V1[4] = 0, ... ) // MoveConst ( v1[3] , "123" ) ; // ( V1[0] = 0,V1[1] = 0, V1[2] = 0, V1[3] = 1, V1[4] = 2, V1[5] = 3, ... ) jump : start ; //Notice: --- : AddressLable1 ; Get ( ErrorCode , vb_error ) ; // user evaluation for the value of Errorcode return;