WinCC Unified parameter set (recipe) filtering/sorting

dbozic

Lifetime Supporting Member
Join Date
Oct 2013
Location
Zagreb
Posts
74
Hi,

I have just started with WinCC unified (v17) and there are alot of things I used on Comfort but now are not available.
Currently I am finding hard time to get used to parameter sets (I will refer to them as recipes as I think former name was better...)
I made a recipe but I would like to fetch the current loaded recipe to display its name.
Also is there a way to filter out the recipes by the internal IO value field.
I managed to do this on the alarm view via script as it has the property filter accessible with the following code:
let tag1=Tags("alarmFilter");
Screen.FindItem('Alarm control_1').Filter=tag1.Read();

But "Parameter set control" only give me option "Allow filter" and "Allow sorting"..
Also I have activated both of these options above and I see no difference. I don't know how to filter/sort the recipe view, do I need to click somewhere?
As my parameter set/recipe name would be named as "HeightXWidth" i would like to at least sort it if filter is not possible.
Right now it is displayed in the table by the record/creation number, so it is all mixed up.

Thanks!
 
I found something in Siemens forum:
https://support.industry.siemens.co...g-parameter-name-from-the-parameter-id/254092

As I am in situation where recipe name could be saved as height x width I made a button that when pressed exports all parameter sets, imports and reads them to variable and loops through them to find ID of the set. Then it loads the recipe to PLC.
Right now my path of export is C:\\Users\\Public\\Parameter set control_1.tsv", this line I will modify when I get the HMI..

Example:

Code:
export async function Button_9_OnDown(item, x, y, modifiers, trigger) {

// Export all data sets
try {
await HMIRuntime.ParameterSetTypes.SysFct.ExportParameterSets(1, 0, "C:\\Users\\Public\\Parameter set control_1.tsv", 1, true, HMIRuntime.Tags.SysFct.CreateSetTagCommand("ExportStatus"), false);
}
catch (err) { }

//Import all data sets and save into a internal variable
let text;

try{
text = await HMIRuntime.FileSystem.ReadFile("C:\\Users\\Public\\Parameter set control_1.tsv", "utf8");
}
catch (e)
{
HMIRuntime.Trace("Read failed with error: " + e);
}

// Split the archive in individual lines
let textLines;
textLines = text.split('\n');


// Find a specific ID and get the Name of it
let id;
id = 0;

let textLine;

for (let i = 0; i < textLines.length; i++) { //scan all file
  textLine = textLines[i].split('\t'); // split the line by tabs
  if(textLine[1] == Tags("Name").Read()){ // check if the right line field match with the ParameterSet ID
    id = parseInt(textLine[0]);
    break;
}
}

HMIRuntime.ParameterSetTypes.SysFct.LoadAndWriteParameterSet(1, id, false, undefined);

}

Hope it helps someone, and in future hope that Siemens makes it user friendly and better solution..

I still would like to have stock recipe screen where filter is working and you can find the recipe without too much scrolling if there is large number of sets...
 
Thank you dbozic. That was helpful.


I use it to do a recipe "Selector". The "tsv" file is generated on Window load and is used with the help of specific field/column values specified by the operator (one textbox or list for each column) and then click search. On that button "Search" click The file is loaded and parsed to find the matching ID. It's efficient.

I agree with you about the "recipe set" control scrolling. In my current project, the initial number of recipes is 250 and will probably go higher in the future. I suggested a barcode sheet to the customer which would fetch the ID directly but to start this was the best solution.
 
Can you please share some code or walk through for that?

I am new to the Siemens and try to do filter/sort of recipes.
 

Similar Topics

Hello Experts I am working on a project with WinCC Unified v16 PC system and want to create an option on the screen to export logs to the...
Replies
0
Views
36
Does anyone happen to know how to install the graphic picture in HMI when I go into blower selection there are no graphics shown not only blower...
Replies
1
Views
69
I have created a project in TIA Portal v16 Upd6 with S7-1200 (6ES7214-1AG40-0XB0) and WinCC Unified (PC station). The communication between the...
Replies
4
Views
146
I am creating a project with WinCC Unified v16 Upd6 (PC runtime) with an S7-1200. The communication is good between the PC and the PLC as I can...
Replies
6
Views
200
I was looking for this function, so that i doesn´t need to do it in the PLC. If there are an alarm in the alarm list, i want to flash the...
Replies
2
Views
535
Back
Top Bottom