In SIMPL land, I would match it against an SIO full of hex values, and have those trigger an analog init with the correct decimal values. ?In SIMPL+ you can use HEXTOI(). ?If you wind up with a 0-100 value and want to show it on a touchpanel gauge, use an ASCALEL to convert 0d-100d to 0%-100% so it will be in the correct range.
If you have any other questions, please let me know how you're currently parsing the string.
On Mon, Feb 24, 2014 at 11:47 PM, <cochoa2716@...> wrote:
?
I have a question about converting a string into an analog signal to be used for feedback purposes. Below is the protocol. I have no issues whatsoever parsing the information I need. But how am I to convert the serial sting to an analog value that I can use for feedback.
For example, below after the parse you end up with Out1- 15, Out2- 46. I am more concerned with Out2 which in decimal is equiv to 70%. It is output as 46h. How do I change that into decimal?
Any help would be greatly appreciated. Thanks!
Status query
ZGnn,20,02 Where nn is the NodeID in hex format.
This will return a string which includes the node # and the level.
For example, for node #21, let¡¯s assume it is a dimmer set to a level of 70
Send ZG15,20,02
15 is HEX for node 21
20 is HEX for Basic Command Class
02 is HEX for Basic Get
You will then get this back:
ZG15,20,03,46
15 is HEX for node 21
20 is HEX for Basic Command Class
03 is HEX for Basic Report
46 is HEX for 70
Parse this string to get node # 21 at a level of 70.