Tag has been updated, and indexing tag names
Posted: Wed Aug 19, 2015 12:50 pm
Hallo.
Im working on a project where I need to know if the following two questions are possible:
1) Is it possible to somehow index tag names for looping.
2) Telling when a specifig tag has been updated from the controller.
A bit about the project:
I have 350 array[50] of int tags in both the ix panel and the controller.
Each array is a recipe with 50 elements.
A MySql server have been made with the same structure as the array tags.
The idea is to update the values in the database with one of the 350 arrays when needet.
The reason i use a MySql server, and not the build in recipe handler, is i want to display results on a php webserver.
Basically im using the ix panel to transfer tags between the controller and the MySql server.
This works fine, but the C# have been made in a very manual way.
For now i have made 350 queries, because i have no idea how to index the tag name. Which makes the 1st question.
1)
Lets say the tag names are Array1, Array2, Array3.. etc. Is it then possible to somehow index the tag name, so i could loop through Array[1], Array[2], Array[3] etc.?
How it works in pratice:
User have a screen where they have to chose the recipe number 1-350
There i have my pointer. User gets 50 input fields (array[50]). When done editing, user hit save and it goes like this:
The 50 input fields are updated in the controller, in the correct array[Recipe number]. The controller activates the MySql query in the ix panel. Which brings me to the 2nd question.
2)
I want to know if it is possible to tell if a tag has been updated/pulling done?
For now ive set all the 350 arrays for Always Active. This again works fine, but makes alot of unnecessary trafic. And i have to rely on timers, to make sure the ix panel is done pulling, before i make the MySql query. Maybe i could see if the last element in the array is updated(in case its updates in that order), and rely on that to know the whole array has been updated.
If so i could do a Tag.Read -> Wait for update -> MySql query.
Thanks in advance.
Im working on a project where I need to know if the following two questions are possible:
1) Is it possible to somehow index tag names for looping.
2) Telling when a specifig tag has been updated from the controller.
A bit about the project:
I have 350 array[50] of int tags in both the ix panel and the controller.
Each array is a recipe with 50 elements.
A MySql server have been made with the same structure as the array tags.
The idea is to update the values in the database with one of the 350 arrays when needet.
The reason i use a MySql server, and not the build in recipe handler, is i want to display results on a php webserver.
Basically im using the ix panel to transfer tags between the controller and the MySql server.
This works fine, but the C# have been made in a very manual way.
For now i have made 350 queries, because i have no idea how to index the tag name. Which makes the 1st question.
1)
Lets say the tag names are Array1, Array2, Array3.. etc. Is it then possible to somehow index the tag name, so i could loop through Array[1], Array[2], Array[3] etc.?
How it works in pratice:
User have a screen where they have to chose the recipe number 1-350
There i have my pointer. User gets 50 input fields (array[50]). When done editing, user hit save and it goes like this:
The 50 input fields are updated in the controller, in the correct array[Recipe number]. The controller activates the MySql query in the ix panel. Which brings me to the 2nd question.
2)
I want to know if it is possible to tell if a tag has been updated/pulling done?
For now ive set all the 350 arrays for Always Active. This again works fine, but makes alot of unnecessary trafic. And i have to rely on timers, to make sure the ix panel is done pulling, before i make the MySql query. Maybe i could see if the last element in the array is updated(in case its updates in that order), and rely on that to know the whole array has been updated.
If so i could do a Tag.Read -> Wait for update -> MySql query.
Thanks in advance.