On button press gets a String from AB Logix PLC and places it in a Global script.
procedure OnMouseUp;
begin value:=StringGet('PLC','RECIPE[2].PRODUCT_NAME1',0,82); GlobalSet('test','bob',value); end;Display information in a message box mid script. Note you need to convert an integer into string to display
tag_value:=ReadValue(['column',5000]);
ShowMessage('Value = '+IntToStr(tag_value[0]));// This selects items (ingredients) from an excel sheet (Recipe) and stores them in a Script Globals.// All the Ports need to be pre-setup for this script to work// Note: ODBC In/Out need to be configured BUT the tick box "Enabled" Must not be selected for this script to work.var i : Integer; Ingredient_Number, Item_Number : String; Customer_Number : array of String;begin Customer_Number:=ReadValue(['Recipe_Selection',5000]); //User input selection (Select Recipe) begin for i := 1 to 8 do // Number of Items begin Ingredient_Number:='name_'+formatfloat('000',IntToStr(i)); // Name_001 = Item format Item_N:=IntToStr(i); // Sheet Row Number value:=ODBCAddToInList('ODBC_Rec',1,'Rec_Names',Ingredient_Number,Customer_Number[0],Item_N); // Add to Item List end; end; value:=ODBCSetTableName('ODBC_Rec','R1'); //select the sheet we want value:=ODBCIssueRead('ODBC_Rec'); //command the read from the sheetend;