Posted 10 Oct 2020 Hi: How to use data type Word to perform math function without converting to Int or Uint ? -----> Error 26 The '+' operator is not supported by WORD data type. thanks Share this post Link to post Share on other sites
Posted 10 Oct 2020 Can you post a picture of what you are trying to do? Regards, Garry Share this post Link to post Share on other sites
Posted 11 Oct 2020 16 hours ago, gclshortt said: Can you post a picture of what you are trying to do? Regards, Garry WordCounter:=WordCounter+UINT#1; The error :Error 26 The '+' operator is not supported by WORD data type. Share this post Link to post Share on other sites
Posted 11 Oct 2020 (edited) On 10/10/2020 at 0:48 PM, simonongsk said: Hi: How to use data type Word to perform math function without converting to Int or Uint ? -----> Error 26 The '+' operator is not supported by WORD data type. thanks You can't. A WORD datatype is defined as a bit string. So you can only use bitwise operators like AND OR XOR etc. You will need to change the datatype of the variable or convert the variable to an UINT,INT etc. Edited 11 Oct 2020 by chelton Share this post Link to post Share on other sites
Posted 15 Oct 2020 If you read the instructions, you can add data of different types, but the bit string types (BYTE, WORD, DWORD, LWORD) can NOT be added to the integer or real number types. Share this post Link to post Share on other sites