TwinCat3 TE2000 HMI how to setup recipe managment with restrictive input? - automation

I'm currently setting up a HMI as a Project at work. The operator will create a recipe that includes the following:
General recipe data (strings) e.g. customername, comment. - Input is not restricted
Number values (real) e.g. temperature, Moisture. - Input is restricted to min and max values
Timespans (timespan) e.g. heating time, cooling time - Input is restricted to time, min and max values
A recipe would look something like this:
memberName
Value
Unit
Comment
Customername
My Customer
-
The customer name of this recipe
Product
Flour
-
Used product for this recipe
Temperature container
45
°C
Setpoint temperature in container
Target Moisture
11
%
Target product moisture
Heating time
1h 30min
time
Total heating time
Drying time
30min
time
Total drying time
So far I have managed to load a saved recipe into a datagrid like I displayed above with the help of the infosys example:
https://infosys.beckhoff.com/english.php?content=../content/1033/te2000_tc3_hmi_engineering/53218196597888701067.html&id=
I modified the ConvertToDatagrid.js function so that it also returns the min, max, comment and unit of each memberName.
The issue with this solution is that I can't figure out how to restrict and check for valid inputs in the individual cells. You shouldn't be able to enter a number higher than than the max or lower than the min value. I'd also like to display a timespanpicker when selecting a cell which needs a time input.
I thought about just replicating a Datagrid with textboxes but I don't know how to select data from the array provided by ConvertToDatagrid.js. Another option would be to just link the symbols of the recipe to the textboxes but then I would have to always activate the recipe when selecting it which doesn't really seem that clean either.
I'd be glad if someone experienced with the recipe management could help me :)

Related

Simultaneously run of simulation and optimization in Anylogic

In “Anylogic” I created a production chain of a furniture company for five product types. The chain was built of “delay-”, “service-” with “RessourcePool-Blocks” to simulate the production time of the product and the availability of the worker on the machining station.
The goal was to adjust the load profile with the energy production profile of a photovoltaic system. For this purpose, the production time should be choose individual. The production profile become loaded in the simulation from an excel table. Every day the company produce 20 furniture of different types.
The idea to adjust the production time and the kind of furniture (every furniture type have a different production time) was to use “parameter” to determine the start point to begin the production and the selection of product type. I need for each product two parameter.
In an “optimization” “experiment” in “Anylogic” the simulation for one day runs through. The “Objective” is to minimize the amount of energy draw from the grid. After 500 iterations and some adjustments of the value range, I get adapted parameter as result. The resulted value for the parameter in the “optimization” can transfer to the production chain simulation.
My question is:
Is it possible to transfer the resulted parameters automatic to the production chain program, so that I do not need always to run both simulations separately?
I want to simulate for a whole year, to get specific result for different production profile over the year and not start the optimization program and the simulation individual for every day.

Issue in VBA excel

I have a list of Data that contains a list of machines with the following columns (good parts, bad parts, production date, end date, time/1pc = means time spent for one piece to make) these informations are used to calculate the 3 performance indicators in order to get the OEE for each machine.
I've created a user form that allows the user to enter the type of machine and the production date and by hiting ''OK'' the 3 indicators (availability, quality, performance) are calculated via a program in VBA excel. My Main objective is to create a dashboard that shows all these indicators plus the OEE for the type of machine selected by the user in a specific month I have created a worksheet for each machine containing in each column (the Month of the year the specific date, quality indicator, availability and performance and OEE) and by side there is a button that shows us a userform to select the week desired to calculate these indicators and there it goes my issue:
I'm trying to connect the userform before that calculate the indicators with this one that allows us to chose the week to fill the table for each machine with their indicators. How can I do that?

Sliderinput Shiny from own dataset

I'm currently working on a shiny app, but I've got some problems with a slider input. I've got 500.000 variables called 'duration' which all correspond a specific 'price'. However, the range of the duration is between 1-around 50000, so min - max isn't working properly. Therefore I want to address the duration based on my own data duration data set(skipping duration numbers which don't exist) and match the corresponding price with that duration. As there are many durations with different prices, a histogram seems to be most logical.
So my question, how do I customize these sliders with my own data?

Dynamically filtering large query result for presentation in SSRS

We have a system that records data to an SQL Server DB captured from field equipment every minute. This data is used for a number of purposes, one of which is for charting in reports via SSRS.
The issue is that with such a high volume of data, when a report is run for period of for example 3 months, the volume of data returned obviously causes excessive report rendering times.
I've been thinking of finding a way of dynamically reducing the amount of data returned, based on the start and end time periods chosen. Something along the lines of a sliding scale where from the duration between the start and end period, I can apply different levels of filtering so that where larger periods are chosen, more filtering occurs while for smaller periods less or no filtering occurs.
There is still a need to be able to produce higher resolution (as in more data points returned) reports for troubleshooting purposes.
For example:
Scenario 1:
User is executing a report for a period of 3 months. Result set returned by the query is reduced for performance reasons without adversely affecting what information the user wants to see (the chart is still representative of the changes over time).
Scenario 2:
User executes the report for a period of 1 hour, in order to look for potential indicator(s) of problems with field devices while troubleshooting the system. For this short time period, no filtering is applied.
My first thought was to use a modulo operation on the primary key of the data (which is an identity field), whereby the divisor is chosen depending on the difference between the start and end dates.
For example, something like if the difference between the start and end dates for the report execution period is 5 weeks, choose a divisor of 5 and apply a mod to the PK, selecting where the result is equal to zero.
I would love to get feedback as to whether this sounds like a valid approach or whether there is a better way to do this.
Thanks.

MS Access Combo Box Selections and Time Calculation

Hi currently i am making a Table with 21 Columns ("Task, Name, Time Taken") Each group, so total 7 groups.
Task combo consist of "WIP, HOLD, Quality Check"
Name combo consist of "Mark, John, Alex"
Time taken is a number field "only minutes" like 150, 200, 300 etc
At the end i have 3 columns which is for total time taken for "WIP, HOLD, Quality Check"
My Requirements:
a) When i select a Task (eg. WIP) auto the name should block with the user logged in "I have created a employee table with login form its working fine"
b) When the task selected as "WIP" and entered the "Time Taken" may be multipal times wit there groups. only the WIP total time should calculate and reflect on "TOTAL TIME TAKEN for WIP column"
Please help me ... it may be confusing but let me know if your unable to understand.
Thanks in advance.
What you're describing doesn't sound normalized at all. I'm not entirely clear on your situation but I believe you need to have two at least two tables. If you don't know what normalization is then
What is Normalisation (or Normalization)?
is a good place to start
As for the last 3 columns with the total time. You shouldn't put that in a table. Once you have a table you should always have a query total it up for you.
First of all, your table should have 5 columns. ID, Task, Name, TimeTaken, GroupName. Unless you have a need to show 7 groups simultaneously on the same form? You can filter the data at any time based on GroupName.
For part a, it sounds like your login form should be able to feed your Name combo? Just set ComboName.SelectedValue to whatever your user's name is.
For part b, I just don't understand what you're asking. Can you clarify?