Hi guys,
I need to create a button to turn on or off several fan coil units in one data source at the same time, each fan coil unit is turned on or off through its own coil register.
How can this be done?
Thanks!
Rodrigo
Setting Several Data Points at once
Hi guys,
I need to create a button to turn on or off several fan coil units in one data source at the same time, each fan coil unit is turned on or off through its own coil register.
How can this be done?
Thanks!
Rodrigo
Have multiple points and call set value on each one on the same button is how!
Here:
<ma-button ng-click="pt1.setValue(1);pt2.setValue(2);...." ></ma-button>
If its still clear as mud let me know!
Fox
Hi Matt,
Clearer, but still muddy :'D
Will you be so kind of elaborating a little further?
Thanks!
Matt,
Is it md-button or ma-button?
Best,
Rodrigo
Both will work. Use an ma-point-query item or an ma-get-point-value to pull the point through by its xid then you can use the variable the point is assigned to and set its value.
Ill find some time to give you a better example...
Fox
@rodrigo said in Setting Several Data Points at once:
Hi Matt,
Clearer, but still muddy :'D
Will you be so kind of elaborating a little further?
Thanks!
Use ma-point-query to pull all of your wanted points through (Use the watchlist builder to help you generate your query).
You can use a watchlist to put all the points you want in one place also then use that to pull all the points through in that watchlist
(refer to <ma-watch-list-get>),
Alternatively if you know what points you want, use their xids and use ma-get-point-value to pull the data point information through.
<ma-get-point-value point-xid="XID_OF_YOUR_PT" point="pointName_no_spaces"/>
Then when you click on your button:
<md-button ng-click="pointName_no_spaces.setValue(newValue);nextPt.setValue(0);"></md-button>
Hope this expands a bit more on what to do.
Fox
Thanks Matt!
Will give it a try!
Best,
Rodrigo