william Posted April 27, 2017 Share Posted April 27, 2017 I want to change the value in a channel; the channel is updated from incoming serial data using xxxx.addValue(). I tried changing the value using a BUTTON and the SET TO action but it does not add the value I enter into the set to box. The only way I can get it to work is to: a. create a global variable; (use DATA for variable name.) b. Create a button and using the SET TO action, I can write the value I want to DATA. c.Create a second button and use the QUICK SEQUENCE action to write data to the channel using xxxx.addValue(DATA); Is there a way to do this with one button??? Thanks Bill Link to comment Share on other sites More sharing options...
AzeoTech Posted April 28, 2017 Share Posted April 28, 2017 Use the quick sequence on the first button with code to request the value: private string newVal = system.entryDialog("Enter new value:") if (!isEmpty(newVal)) myChannel.addValue(strToDouble(newVal)) endif Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.