Page 1 of 1

Tag write expression

Posted: Tue Nov 26, 2019 3:31 am
by DeFacto
Hello,

I do try to shift bits left in the tag write expression on iX T7E, but when i input the value into the analog numeric field, the value that PLC gets is always 0. My code looks like that:

Code: Select all

((value - (value%10))<<4)
I have no idea what is wrong.

Re: Tag write expression

Posted: Fri Nov 29, 2019 5:57 am
by tfuk
Have you tried instead of (value << 4) doing (value*16)? Maybe it will get around with variable type issues and get the same results.