EncodeAscii Forum Home › Forums › Understanding the Software › Using Formulas › EncodeAscii This topic has 5 replies, 3 voices, and was last updated 2 years, 10 months ago by Mikhail. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts June 10, 2021 at 8:26 am #9066 JureParticipant I would like to encode value to ASCII. I know that for 2 values you can use EncodeAscii(Val(1) < 1 ? “Off” : “On”). How could I do this for 3 values? June 10, 2021 at 1:35 pm #9070 manjey73Participant A formula in the reference list with an enumeration for example June 10, 2021 at 2:32 pm #9071 MikhailModerator Please explain why do you need it? May be we can find the better solution. June 11, 2021 at 10:51 am #9076 JureParticipant Variable can represent 3 different strings: 0=OFF 1=TČ 2=zemlja June 11, 2021 at 12:26 pm #9077 JureParticipant I made formula: String M8ToString(double val) { if(val == 0.0)return “OFF”; if(val == 1.0)return “TČ”; if(val == 2.0)return “zemlja”; return “error”; } Then in input channels I called it like this: M8ToString(Cnl) but it is still display basic value 0,1,2. June 11, 2021 at 1:06 pm #9079 MikhailModerator You should add strings into a unit table. See “Off-On” for example. String conversion is not needed. Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In