• J
    jmln5000

    Hi Joel,

    Your question is leading me to think about this a little different. I'm wrapped up in how this looks but I don't really need to see my values. I need to parse that hex string, perform some logic on a couple values and then act upon it. If the value is intact at it's binary state in memory (and I bet it is), I should be able to do that without seeing it. I will take that approach this week and see what I come up with.

    Thanks so much!

    • Jason

    posted in User help read more
  • J
    jmln5000

    Phil and Mango Team -

    This thread has been quiet for a while so I just want to reach out one last time for help before giving up on mango. So you don't feel like you're wasting time, my intent here is to ultimately purchase several mango es devices for an industrial project that I am involved in. I have successfully tested and used a couple of other configurations for this but I am impressed with mango and very interested in making a switch if we can solve this simple hex value problem. I’m not asking for custom code to parse the values. All I am asking is to get a hex value from a serial data source into the value of a data point so that I can script around it. The scripting and UI design, everything else I can handle. I just think that when I check the value hex box in a serial data source, that the resulting hex value should carry throughout mango as hex and not turn to garbage when I view it in any of the several ways I have discussed or try to script on it. Please either tell me its a bug with a fix date or point me in the right direction. I am very serious about making this work, given up many hours of my time to do to so and now I’m at a complete loss.

    Some additional detail since last post:

    For test purposes I am sending 0xfe from arduino every 5 seconds.

    I can also duplicate this with my other existing and known-good end devices, several other configurations in mango, and any number of hex values but for simplicity, I am testing with an arduino plugged into my windows 10 laptop’s USB port.

    If I follow your above blog post excerpt exactly, I get one character of garbage in the response’s data point value viewed by either the data point details utility or by scripting print response.value in a scripting data point.

    Just for fun, I tried and can convert some of these garbage values back to hex but not all.

    Please help. I really want Mango to work for this project!

    --Jason

    posted in User help read more
  • J
    jmln5000

    I’m not sure that I am maintaining the hex format from Mango's data source to the data point. When I add the data source and select ‘configuration is in Hex’, I see my expected output in the log:

    7e0012920013a20040c337461ec84101001000000000

    I then created a data point in the serial data source called serialDataPoint01 and added that to a script as var sdata01. Both the data point details page and the script: print (sdata01) just return garbage:

    value: ~��@�7F�A

    Just for the fun of it, I converted the garbage to hex with a script and got close but not exact:

    7e 00 12 fd 00 13 fd 00 40 fd 37 46 1e fd 41 01 00 10 00 00 00 00

    Any thoughts on where I’m going wrong?

    Thanks,

    I could still use some help with this one please. If I set a point value using a single hex value from a serial device, I just see garbage in the data point details view or by scripting [print(serialDataPoint.value)]. I read through the entire suggested blog post several times and it makes sense but I’m not getting far enough with my setup to even think about parsing the hex string. For the sake of simple testing I am now feeding a single hex value to mango via serial connection from an arduino. All hex values that I send to Mango show up perfectly in the serial connection log but show up as garbage in the point value. I can then turn most of these garbage values back into valid hex values with a small script that converts ascii to hex but some values do not work in this conversion like 0x7e for example, which turns to fd.

    posted in User help read more
  • J
    jmln5000

    I’m not sure that I am maintaining the hex format from Mango's data source to the data point. When I add the data source and select ‘configuration is in Hex’, I see my expected output in the log:

    7e0012920013a20040c337461ec84101001000000000

    I then created a data point in the serial data source called serialDataPoint01 and added that to a script as var sdata01. Both the data point details page and the script: print (sdata01) just return garbage:

    value: ~��@�7F�A

    Just for the fun of it, I converted the garbage to hex with a script and got close but not exact:

    7e 00 12 fd 00 13 fd 00 40 fd 37 46 1e fd 41 01 00 10 00 00 00 00

    Any thoughts on where I’m going wrong?

    Thanks,

    posted in User help read more
  • J
    jmln5000

    Hello,

    How would I bring in the below string as a data point’s value via serial connection? This is a HEX string and the only constant is the starting 7e so I’m struggling to come up with the point’s point id, point value ID and regex. To start, I would like to bring in the whole string or everything after the 7e as the point’s value but I may eventually parse it out into separate data points (possibly for another question, we’ll see if I can figure that part out). I have the data source set up and see this value in the log but cannot seem to get the data point to recognize it as a value.

    Here’s the string: 7e0012920013a20040c33746114d4101001000000088

    Thanks,

    posted in User help read more
  • J
    jmln5000

    That's what I needed. Thank you so much!

    posted in User help read more
  • J
    jmln5000

    How would you bind a data point directly to a slider component without using the dropdown in the examples? I would like to use a slider similar to the way you can use a set point value component in dashboard designer just by giving it the point name.

    for example: set point value component works great just giving it point="(point's XID)" but slider is looking for ng-model="myPoint.valueFn". how would I define myPoint as a point that I have created in data sources.

    Thanks,

    posted in User help read more