ftview recipe pro

More information would be helpful, however, there are possibly a number of ways to do this.
Use VBA and write the code to store the recipe variables on the HMI in some format for example CSV (Comma delimited files) probably the easiest.
Create your screen with the variables you need, add some buttons like Load, Save, delete etc. (probably the easiest would be two displays one for loading recipes into the PLC & displaying the values i.e. current recipe.
Another where you can edit & save the recipes, in VBA use the standard functions like to browse for the files, save a new recipe, load a recipe & save it.
Never done it on FT but have done it on other systems as I found the recipe handling very cumbersome & did not fit what I wanted. It is quite easy to search for files, open them into variables, save them or save them as a new file (recipe).
I have done this using SQL database as well but that requires a little more skill & a knowledge of SQL queries.
 
Here is a quick one I did on another platform, however, do not know FTV basic but most of the commands should be there, the things that you may have to change are getting & setting the variables as on this the GetVariableValue( ) function is probably only for this platform I have no idea how you reference variable tags in FTV, the same goes for standard windows controls like MsgBox & Combobox, you may have to roll your own.
I wrote this in about 2 hours so the error handling may not be tested fully.

' Saving the recipe
Sub Main()
Dim FileNum,i As Integer
Dim j As Variant
Dim FileName, TempStr1 As String
On Error GoTo ErrorHndl
FileName = CurDir 'Here I'm just getting the current directory of the project
FileName = FileName + "\Recipe" + GetVariableValue("Edit_Recipe_Name") ' then adding the folder & edit recipe name
If GetVariableValue("Edit_Recipe_Name") = "" Then 'If the edit recipe name is null then pop up error
If MsgBox ("Recipe has no name", vbMsgBoxSetForeground,"Error") = vbOK Then
Exit Sub 'then exit because we cannot save a recipe without a name
End If
End If
FileNum = FreeFile
Open FileName For Binary Lock Read Write As #FileNum
For i = 1 To 10

TempStr1 = "Edit_Recipe_" + Trim (Str(i)) 'my tags are referenced by strings so need to build the strings

j = GetVariableValue(TempStr1) 'Move the values into the file from the Edit Recipe Tags
Put #FileNum,,j
Next
Close #FileNum
Exit Sub
ErrorHndl:
MsgBox (Str(Error), vbExclamation,"Error") 'On an error show error
End Sub

' This is the Recipe load code, it selects a recipe from those stored in the directory
Sub Main()
Dim DirStr,FileStr, RecipeName As String
Dim ListStr(300) As String ' Just set a limit of 300 for number of recipes probably never have that many
Dim FileNumber, Inc, x, i As Integer
Dim j As Variant ' this is a variant which allows it to be used for many types of values i.e. float or integer
On Error GoTo Errhndl 'On error go to error handler
FileNumber = FreeFile 'Return the next free file number note: the file type is binary
DirStr = CurDir() + "\Recipe\*." 'Create the directory string
Inc = 0
FileStr = Dir(DirStr) 'load all the files in the recipe directory
ListStr(Inc) = FileStr
Inc = Inc + 1
While FileStr <> ""
ListStr(Inc) = Dir()
FileStr = ListStr(Inc)
Inc = Inc + 1
Wend
Begin Dialog UserDialog 190,180 'create a user dialog with a combo box
Text 10,10,190,25,"Please Select Recipe"
ComboBox 10,50,180,100,ListStr(),.combo 'populate the combo box lists with the recipes
OKButton 60,155,60,20
End Dialog
Dim dlg As UserDialog
dlg.combo = "none"
Dialog dlg ' show dialog (wait for ok)
RecipeName = dlg.combo 'return the recipe selected
FileStr = CurDir 'Get the current directory, here I'm using the application directory
FileStr = FileStr + "\Recipe" + RecipeName
FileNumber = FreeFile
Open FileStr For Binary Lock Read Write As #FileNumber
SetVariableValue("Recipe_Name",RecipeName) 'Update the current recipe name
For i = 1 To 10 'Load the values into the variables
TempStr1 = "Recipe_" + Trim (Str(i))
Get #FileNumber,,j
SetVariableValue(TempStr1,j) 'update the recipe tags
Next
Close #FileNumber
SetVariableValue("Recipe_Name",RecipeName) 'Update the current recipe name
Exit Sub
Errhndl:
MsgBox (Str(Error), vbExclamation,"Error") 'On an error show error
Exit Sub
End Sub

You could add deleting recipes and I would suggest put the recipe edit & recipe load on separate screens, I did this just as a demo

Recipe.png
 

Similar Topics

Hello all. Is it possible to create a shared folder between my laptop and my PV+ 7- standard......2711P-T10C21D8S Series D? What I would like to...
Replies
4
Views
427
Hello all. If I want to create a recipe in an excel spreadsheet on the network shared file), then download it to a PV+, does that require FTView...
Replies
0
Views
214
Dear Forum users i have a project, which i have to creat 2 recipe form with about 20 parameters in VBA form. - 1 recipe form used to fill...
Replies
0
Views
4,168
Hi In a graphic display of my Factorytalk view ME project I have a recipe plus selector object. In runtime, when I load that page (for example...
Replies
0
Views
2,603
Hi I'm developing my first project with Factorytalk view ME, using a panelview Plus 1000 and a L32E controller I have some problems with...
Replies
1
Views
2,738
Back
Top Bottom