• J
    jcaballeroa

    I have tested it on versions 3.5.6 and 3.7.4 of Mango.

    I think it is a precision error in the Java multiplication functions. Since when doing the operation through a Metadata, you can clearly see that many decimals appear (which, the real result of the operation does not have --> 1001 * 0.03 = 30,03 exactly, without more decimals).

    0_1585548272515_7f264724-eee4-464c-8550-ca749d6cbd9c-image.png

    So trying to limit the number of decimals in some way. I can do it through the toFixed function with a MetaData, but this means that if I have 300 DP to which I want to apply a conversion factor, they will finally become 600, just for the sake of limiting the decimals, I don't think so a good solution.

    0_1585548550745_a7efa3da-fe24-4edc-84ba-83b95ab6978f-image.png

    posted in User help read more
  • J
    jcaballeroa

    Hi Fox,

    Thanks for your response.

    Where is the text format option for analog values found?

    Do you mean the format field in the "Text Renderer properties" menu?

    0_1585546192185_18607df7-094b-40a0-87fd-ccf4ce1ad04e-image.png

    If so, I have already tried this, but it does not solve the problem. Modify the display of the number in Mango, and adapt to the requested format. However, the publisher continues to use a high number of decimal places.

    posted in User help read more
  • J
    jcaballeroa

    Hi to all,

    I have a problem sending information through a publisher.

    I have a data point of type SNMP that receives information with a value = 1001, to which I apply a multiplier = 0.03. Therefore the result is 30.03. Which is shown correctly in the visualization of the Data Point.

    0_1585517262304_5819064f-17d6-4bcb-8aef-dc0748700ab3-image.png

    0_1585517364183_77471c80-75ba-4a19-a595-8ec664a74882-image.png

    However, through the publisher I get a value that is not exact and with a very high number of decimals = 30.02999999999998

    0_1585517385620_257a534c-d658-44e1-a4a5-3230968c06fc-image.png

    Is it possible to limit the number of decimal places in the publisher?

    The only thing that has occurred to me is to enter a MetaDate or an intermediate script to eliminate decimals. But I would not like to have to replicate Data Point, "overloading" the system, only to do these operations.

    posted in User help read more
  • J
    jcaballeroa

    Hi Everyone,

    I have created a data source of type HTTP Retriever to make a web request for the status of an equipment. The response of the request is simple of the type:
    result = <value>

    I would like Mango to show me the value obtained in hexadecimal. For this I have configured a Data Point as follows:
    0_1582790985123_d793e58f-1b18-4dd6-9a22-ae5913042836-image.png

    According to the Mango documentation, the following can be read:

    *"In addition to the standard DecimalFormat options you can prefix your format with '0x' to imply you want hexidecimal values rendered. This format will truncate the decimal place and requires that you supply the minimum number of places you want rendered. So 0x00 will always render at least 2 values:

    512 = 0x200
    255 = 0xFF
    16.7 = 0x10
    15 = 0x0F"*

    Therefore, if I receive a 15, I expected the value of the data point to take a 0x0F

    However, as seen in the image, the result is a negative value.
    0_1582791002768_388c9556-71d1-4ab6-a0da-5dea40dd5a36-image.png

    Am I setting something wrong or it is a bug?

    Thanks!

    posted in Mango feedback read more
  • J
    jcaballeroa

    Hi Everyone,

    I have created a data source of type HTTP Retriever to make a web request for the status of an equipment. The response of the request is simple of the type:
    result = <value>

    I would like Mango to show me the value obtained in hexadecimal. For this I have configured a Data Point as follows:
    0_1582101233541_ed43f4cf-2467-4530-a20e-ea323b8a20e8-image.png

    According to the Mango documentation, the following can be read:

    *"In addition to the standard DecimalFormat options you can prefix your format with '0x' to imply you want hexidecimal values rendered. This format will truncate the decimal place and requires that you supply the minimum number of places you want rendered. So 0x00 will always render at least 2 values:

    512 = 0x200
    255 = 0xFF
    16.7 = 0x10
    15 = 0x0F"*

    Therefore, if I receive a 15, I expected the value of the data point to take a 0x0F

    However, as seen in the image, the result is a negative value.

    0_1582101156853_32c2c4c3-558a-4996-9c71-b78091933831-image.png

    Am I setting something wrong?

    Thanks!

    posted in How-To read more
  • J
    jcaballeroa

    Yes, it is a very good idea. I had already thought of something similar, in my case I had thought to use Phyton. So that my python app would open a socket against the peripheral and listen to everything it receives, and then send it to Mango through a Virtual Serial Port configured as Server Port.

    Thanks!!

    posted in User help read more
  • J
    jcaballeroa

    @terrypacker

    Thank you very much for your answer.

    The problem is that there is no way to make the peripheral establish the socket towards Mango. For me it is a black box, which I cannot touch, it is a commercial device that I have acquired. And his way of working is that, he expects the remote device (in this case Mango) to establish a client socket by opening the connection and only then begins to send information through this socket (without the need for any command to be sent for it) . We can discuss whether this method is good or bad, but it is the way it works, and it is not possible to change it unfortunately.

    posted in User help read more
  • J
    jcaballeroa

    @MattFox

    Have you tried sending all of this with the wildcard regex and the hex box unchecked?

    Yes, but the result is the same. No Data in log and no data in Data Point.

    @terrypacker

    What version of Mango are you using?
    What is the version of the data source module?

    I have tried in 2 versions of Mango: 3.5.6 and 3.7.4. Now I am using version 3.7.4

    The version of Data Source Module: 3.7.0

    Then the JSON with the requested information:

    {
    "virtualSerialPorts":[
    {
    "xid":"VSP_Client",
    "address":"localhost",
    "port":9000,
    "portName":"1",
    "type":"SERIAL_SOCKET_BRIDGE",
    "timeout":0
    }
    ],
    "dataPoints":[
    {
    "purgePeriod":1,
    "setExtremeLowLimit":-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
    "intervalLoggingType":"INSTANT",
    "dataSourceXid":"DS_e4aa6461-15c2-4f52-8fc8-5deac4ecc66c",
    "discardHighLimit":179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
    "deviceName":"hdfhdh",
    "enabled":true,
    "rollup":"NONE",
    "purgeOverride":false,
    "chartRenderer":{
    "limit":10,
    "type":"TABLE"
    },
    "xid":"DP_97638d3f-6fb2-42dd-bad5-367219b78e98",
    "eventDetectors":[
    ],
    "textRenderer":{
    "useUnitAsSuffix":false,
    "type":"PLAIN",
    "suffix":""
    },
    "loggingType":"ON_CHANGE",
    "overrideIntervalLoggingSamples":false,
    "defaultCacheSize":1,
    "readPermission":"",
    "setPermission":"",
    "intervalLoggingPeriodType":"MINUTES",
    "intervalLoggingSampleWindowSize":0,
    "tolerance":0,
    "purgeType":"YEARS",
    "plotType":"STEP",
    "intervalLoggingPeriod":1,
    "discardExtremeValues":false,
    "tags":{
    },
    "unit":"",
    "pointLocator":{
    "valueIndex":0,
    "dataType":"ALPHANUMERIC",
    "valueRegex":"(.*)",
    "pointIdentifier":""
    },
    "discardLowLimit":-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
    "setExtremeHighLimit":179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
    "name":"pyupyp",
    "chartColour":"",
    "preventSetExtremeValues":false,
    "simplifyType":"NONE"
    }
    ],
    "dataSources":[
    {
    "purgePeriod":1,
    "stopBits":"STOP_BITS_1",
    "parity":"NONE",
    "dataBits":"DATA_BITS_8",
    "type":"SERIAL",
    "flowControlIn":"NONE",
    "enabled":true,
    "logIO":true,
    "purgeOverride":false,
    "xid":"DS_e4aa6461-15c2-4f52-8fc8-5deac4ecc66c",
    "messageRegex":"",
    "hex":false,
    "maxMessageSize":1024,
    "editPermission":"",
    "purgeType":"YEARS",
    "commPortId":"1",
    "maxHistoricalIOLogs":1,
    "baudRate":9600,
    "retries":1,
    "pointIdentifierIndex":0,
    "ioLogFileSizeMBytes":1,
    "messageTerminator":"",
    "alarmLevels":{
    "POINT_READ_PATTERN_MISMATCH_EVENT":"URGENT",
    "POINT_WRITE_EXCEPTION":"URGENT",
    "DATA_SOURCE_EXCEPTION":"URGENT",
    "POINT_READ_EXCEPTION":"URGENT"
    },
    "flowControlOut":"NONE",
    "useTerminator":false,
    "name":"hdfhdh"
    }
    ]
    }

    posted in User help read more