1
Support Questions / Re: Read from an array
« on: July 15, 2013, 02:39:18 PM »
I can't seem to upload any screenshots, as they keep clearing.
Visual Studio code
PLC Data types
RecipeStore[0] (RecipeStorage datatype)
RecipeStore[0].Number (DINT datatype)
RecipeStore[0].OD (Real datatype)
RecipeStore[0].Description (String datatype)
RecipeStore[0].PT (Recipe_Single datatype)
RecipeStore[0].PT.Entry (Real[10] datatype)
RecipeStore[0].PT.Entry[0] - [10] (Real datatype)
Visual Studio code
Code: [Select]
Private Sub LoadRecipes(ByVal RecipesLoaded As Int32)
Try
For i As Int32 = RecipesLoaded To 50
Dim plcResults As String()
'plcResults = _syncReadPLC.ReadSynchronous("RecipeStore", 1)
plcResults = _syncReadPLC.ReadAny("RecipeStore", 1, False)
uxRecipeList.Items.Add(i & " - " & plcResults(0) & """ Diameter Pipe")
RecipesLoaded += 1
Next
uxRecipeList.SelectedIndex = 0
Catch ex As Exception
Trace.WriteLine(RecipesLoaded)
If ex.ToString().Contains("Read Failed - Status Code=-20") Then
LoadRecipes(RecipesLoaded)
Else
Console.WriteLine(ex.ToString())
End If
End Try
End Sub
PLC Data types
RecipeStore[0] (RecipeStorage datatype)
RecipeStore[0].Number (DINT datatype)
RecipeStore[0].OD (Real datatype)
RecipeStore[0].Description (String datatype)
RecipeStore[0].PT (Recipe_Single datatype)
RecipeStore[0].PT.Entry (Real[10] datatype)
RecipeStore[0].PT.Entry[0] - [10] (Real datatype)