pascal Posted November 4, 2010 Report Share Posted November 4, 2010 I'm using data tabels with a V570 to control the lighting of a house Now I have +- 60 different datatables, named button1,button2,button3,button4,....,button65 The layout of these tabels are the same. The program calls datatabel button1 when the user presses button1 in the house, and call's datatable button2 if the user pushes button nr. 2 in the house. that is my approach of my domotics system (so can the user himself programming the buttons in his house, only with updating the datatable.) Now my question is : Can I make 1 datatable, like an indexed datatable, because now I have to copy the desired datatable in a work datatable and then executing the work datatable So whe user presses button 1 I copy the datatable named button1 into the work datatable and the I execute the workdatatable. This works fine but I need the program for every button a different line like if button1 pressed -> copy datatable button1 into work datatable if button 2 pressed -> copy datatable button2 into work datatable ... if button 63 pressed -> copy datatable button63 into work datatable Is there a way to say : if button X is pressed -> copy datatable button index X into datatable or read row (datatable button, line 1, index X) Thanks ! why making it easy if you can do it difficult Link to comment Share on other sites More sharing options...
Emil Posted November 4, 2010 Report Share Posted November 4, 2010 Hi Pascal, You cannot make indirect addressing of DT, as DT is accesse4d by name, not by number/pointer. Idea - you can make one big table, where you can reserve place for each button. Let's say Button 1 will take in your big DT from row 0 to row 9, button 2 - from row 10 to row 19... and so on.. In this case, you even don't need to copy the table to another one. You can work with the main table - just operating the pointers, which is not so complicated. The disadvantage of this method is, that your final customer will need to operate the whole table, which can be a little more complicated for him. You can ease his life, making Excel template, which will give beter GUI. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now