Hello world,
I use "Send SMS" block for sending status information from the technology to users. Time-to-time I am facing a strange situation: When an integer variable inside of SMS has positive sign, everything goes OK. Unfortunately, sometimes there is need to send a negative value. Now there is an interesting situation: In some 50% of cases the value is sent normally (value with negative sign) but in the other cases user gets strange value, looking rather as binary complement of value than as a negative number.
Example of correct SMS:
P 74.0kW, Running OK, Total 279 MWh, Nivo -33mm Zadani -20mm +/-10mm, Nivo start -10mm, Diferencija -707mm, regulacija 1.
Example of incorrect format of SMS:
P 64.0kW, Running OK, Total 281 MWh, Nivo 65518mm Zadani 65516mm +/-10mm, Nivo start 65526mm, Diferencija 64829mm, regulacija 1.
SMS is configured via the "SMS Configuration" block which is called once just after the serial port is properly initialized. I tried to format variables in the SMS as Integer or as Long but the result is exactly the same. Do you know how to make the SMS to be sent correctly?
Thank you in advance, Michal.
(attached file is a screenshot of the SMS Config block)