I am working on converting my string table values into hex format and then pushing them back into a string table for further data conversion. Here is the raw string received from a wireless sensor via serial communication:
Does anyone know how to convert a string table into a hex table or a string hex table? I’ve looked through the available commands but couldn’t find anything that works for this purpose. Any suggestions or guidance would be greatly appreciated!
How did you get the data in the table that way? It will be easier to work with (and to use the Unpack command) if it was in a single string variable.
Are you sure you need to convert it to ASCII Hex prior to your end result? If you can share a bit more on what you need extracted, I/we can then give more specific advice.
The string table width is set to 1. This allowed me to arrange the data in the desired order. I can receive the data as a string, but converting it from the table seems much easier than parsing it from a single continuous string.
For example, here’s how the data would be parsed:
Raw Data:
7E 00 19 90 00 13 A2 00 41 A2 70 EA FF FE C2 7F 00 05 03 FF 01 00 01 00 0D 7A 0A 56 4F
I would like to have them in table. I am not able the receive the whole data in one string variable. The message are getting chopped of after 26 character. In table I am able to receive all the data at once. Table is more for better visualization, as this is in development stage.
Edit: Added this function to prevent the communication timeout in a second. Which prevented the data from getting chopped off. SendCommunicationHandleCommand(hCom_NCD, “set.to:10”);
Initially I tried that it didn’t work and got error “string can’t multiplied” . But now it seems to work fine. Not sure how. Will test out all the data points and get back.
The gateway is Ethernet as you can see, so I hooked them up to groov View via the NCD nodes in Node-RED.
On the fence about recommending them.
The node is a bit funky to work with, but the upside is that it returns a JSON object, so its trivial to work with all the values and get them into a groov View data store.